adlint-3.2.0/0000755000004100000410000000000012224440633013017 5ustar www-datawww-dataadlint-3.2.0/README0000644000004100000410000000471012224440633013701 0ustar www-datawww-data-- ___ ____ __ ___ _________ / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer / /| | / / / / / / / |/ / / / AdLint - Advanced Lint / __ |/ /_/ / /___/ / /| / / / /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. This file is part of AdLint. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see . ++ == \AdLint - Advanced Lint \AdLint is a source code static analyzer. It can point out unreliable or nonportable code fragments, and can measure various quality metrics of the source code. It (currently) can analyze source code compliant with ANSI C89 / ISO C90 and partly ISO C99. For more details, visit our project homepage at <{http\://adlint.sourceforge.net/}[http://adlint.sourceforge.net/]>. == How to Install :include:INSTALL == License Copyright (C) 2010-2013, {OGIS-RI}[http://www.ogis-ri.co.jp/] Co.,Ltd. \AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. \AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with \AdLint. If not, see <{http\://www.gnu.org/licenses/}[http://www.gnu.org/licenses/]>. == Further Reading * {User's Guide (in Japanese)}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/users_guide_ja.html] * {User's Guide (in English)}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/users_guide_en.html] * {Developer's Guide (in Japanese)}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/developers_guide_ja.html] == TODO :include:TODO == Authors :include:AUTHORS adlint-3.2.0/INSTALL0000644000004100000410000000560012224440633014051 0ustar www-datawww-data-- ___ ____ __ ___ _________ / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer / /| | / / / / / / / |/ / / / AdLint - Advanced Lint / __ |/ /_/ / /___/ / /| / / / /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. This file is part of AdLint. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see . ++ === Prerequisites * Ruby 1.9.3-p0 or later for normal use [*mandatory*] * GNU Make 3 or later to use adlintized Makefile [optional but recommended] * Racc 1.4.7 for development [optional] === Installation Setup your Ruby interpreter. Then, you can install \AdLint by following instruction. % gem install adlint === Evaluation Tiny sample C language projects are bundled with \AdLint gem. You can evaluate \AdLint by following instructions. First, copy \`intro_demo' project into your workspace. "+adlint+ +--prefix+" command prints the prefix pathname of the \AdLint installation directory. % cp -r `adlint --prefix`/share/demo/intro_demo . Second, generate configuration files for \AdLint. % cd intro_demo % adlintize Following files will be generated. * [+GNUmakefile+] Automatic analysis Makefile for GNU Make. * [+adlint_traits.yml+] \AdLint configuration file. * [+adlint_pinit.h+] Project specific initial header file. * [+adlint_cinit.h+] Compiler specific initial header file. * [+adlint_all.sh+] Automatic analysis shell script. * [+adlint_all.bat+] Automatic analysis mswin bat file. * [+adlint_files.txt+] List file for sh script and bat file. Finally, do analysis. % make verbose-all adlint --verbose -t adlint_traits.yml -o . intro_demo.c intro_demo.c [fin] |============================| 0.401s intro_demo [fin] |============================| 0.029s 1.125s user, 0.765s system, 00:00:01.89 total Following files will be generated. * [+intro_demo.i+] Preprocessed source of +intro_demo.c+. * [+intro_demo.c.met.csv+] Single module code structure and metric information. * [+intro_demo.c.msg.csv+] Single module warning messages. * [+intro_demo.met.csv+] Cross module metric information. * [+intro_demo.msg.csv+] Cross module warning messages. \`+intro_demo.c.msg.csv+' will tell you that the control will never reach to some statements and that division by zero will occur in \`+intro_demo.c+'. adlint-3.2.0/etc/0000755000004100000410000000000012224440633013572 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/0000755000004100000410000000000012224440633014747 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/c_builtin/0000755000004100000410000000000012224440633016717 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/c_builtin/ja_JP/0000755000004100000410000000000012224440633017702 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/c_builtin/ja_JP/messages.yml0000644000004100000410000032572212224440633022247 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # # Default message catalog of c_builtin examination package for ja_JP locale. # # ********************************* # ***** DO NOT EDIT THIS FILE ***** # ********************************* # # To override default messages, edit `change_list' section of the traits file. # # [Example] # # % tail traits.yml # message_traits: # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the fatal error of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the error of E9999." version: "3.2.0" message_definition: W0001: classes: - "UNC:X99" format: "括弧 `()' のネストの深さが 32 を超えています。このプログラムは、ISO C90 標準規格に厳密に合致していません。" W0002: classes: - "UNC:X99" format: "関数 `%s()' の定義において、識別子と仮引数宣言を分けて記述するのは、古いスタイルです。" W0003: classes: - "UNC:X99" format: "この switch 文には default ラベルが含まれていません。" W0007: classes: - "UNC:X99" format: "直前の case 節あるいは default 節の末尾に、break 文または return 文がありません。" W0010: classes: - "UNC:X99" format: "この三項演算子(条件演算子)のオペランドに副作用があります。" W0013: classes: - "UNC:X99" format: "繰り返し文の中で、continue 文が使用されています。" W0016: classes: - "UNC:X99" format: "変換指定子のフィールド幅が 509 文字を超えています。" W0017: classes: - "UNC:X99" format: "変換指定子のフィールド幅が 509 文字を超えています。" W0018: classes: - "UNC:X99" format: "変換指定子の精度幅が 509 文字を超えています。" W0019: classes: - "UNC:X99" format: "このポインタキャストは、const 修飾を削除しているので危険です。" W0021: classes: - "UNC:X99" format: "このポインタキャストは、volatile 修飾を削除しているので危険です。" W0023: classes: - "UNC:X99" format: "ポインタ型の変数に対して算術演算が行われています。" W0024: classes: - "UNC:X99" format: "ポインタ型の変数に対してインクリメントまたはデクリメントが行われています。" W0025: classes: - "UNC:X99" format: "`%s' は、既にこのファイルから直接インクルードされています。" W0026: classes: - "UNC:X99" format: "`%s' は、既にこのファイルから間接的にインクルードされています。" W0027: classes: - "UNC:X99" format: "ポインタ型の変数に対して比較演算が行われています。" W0028: classes: - "UNC:X99" format: "NULL ポインタに対して間接参照が行われています。" W0030: classes: - "UNC:X99" format: "NULL ポインタに対して算術演算が行われています。" W0031: classes: - "UNC:X99" format: "仮引数 `%s' は、この関数の中で使われていません。" W0033: classes: - "UNC:X99" format: "ラベル `%s:' は、この関数の中で使われていないため、削除することができます。" W0035: classes: - "UNC:X99" format: "`&&' または `||' の右のオペランドは、算術型またはポインタ型でなければなりません。" W0036: classes: - "UNC:X99" format: "宣言子の中の修飾子の数が 12 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0037: classes: - "UNC:X99" format: "構造体または共用体のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0038: classes: - "UNC:X99" format: "オブジェクト `%s' のサイズが 32767 バイトを超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0039: classes: - "UNC:X99" format: "ブロックの中のローカルな識別子の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0040: classes: - "UNC:X99" format: "ビットフィールドが signed または unsigned 付きで宣言されていません。" W0041: classes: - "UNC:X99" format: "構造体または共用体のメンバの数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0042: classes: - "UNC:X99" format: "列挙定数の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0043: classes: - "UNC:X99" format: "配列の初期値が、宣言された配列のサイズに足りません。残りの配列要素はゼロで初期化されます。" W0049: classes: - "UNC:X99" format: "制御構造のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0050: classes: - "UNC:X99" format: "case ラベルの数が 257 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0051: classes: - "UNC:X99" format: "外部識別子 `%s' が他の識別子名と、リンカ特性で指定された文字数の範囲内で区別できません。" W0052: classes: - "UNC:X99" format: "識別子 `%s' が他の識別子名と、コンパイラ特性で指定された文字数の範囲内で区別できません。" W0053: classes: - "UNC:X99" format: "`#include \"%s\"' のネストが 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0054: classes: - "UNC:X99" format: "`#if...' のネストの最大値が 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0055: classes: - "UNC:X99" format: "マクロ定義の数が 1024 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0056: classes: - "UNC:X99" format: "関数形式マクロの仮引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0057: classes: - "UNC:X99" format: "関数形式マクロの呼び出しの実引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0058: classes: - "UNC:X99" format: "文字列リテラルの文字数が 509 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。" W0059: classes: - "UNC:X99" format: "このファイルの行末に Ctrl-M(^M) 制御文字が見つかりました。" W0060: classes: - "UNC:X99" format: "このファイル内に Ctrl-Z(^Z) 制御文字が見つかりました。" W0061: classes: - "UNC:X99" format: "`%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。" W0062: classes: - "UNC:X99" format: "`__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。" W0063: classes: - "UNC:X99" format: "`__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。" W0064: classes: - "UNC:X99" format: "2 進数整数リテラルが使われています。これは言語拡張です。" W0065: classes: - "UNC:X99" format: "代入演算子の左オペランドをキャストしてはなりません。" W0066: classes: - "UNC:X99" format: "`main()' 関数は、`int (void)' または `int (int, char *[])' のどちらかでなければなりません。" W0067: classes: - "UNC:X99" format: "ネストされた構造体のメンバに直接アクセスしています。これは言語拡張です。" W0068: classes: - "UNC:X99" format: "ビットにアクセスするために `.' を使っています。これは言語拡張です。" W0069: classes: - "UNC:X99" format: "`/*' で始まるコメントの中に `/*' が見つかりました。ネストされたコメントは、ISO C 標準規格では認められていません。" W0070: classes: - "UNC:X99" format: "インクルードされている <%s> の内容は翻訳単位の中で全く参照されていません。削除することができます。" W0071: classes: - "UNC:X99" format: "インクルードされている \"%s\" の内容は翻訳単位の中で全く参照されていません。削除することができます。" W0072: classes: - "UNC:X99" format: "基本ソース文字集合に含まれない文字が、ヘッダファイル名で使われています。" W0073: classes: - "UNC:X99" format: "このインクルードファイルには、インクルードガードが記述されていません。" W0076: classes: - "UNC:X99" format: "この 16 進整数リテラルには、接尾語 `U' または `u' が付けられていません。" W0077: classes: - "UNC:X99" format: "接尾語として小文字の `l' が整数または浮動小数点数に付けられています。" W0078: classes: - "UNC:X99" format: "仮引数並びがない関数が宣言されています。" W0079: classes: - "UNC:X99" format: "この配列は、初期値の文字列リテラルの終端文字 `\\0' を保持できません。" W0080: classes: - "UNC:X99" format: "const 修飾されたグローバルオブジェクトが、明示的に初期化されずに定義されています。" W0081: classes: - "UNC:X99" format: "単項演算子 `-' を unsigned int 型、unsigned long 型、unsigned long long 型のオペランドに対して使うと、符号無し型になってしまいます。" W0082: classes: - "UNC:X99" format: "単項演算子 `-' を符号無しの潜在型 `%s' のオペランドに対して使っています。" W0084: classes: - "UNC:X99" format: "このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。" W0085: classes: - "UNC:X99" format: "この文には副作用がありません。誤りのある可能性が高いです。" W0086: classes: - "UNC:X99" format: "三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。" W0087: classes: - "UNC:X99" format: "カンマ演算子の右側の式は、副作用がない冗長な式です。" W0088: classes: - "UNC:X99" format: "論理演算子の右側の式は、副作用がない冗長な式です。" W0093: classes: - "UNC:X99" format: "ゼロになることがある値で除算しています。" W0094: classes: - "UNC:X99" format: "使用不可" W0096: classes: - "UNC:X99" format: "ゼロになる定数式で除算しています。" W0097: classes: - "UNC:X99" format: "ゼロの値で除算しています。" W0100: classes: - "UNC:X99" format: "変数 `%s' は初期値を設定後に再代入されません。変数を const 付きで初期値を指定して定義できる可能性があります。" W0101: classes: - "UNC:X99" format: "自動変数のアドレスが、より長い寿命を持つポインタに代入されています。このプログラムは危険です。" W0102: classes: - "UNC:X99" format: "自動変数のアドレスが、関数の仮引数を介して戻されています。このプログラムは危険です。" W0103: classes: - "UNC:X99" format: "自動変数のアドレスが、戻り値として関数から返されています。このプログラムは危険です。" W0104: classes: - "UNC:X99" format: "仮引数 `%s' は値が変わりません。const 付きで宣言できる可能性があります。" W0105: classes: - "UNC:X99" format: "ポインタ仮引数 `%s' が指しているオブジェクトは関数内で変わらないので、const オブジェクトを指すポインタ型として宣言できる可能性があります。" W0107: classes: - "UNC:X99" format: "自動変数のアドレスが、static 付きローカルポインタに代入されています。このプログラムは危険です。" W0108: classes: - "UNC:X99" format: "代入演算子が論理演算式の中で使われています。" W0109: classes: - "UNC:X99" format: "この関数の宣言が見つかりません。省略されたものとみなし、`extern int %s()' を挿入します。" W0110: classes: - "UNC:X99" format: "浮動小数点型の変数が for 文のループカウンタとして使われています。" W0112: classes: - "UNC:X99" format: "浮動小数点の式を等価演算子で比較しています。" W0114: classes: - "UNC:X99" format: "この制御式は明示的な論理演算ではありません。" W0115: classes: - "UNC:X99" format: "符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。" W0116: classes: - "UNC:X99" format: "符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。" W0117: classes: - "UNC:X99" format: "`%s' の定義は外部結合を持ちますが、定義より前にその宣言がありません。" W0118: classes: - "UNC:X99" format: "外部結合を持つ `%s' の宣言が、ヘッダファイルの中にありません。" W0119: classes: - "UNC:X99" format: "暗黙的に char 型から signed char 型に型変換されています。" W0120: classes: - "UNC:X99" format: "暗黙的に char 型から unsigned char 型に型変換されています。" W0121: classes: - "UNC:X99" format: "暗黙的に char 型から signed short 型に型変換されています。" W0122: classes: - "UNC:X99" format: "暗黙的に char 型から unsigned short 型に型変換されています。" W0123: classes: - "UNC:X99" format: "暗黙的に char 型から signed int 型に型変換されています。" W0124: classes: - "UNC:X99" format: "暗黙的に char 型から unsigned int 型に型変換されています。" W0125: classes: - "UNC:X99" format: "暗黙的に char 型から signed long 型に型変換されています。" W0126: classes: - "UNC:X99" format: "暗黙的に char 型から unsigned long 型に型変換されています。" W0127: classes: - "UNC:X99" format: "暗黙的に char 型から float 型に型変換されています。" W0128: classes: - "UNC:X99" format: "暗黙的に char 型から double 型に型変換されています。" W0129: classes: - "UNC:X99" format: "暗黙的に char 型から long double 型に型変換されています。" W0130: classes: - "UNC:X99" format: "暗黙的に char 型から signed long long 型に型変換されています。" W0131: classes: - "UNC:X99" format: "暗黙的に char 型から unsigned long long 型に型変換されています。" W0132: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から char 型に型変換されています。" W0133: classes: - "UNC:X99" format: "暗黙的に signed char 型から char 型に型変換されています。" W0134: classes: - "UNC:X99" format: "暗黙的に signed short 型から char 型に型変換されています。" W0135: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から char 型に型変換されています。" W0136: classes: - "UNC:X99" format: "暗黙的に signed int 型から char 型に型変換されています。" W0137: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から char 型に型変換されています。" W0138: classes: - "UNC:X99" format: "暗黙的に signed long 型から char 型に型変換されています。" W0139: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から char 型に型変換されています。" W0140: classes: - "UNC:X99" format: "暗黙的に signed long long 型から char 型に型変換されています。" W0141: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から char 型に型変換されています。" W0142: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から signed char 型に型変換されています。" W0143: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から signed char 型に型変換されています。" W0144: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から signed short 型に型変換されています。" W0145: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から signed char 型に型変換されています。" W0146: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から signed short 型に型変換されています。" W0147: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から signed int 型に型変換されています。" W0148: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から signed char 型に型変換されています。" W0149: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から signed short 型に型変換されています。" W0150: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から signed int 型に型変換されています。" W0151: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から signed long 型に型変換されています。" W0152: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から signed char 型に型変換されています。" W0153: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から signed short 型に型変換されています。" W0154: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から signed int 型に型変換されています。" W0155: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から signed long 型に型変換されています。" W0156: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から signed long long 型に型変換されています。" W0157: classes: - "UNC:X99" format: "暗黙的に signed char 型から unsigned char 型に型変換されています。" W0158: classes: - "UNC:X99" format: "暗黙的に signed char 型から unsigned short 型に型変換されています。" W0159: classes: - "UNC:X99" format: "暗黙的に signed char 型から unsigned int 型に型変換されています。" W0160: classes: - "UNC:X99" format: "暗黙的に signed char 型から unsigned long 型に型変換されています。" W0161: classes: - "UNC:X99" format: "暗黙的に signed short 型から unsigned char 型に型変換されています。" W0162: classes: - "UNC:X99" format: "暗黙的に signed short 型から unsigned short 型に型変換されています。" W0163: classes: - "UNC:X99" format: "暗黙的に signed short 型から unsigned int 型に型変換されています。" W0164: classes: - "UNC:X99" format: "暗黙的に signed short 型から unsigned long 型に型変換されています。" W0165: classes: - "UNC:X99" format: "暗黙的に signed int 型から unsigned char 型に型変換されています。" W0166: classes: - "UNC:X99" format: "暗黙的に signed int 型から unsigned short 型に型変換されています。" W0167: classes: - "UNC:X99" format: "暗黙的に signed int 型から unsigned int 型に型変換されています。" W0168: classes: - "UNC:X99" format: "暗黙的に signed int 型から unsigned long 型に型変換されています。" W0169: classes: - "UNC:X99" format: "暗黙的に signed long 型から unsigned char 型に型変換されています。" W0170: classes: - "UNC:X99" format: "暗黙的に signed long 型から unsigned short 型に型変換されています。" W0171: classes: - "UNC:X99" format: "暗黙的に signed long 型から unsigned int 型に型変換されています。" W0172: classes: - "UNC:X99" format: "暗黙的に signed long 型から unsigned long 型に型変換されています。" W0173: classes: - "UNC:X99" format: "暗黙的に signed char 型から unsigned long long 型に型変換されています。" W0174: classes: - "UNC:X99" format: "暗黙的に singed short 型から unsigned long long 型に型変換されています。" W0175: classes: - "UNC:X99" format: "暗黙的に signed int 型から unsigned long long 型に型変換されています。" W0176: classes: - "UNC:X99" format: "暗黙的に signed long 型から unsigned long long 型に型変換されています。" W0177: classes: - "UNC:X99" format: "暗黙的に signed long long 型から unsigned char 型に型変換されています。" W0178: classes: - "UNC:X99" format: "暗黙的に signed long long 型から unsigned short 型に型変換されています。" W0179: classes: - "UNC:X99" format: "暗黙的に signed long long 型から unsigned int 型に型変換されています。" W0180: classes: - "UNC:X99" format: "暗黙的に signed long long 型から unsigned long 型に型変換されています。" W0181: classes: - "UNC:X99" format: "暗黙的に signed long long 型から unsigned long long 型に型変換されています。" W0182: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から float 型に型変換されています。" W0183: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から double 型に型変換されています。" W0184: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から long double 型に型変換されています。" W0185: classes: - "UNC:X99" format: "暗黙的に signed char 型から float 型に型変換されています。" W0186: classes: - "UNC:X99" format: "暗黙的に signed char 型から double 型に型変換されています。" W0187: classes: - "UNC:X99" format: "暗黙的に signed char 型から long double 型に型変換されています。" W0188: classes: - "UNC:X99" format: "暗黙的に signed short 型から float 型に型変換されています。" W0189: classes: - "UNC:X99" format: "暗黙的に signed short 型から double 型に型変換されています。" W0190: classes: - "UNC:X99" format: "暗黙的に signed short 型から long double 型に型変換されています。" W0191: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から float 型に型変換されています。" W0192: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から double 型に型変換されています。" W0193: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から long double 型に型変換されています。" W0194: classes: - "UNC:X99" format: "暗黙的に signed int 型から float 型に型変換されています。" W0195: classes: - "UNC:X99" format: "暗黙的に signed int 型から double 型に型変換されています。" W0196: classes: - "UNC:X99" format: "暗黙的に signed int 型から long double 型に型変換されています。" W0197: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から float 型に型変換されています。" W0198: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から double 型に型変換されています。" W0199: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から long double 型に型変換されています。" W0200: classes: - "UNC:X99" format: "暗黙的に signed long 型から float 型に型変換されています。" W0201: classes: - "UNC:X99" format: "暗黙的に signed long 型から double 型に型変換されています。" W0202: classes: - "UNC:X99" format: "暗黙的に signed long 型から long double 型に型変換されています。" W0203: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から float 型に型変換されています。" W0204: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から double 型に型変換されています。" W0205: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から long double 型に型変換されています。" W0206: classes: - "UNC:X99" format: "暗黙的に signed long long 型から float 型に型変換されています。" W0207: classes: - "UNC:X99" format: "暗黙的に signed long long 型から double 型に型変換されています。" W0208: classes: - "UNC:X99" format: "暗黙的に signed long long 型から long double 型に型変換されています。" W0209: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から float 型に型変換されています。" W0210: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から double 型に型変換されています。" W0211: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から long double 型に型変換されています。" W0212: classes: - "UNC:X99" format: "暗黙的に float 型から char 型に型変換されています。" W0213: classes: - "UNC:X99" format: "暗黙的に float 型から signed char 型に型変換されています。" W0214: classes: - "UNC:X99" format: "暗黙的に float 型から unsigned char 型に型変換されています。" W0215: classes: - "UNC:X99" format: "暗黙的に float 型から signed short 型に型変換されています。" W0216: classes: - "UNC:X99" format: "暗黙的に float 型から unsigned short 型に型変換されています。" W0217: classes: - "UNC:X99" format: "暗黙的に float 型から signed int 型に型変換されています。" W0218: classes: - "UNC:X99" format: "暗黙的に float 型から unsigned int 型に型変換されています。" W0219: classes: - "UNC:X99" format: "暗黙的に float 型から signed long 型に型変換されています。" W0220: classes: - "UNC:X99" format: "暗黙的に float 型から unsigned long 型に型変換されています。" W0221: classes: - "UNC:X99" format: "暗黙的に double 型から char 型に型変換されています。" W0222: classes: - "UNC:X99" format: "暗黙的に double 型から signed char 型に型変換されています。" W0223: classes: - "UNC:X99" format: "暗黙的に double 型から unsigned char 型に型変換されています。" W0224: classes: - "UNC:X99" format: "暗黙的に double 型から signed short 型に型変換されています。" W0225: classes: - "UNC:X99" format: "暗黙的に double 型から unsigned short 型に型変換されています。" W0226: classes: - "UNC:X99" format: "暗黙的に double 型から signed int 型に型変換されています。" W0227: classes: - "UNC:X99" format: "暗黙的に double 型から unsigned int 型に型変換されています。" W0228: classes: - "UNC:X99" format: "暗黙的に double 型から signed long 型に型変換されています。" W0229: classes: - "UNC:X99" format: "暗黙的に double 型から unsigned long 型に型変換されています。" W0230: classes: - "UNC:X99" format: "暗黙的に long double 型から char 型に型変換されています。" W0231: classes: - "UNC:X99" format: "暗黙的に long double 型から signed char 型に型変換されています。" W0232: classes: - "UNC:X99" format: "暗黙的に long double 型から unsigned char 型に型変換されています。" W0233: classes: - "UNC:X99" format: "暗黙的に long double 型から signed short 型に型変換されています。" W0234: classes: - "UNC:X99" format: "暗黙的に long double 型から unsigned short 型に型変換されています。" W0235: classes: - "UNC:X99" format: "暗黙的に long double 型から signed int 型に型変換されています。" W0236: classes: - "UNC:X99" format: "暗黙的に long double 型から unsigned int 型に型変換されています。" W0237: classes: - "UNC:X99" format: "暗黙的に long double 型から signed long 型に型変換されています。" W0238: classes: - "UNC:X99" format: "暗黙的に long double 型から unsigned long 型に型変換されています。" W0239: classes: - "UNC:X99" format: "暗黙的に float 型から signed long long 型に型変換されています。" W0240: classes: - "UNC:X99" format: "暗黙的に float 型から unsigned long long 型に型変換されています。" W0241: classes: - "UNC:X99" format: "暗黙的に double 型から signed long long 型に型変換されています。" W0242: classes: - "UNC:X99" format: "暗黙的に double 型から unsigned long long 型に型変換されています。" W0243: classes: - "UNC:X99" format: "暗黙的に long double 型から signed long long 型に型変換されています。" W0244: classes: - "UNC:X99" format: "暗黙的に long double 型から unsigned long long 型に型変換されています。" W0245: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から signed short 型に型変換されています。" W0246: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から signed int 型に型変換されています。" W0247: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から signed long 型に型変換されています。" W0248: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から signed int 型に型変換されています。" W0249: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から signed long 型に型変換されています。" W0250: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から signed long 型に型変換されています。" W0251: classes: - "UNC:X99" format: "暗黙的に unsigned char 型から signed long long 型に型変換されています。" W0252: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から signed long long 型に型変換されています。" W0253: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から signed long long 型に型変換されています。" W0254: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から signed long long 型に型変換されています。" W0255: classes: - "UNC:X99" format: "char 型の値が関数 `signed char %s()' から返されています。" W0256: classes: - "UNC:X99" format: "char 型の値が関数 `unsigned char %s()' から返されています。" W0257: classes: - "UNC:X99" format: "char 型の値が関数 `signed short %s()' から返されています。" W0258: classes: - "UNC:X99" format: "char 型の値が関数 `unsigned short %s()' から返されています。" W0259: classes: - "UNC:X99" format: "char 型の値が関数 `signed int %s()' から返されています。" W0260: classes: - "UNC:X99" format: "char 型の値が関数 `unsigned int %s()' から返されています。" W0261: classes: - "UNC:X99" format: "char 型の値が関数 `signed long %s()' から返されています。" W0262: classes: - "UNC:X99" format: "char 型の値が関数 `unsigned long %s()' から返されています。" W0263: classes: - "UNC:X99" format: "char 型の値が関数 `float %s()' から返されています。" W0264: classes: - "UNC:X99" format: "char 型の値が関数 `double %s()' から返されています。" W0265: classes: - "UNC:X99" format: "char 型の値が関数 `long double %s()' から返されています。" W0266: classes: - "UNC:X99" format: "char 型の値が関数 `signed long long %s()' から返されています。" W0267: classes: - "UNC:X99" format: "char 型の値が関数 `unsigned long long %s()' から返されています。" W0268: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `char %s()' から返されています。" W0269: classes: - "UNC:X99" format: "signed char 型の値が関数 `char %s()' から返されています。" W0270: classes: - "UNC:X99" format: "signed short 型の値が関数 `char %s()' から返されています。" W0271: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `char %s()' から返されています。" W0272: classes: - "UNC:X99" format: "signed int 型の値が関数 `char %s()' から返されています。" W0273: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `char %s()' から返されています。" W0274: classes: - "UNC:X99" format: "signed long 型の値が関数 `char %s()' から返されています。" W0275: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `char %s()' から返されています。" W0276: classes: - "UNC:X99" format: "signed long long 型の値が関数 `char %s()' から返されています。" W0277: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `char %s()' から返されています。" W0278: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `signed char %s()' から返されています。" W0279: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `signed char %s()' から返されています。" W0280: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `signed short %s()' から返されています。" W0281: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `signed char %s()' から返されています。" W0282: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `signed short %s()' から返されています。" W0283: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `signed int %s()' から返されています。" W0284: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `signed char %s()' から返されています。" W0285: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `signed short %s()' から返されています。" W0286: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `signed int %s()' から返されています。" W0287: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `signed long %s()' から返されています。" W0288: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `signed char %s()' から返されています。" W0289: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `signed short %s()' から返されています。" W0290: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `signed int %s()' から返されています。" W0291: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `signed long %s()' から返されています。" W0292: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `signed long long %s()' から返されています。" W0293: classes: - "UNC:X99" format: "signed char 型の値が関数 `unsigned char %s()' から返されています。" W0294: classes: - "UNC:X99" format: "signed char 型の値が関数 `unsigned short %s()' から返されています。" W0295: classes: - "UNC:X99" format: "signed char 型の値が関数 `unsigned int %s()' から返されています。" W0296: classes: - "UNC:X99" format: "signed char 型の値が関数 `unsigned long %s()' から返されています。" W0297: classes: - "UNC:X99" format: "signed short 型の値が関数 `unsigned char %s()' から返されています。" W0298: classes: - "UNC:X99" format: "signed short 型の値が関数 `unsigned short %s()' から返されています。" W0299: classes: - "UNC:X99" format: "signed short 型の値が関数 `unsigned int %s()' から返されています。" W0300: classes: - "UNC:X99" format: "signed short 型の値が関数 `unsigned long %s()' から返されています。" W0301: classes: - "UNC:X99" format: "signed int 型の値が関数 `unsigned char %s()' から返されています。" W0302: classes: - "UNC:X99" format: "signed int 型の値が関数 `unsigned short %s()' から返されています。" W0303: classes: - "UNC:X99" format: "signed int 型の値が関数 `unsigned int %s()' から返されています。" W0304: classes: - "UNC:X99" format: "signed int 型の値が関数 `unsigned long %s()' から返されています。" W0305: classes: - "UNC:X99" format: "signed long 型の値が関数 `unsigned char %s()' から返されています。" W0306: classes: - "UNC:X99" format: "signed long 型の値が関数 `unsigned short %s()' から返されています。" W0307: classes: - "UNC:X99" format: "signed long 型の値が関数 `unsigned int %s()' から返されています。" W0308: classes: - "UNC:X99" format: "signed long 型の値が関数 `unsigned long %s()' から返されています。" W0309: classes: - "UNC:X99" format: "signed char 型の値が関数 `unsigned long long %s()' から返されています。" W0310: classes: - "UNC:X99" format: "signed short 型の値が関数 `unsigned long long %s()' から返されています。" W0311: classes: - "UNC:X99" format: "signed int 型の値が関数 `unsigned long long %s()' から返されています。" W0312: classes: - "UNC:X99" format: "signed long 型の値が関数 `unsigned long long %s()' から返されています。" W0313: classes: - "UNC:X99" format: "signed long long 型の値が関数 `unsigned char %s()' から返されています。" W0314: classes: - "UNC:X99" format: "signed long long 型の値が関数 `unsigned short %s()' から返されています。" W0315: classes: - "UNC:X99" format: "signed long long 型の値が関数 `unsigned int %s()' から返されています。" W0316: classes: - "UNC:X99" format: "signed long long 型の値が関数 `unsigned long %s()' から返されています。" W0317: classes: - "UNC:X99" format: "signed long long 型の値が関数 `unsigned long long %s()' から返されています。" W0318: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `float %s()' から返されています。" W0319: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `double %s()' から返されています。" W0320: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `long double %s()' から返されています。" W0321: classes: - "UNC:X99" format: "signed char 型の値が関数 `float %s()' から返されています。" W0322: classes: - "UNC:X99" format: "signed char 型の値が関数 `double %s()' から返されています。" W0323: classes: - "UNC:X99" format: "signed char 型の値が関数 `long double %s()' から返されています。" W0324: classes: - "UNC:X99" format: "signed short 型の値が関数 `float %s()' から返されています。" W0325: classes: - "UNC:X99" format: "signed short 型の値が関数 `double %s()' から返されています。" W0326: classes: - "UNC:X99" format: "signed short 型の値が関数 `long double %s()' から返されています。" W0327: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `float %s()' から返されています。" W0328: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `double %s()' から返されています。" W0329: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `long double %s()' から返されています。" W0330: classes: - "UNC:X99" format: "signed int 型の値が関数 `float %s()' から返されています。" W0331: classes: - "UNC:X99" format: "signed int 型の値が関数 `double %s()' から返されています。" W0332: classes: - "UNC:X99" format: "signed int 型の値が関数 `long double %s()' から返されています。" W0333: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `float %s()' から返されています。" W0334: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `double %s()' から返されています。" W0335: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `long double %s()' から返されています。" W0336: classes: - "UNC:X99" format: "signed long 型の値が関数 `float %s()' から返されています。" W0337: classes: - "UNC:X99" format: "signed long 型の値が関数 `double %s()' から返されています。" W0338: classes: - "UNC:X99" format: "signed long 型の値が関数 `long double %s()' から返されています。" W0339: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `float %s()' から返されています。" W0340: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `double %s()' から返されています。" W0341: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `long double %s()' から返されています。" W0342: classes: - "UNC:X99" format: "signed long long 型の値が関数 `float %s()' から返されています。" W0343: classes: - "UNC:X99" format: "signed long long 型の値が関数 `double %s()' から返されています。" W0344: classes: - "UNC:X99" format: "signed long long 型の値が関数 `long double %s()' から返されています。" W0345: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `float %s()' から返されています。" W0346: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `double %s()' から返されています。" W0347: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `long double %s()' から返されています。" W0348: classes: - "UNC:X99" format: "float 型の値が関数 `char %s()' から返されています。" W0349: classes: - "UNC:X99" format: "float 型の値が関数 `signed char %s()' から返されています。" W0350: classes: - "UNC:X99" format: "float 型の値が関数 `unsigned char %s()' から返されています。" W0351: classes: - "UNC:X99" format: "float 型の値が関数 `signed short %s()' から返されています。" W0352: classes: - "UNC:X99" format: "float 型の値が関数 `unsigned short %s()' から返されています。" W0353: classes: - "UNC:X99" format: "float 型の値が関数 `signed int %s()' から返されています。" W0354: classes: - "UNC:X99" format: "float 型の値が関数 `unsigned int %s()' から返されています。" W0355: classes: - "UNC:X99" format: "float 型の値が関数 `signed long %s()' から返されています。" W0356: classes: - "UNC:X99" format: "float 型の値が関数 `unsigned long %s()' から返されています。" W0357: classes: - "UNC:X99" format: "double 型の値が関数 `char %s()' から返されています。" W0358: classes: - "UNC:X99" format: "double 型の値が関数 `signed char %s()' から返されています。" W0359: classes: - "UNC:X99" format: "double 型の値が関数 `unsigned char %s()' から返されています。" W0360: classes: - "UNC:X99" format: "double 型の値が関数 `signed short %s()' から返されています。" W0361: classes: - "UNC:X99" format: "double 型の値が関数 `unsigned short %s()' から返されています。" W0362: classes: - "UNC:X99" format: "double 型の値が関数 `signed int %s()' から返されています。" W0363: classes: - "UNC:X99" format: "double 型の値が関数 `unsigned int %s()' から返されています。" W0364: classes: - "UNC:X99" format: "double 型の値が関数 `signed long %s()' から返されています。" W0365: classes: - "UNC:X99" format: "double 型の値が関数 `unsigned long %s()' から返されています。" W0366: classes: - "UNC:X99" format: "long double 型の値が関数 `char %s()' から返されています。" W0367: classes: - "UNC:X99" format: "long double 型の値が関数 `signed char %s()' から返されています。" W0368: classes: - "UNC:X99" format: "long double 型の値が関数 `unsigned char %s()' から返されています。" W0369: classes: - "UNC:X99" format: "long double 型の値が関数 `signed short %s()' から返されています。" W0370: classes: - "UNC:X99" format: "long double 型の値が関数 `unsigned short %s()' から返されています。" W0371: classes: - "UNC:X99" format: "long double 型の値が関数 `signed int %s()' から返されています。" W0372: classes: - "UNC:X99" format: "long double 型の値が関数 `unsigned int %s()' から返されています。" W0373: classes: - "UNC:X99" format: "long double 型の値が関数 `signed long %s()' から返されています。" W0374: classes: - "UNC:X99" format: "long double 型の値が関数 `unsigned long %s()' から返されています。" W0375: classes: - "UNC:X99" format: "float 型の値が関数 `signed long long %s()' から返されています。" W0376: classes: - "UNC:X99" format: "float 型の値が関数 `unsigned long long %s()' から返されています。" W0377: classes: - "UNC:X99" format: "double 型の値が関数 `signed long long %s()' から返されています。" W0378: classes: - "UNC:X99" format: "double 型の値が関数 `unsigned long long %s()' から返されています。" W0379: classes: - "UNC:X99" format: "long double 型の値が関数 `signed long long %s()' から返されています。" W0380: classes: - "UNC:X99" format: "long double 型の値が関数 `unsigned long long %s()' から返されています。" W0381: classes: - "UNC:X99" format: "signed short 型の値が関数 `signed char %s()' から返されています。" W0382: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `unsigned char %s()' から返されています。" W0383: classes: - "UNC:X99" format: "signed int 型の値が関数 `signed char %s()' から返されています。" W0384: classes: - "UNC:X99" format: "signed int 型の値が関数 `signed short %s()' から返されています。" W0385: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `unsigned char %s()' から返されています。" W0386: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `unsigned short %s()' から返されています。" W0387: classes: - "UNC:X99" format: "signed long 型の値が関数 `signed char %s()' から返されています。" W0388: classes: - "UNC:X99" format: "signed long 型の値が関数 `signed short %s()' から返されています。" W0389: classes: - "UNC:X99" format: "signed long 型の値が関数 `signed int %s()' から返されています。" W0390: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `unsigned char %s()' から返されています。" W0391: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `unsigned short %s()' から返されています。" W0392: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `unsigned int %s()' から返されています。" W0393: classes: - "UNC:X99" format: "signed long long 型の値が関数 `signed char %s()' から返されています。" W0394: classes: - "UNC:X99" format: "signed long long 型の値が関数 `signed short %s()' から返されています。" W0395: classes: - "UNC:X99" format: "signed long long 型の値が関数 `signed int %s()' から返されています。" W0396: classes: - "UNC:X99" format: "signed long long 型の値が関数 `signed long %s()' から返されています。" W0397: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `unsigned char %s()' から返されています。" W0398: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `unsigned short %s()' から返されています。" W0399: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `unsigned int %s()' から返されています。" W0400: classes: - "UNC:X99" format: "unsigned long long 型の値が関数 `unsigned long %s()' から返されています。" W0401: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `signed short %s()' から返されています。" W0402: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `signed int %s()' から返されています。" W0403: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `signed long %s()' から返されています。" W0404: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `signed int %s()' から返されています。" W0405: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `signed long %s()' から返されています。" W0406: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `signed long %s()' から返されています。" W0407: classes: - "UNC:X99" format: "unsigned char 型の値が関数 `signed long long %s()' から返されています。" W0408: classes: - "UNC:X99" format: "unsigned short 型の値が関数 `signed long long %s()' から返されています。" W0409: classes: - "UNC:X99" format: "unsigned int 型の値が関数 `signed long long %s()' から返されています。" W0410: classes: - "UNC:X99" format: "unsigned long 型の値が関数 `signed long long %s()' から返されています。" W0411: classes: - "UNC:X99" format: "列挙体は、最初だけ初期化するか、全てを初期化するか、全く初期化しないかのいずれかにしてください。" W0413: classes: - "UNC:X99" format: "制御文の本体が `{}' で囲まれたブロックになっていません。" W0414: classes: - "UNC:X99" format: "制御文の本体が同じ行にあり、`{}' で囲まれたブロックになっていません。" W0421: classes: - "UNC:X99" format: "値が NULL になるポインタに対して間接参照が行われています。" W0422: classes: - "UNC:X99" format: "値が NULL になることがあるポインタに対して間接参照が行われています。" W0423: classes: - "UNC:X99" format: "値が NULL になるポインタに対して算術演算を行っています。" W0424: classes: - "UNC:X99" format: "値が NULL になることがあるポインタに対して算術演算を行っています。" W0425: classes: - "UNC:X99" format: "一つの行に複数の宣言または文が存在します。" W0431: classes: - "UNC:X99" format: "この行は以前の同じ深さのインデントより左にずれています。" W0432: classes: - "UNC:X99" format: "この行はプロジェクトのインデントスタイルと合っていません。" W0440: classes: - "UNC:X99" format: "この閉じカッコ `}' は、対応する開きカッコ `{' に合うようなインデントに置かれていません。" W0441: classes: - "UNC:X99" format: "接尾辞がない整数リテラルの型が、int 型ではありません。" W0442: classes: - "UNC:X99" format: "関数形式マクロが定義されています。" W0443: classes: - "UNC:X99" format: "この関数形式マクロは関数で置き換えることができる可能性があります。" W0444: classes: - "UNC:X99" format: "`#' 演算子と `##' 演算子が一つのマクロ定義内で使われています。" W0445: classes: - "UNC:X99" format: "複数の `##' 演算子が一つのマクロ定義内で使われています。" W0446: classes: - "UNC:X99" format: "代入演算の結果値が使われています。" W0447: classes: - "UNC:X99" format: "カンマ演算子が for 文の制御式以外で使われています。" W0456: classes: - "UNC:X99" format: "外部結合を持つオブジェクトあるいは関数 `%s' が、ヘッダファイル内で定義されています。" W0457: classes: - "UNC:X99" format: "関数の宣言あるいは定義で、戻り値型が明示的に定義されていないので、暗黙的に int 型と定義されます。" W0458: classes: - "UNC:X99" format: "オブジェクトの宣言あるいは定義で、型が明示的に定義されていないので、暗黙的に int 型と定義されます。" W0459: classes: - "UNC:X99" format: "変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。" W0460: classes: - "UNC:X99" format: "変数 `%s' の値は、この式の評価時点では設定されていないことがあります。" W0461: classes: - "UNC:X99" format: "値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。" W0462: classes: - "UNC:X99" format: "値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。" W0463: classes: - "UNC:X99" format: "使用不可" W0464: classes: - "UNC:X99" format: "使用不可" W0477: classes: - "UNC:X99" format: "マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。" W0478: classes: - "UNC:X99" format: "このマクロは、認識不可能なコードの断片を定義しています。" W0479: classes: - "UNC:X99" format: "このマクロ定義は typedef 宣言に置換することができます。" W0480: classes: - "UNC:X99" format: "このマクロは、制御文のキーワード、あるいは句読文字を定義しています。" W0481: classes: - "UNC:X99" format: "このマクロは、`{}' で囲まれたブロックを定義しています。" W0482: classes: - "UNC:X99" format: "このマクロは、いずれかの型指定子を定義しています。" W0483: classes: - "UNC:X99" format: "このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。" W0488: classes: - "UNC:X99" format: "関数呼び出し `()'、配列添字演算 `[]'、あるいは構造体/共用体メンバ演算 `->' または `.' が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。" W0489: classes: - "UNC:X99" format: "単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。" W0490: classes: - "UNC:X99" format: "二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。" W0491: classes: - "UNC:X99" format: "同じ識別子名 `%s' は他の名前空間内の宣言でも使われています。" W0492: classes: - "UNC:X99" format: "同じ識別子名 `%s' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。" W0493: classes: - "UNC:X99" format: "構造体あるいは共用体の値を関数の実引数として渡しています。" W0495: classes: - "UNC:X99" format: "演算子 %% が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。" W0496: classes: - "UNC:X99" format: "三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。" W0497: classes: - "UNC:X99" format: "シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。" W0498: classes: - "UNC:X99" format: "二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。" W0499: classes: - "UNC:X99" format: "+ - * / %% 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。" W0500: classes: - "UNC:X99" format: "二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。" W0501: classes: - "UNC:X99" format: "三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。" W0502: classes: - "UNC:X99" format: "+ - * / %% 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。" W0508: classes: - "UNC:X99" format: "`&&' あるいは `||' 演算子の右オペランドに副作用があります。" W0511: classes: - "UNC:X99" format: "C++ コメント `//' が使われています。" W0512: classes: - "UNC:X99" format: "`++' あるいは `--' 演算子の結果が式の中で使われています。" W0525: classes: - "UNC:X99" format: "1 ビットの名前が付いたフィールドが符号付き型として宣言されています。" W0528: classes: - "UNC:X99" format: "このマクロは、8 進数定数を定義しています。" W0529: classes: - "UNC:X99" format: "8 進数リテラルが使われています。" W0530: classes: - "UNC:X99" format: "文字定数または文字列リテラルの中で、8 進拡張表記が使われています。" W0532: classes: - "UNC:X99" format: "switch 文の case 節、default 節から出るために break 文が使われていますが、case 節の末尾に記述されていません。" W0534: classes: - "UNC:X99" format: "制御変数 `%s' は、この for 文制御式で初期化されていません。" W0535: classes: - "UNC:X99" format: "for 文の制御式の中にカンマ演算子が使われています。" W0538: classes: - "UNC:X99" format: "この default ラベルは、switch 文内の最後のラベルではありません。" W0540: classes: - "UNC:X99" format: "空の仮引数並びの関数が定義されています。`void' が省略されています。" W0541: classes: - "UNC:X99" format: "マクロで隠蔽されないインラインアセンブリコードです。" W0542: classes: - "UNC:X99" format: "関数宣言の仮引数の一部にのみ識別子が存在します。" W0543: classes: - "UNC:X99" format: "この関数宣言における仮引数の識別子は、以前の宣言の仮引数の識別子と異なります。" W0544: classes: - "UNC:X99" format: "関数宣言の仮引数の識別子と関数ポインタの宣言の仮引数の識別子が異なります。" W0546: classes: - "UNC:X99" format: "switch 文の case ラベルあるいは default ラベルが、ネストされたブロックの中に存在します。" W0549: classes: - "UNC:X99" format: "マクロの仮引数が `()' で囲まれていません。" W0551: classes: - "UNC:X99" format: "共用体型指定子が定義されています。" W0552: classes: - "UNC:X99" format: "共用体型のオブジェクトが定義されています。" W0553: classes: - "UNC:X99" format: "関数を指すポインタが、異なる関数ポインタ型へキャストされています。" W0554: classes: - "UNC:X99" format: "`#pragma' の実引数 `%s' は認識できません。この `#pragma' 指令は無視されました。" W0555: classes: - "UNC:X99" format: "この関数はプロジェクト中で間接的に再帰呼び出しされています。" W0556: classes: - "UNC:X99" format: "この呼び出しを含む関数は、再帰呼び出しされています。" W0559: classes: - "UNC:X99" format: "`!' 演算子のオペランドが算術演算あるいはビット演算の式になっています。" W0560: classes: - "UNC:X99" format: "`~' 演算子のオペランドがブール型式になっています。" W0561: classes: - "UNC:X99" format: "`*p++' の意味は、`(*p)++' ではなく、`*(p++)' です。`*' 演算子は冗長です。" W0562: classes: - "UNC:X99" format: "初期化子の中に余分な `{}' があります。" W0563: classes: - "UNC:X99" format: "このブロックの外側からラベル `%s' へジャンプした場合、ローカル変数は初期化されません。" W0564: classes: - "UNC:X99" format: "この goto 文がラベル `%s' へジャンプした場合、ローカル変数は初期化されません。" W0565: classes: - "UNC:X99" format: "汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。" W0566: classes: - "UNC:X99" format: "汎整数型を関数ポインタ型(またはその逆)へキャストしています。" W0567: classes: - "UNC:X99" format: "汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。" W0568: classes: - "UNC:X99" format: "符号付き定数式の値を左シフト演算した結果は、未定義になります。" W0569: classes: - "UNC:X99" format: "符号付きの式の値を左シフト演算した結果は、未定義になります。" W0570: classes: - "UNC:X99" format: "符号付きの式の値を左シフト演算した結果は、未定義になることがあります。" W0571: classes: - "UNC:X99" format: "符号付きデータの右シフト演算には、処理系によって論理シフトと算術シフトの両方の可能性があります。" W0572: classes: - "UNC:X99" format: "符号付きのデータに対するビット演算は処理系定義の結果になります。" W0573: classes: - "UNC:X99" format: "`[]' 内の走査セットの `-' 文字は、処理系定義になります。" W0574: classes: - "UNC:X99" format: "基本ソース文字集合に含まれない文字が、文字定数の中で使われています。" W0575: classes: - "UNC:X99" format: "基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。" W0576: classes: - "UNC:X99" format: "基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。" W0577: classes: - "UNC:X99" format: "基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。" W0578: classes: - "UNC:X99" format: "暗黙的に汎整数型 `%s' の複合式からより大きな型 `%s' に型変換されています。" W0579: classes: - "UNC:X99" format: "汎整数型 `%s' の複合式を、より大きな型 `%s' にキャストしています。" W0580: classes: - "UNC:X99" format: "ローカルな静的変数のアドレスが、より長い有効範囲を持つポインタに代入されています。" W0581: classes: - "UNC:X99" format: "実引数の個数か型が、この関数の以前の使用時と異なります。" W0582: classes: - "UNC:X99" format: "実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。" W0583: classes: - "UNC:X99" format: "実引数の個数か型が、この後で見つかる関数定義と異なります。" W0584: classes: - "UNC:X99" format: "%s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。" W0585: classes: - "UNC:X99" format: "制御変数 `%s' はインクリメント式に現れません。" W0586: classes: - "UNC:X99" format: "typedef`%s' が二つ以上の場所で宣言されています。" W0589: classes: - "UNC:X99" format: "オブジェクト `%s' は、定義されている翻訳単位の内の、関数 `%s' のみから参照されています。" W0591: classes: - "UNC:X99" format: "関数 `%s' は、定義されている翻訳単位の内でのみ参照されています。" W0593: classes: - "UNC:X99" format: "オブジェクト `%s' は、定義されている翻訳単位の中でのみ参照されています。" W0597: classes: - "UNC:X99" format: "副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。" W0598: classes: - "UNC:X99" format: "副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。" W0599: classes: - "UNC:X99" format: "副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。" W0600: classes: - "UNC:X99" format: "副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。" W0605: classes: - "UNC:X99" format: "繰り返し文を終了させる目的で、break 文が二つ以上使用されています。" W0606: classes: - "UNC:X99" format: "共用体に浮動小数点型のメンバがあります。" W0607: classes: - "UNC:X99" format: "値が負になる整数式が符号無し型に変換されています。" W0608: classes: - "UNC:X99" format: "値が負になることがありうる整数式が符号無し型に変換されています。" W0609: classes: - "UNC:X99" format: "この論理演算の結果は常に真になります。" W0610: classes: - "UNC:X99" format: "この論理演算の結果は常に偽になります。" W0611: classes: - "UNC:X99" format: "この繰り返し文の制御式の値は常に真です。" W0612: classes: - "UNC:X99" format: "この if 条件式の値は常に真です。" W0613: classes: - "UNC:X99" format: "この制御式の値は常に偽になります。" W0614: classes: - "UNC:X99" format: "この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。" W0622: classes: - "UNC:X99" format: "関数がブロックスコープ内で宣言されています。" W0623: classes: - "UNC:X99" format: "外部結合のオブジェクトが、ブロックスコープ内で宣言されています。" W0624: classes: - "UNC:X99" format: "#define あるいは #undef がブロックの中に存在します。" W0625: classes: - "UNC:X99" format: "外部結合の定義または宣言の中で `%s' が使われていますが、その typedef がヘッダファイルの中で宣言されていません。" W0626: classes: - "UNC:X99" format: "ワイド文字またはワイド文字列リテラルが使われています。" W0627: classes: - "UNC:X99" format: "一行に、空文(`;' だけの文)が、他のコードの後にあります。" W0628: classes: - "UNC:X99" format: "関数 `%s' が定義されていますが、このプロジェクトでは使われていません。" W0629: classes: - "UNC:X99" format: "static 関数 `%s()' は、この翻訳単位の中で使われていません。" W0632: classes: - "UNC:X99" format: "`#include %s' の中で ' や \" 文字を使うと、未定義の動作になります。" W0633: classes: - "UNC:X99" format: "`#include %s' の中で ' 文字を使うと、未定義の動作になります。" W0634: classes: - "UNC:X99" format: "`#include' 行の中で `\\' を使っています。パス区切り文字としては `/' を勧めます。" W0635: classes: - "UNC:X99" format: "%s 番目の変換指定子と、対応する実引数の型が合いません。" W0636: classes: - "UNC:X99" format: "%s 番目の変換指定子に対応する実引数が存在しません。" W0637: classes: - "UNC:X99" format: "関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。" W0638: classes: - "UNC:X99" format: "この関数呼び出しには、少なくとも一つの実引数が必要です。" W0639: classes: - "UNC:X99" format: "%s 番目の変換指定子と、対応する実引数の型が合いません。" W0640: classes: - "UNC:X99" format: "scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。" W0641: classes: - "UNC:X99" format: "浮動小数点数型をオブジェクトへのポインタ(あるいはその逆)へキャストしています。" W0642: classes: - "UNC:X99" format: "register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。" W0643: classes: - "UNC:X99" format: "このマクロで構成された文字列リテラルは、`\"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\\' が末尾にある実引数に適用された結果である可能性があります。" W0644: classes: - "UNC:X99" format: "void 式の値を使用しようとしています。void 式は値をもちません。" W0645: classes: - "UNC:X99" format: "仮引数の型には、void 型を使うことができません。" W0646: classes: - "UNC:X99" format: "通常の文字列リテラルとワイド文字列リテラルが隣接しています。" W0649: classes: - "UNC:X99" format: "シフト演算子の右オペランドの値が負の定数です。結果は未定義になります。" W0650: classes: - "UNC:X99" format: "シフト演算子の右オペランドの値が左オペランドの型 `%s' で表されるビット数に対して大きすぎます。結果は未定義になります。" W0653: classes: - "UNC:X99" format: "配列、構造体あるいは共用体の初期値が `{}' で囲まれていません。" W0654: classes: - "UNC:X99" format: "構造体あるいは共用体の初期化子は、同じ構造体型あるいは共用体型の値でなければなりません。" W0655: classes: - "UNC:X99" format: "サイズが未定義のビットフィールド式です。" W0656: classes: - "UNC:X99" format: "%s 番目の変換指定子は、ISO C 標準規格でサポートされません。" W0657: classes: - "UNC:X99" format: "%s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。" W0658: classes: - "UNC:X99" format: "%s 番目の変換指定子 `o' に無効なフラグが使われています。" W0659: classes: - "UNC:X99" format: "%s 番目の変換指定子 `u' に無効なフラグが使われています。" W0660: classes: - "UNC:X99" format: "%s 番目の変換指定子 `x' に無効なフラグが使われています。" W0661: classes: - "UNC:X99" format: "%s 番目の変換指定子 `X' に無効なフラグが使われています。" W0662: classes: - "UNC:X99" format: "%s 番目の変換指定子 `f' に無効なフラグが使われています。" W0663: classes: - "UNC:X99" format: "%s 番目の変換指定子 `e' に無効なフラグが使われています。" W0664: classes: - "UNC:X99" format: "%s 番目の変換指定子 `E' に無効なフラグが使われています。" W0665: classes: - "UNC:X99" format: "%s 番目の変換指定子 `g' に無効なフラグが使われています。" W0666: classes: - "UNC:X99" format: "%s 番目の変換指定子 `G' に無効なフラグが使われています。" W0667: classes: - "UNC:X99" format: "%s 番目の変換指定子 `c' に無効なフラグが使われています。" W0668: classes: - "UNC:X99" format: "%s 番目の変換指定子 `%%' に無効なフラグが使われています。" W0669: classes: - "UNC:X99" format: "%s 番目の変換指定子 `s' に無効なフラグが使われています。" W0670: classes: - "UNC:X99" format: "%s 番目の変換指定子 `n' に無効なフラグが使われています。" W0671: classes: - "UNC:X99" format: "%s 番目の変換指定子 `p' に無効なフラグが使われています。" W0672: classes: - "UNC:X99" format: "%s 番目に無効な変換指定子が使われています。" W0673: classes: - "UNC:X99" format: "%s 番目の変換指定子は、ISO C 標準規格でサポートされません。" W0674: classes: - "UNC:X99" format: "%s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。" W0675: classes: - "UNC:X99" format: "%s 番目の変換指定子 `o' に無効なフラグが使われています。" W0676: classes: - "UNC:X99" format: "%s 番目の変換指定子 `u' に無効なフラグが使われています。" W0677: classes: - "UNC:X99" format: "%s 番目の変換指定子 `x/X' に無効なフラグが使われています。" W0678: classes: - "UNC:X99" format: "%s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。" W0679: classes: - "UNC:X99" format: "%s 番目の変換指定子 `s' に無効なフラグが使われています。" W0680: classes: - "UNC:X99" format: "%s 番目の変換指定子 `p' に無効なフラグが使われています。" W0681: classes: - "UNC:X99" format: "%s 番目の変換指定子 `%%' に無効なフラグが使われています。" W0682: classes: - "UNC:X99" format: "%s 番目の変換指定子 `[' に無効なフラグが使われています。" W0683: classes: - "UNC:X99" format: "%s 番目の変換指定子 `c' に無効なフラグが使われています。" W0684: classes: - "UNC:X99" format: "%s 番目に無効な変換指定子が使われています。" W0685: classes: - "UNC:X99" format: "`[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。" W0686: classes: - "UNC:X99" format: "走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。" W0687: classes: - "UNC:X99" format: "defined 演算子を削除する目的で #undef を使っています。" W0688: classes: - "UNC:X99" format: "#line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。" W0689: classes: - "UNC:X99" format: "#line 指令の構文が `#line 汎整数定数 \"文字列\"' の形式と合っていません。" W0690: classes: - "UNC:X99" format: "#line 指令の後に行番号が記述されていません。" W0691: classes: - "UNC:X99" format: "`##' 演算子の結果が有効な前処理字句ではありません。" W0692: classes: - "UNC:X99" format: "関数形式マクロ `%s' に実引数が与えられていません。" W0693: classes: - "UNC:X99" format: "関数形式マクロがその定義よりも少ない実引数で呼び出されています。" W0694: classes: - "UNC:X99" format: "`assert' という名称の関数を呼び出す目的で、assert マクロが抑制されています。未定義の結果になります。" W0695: classes: - "UNC:X99" format: "assert マクロを #undef してその名前の関数を呼び出しできるようにすると、未定義の結果になります。" W0696: classes: - "UNC:X99" format: "この `#if...' で使われているマクロ `%s' は定義されていません。" W0697: classes: - "UNC:X99" format: "戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。" W0698: classes: - "UNC:X99" format: "戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。" W0699: classes: - "UNC:X99" format: "関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。" W0700: classes: - "UNC:X99" format: "関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。" W0703: classes: - "UNC:X99" format: "タグ `%s' がより広い有効範囲をもつ同じ識別子の宣言を隠しています。" W0704: classes: - "UNC:X99" format: "この `%s' の宣言は、より広い有効範囲をもつ同じ識別子の宣言を隠しています。" W0705: classes: - "UNC:X99" format: "配列の添字が領域外を指すことがあります。" W0707: classes: - "UNC:X99" format: "配列の添字が領域外を指す定数です。" W0708: classes: - "UNC:X99" format: "for 文の制御変数 `%s' は繰り返し文本体の中で値を変えられています。" W0711: classes: - "UNC:X99" format: "関係演算子の右側のオペランドが実質的なブール型の式です。" W0712: classes: - "UNC:X99" format: "関係演算子の左側のオペランドが実質的なブール型の式です。" W0713: classes: - "UNC:X99" format: "関係演算子の両側のオペランドが実質的なブール型の式です。" W0714: classes: - "UNC:X99" format: "`&' 演算子の両側のオペランドが実質的なブール型の式です。" W0715: classes: - "UNC:X99" format: "`|' 演算子の両側のオペランドが実質的なブール型の式です。" W0716: classes: - "UNC:X99" format: "ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。" W0717: classes: - "UNC:X99" format: "ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。" W0718: classes: - "UNC:X99" format: "ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。" W0719: classes: - "UNC:X99" format: "シフト演算子の右オペランドが、潜在型 `%s' のビット幅以上の定数値です。" W0720: classes: - "UNC:X99" format: "浮動小数点型の値が変換先の型の範囲に入りきりません。" W0721: classes: - "UNC:X99" format: "この汎整数型は、ポインタの値を保持するのに十分な大きさをもちません。" W0722: classes: - "UNC:X99" format: "符号付きの式の値がオーバーフローしています。" W0723: classes: - "UNC:X99" format: "符号付きの式の値がオーバーフローする可能性があります。" W0724: classes: - "UNC:X99" format: "条件付きインクルード指令によって、認識できない前処理指令が無視されました。" W0726: classes: - "UNC:X99" format: "修飾子付き void 型の戻り値が定義された関数 `%s()' の中で、`return 式;' が見つかりました。" W0727: classes: - "UNC:X99" format: "列挙型にない値を使っています。" W0728: classes: - "UNC:X99" format: "列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。" W0729: classes: - "UNC:X99" format: "列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。" W0730: classes: - "UNC:X99" format: "列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。" W0731: classes: - "UNC:X99" format: "switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。" W0732: classes: - "UNC:X99" format: "`&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。" W0733: classes: - "UNC:X99" format: "`||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。" W0734: classes: - "UNC:X99" format: "論理演算子の左側のオペランドがビット演算の式あるいは算術式です。" W0735: classes: - "UNC:X99" format: "論理演算子の右側のオペランドがビット演算の式あるいは算術式です。" W0736: classes: - "UNC:X99" format: "ファイルスコープで宣言された静的変数 `%s' は 1 つの関数内でしか読み書きされていません。" W0737: classes: - "UNC:X99" format: "`enum %s' の内容が不明です。列挙体タグが内容を指定せずに宣言されています。" W0738: classes: - "UNC:X99" format: "正の整数定数の値がより小さな符号無し型への暗黙の型変換を行ったため、切り捨てられます。" W0739: classes: - "UNC:X99" format: "定数式における符号無し減算の結果が負になりました。" W0740: classes: - "UNC:X99" format: "定数式における符号無し加算の結果が最大値を超えました。" W0741: classes: - "UNC:X99" format: "定数式における符号無し乗算の結果が最大値を超えました。" W0742: classes: - "UNC:X99" format: "負の整数定数式が符号無し型に変換されています。" W0743: classes: - "UNC:X99" format: "整数定数式の値は、変換先の符号付きの結果の型で表現できる範囲を超えています。" W0744: classes: - "UNC:X99" format: "この制御式の値は偽になる定数のため、制御文本体は実行されません。" W0745: classes: - "UNC:X99" format: "配列の添字が、領域外を指しています。" W0747: classes: - "UNC:X99" format: "暗黙的に signed short 型から signed char 型に型変換されています。" W0748: classes: - "UNC:X99" format: "暗黙的に unsigned short 型から unsigned char 型に型変換されています。" W0749: classes: - "UNC:X99" format: "暗黙的に signed int 型から signed char 型に型変換されています。" W0750: classes: - "UNC:X99" format: "暗黙的に signed int 型から signed short 型に型変換されています。" W0751: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から unsigned char 型に型変換されています。" W0752: classes: - "UNC:X99" format: "暗黙的に unsigned int 型から unsigned short 型に型変換されています。" W0753: classes: - "UNC:X99" format: "暗黙的に signed long 型から signed char 型に型変換されています。" W0754: classes: - "UNC:X99" format: "暗黙的に signed long 型から signed short 型に型変換されています。" W0755: classes: - "UNC:X99" format: "暗黙的に signed long 型から signed int 型に型変換されています。" W0756: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から unsigned char 型に型変換されています。" W0757: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から unsigned short 型に型変換されています。" W0758: classes: - "UNC:X99" format: "暗黙的に unsigned long 型から unsigned int 型に型変換されています。" W0759: classes: - "UNC:X99" format: "暗黙的に signed long long 型から signed char 型に型変換されています。" W0760: classes: - "UNC:X99" format: "暗黙的に signed long long 型から signed short 型に型変換されています。" W0761: classes: - "UNC:X99" format: "暗黙的に signed long long 型から signed int 型に型変換されています。" W0762: classes: - "UNC:X99" format: "暗黙的に signed long long 型から signed long 型に型変換されています。" W0763: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から unsigned char 型に型変換されています。" W0764: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から unsigned short 型に型変換されています。" W0765: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から unsigned int 型に型変換されています。" W0766: classes: - "UNC:X99" format: "暗黙的に unsigned long long 型から unsigned long 型に型変換されています。" W0767: classes: - "UNC:X99" format: "暗黙的に double 型から float 型に型変換されています。" W0768: classes: - "UNC:X99" format: "暗黙的に long double 型から float 型に型変換されています。" W0769: classes: - "UNC:X99" format: "暗黙的に long double 型から double 型に型変換されています。" W0770: classes: - "UNC:X99" format: "外部結合をもつ識別子 `%s' の宣言が、二つ以上存在しています。" W0771: classes: - "UNC:X99" format: "グローバルな識別子 `%s' が、二つ以上のファイルで宣言されています。" W0774: classes: - "UNC:X99" format: "double 型の値が関数 `float %s()' から返されています。" W0775: classes: - "UNC:X99" format: "long double 型の値が関数 `float %s()' から返されています。" W0776: classes: - "UNC:X99" format: "long double 型の値が関数 `double %s()' から返されています。" W0777: classes: - "UNC:X99" format: "暗黙的に float 型の複合式から double 型に型変換されています。" W0778: classes: - "UNC:X99" format: "暗黙的に float 型の複合式から long double 型に型変換されています。" W0779: classes: - "UNC:X99" format: "暗黙的に double 型の複合式から long double 型に型変換されています。" W0780: classes: - "UNC:X99" format: "定数式における符号無し左シフト演算 `<<' は、非ゼロの上位ビットを切り詰めます。" W0781: classes: - "UNC:X99" format: "この switch 文にはパスが 1 つしかありません。この switch 文は冗長です。" W0783: classes: - "UNC:X99" format: "不完全型を指すポインタを含むキャストが行われています。このプログラムは移植性がありません。" W0784: classes: - "UNC:X99" format: "非標準の拡張表記が使われています。" W0785: classes: - "UNC:X99" format: "このタグ `%s' の宣言は、以前の宣言と異なります。" W0786: classes: - "UNC:X99" format: "int、signed int、あるいは unsigned int 以外の型をもつビットフィールドは、ISO C 標準規格ではサポートされません。" W0787: classes: - "UNC:X99" format: "`%s' の型が、以前の異なるスコープで宣言された型と異なります。" W0788: classes: - "UNC:X99" format: "`%s' の型が、以前の同じスコープ内で宣言された型と異なります。" W0789: classes: - "UNC:X99" format: "`%s' の型が、以前のより広いスコープで宣言された型と異なります。" W0790: classes: - "UNC:X99" format: "グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。" W0791: classes: - "UNC:X99" format: "グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。" W0792: classes: - "UNC:X99" format: "浮動小数点数型を関数ポインタ(あるいはその逆)へキャストしています。" W0793: classes: - "UNC:X99" format: "関数ポインタをオブジェクトを指すポインタ(あるいはその逆)へキャストしています。" W0794: classes: - "UNC:X99" format: "符号付きのオペランドを左シフト演算しています。" W0795: classes: - "UNC:X99" format: "関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。" W0796: classes: - "UNC:X99" format: "関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。" W0797: classes: - "UNC:X99" format: "関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。" W0798: classes: - "UNC:X99" format: "不完全な共用体オブジェクトの値を使ってはいけません。" W0799: classes: - "UNC:X99" format: "不完全な構造体オブジェクトの値を使ってはいけません。" W0800: classes: - "UNC:X99" format: "`%s' は結合をもたない不完全型です。これは未定義です。" W0801: classes: - "UNC:X99" format: "この構造体あるいは共用体には名前付きのメンバがありません。" W0802: classes: - "UNC:X99" format: "`#include' 前処理指令の後が、<ファイル名> あるいは \"ファイル名 \"形式のどちらでもありません。" W0803: classes: - "UNC:X99" format: "関数形式マクロの実引数の中に、前処理指令が記述されています。" W0804: classes: - "UNC:X99" format: "defined 構文が、`defined(識別子)' あるいは `defined 識別子' のどちらでもありません。" W0805: classes: - "UNC:X99" format: "`defined' に、実引数となる識別子がありません。" W0806: classes: - "UNC:X99" format: "`defined' という名称のマクロを定義しようとしています。" W0807: classes: - "UNC:X99" format: "事前定義のマクロ名 `%s' を削除しようとしています。" W0808: classes: - "UNC:X99" format: "事前定義のマクロ名 `%s' を再定義しようとしています。" W0809: classes: - "UNC:X99" format: "識別子 `%s' はライブラリで予約済みです。" W0810: classes: - "UNC:X99" format: "この `if-if-else' 文の構造をより明確にするためには `{}' が必要です。" W0811: classes: - "UNC:X99" format: "このマクロの展開結果の、`defined' トークンは、許容されません。" W0827: classes: - "UNC:X99" format: "ネストされた構造体の初期値の各要素が `{}' で囲まれていません。" W0828: classes: - "UNC:X99" format: "ネストされた配列の初期値の各要素が `{}' で囲まれていません。" W0830: classes: - "UNC:X99" format: "列挙子並びの末尾にカンマ `,' があります。" W0831: classes: - "UNC:X99" format: "これはインラインアセンブリ用の言語拡張です。#asm と #endasm の間は無視します。" W0832: classes: - "UNC:X99" format: "インラインアセンブリ構文を使っています。これは言語拡張です。このコードは無視します。" W0833: classes: - "UNC:X99" format: "接尾語 LL を使っています。" W0834: classes: - "UNC:X99" format: "long long 型を使っています。" W0835: classes: - "UNC:X99" format: "可変引数を受け取るマクロが定義されています。" W0947: classes: - "UNC:X99" format: "文字列リテラルが直接使われています。" W0948: classes: - "UNC:X99" format: "文字定数 %s が直接使われています。" W0949: classes: - "UNC:X99" format: "ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。" W0950: classes: - "UNC:X99" format: "配列のサイズ定義に、数値 `%s' が直接使われています。" W1026: classes: - "UNC:X99" format: "%s 番目の実引数がオブジェクト型ではありません。" W1027: classes: - "UNC:X99" format: "配列の基本型が関数型です。これは意味がありません。" W1028: classes: - "UNC:X99" format: "配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。" W1029: classes: - "UNC:X99" format: "配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。" W1030: classes: - "UNC:X99" format: "ラベル `%s' がこの関数の中で二回以上使われています。" W1031: classes: - "UNC:X99" format: "オブジェクト `%s' は、外部結合と内部結合の両方で宣言されています。その動作は未定義です。" W1032: classes: - "UNC:X99" format: "内部結合をもつ変数 '%s' の仮定義は、不完全型ではいけません。" W1033: classes: - "UNC:X99" format: "関数の戻り値の型に volatile あるいは const 修飾子を使っています。その動作は未定義です。" W1034: classes: - "UNC:X99" format: "ブロックスコープで、関数 `%s()' に static 記憶域クラス指定子を使って宣言されています。この用法は意味がありません。" W1035: classes: - "UNC:X99" format: "`%s' は typedef として宣言されています。明示的な型指定子を使わずに、より内側のスコープで再宣言することはできません。" W1036: classes: - "UNC:X99" format: "`%s' は typedef として宣言されています。明示的な型指定子を使わずに、構造体または共用体のメンバとして再宣言することはできません。" W1037: classes: - "UNC:X99" format: "外部結合をもつ `%s' が、二つ以上宣言されていますが互換性がありません。" W1039: classes: - "UNC:X99" format: "%s 番目の変換指定子に `ll' が使われています。" W1040: classes: - "UNC:X99" format: "前処理指令の後に認識できない文字列が記述されています。" W1041: classes: - "UNC:X99" format: "`%s' は、ISO C 標準規格の正式な前処理指令ではありません。" W1042: classes: - "UNC:X99" format: "前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。" W1043: classes: - "UNC:X99" format: "`@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。" W1044: classes: - "UNC:X99" format: "使用不可" W1045: classes: - "UNC:X99" format: "この `@ word' 構文は無視されます。" W1046: classes: - "UNC:X99" format: "`\\' と改行の間にある空白文字類が無視されています。" W1047: classes: - "UNC:X99" format: "構造体、共用体、あるいは配列の初期化子がリテラルではありません。" W1048: classes: - "UNC:X99" format: "マルチバイト文字リテラルは処理系定義の値になります。" W1049: classes: - "UNC:X99" format: "この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。" W1050: classes: - "UNC:X99" format: "この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。" W1051: classes: - "UNC:X99" format: "符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。" W1052: classes: - "UNC:X99" format: "符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。" W1053: classes: - "UNC:X99" format: "仮引数が列挙型である関数の実引数に数値定数が渡されています。" W1054: classes: - "UNC:X99" format: "列挙型に、列挙型ではない式が代入されています。" W1055: classes: - "UNC:X99" format: "戻り値が列挙型の関数から、列挙型ではない式が返されています。" W1056: classes: - "UNC:X99" format: "仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。" W1057: classes: - "UNC:X99" format: "列挙型に、異なる列挙型のオブジェクトが代入されています。" W1058: classes: - "UNC:X99" format: "戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。" W1059: classes: - "UNC:X99" format: "仮引数が列挙型でない関数の実引数に列挙型が渡されています。" W1060: classes: - "UNC:X99" format: "戻り値が列挙型でない関数から、列挙型が返されています。" W1061: classes: - "UNC:X99" format: "仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。" W1062: classes: - "UNC:X99" format: "異なる型の非定数式の値が列挙型オブジェクトに代入されています。" W1063: classes: - "UNC:X99" format: "戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。" W1064: classes: - "UNC:X99" format: "列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。" W1065: classes: - "UNC:X99" format: "列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。" W1066: classes: - "UNC:X99" format: "明示的に float 型の複合式の値を double 型に変換しています。" W1067: classes: - "UNC:X99" format: "明示的に float 型の複合式の値を long double 型に変換しています。" W1068: classes: - "UNC:X99" format: "明示的に double 型の複合式の値を long double 型に変換しています。" W1069: classes: - "UNC:X99" format: "この `if-else-if' 文には、末尾の `else' 節がありません。" W1070: classes: - "UNC:X99" format: "この `switch' 文には実行経路が 2 つしか無いため、`if-else' 文に変換可能です。" W1071: classes: - "UNC:X99" format: "関数 `%s' には複数の終了点があります。" W1072: classes: - "UNC:X99" format: "`goto' 文を使用しています。" W1073: classes: - "UNC:X99" format: "関数 `%s' の戻り値を破棄しています。" W1074: classes: - "UNC:X99" format: "`sizeof' 演算子のオペランドは実行されないため、副作用が発生しません。" W1075: classes: - "UNC:X99" format: "`%s' は以前に内部結合として宣言されていますが、この宣言には `static' がありません。" W1076: classes: - "UNC:X99" format: "関数 `%s' は内部結合を持ちますが、事前に内部結合として宣言していません。" W1077: classes: - "UNC:X99" format: "サイズが省略された配列を宣言しています。" W9001: classes: - "UNC:X99" format: "この文には制御が到達しません。" W9002: classes: - "UNC:X99" format: "ファイルの末尾に改行文字がありません。" W9003: classes: - "UNC:X99" format: "暗黙的に `%s' 型のオブジェクトが `%s' 型のオブジェクトに変換されています。" C0001: classes: - "INF:X99" format: "この識別名 `%s' で警告を検知しました。" C1000: classes: - "INF:X99" format: "次の実行パスで警告を検知しました。" C1001: classes: - "INF:X99" format: "この制御式を真として評価しました。" C1002: classes: - "INF:X99" format: "この制御式を偽として評価しました。" C1003: classes: - "INF:X99" format: "ここで該当変数が初期値を指定せずに定義されています。" C1004: classes: - "INF:X99" format: "ここで該当変数に NULL の値を割り当てました。" C1005: classes: - "INF:X99" format: "ここで該当変数に NULL の可能性がある値を割り当てました。" C1006: classes: - "INF:X99" format: "ここで該当変数に値を割り当てました。" adlint-3.2.0/etc/mesg.d/c_builtin/en_US/0000755000004100000410000000000012224440633017730 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/c_builtin/en_US/messages.yml0000644000004100000410000027443612224440633022302 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # # Default message catalog of c_builtin examination package for en_US locale. # # ********************************* # ***** DO NOT EDIT THIS FILE ***** # ********************************* # # To override default messages, edit `change_list' section of the traits file. # # [Example] # # % tail traits.yml # message_traits: # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the fatal error of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the error of E9999." version: "3.2.0" message_definition: W0001: classes: - "UNC:X99" format: "Nesting depth of round bracket`()' exceed 32. This program doesn't meet the strict ISO C90 standards of the term." W0002: classes: - "UNC:X99" format: "Identifier and declaration of formal argument described separately in the definition of function `%s()' is old style." W0003: classes: - "UNC:X99" format: "This switch statement doesn't have default label." W0007: classes: - "UNC:X99" format: "'break' or 'return' statement doesn't found in the last 'case' or 'default' section." W0010: classes: - "UNC:X99" format: "There is a side-effect in this ternary operator (conditional operator)." W0013: classes: - "UNC:X99" format: "'continue' statement is used in repetition statement." W0016: classes: - "UNC:X99" format: "The field width of conversion specifier exceeds 509 characters in 'printf' function." W0017: classes: - "UNC:X99" format: "The field width of conversion specifier exceeds 509 characters in 'scanf' function." W0018: classes: - "UNC:X99" format: "This accuracy width of conversion specifier exceeds 509 characters." W0019: classes: - "UNC:X99" format: "This pointer cast is danger because it delete const qualifier." W0021: classes: - "UNC:X99" format: "This pointer cast is danger because it delete volatile qualifier." W0023: classes: - "UNC:X99" format: "Arithmetic operation is being made by pointer variable." W0024: classes: - "UNC:X99" format: "Increment or decrement is being made by pointer variable." W0025: classes: - "UNC:X99" format: "`%s' is already included by this file directly." W0026: classes: - "UNC:X99" format: "`%s' is already included by this file indirectly." W0027: classes: - "UNC:X99" format: "Comparison operation is being made by pointer variable." W0028: classes: - "UNC:X99" format: "Dereferencing a pointer constant of NULL." W0030: classes: - "UNC:X99" format: "Arithmetic operation is being made by NULL pointer." W0031: classes: - "UNC:X99" format: "A formal argument `%s' is not used in this function." W0033: classes: - "UNC:X99" format: "A label of `%s:' is not used in this function. It might be removed." W0035: classes: - "UNC:X99" format: "Right operand of ``&&' or `||' must arithmetic type or pointer type." W0036: classes: - "UNC:X99" format: "The number of qualification operator exceeds 12.This program doesn't meet the strict ISO C90 standards of the term." W0037: classes: - "UNC:X99" format: "Nest of structure or union exceeds 15. This program doesn't meet the strict ISO C90 standards of the term." W0038: classes: - "UNC:X99" format: "The size of object `%s' exceeds 32767 bytes. This program doesn't meet the strict ISO C90 standards of the term." W0039: classes: - "UNC:X99" format: "The number of local identifier in the block exceeds 127. This program doesn't meet the strict ISO C90 standards of the term." W0040: classes: - "UNC:X99" format: "A bit field is declared without 'signed' or 'unsigned'." W0041: classes: - "UNC:X99" format: "The number of member of structure or union exceeds 127.This program doesn't meet the strict ISO C90 standards of the term." W0042: classes: - "UNC:X99" format: "The number of enumeration literal exceeds 127. This program doesn't meet the strict ISO C90 standards of the term." W0043: classes: - "UNC:X99" format: "The initial value of the array is short of declared array's size. The residual array will be initialized by zero." W0049: classes: - "UNC:X99" format: "Nest of control structure exceeds 15. This program doesn't meet the strict ISO C90 standards of the term." W0050: classes: - "UNC:X99" format: "The number of 'case' label exceeds 257. This program doesn't meet the strict ISO C90 standards of the term." W0051: classes: - "UNC:X99" format: "An external identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in linker property." W0052: classes: - "UNC:X99" format: "An identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in compile property." W0053: classes: - "UNC:X99" format: "Nest of `#include \"%s\"' exceeds 8.This program doesn't meet the strict ISO C90 standards of the term." W0054: classes: - "UNC:X99" format: "The maximum number of `#if...' nest exceeds 8. This program doesn't meet the strict ISO C90 standards of the term." W0055: classes: - "UNC:X99" format: "The number of macro definition exceeds 1024. This program doesn't meet the strict ISO C90 standards of the term." W0056: classes: - "UNC:X99" format: "The number of formal argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term." W0057: classes: - "UNC:X99" format: "The number of actual argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term." W0058: classes: - "UNC:X99" format: "The number of characters of string literal exceeds 509.This program doesn't meet the strict ISO C90 standards of the term." W0059: classes: - "UNC:X99" format: "Ctrl-M(^M) control character is found at the end of line." W0060: classes: - "UNC:X99" format: "Ctrl-Z(^Z) control character is found in this file." W0061: classes: - "UNC:X99" format: "`%s' is not actual reserved keyword. It will be considered as language extension and ignored." W0062: classes: - "UNC:X99" format: "`__typeof__' is not supported ISO C standards. It will be considered as language extension." W0063: classes: - "UNC:X99" format: "`__alignof__'is not supported ISO C standards. It will be considered as language extension.." W0064: classes: - "UNC:X99" format: "A binary integer literal is used. This is the language extension." W0065: classes: - "UNC:X99" format: "Must not cast left operand of assignment operator." W0066: classes: - "UNC:X99" format: "`main()' function must `int (void)' or `int (int, char *[])'." W0067: classes: - "UNC:X99" format: "Directly access to the member of nested structure. This is the language extension." W0068: classes: - "UNC:X99" format: "`.' is used to get access to bit. This is the language extension." W0069: classes: - "UNC:X99" format: "`/*' is found in the beginning with `/*' comments. Nested comment doesn't allowed in ISO C standards." W0070: classes: - "UNC:X99" format: "Included <%s> is not referenced in the translation unit. It can be removed." W0071: classes: - "UNC:X99" format: "Included \"%s\" is not referenced in the translation unit. It can be removed." W0072: classes: - "UNC:X99" format: "A character except for basic source character is used in header file name." W0073: classes: - "UNC:X99" format: "No include guard in this include file." W0076: classes: - "UNC:X99" format: "Hexadecimal constant without `U' or `u' suffix." W0077: classes: - "UNC:X99" format: "Lower case`l' is added to integer or floating-point number." W0078: classes: - "UNC:X99" format: "A function is declared without list of formal argument." W0079: classes: - "UNC:X99" format: "This array cannot keep final character `\\0' which initial value of string literal." W0080: classes: - "UNC:X99" format: "A global object which const qualified is defined without explicitly initialized." W0081: classes: - "UNC:X99" format: "A monadic operator`-' becomes unsigned type if it use 'unsigned int' type, 'unsigned long' type or 'unsigned long' type operand." W0082: classes: - "UNC:X99" format: "Unary operator `-' is applied to an operand whose underlying type `%s' is unsigned." W0084: classes: - "UNC:X99" format: "Left operand of this comma operator`,' doesn't described the statement which has side-effects." W0085: classes: - "UNC:X99" format: "This statement doesn't have side-effects. It is highly possible that it having error." W0086: classes: - "UNC:X99" format: "Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator)." W0087: classes: - "UNC:X99" format: "The right side statement of comma operator is verbose statement which doesn't have side-effects." W0088: classes: - "UNC:X99" format: "The right side statement of logical operator is verbose statement which doesn't have side-effects." W0093: classes: - "UNC:X99" format: "This expression may cause division-by-zero." W0094: classes: - "UNC:X99" format: "UNUSABLE" W0096: classes: - "UNC:X99" format: "It divided by a constant expression which definitely zero." W0097: classes: - "UNC:X99" format: "This expression must cause division-by-zero." W0100: classes: - "UNC:X99" format: "The variable `%s' has not been reassigned since the initial value is assigned. It may be able to be defined as `const' with an initial value." W0101: classes: - "UNC:X99" format: "An address of auto variable is substituted for a pointer which has a longer life. This program is danger." W0102: classes: - "UNC:X99" format: "An address of auto variable is returned via formal argument to functions. This program is danger." W0103: classes: - "UNC:X99" format: "An address of auto variable is returned as return value from a function. This program is danger." W0104: classes: - "UNC:X99" format: "The value of formal argument `%s' is not change. It can be declarable with 'const'." W0105: classes: - "UNC:X99" format: "The object which points the formal argument `%s' is not change. It can be declaring as pointer type which points const object." W0107: classes: - "UNC:X99" format: "An address of auto variable is substituted for local pointer with 'static' option. This program is danger." W0108: classes: - "UNC:X99" format: "An assignment-expression appears in the logical expression." W0109: classes: - "UNC:X99" format: "The definition of this function doesn't found. It consider it was omitted, and insert `extern int %s()'." W0110: classes: - "UNC:X99" format: "A variable number with floating-point type is used by loop counter in for statement." W0112: classes: - "UNC:X99" format: "The statement of floating-point compares by equivalent operator." W0114: classes: - "UNC:X99" format: "This control expression is not explicit logical operation." W0115: classes: - "UNC:X99" format: "Unsigned left shift operator `<<' drop the high-order bit." W0116: classes: - "UNC:X99" format: "Unsigned left shift operator `<<' can be drop high-order bit." W0117: classes: - "UNC:X99" format: "`%s' has external-linkage without any prototype declarations." W0118: classes: - "UNC:X99" format: "`%s' has external-linkage, but no prototype declaration is in header files." W0119: classes: - "UNC:X99" format: "An implicit type conversion from char to signed char." W0120: classes: - "UNC:X99" format: "An implicit type conversion from char to unsigned char." W0121: classes: - "UNC:X99" format: "An implicit type conversion from char to signed short." W0122: classes: - "UNC:X99" format: "An implicit type conversion from char to unsigned short." W0123: classes: - "UNC:X99" format: "An implicit type conversion from char to signed int." W0124: classes: - "UNC:X99" format: "An implicit type conversion from char to unsigned int." W0125: classes: - "UNC:X99" format: "An implicit type conversion from char to signed long." W0126: classes: - "UNC:X99" format: "An implicit type conversion from char to unsigned long." W0127: classes: - "UNC:X99" format: "An implicit type conversion from char to float." W0128: classes: - "UNC:X99" format: "An implicit type conversion from char to double." W0129: classes: - "UNC:X99" format: "An implicit type conversion from char to long double." W0130: classes: - "UNC:X99" format: "An implicit type conversion from char to signed long long." W0131: classes: - "UNC:X99" format: "An implicit type conversion from char to unsigned long long." W0132: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to char." W0133: classes: - "UNC:X99" format: "An implicit type conversion from signed char to char." W0134: classes: - "UNC:X99" format: "An implicit type conversion from signed short to char." W0135: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to char." W0136: classes: - "UNC:X99" format: "An implicit type conversion from signed int to char." W0137: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to char." W0138: classes: - "UNC:X99" format: "An implicit type conversion from signed long to char." W0139: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to char." W0140: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to char." W0141: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to char." W0142: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to signed char." W0143: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to signed char." W0144: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to signed short." W0145: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to signed char." W0146: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to signed short." W0147: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to signed int." W0148: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to signed char." W0149: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to signed short." W0150: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to signed int." W0151: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to signed long." W0152: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to signed char." W0153: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to signed short." W0154: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to signed int." W0155: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to signed long." W0156: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to signed long long." W0157: classes: - "UNC:X99" format: "An implicit type conversion from signed char to unsigned char." W0158: classes: - "UNC:X99" format: "An implicit type conversion from signed char to unsigned short." W0159: classes: - "UNC:X99" format: "An implicit type conversion from signed char to unsigned int." W0160: classes: - "UNC:X99" format: "An implicit type conversion from signed char to unsigned long." W0161: classes: - "UNC:X99" format: "An implicit type conversion from signed short to unsigned char." W0162: classes: - "UNC:X99" format: "An implicit type conversion from signed short to unsigned short." W0163: classes: - "UNC:X99" format: "An implicit type conversion from signed short to unsigned int." W0164: classes: - "UNC:X99" format: "An implicit type conversion from signed short to unsigned long." W0165: classes: - "UNC:X99" format: "Implicit conversion from `signed int' to `unsigned char'." W0166: classes: - "UNC:X99" format: "An implicit type conversion from signed int to unsigned short." W0167: classes: - "UNC:X99" format: "Implicit conversion from `signed int' to `unsigned int'." W0168: classes: - "UNC:X99" format: "An implicit type conversion from signed int to unsigned long." W0169: classes: - "UNC:X99" format: "An implicit type conversion from signed long to unsigned char." W0170: classes: - "UNC:X99" format: "An implicit type conversion from signed long to unsigned short." W0171: classes: - "UNC:X99" format: "An implicit type conversion from signed long to unsigned int." W0172: classes: - "UNC:X99" format: "An implicit type conversion from signed long to unsigned long." W0173: classes: - "UNC:X99" format: "An implicit type conversion from signed char to unsigned long long." W0174: classes: - "UNC:X99" format: "An implicit type conversion from signed short to unsigned long long." W0175: classes: - "UNC:X99" format: "An implicit type conversion from signed int to unsigned long long." W0176: classes: - "UNC:X99" format: "An implicit type conversion from signed long to unsigned long long." W0177: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to unsigned char." W0178: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to unsigned short." W0179: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to unsigned int." W0180: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to unsigned long." W0181: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to unsigned long long." W0182: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to float." W0183: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to double." W0184: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to long double." W0185: classes: - "UNC:X99" format: "An implicit type conversion from signed char to float." W0186: classes: - "UNC:X99" format: "An implicit type conversion from signed char to double." W0187: classes: - "UNC:X99" format: "An implicit type conversion from signed char to long double." W0188: classes: - "UNC:X99" format: "An implicit type conversion from signed short to float." W0189: classes: - "UNC:X99" format: "An implicit type conversion from signed short to double." W0190: classes: - "UNC:X99" format: "An implicit type conversion from signed short to long double." W0191: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to float." W0192: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to double." W0193: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to long double." W0194: classes: - "UNC:X99" format: "An implicit type conversion from signed int to float." W0195: classes: - "UNC:X99" format: "An implicit type conversion from signed int to double." W0196: classes: - "UNC:X99" format: "An implicit type conversion from signed int to long double." W0197: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to float." W0198: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to double." W0199: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to long double." W0200: classes: - "UNC:X99" format: "An implicit type conversion from signed long to float." W0201: classes: - "UNC:X99" format: "An implicit type conversion from signed long to double." W0202: classes: - "UNC:X99" format: "An implicit type conversion from signed long to long double." W0203: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to float." W0204: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to double." W0205: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to long double." W0206: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to float." W0207: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to double." W0208: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to long double." W0209: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to float." W0210: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to double." W0211: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to long double." W0212: classes: - "UNC:X99" format: "An implicit type conversion from float to char." W0213: classes: - "UNC:X99" format: "An implicit type conversion from float to signed char." W0214: classes: - "UNC:X99" format: "An implicit type conversion from float to unsigned char." W0215: classes: - "UNC:X99" format: "An implicit type conversion from float to signed short." W0216: classes: - "UNC:X99" format: "An implicit type conversion from float to unsigned short." W0217: classes: - "UNC:X99" format: "An implicit type conversion from float to signed int." W0218: classes: - "UNC:X99" format: "An implicit type conversion from float to unsigned int." W0219: classes: - "UNC:X99" format: "An implicit type conversion from float to signed long." W0220: classes: - "UNC:X99" format: "An implicit type conversion from float to unsigned long." W0221: classes: - "UNC:X99" format: "An implicit type conversion from double to char." W0222: classes: - "UNC:X99" format: "An implicit type conversion from double to signed char." W0223: classes: - "UNC:X99" format: "An implicit type conversion from double to unsigned char." W0224: classes: - "UNC:X99" format: "An implicit type conversion from double to signed short." W0225: classes: - "UNC:X99" format: "An implicit type conversion from double to unsigned short." W0226: classes: - "UNC:X99" format: "An implicit type conversion from double to signed int." W0227: classes: - "UNC:X99" format: "An implicit type conversion from double to unsigned int." W0228: classes: - "UNC:X99" format: "An implicit type conversion from double to signed long." W0229: classes: - "UNC:X99" format: "An implicit type conversion from double to unsigned long." W0230: classes: - "UNC:X99" format: "An implicit type conversion from long double to char." W0231: classes: - "UNC:X99" format: "An implicit type conversion from long double to signed char." W0232: classes: - "UNC:X99" format: "An implicit type conversion from long double to unsigned char." W0233: classes: - "UNC:X99" format: "An implicit type conversion from long double to signed short." W0234: classes: - "UNC:X99" format: "An implicit type conversion from long double to unsigned short." W0235: classes: - "UNC:X99" format: "An implicit type conversion from long double to signed int." W0236: classes: - "UNC:X99" format: "An implicit type conversion from long double to unsigned int." W0237: classes: - "UNC:X99" format: "An implicit type conversion from long double to signed long." W0238: classes: - "UNC:X99" format: "An implicit type conversion from long double to unsigned long." W0239: classes: - "UNC:X99" format: "An implicit type conversion from float to signed long long." W0240: classes: - "UNC:X99" format: "An implicit type conversion from float to unsigned long long." W0241: classes: - "UNC:X99" format: "An implicit type conversion from double to signed long long." W0242: classes: - "UNC:X99" format: "An implicit type conversion from double to unsigned long long." W0243: classes: - "UNC:X99" format: "An implicit type conversion from long double to signed long long." W0244: classes: - "UNC:X99" format: "An implicit type conversion from long double to unsigned long long." W0245: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to signed short." W0246: classes: - "UNC:X99" format: "Implicit conversion from `unsigned char' to `signed int'." W0247: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to signed long." W0248: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to signed int." W0249: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to signed long." W0250: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to signed long." W0251: classes: - "UNC:X99" format: "An implicit type conversion from unsigned char to signed long long." W0252: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to signed long long." W0253: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to signed long long." W0254: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to signed long long." W0255: classes: - "UNC:X99" format: "A value of char type is returned from `signed char %s()' function." W0256: classes: - "UNC:X99" format: "A value of char type is returned from `unsigned char %s()' function." W0257: classes: - "UNC:X99" format: "A value of char type is returned from `signed short %s()' function." W0258: classes: - "UNC:X99" format: "A value of char type is returned from `unsigned short %s()' function." W0259: classes: - "UNC:X99" format: "A value of char type is returned from `signed int %s()' function." W0260: classes: - "UNC:X99" format: "A value of char type is returned from `unsigned int %s()' function." W0261: classes: - "UNC:X99" format: "A value of char type is returned from `signed long %s()' function." W0262: classes: - "UNC:X99" format: "A value of char type is returned from `unsigned long %s()' function." W0263: classes: - "UNC:X99" format: "A value of char type is returned from `float %s()' function." W0264: classes: - "UNC:X99" format: "A value of char type is returned from `double %s()' function." W0265: classes: - "UNC:X99" format: "A value of char type is returned from `long double %s()' function." W0266: classes: - "UNC:X99" format: "A value of char type is returned from `signed long long %s()' function." W0267: classes: - "UNC:X99" format: "A value of char type is returned from `unsigned long long %s()' function." W0268: classes: - "UNC:X99" format: "A value of unsigned char type is returned from`char %s()' function." W0269: classes: - "UNC:X99" format: "A value of signed char type is returned from`char %s()' function." W0270: classes: - "UNC:X99" format: "A value of signed short type is returned from `char %s()' function." W0271: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `char %s()' function." W0272: classes: - "UNC:X99" format: "A value of signed int type is returned from `char %s()' function." W0273: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `char %s()' function." W0274: classes: - "UNC:X99" format: "A value of signed long type is returned from `char %s()' function." W0275: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `char %s()' function." W0276: classes: - "UNC:X99" format: "A value of signed long long type is returned from `char %s()' function." W0277: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `char %s()' function." W0278: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `signed char %s()' function." W0279: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `signed char %s()' function." W0280: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `signed short %s()' function." W0281: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `signed char %s()' function." W0282: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `signed short %s()' function." W0283: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `signed int %s()' function." W0284: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `signed char %s()' function." W0285: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `signed short %s()' function." W0286: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `signed int %s()' function." W0287: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `signed long %s()' function." W0288: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `signed char %s()' function." W0289: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `signed short %s()' function." W0290: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `signed int %s()' function." W0291: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `signed long %s()' function." W0292: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `signed long long %s()' function." W0293: classes: - "UNC:X99" format: "A value of signed char type is returned from `unsigned char %s()' function." W0294: classes: - "UNC:X99" format: "A value of signed char type is returned from `unsigned short %s()' function." W0295: classes: - "UNC:X99" format: "A value of signed char type is returned from `unsigned int %s()' function." W0296: classes: - "UNC:X99" format: "A value of signed char type is returned from `unsigned long %s()' function." W0297: classes: - "UNC:X99" format: "A value of signed short type is returned from `unsigned char %s()' function." W0298: classes: - "UNC:X99" format: "A value of signed short type is returned from `unsigned short %s()' function." W0299: classes: - "UNC:X99" format: "A value of signed short type is returned from `unsigned int %s()' function." W0300: classes: - "UNC:X99" format: "A value of signed short type is returned from `unsigned long %s()' function." W0301: classes: - "UNC:X99" format: "A value of signed int type is returned from `unsigned char %s()' function." W0302: classes: - "UNC:X99" format: "A value of signed int type is returned from `unsigned short %s()' function." W0303: classes: - "UNC:X99" format: "A value of signed int type is returned from `unsigned int %s()' function." W0304: classes: - "UNC:X99" format: "A value of signed int type is returned from `unsigned long %s()' function." W0305: classes: - "UNC:X99" format: "A value of signed long type is returned from `unsigned char %s()' function." W0306: classes: - "UNC:X99" format: "A value of signed long type is returned from `unsigned short %s()' function." W0307: classes: - "UNC:X99" format: "A value of signed long type is returned from `unsigned int %s()' function." W0308: classes: - "UNC:X99" format: "A value of signed long type is returned from `unsigned long %s()' function." W0309: classes: - "UNC:X99" format: "A value of signed char type is returned from `unsigned long long %s()' function." W0310: classes: - "UNC:X99" format: "A value of signed short type is returned from `unsigned long long %s()' function." W0311: classes: - "UNC:X99" format: "A value of signed int type is returned from `unsigned long long %s()' function." W0312: classes: - "UNC:X99" format: "A value of signed long type is returned from `unsigned long long %s()' function." W0313: classes: - "UNC:X99" format: "A value of signed long long type is returned from `unsigned char %s()' function." W0314: classes: - "UNC:X99" format: "A value of signed long long type is returned from `unsigned short %s()' function." W0315: classes: - "UNC:X99" format: "A value of signed long long type is returned from `unsigned int %s()' function." W0316: classes: - "UNC:X99" format: "A value of signed long long type is returned from `unsigned long %s()' function." W0317: classes: - "UNC:X99" format: "A value of signed long long type is returned from `unsigned long long %s()' function." W0318: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `float %s()' function." W0319: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `double %s()' function." W0320: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `long double %s()' function." W0321: classes: - "UNC:X99" format: "A value of signed char type is returned from `float %s()' function." W0322: classes: - "UNC:X99" format: "A value of signed char type is returned from `double %s()' function." W0323: classes: - "UNC:X99" format: "A value of signed char type is returned from `long double %s()' function." W0324: classes: - "UNC:X99" format: "A value of signed short type is returned from `float %s()' function." W0325: classes: - "UNC:X99" format: "A value of signed short type is returned from `double %s()' function." W0326: classes: - "UNC:X99" format: "A value of signed short type is returned from `long double %s()' function." W0327: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `float %s()' function." W0328: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `double %s()' function." W0329: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `long double %s()' function." W0330: classes: - "UNC:X99" format: "A value of signed int type is returned from `float %s()' function." W0331: classes: - "UNC:X99" format: "A value of signed int type is returned from `double %s()' function." W0332: classes: - "UNC:X99" format: "A value of signed int type is returned from `long double %s()' function." W0333: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `float %s()' function." W0334: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `double %s()' function." W0335: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `long double %s()' function." W0336: classes: - "UNC:X99" format: "A value of signed long type is returned from `float %s()' function." W0337: classes: - "UNC:X99" format: "A value of signed long type is returned from `double %s()' function." W0338: classes: - "UNC:X99" format: "A value of signed long type is returned from `long double %s()' function." W0339: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `float %s()' function." W0340: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `double %s()' function." W0341: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `long double %s()' function." W0342: classes: - "UNC:X99" format: "A value of signed long long type is returned from `float %s()' function." W0343: classes: - "UNC:X99" format: "A value of signed long long type is returned from `double %s()' function." W0344: classes: - "UNC:X99" format: "A value of signed long long type is returned from `long double %s()' function." W0345: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `float %s()' function." W0346: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `double %s()' function." W0347: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `long double %s()' function." W0348: classes: - "UNC:X99" format: "A value of float type is returned from `char %s()' function." W0349: classes: - "UNC:X99" format: "A value of float type is returned from `signed char %s()' function." W0350: classes: - "UNC:X99" format: "A value of float type is returned from `unsigned char %s()' function." W0351: classes: - "UNC:X99" format: "A value of float type is returned from `signed short %s()' function." W0352: classes: - "UNC:X99" format: "A value of float type is returned from `unsigned short %s()' function." W0353: classes: - "UNC:X99" format: "A value of float type is returned from `signed int %s()' function." W0354: classes: - "UNC:X99" format: "A value of float type is returned from `unsigned int %s()' function." W0355: classes: - "UNC:X99" format: "A value of float type is returned from `signed long %s()' function." W0356: classes: - "UNC:X99" format: "A value of float type is returned from `unsigned long %s()' function." W0357: classes: - "UNC:X99" format: "A value of double type is returned from `char %s()' function." W0358: classes: - "UNC:X99" format: "A value of double type is returned from `signed char %s()' function." W0359: classes: - "UNC:X99" format: "A value of double type is returned from `unsigned char %s()' function." W0360: classes: - "UNC:X99" format: "A value of double type is returned from `signed short %s()' function." W0361: classes: - "UNC:X99" format: "A value of double type is returned from `unsigned short %s()' function." W0362: classes: - "UNC:X99" format: "A value of double type is returned from `signed int %s()' function." W0363: classes: - "UNC:X99" format: "A value of double type is returned from `unsigned int %s()' function." W0364: classes: - "UNC:X99" format: "A value of double type is returned from `signed long %s()' function." W0365: classes: - "UNC:X99" format: "A value of double type is returned from `unsigned long %s()' function." W0366: classes: - "UNC:X99" format: "A value of long double type is returned from `char %s()' function." W0367: classes: - "UNC:X99" format: "A value of long double type is returned from `signed char %s()' function." W0368: classes: - "UNC:X99" format: "A value of long double type is returned from `unsigned char %s()' function." W0369: classes: - "UNC:X99" format: "A value of long double type is returned from `signed short %s()' function." W0370: classes: - "UNC:X99" format: "A value of long double type is returned from `unsigned short %s()' function." W0371: classes: - "UNC:X99" format: "A value of long double type is returned from `signed int %s()' function." W0372: classes: - "UNC:X99" format: "A value of long double type is returned from `unsigned int %s()' function." W0373: classes: - "UNC:X99" format: "A value of long double type is returned from `signed long %s()' function." W0374: classes: - "UNC:X99" format: "A value of long double type is returned from `unsigned long %s()' function." W0375: classes: - "UNC:X99" format: "A value of float type is returned from `signed long long %s()' function." W0376: classes: - "UNC:X99" format: "A value of float type is returned from `unsigned long long %s()' function." W0377: classes: - "UNC:X99" format: "A value of double type is returned from `signed long long %s()' function." W0378: classes: - "UNC:X99" format: "A value of double type is returned from `unsigned long long %s()' function." W0379: classes: - "UNC:X99" format: "A value of long double type is returned from `signed long long %s()' function." W0380: classes: - "UNC:X99" format: "A value of long double type is returned from `unsigned long long %s()' function." W0381: classes: - "UNC:X99" format: "A value of signed short type is returned from `signed char %s()' function." W0382: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `unsigned char %s()' function." W0383: classes: - "UNC:X99" format: "A value of signed int type is returned from `signed char %s()' function." W0384: classes: - "UNC:X99" format: "A value of signed int type is returned from `signed short %s()' function." W0385: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `unsigned char %s()' function." W0386: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `unsigned short %s()' function." W0387: classes: - "UNC:X99" format: "A value of signed long type is returned from `signed char %s()' function." W0388: classes: - "UNC:X99" format: "A value of signed long type is returned from `signed short %s()' function." W0389: classes: - "UNC:X99" format: "A value of signed long type is returned from `signed int %s()' function." W0390: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `unsigned char %s()' function." W0391: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `unsigned short %s()' function." W0392: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `unsigned int %s()' function." W0393: classes: - "UNC:X99" format: "A value of signed long long type is returned from `signed char %s()' function." W0394: classes: - "UNC:X99" format: "A value of signed long long type is returned from `signed short %s()' function." W0395: classes: - "UNC:X99" format: "A value of signed long long type is returned from `signed int %s()' function." W0396: classes: - "UNC:X99" format: "A value of signed long long type is returned from `signed long %s()' function." W0397: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `unsigned char %s()' function." W0398: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `unsigned short %s()' function." W0399: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `unsigned int %s()' function." W0400: classes: - "UNC:X99" format: "A value of unsigned long long type is returned from `unsigned long %s()' function." W0401: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `signed short %s()' function." W0402: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `signed int %s()' function." W0403: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `signed long %s()' function." W0404: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `signed int %s()' function." W0405: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `signed long %s()' function." W0406: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `signed long %s()' function." W0407: classes: - "UNC:X99" format: "A value of unsigned char type is returned from `signed long long %s()' function." W0408: classes: - "UNC:X99" format: "A value of unsigned short type is returned from `signed long long %s()' function." W0409: classes: - "UNC:X99" format: "A value of unsigned int type is returned from `signed long long %s()' function." W0410: classes: - "UNC:X99" format: "A value of unsigned long type is returned from `signed long long %s()' function." W0411: classes: - "UNC:X99" format: "The initialization of enumeration should be only the starting, whole or not at all." W0413: classes: - "UNC:X99" format: "The body of control statement is unenclosed by curly brace `{}' block." W0414: classes: - "UNC:X99" format: "Body of the controlling statement in a line is not enclosed by `{}'." W0421: classes: - "UNC:X99" format: "Value of the dereferencing pointer must be NULL." W0422: classes: - "UNC:X99" format: "Value of the dereferencing pointer may be NULL." W0423: classes: - "UNC:X99" format: "Arithmetic operation is being made to the pointer which its value will be NULL." W0424: classes: - "UNC:X99" format: "Arithmetic operation is being made to the pointer which its value might be NULL." W0425: classes: - "UNC:X99" format: "There are several definitions or statements in a line." W0431: classes: - "UNC:X99" format: "This line begins at more left than previous lines of the same indentation level." W0432: classes: - "UNC:X99" format: "Indentation of this line does not comply with the project's indent style." W0440: classes: - "UNC:X99" format: "An indent of this close bracket `}' is not correspond to the open bracket `{'." W0441: classes: - "UNC:X99" format: "The type of integer literal which doesn't have a suffix is not int type." W0442: classes: - "UNC:X99" format: "A function-like macro is defined." W0443: classes: - "UNC:X99" format: "This function-like macro might be replaced with a function." W0444: classes: - "UNC:X99" format: "`#'operator and `##'operator is used in a macro definition." W0445: classes: - "UNC:X99" format: "Multiple `##'operator is used in a macro definition." W0446: classes: - "UNC:X99" format: "The result value of assignment operation is used." W0447: classes: - "UNC:X99" format: "A comma operator is used except 'for' statement." W0456: classes: - "UNC:X99" format: "An object or a function `%s which has external coupling is defined in a header file." W0457: classes: - "UNC:X99" format: "The return value doesn't define explicitly in the function declaration or definition. It defined as 'int' implicitly." W0458: classes: - "UNC:X99" format: "The type doesn't define explicitly in the object declaration or definition. It defined as 'int' implicitly." W0459: classes: - "UNC:X99" format: "A value of variable `%s' doesn't set when this expression is evaluated. This program is danger." W0460: classes: - "UNC:X99" format: "A value of variable `%s' wouldn't set when this expression is evaluated." W0461: classes: - "UNC:X99" format: "A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger." W0462: classes: - "UNC:X99" format: "A pointer which the value will probably not set is used for the actual argument of the function." W0463: classes: - "UNC:X99" format: "UNUSABLE" W0464: classes: - "UNC:X99" format: "UNUSABLE" W0477: classes: - "UNC:X99" format: "There are unpaired `[]',`()',`{}' in macro definition." W0478: classes: - "UNC:X99" format: "This macro defines scraps of unrecognized codes." W0479: classes: - "UNC:X99" format: "This macro definition might be replaced with 'typedef' declaration." W0480: classes: - "UNC:X99" format: "This macro defines keyword of control statement or punctuator." W0481: classes: - "UNC:X99" format: "This macro defines the block around by `{}'." W0482: classes: - "UNC:X99" format: "This macro defines either type specifier." W0483: classes: - "UNC:X99" format: "This macro defines the pair of storage class specifier and type specifier." W0488: classes: - "UNC:X99" format: "A function call`()', array's index operation`[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'." W0489: classes: - "UNC:X99" format: "A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'." W0490: classes: - "UNC:X99" format: "A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'." W0491: classes: - "UNC:X99" format: "The same identifier name `%s' is also used in the declaration of other namespace." W0492: classes: - "UNC:X99" format: "The same identifier name `%s' is also used in the member of structure/union, label, tag or normal identifier." W0493: classes: - "UNC:X99" format: "The value of structure or union is passed as the actual argument of the function." W0495: classes: - "UNC:X99" format: "operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'." W0496: classes: - "UNC:X99" format: "A ternary operator is used several times. It had better clear the coupling by using `()'." W0497: classes: - "UNC:X99" format: "Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'." W0498: classes: - "UNC:X99" format: "The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'." W0499: classes: - "UNC:X99" format: "The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'." W0500: classes: - "UNC:X99" format: "The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'." W0501: classes: - "UNC:X99" format: "A ternary operator is used with binary operator. It had better clear the coupling by using `()'." W0502: classes: - "UNC:X99" format: "A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping." W0508: classes: - "UNC:X99" format: "There's a side effect at the right operand of `&&' or `||'operator." W0511: classes: - "UNC:X99" format: "C++ style comment of `//' is used." W0512: classes: - "UNC:X99" format: "The result of `++' or `--' operator is used in the statement." W0525: classes: - "UNC:X99" format: "A field named 1bit is declared by signed type." W0528: classes: - "UNC:X99" format: "This macro defines octal constant value." W0529: classes: - "UNC:X99" format: "An octal literal is used." W0530: classes: - "UNC:X99" format: "An octal escape sequence is used in a character constant or a string literal." W0532: classes: - "UNC:X99" format: "'break' statement is used to exits 'case' or 'default' section, but it's not described at the end of 'case' section." W0534: classes: - "UNC:X99" format: "A control variable `%s' is not initialized in this 'for' statement." W0535: classes: - "UNC:X99" format: "A comma operator is used in a 'for' statement." W0538: classes: - "UNC:X99" format: "This 'default' label is not final label in this 'switch' statement." W0540: classes: - "UNC:X99" format: "A function which the blank formal argument list is declared. `void' is omitted." W0541: classes: - "UNC:X99" format: "Inline assembly code should be encapsulated by macro." W0542: classes: - "UNC:X99" format: "There are identifiers in the part of formal argument in a function declaration." W0543: classes: - "UNC:X99" format: "The identifier of formal argument in this function declaration is different from the past declaration of it." W0544: classes: - "UNC:X99" format: "The identifier of formal argument in the function declaration is different from the declaration of function pointer." W0546: classes: - "UNC:X99" format: "There is 'case' or 'default' label of switch statement in a nested block." W0549: classes: - "UNC:X99" format: "A formal argument of macro doesn't enclosed by `()'." W0551: classes: - "UNC:X99" format: "An union type specifier is defined." W0552: classes: - "UNC:X99" format: "An union type object is defined." W0553: classes: - "UNC:X99" format: "A pointer points to the function cast to other function pointer type." W0554: classes: - "UNC:X99" format: "An actual argument `%s' in `#pragma' is unrecognized. This `#pragma' command will be ignored." W0555: classes: - "UNC:X99" format: "This function is called recursive with indirectly." W0556: classes: - "UNC:X99" format: "The function which includes this call is called recursively." W0559: classes: - "UNC:X99" format: "The operand of `!' operator is the expression of bit operation or arithmetic operation." W0560: classes: - "UNC:X99" format: "The operand of `~' operator is boolean type expression." W0561: classes: - "UNC:X99" format: "The meaning of `*p++' is `*(p++)'. It is not `(*p)++'. `*' operator is verbose." W0562: classes: - "UNC:X99" format: "There are verbose `{}' in the initializer." W0563: classes: - "UNC:X99" format: "If it jumps from outside of this block to `%s' label,the local variable will not be initialized." W0564: classes: - "UNC:X99" format: "If this 'goto' statement jumps to `%s' label,local variable will not be initialized." W0565: classes: - "UNC:X99" format: "A volatile integer type cast to volatile pointer type and vice versa." W0566: classes: - "UNC:X99" format: "A volatile integer type cast to function pointer type and vice versa." W0567: classes: - "UNC:X99" format: "A volatile integer type cast to pointer to object and vice versa." W0568: classes: - "UNC:X99" format: "The result of left shift operation against the signed constant expression value is undefined." W0569: classes: - "UNC:X99" format: "The result of left shift operation against the signed expression value is undefined." W0570: classes: - "UNC:X99" format: "This signed left shift operation may make undefined value." W0571: classes: - "UNC:X99" format: "The result of right shift operation against the signed data is a possibility the both logical shift and arithmetic shift by implementation." W0572: classes: - "UNC:X99" format: "Bitwise operation of signed value causes implementation-defined behavior." W0573: classes: - "UNC:X99" format: "A `-' character in scanset in `[]' is implementation defined." W0574: classes: - "UNC:X99" format: "The character except for basic source character is used in the character constant." W0575: classes: - "UNC:X99" format: "The character except for basic source character is used in the string literal." W0576: classes: - "UNC:X99" format: "The character except for basic source character is used in the comment of source file `%s'." W0577: classes: - "UNC:X99" format: "The character except for basic source character is used in preprocessing directive of source file `%s'." W0578: classes: - "UNC:X99" format: "A generic integer value of the compound expression typed `%s' is implicitly converted into a new value of bigger type `%s'." W0579: classes: - "UNC:X99" format: "A generic integer value of the compound expression typed `%s' is explicitly converted into a new value of bigger type `%s'." W0580: classes: - "UNC:X99" format: "An address of local static variable is substituted for a pointer which has a wider scope." W0581: classes: - "UNC:X99" format: "The number or type of actual argument is different from the past." W0582: classes: - "UNC:X99" format: "The number or type of actual argument is different from the function prototype declaration at the following." W0583: classes: - "UNC:X99" format: "The number or type of actual argument is different from the function declaration at the following." W0584: classes: - "UNC:X99" format: "The type of %s actual argument is different from the type of formal argument in function definition." W0585: classes: - "UNC:X99" format: "A control variable `%s' doesn't appear increment expression." W0586: classes: - "UNC:X99" format: "A typedef `%s' is declared in more than one place." W0589: classes: - "UNC:X99" format: "An object `%s' is only referenced by function `%s' in the defined translation unit." W0591: classes: - "UNC:X99" format: "A function `%s' is only referenced by the defined translation unit." W0593: classes: - "UNC:X99" format: "An object `%s' is only referenced by the defined translation unit." W0597: classes: - "UNC:X99" format: "`%s' is modified more than once between the side-effects completion point. The evaluation order is undefined." W0598: classes: - "UNC:X99" format: "`%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined." W0599: classes: - "UNC:X99" format: "`%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined." W0600: classes: - "UNC:X99" format: "`%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined." W0605: classes: - "UNC:X99" format: "Multiple break-statements appear to break the same iteration." W0606: classes: - "UNC:X99" format: "An union has a member which type is floating-point." W0607: classes: - "UNC:X99" format: "An integer expression which the value which the value is minus converted to unsigned type." W0608: classes: - "UNC:X99" format: "An integer expression which the value might be minus converted to unsigned type." W0609: classes: - "UNC:X99" format: "This logical expression always makes true." W0610: classes: - "UNC:X99" format: "This logical expression always makes false." W0611: classes: - "UNC:X99" format: "The value of this 'for' control expression is always true." W0612: classes: - "UNC:X99" format: "The value of this 'if' conditional expression is always true." W0613: classes: - "UNC:X99" format: "This controlling expression always makes false." W0614: classes: - "UNC:X99" format: "The value of this \"do-while\" control expression is always false. The body of repetition statement executed only once." W0622: classes: - "UNC:X99" format: "A function is declared in the block scope." W0623: classes: - "UNC:X99" format: "An external coupling object is declared in the block scope." W0624: classes: - "UNC:X99" format: "There is '#define' or '#undef' in a block." W0625: classes: - "UNC:X99" format: "`%s' is using in the declaration or definition of external coupling. But its 'typedef' doesn't declare in the header file." W0626: classes: - "UNC:X99" format: "A wide character or wide string literal is used." W0627: classes: - "UNC:X99" format: "There is a dead letter (only `;') in the following other code." W0628: classes: - "UNC:X99" format: "A function `%s' is defined, but this is not used in this project." W0629: classes: - "UNC:X99" format: "`%s()' has internal-linkage, but it is never called in this translation-unit." W0632: classes: - "UNC:X99" format: "Using ' or \" characters in `#include %s' directive makes undefined behavior." W0633: classes: - "UNC:X99" format: "Using ' character in `#include %s' directive makes undefined behavior." W0634: classes: - "UNC:X99" format: "`\\' is used in `#include' line. `/' is recommended for the path delimiter." W0635: classes: - "UNC:X99" format: "The type doesn't match with %sth conversion specifier and the corresponding actual argument." W0636: classes: - "UNC:X99" format: "An actual argument doesn't exist correspond to %sth conversion specifier." W0637: classes: - "UNC:X99" format: "There is more actual argument than the number of conversion specifier in function call." W0638: classes: - "UNC:X99" format: "This function call requiring at least one actual argument." W0639: classes: - "UNC:X99" format: "%sth conversion specifier doesn't match with corresponding type of actual argument." W0640: classes: - "UNC:X99" format: "The actual argument of scanf function have to pass the object pointer to store the data." W0641: classes: - "UNC:X99" format: "Floating-point number type cast to pointer to object and vice versa." W0642: classes: - "UNC:X99" format: "Address derivation from the object declared as `register' is prohibited." W0643: classes: - "UNC:X99" format: "This string literal constituted by a macro is illegal form unenclosed by `\"'. `#'operator may apply to actual argument which has '\\' at the end." W0644: classes: - "UNC:X99" format: "A value in void statement is going to use. 'void' statement doesn't have a value." W0645: classes: - "UNC:X99" format: "'void' type cannot use in the type of formal argument." W0646: classes: - "UNC:X99" format: "A normal string literal and a wide string literal are contiguous." W0649: classes: - "UNC:X99" format: "A right operand value of shift operand is negative constant value. This result is undefined." W0650: classes: - "UNC:X99" format: "A value of the right operand in a shift expression is bigger than the bit size of the left operand type `%s'. This result is undefined." W0653: classes: - "UNC:X99" format: "The initial value of an array, structure or union is not enclosed by `{}'." W0654: classes: - "UNC:X99" format: "The initializer of structure or union must the value of the same structure type or union type." W0655: classes: - "UNC:X99" format: "This is bit field statement which the size is undefined." W0656: classes: - "UNC:X99" format: "%sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards." W0657: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `i' or 'd'." W0658: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `o'." W0659: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `u'." W0660: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `x'." W0661: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `X'." W0662: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `f'." W0663: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `e'." W0664: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `E'." W0665: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `g'." W0666: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `G'." W0667: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `c'." W0668: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `%%'." W0669: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `s'." W0670: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `n'." W0671: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `p'." W0672: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf." W0673: classes: - "UNC:X99" format: "%sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards." W0674: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `d/i/n'." W0675: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `o'." W0676: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `u'." W0677: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `x/X'." W0678: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'." W0679: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `s'." W0680: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `p'." W0681: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `%%'." W0682: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `['." W0683: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier of `c'." W0684: classes: - "UNC:X99" format: "An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf." W0685: classes: - "UNC:X99" format: "A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'." W0686: classes: - "UNC:X99" format: "The same characters are described in scanset (characters enclosed by `[]')." W0687: classes: - "UNC:X99" format: "#undef is using to delete #defined operator." W0688: classes: - "UNC:X99" format: "There is no line number in 1 to 32767 ranges after #line directive." W0689: classes: - "UNC:X99" format: "#line directive syntax doesn't match `#line integer constant \"string\"'." W0690: classes: - "UNC:X99" format: "No line number after #line directive." W0691: classes: - "UNC:X99" format: "The result of `##' operator is not valid preprocessing token." W0692: classes: - "UNC:X99" format: "A function-like macro `%s' doesn't given an actual argument." W0693: classes: - "UNC:X99" format: "A function-like macro is called by actual argument which its definition is smaller." W0694: classes: - "UNC:X99" format: "'assert' macro is inhibited to call the function named `assert'. This result is undefined." W0695: classes: - "UNC:X99" format: "If #undef the 'assert' macro, and enable to call its name function, the result is undefined." W0696: classes: - "UNC:X99" format: "This macro using in `#if...' is undefined." W0697: classes: - "UNC:X99" format: "There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value." W0698: classes: - "UNC:X99" format: "A `return;' statement is found in a function `%s' which has a return value." W0699: classes: - "UNC:X99" format: "The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement." W0700: classes: - "UNC:X99" format: "The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value." W0703: classes: - "UNC:X99" format: "The tag `%s' hides the declaration of same identifier which has wider scope." W0704: classes: - "UNC:X99" format: "This `%s' declaration hides the declaration of same identifier which has wider scope." W0705: classes: - "UNC:X99" format: "This non-constant array subscript may cause out-of-range access." W0707: classes: - "UNC:X99" format: "This constant array subscript must cause out-of-range access." W0708: classes: - "UNC:X99" format: "A value of control variable `%s' in 'for' statement is changed in the body of repetition." W0711: classes: - "UNC:X99" format: "Right operand of relational operator is a substantive 'boolean' expression." W0712: classes: - "UNC:X99" format: "Left operand of relational operator is a substantive 'boolean' expression." W0713: classes: - "UNC:X99" format: "Both sides of relational operator is substantive 'boolean' expressions." W0714: classes: - "UNC:X99" format: "Both sides of `&' operator is substantive 'boolean' expressions." W0715: classes: - "UNC:X99" format: "Both sides of `|' operator is substantive 'boolean' expressions." W0716: classes: - "UNC:X99" format: "A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression." W0717: classes: - "UNC:X99" format: "A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression." W0718: classes: - "UNC:X99" format: "A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression." W0719: classes: - "UNC:X99" format: "A value of the right operand in a shift expression is bigger than the bit size of the left operand underlying type `%s'." W0720: classes: - "UNC:X99" format: "The value with floating-point type doesn't fit in the range of converted type." W0721: classes: - "UNC:X99" format: "This volatile integer type doesn't have enough size to keep pointer value." W0722: classes: - "UNC:X99" format: "A value of signed statement is overflow." W0723: classes: - "UNC:X99" format: "A value of signed statement might be overflow." W0724: classes: - "UNC:X99" format: "An unrecognized preprocessing directive is ignored by conditional include directive." W0726: classes: - "UNC:X99" format: "A function `%s()' which return value is declared as qualified void type, `return expression;' is found." W0727: classes: - "UNC:X99" format: "The value not part of the enumeration type is used." W0728: classes: - "UNC:X99" format: "Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument." W0729: classes: - "UNC:X99" format: "An enumeration literal of the other enumeration type is substituted for enumeration type object." W0730: classes: - "UNC:X99" format: "A function declared return value to enumeration type returned an enumeration literal of the other enumeration type." W0731: classes: - "UNC:X99" format: "The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement." W0732: classes: - "UNC:X99" format: "Both operand of `&&'operator is bit operator or arithmetic operator." W0733: classes: - "UNC:X99" format: "Both operand of `||'operator is bit operator or arithmetic operator." W0734: classes: - "UNC:X99" format: "A left operand of logical operator is bit operator or arithmetic operator." W0735: classes: - "UNC:X99" format: "A right operand of logical operator is the expression of bit operator or arithmetic operator." W0736: classes: - "UNC:X99" format: "A static variable `%s' which declared in file scope is read and write in one function only." W0737: classes: - "UNC:X99" format: "The content of `enum %s' is unknown. The enumeration tag is declared without define the content." W0738: classes: - "UNC:X99" format: "An implicit type conversion from positive integer constant expression to smaller unsigned type. The value is rounded." W0739: classes: - "UNC:X99" format: "The result of unsigned subtraction in constant expression is minus." W0740: classes: - "UNC:X99" format: "The result of unsigned addition in constant expression beyond the maximum." W0741: classes: - "UNC:X99" format: "The result of unsigned multiplication in constant expression beyond the maximum." W0742: classes: - "UNC:X99" format: "A negative integer constant expression converted to unsigned type." W0743: classes: - "UNC:X99" format: "The value of integer constant expression beyond the range of might be expressed with converted signed type." W0744: classes: - "UNC:X99" format: "The value of this control expression is constant value to be false. This control statement is not run." W0745: classes: - "UNC:X99" format: "This non-constant array subscript must cause out-of-range access." W0747: classes: - "UNC:X99" format: "An implicit type conversion from signed short to signed char." W0748: classes: - "UNC:X99" format: "An implicit type conversion from unsigned short to unsigned char." W0749: classes: - "UNC:X99" format: "An implicit type conversion from signed int to signed char." W0750: classes: - "UNC:X99" format: "An implicit type conversion from signed int to signed short." W0751: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to unsigned char." W0752: classes: - "UNC:X99" format: "An implicit type conversion from unsigned int to unsigned short." W0753: classes: - "UNC:X99" format: "An implicit type conversion from signed long to signed char." W0754: classes: - "UNC:X99" format: "An implicit type conversion from signed long to signed short." W0755: classes: - "UNC:X99" format: "An implicit type conversion from signed long to signed int." W0756: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to unsigned char." W0757: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to unsigned short." W0758: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long to unsigned int." W0759: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to signed char." W0760: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to signed short." W0761: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to signed int." W0762: classes: - "UNC:X99" format: "An implicit type conversion from signed long long to signed long." W0763: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to unsigned char." W0764: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to unsigned short." W0765: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to unsigned int." W0766: classes: - "UNC:X99" format: "An implicit type conversion from unsigned long long to unsigned long." W0767: classes: - "UNC:X99" format: "An implicit type conversion from double to float." W0768: classes: - "UNC:X99" format: "An implicit type conversion from long double to float." W0769: classes: - "UNC:X99" format: "An implicit type conversion from long double to double." W0770: classes: - "UNC:X99" format: "A declaration of identifier `%s' which has external coupling exists more than one." W0771: classes: - "UNC:X99" format: "A global identifier `%s' is declared in more than one file." W0774: classes: - "UNC:X99" format: "A value of double type is returned from `float %s()'function." W0775: classes: - "UNC:X99" format: "A value of long double type is returned from `float %s()' function." W0776: classes: - "UNC:X99" format: "A value of long double type is returned from `double %s()'function." W0777: classes: - "UNC:X99" format: "An implicit type conversion from compound expression of float to double." W0778: classes: - "UNC:X99" format: "An implicit type conversion from compound expression of float to long double." W0779: classes: - "UNC:X99" format: "An implicit type conversion from compound expression of to long double." W0780: classes: - "UNC:X99" format: "Unsigned left shift operator `<<' in constant expression truncate non-zero high-order bit." W0781: classes: - "UNC:X99" format: "This 'switch' statement have only one path. It's verbose." W0783: classes: - "UNC:X99" format: "Cast is being made including the pointer point to incomplete type. This program is not portable." W0784: classes: - "UNC:X99" format: "The nonstandard escape sequence is used." W0785: classes: - "UNC:X99" format: "This declaration of `%s' is different from a former declaration." W0786: classes: - "UNC:X99" format: "A bit field which having the type of except 'int', 'signed int' or 'unsigned int' doesn't support in ISO C standards. " W0787: classes: - "UNC:X99" format: "A type of `%s' is different from the past declaration in the different scope." W0788: classes: - "UNC:X99" format: "A type of `%s' is different from the past declaration in the same scope." W0789: classes: - "UNC:X99" format: "A type of `%s' is different from the past declaration in the wider scope." W0790: classes: - "UNC:X99" format: "An global object or a function `%s' is declared in more than one file." W0791: classes: - "UNC:X99" format: "An global object or a function `%s' is declared in more than one file." W0792: classes: - "UNC:X99" format: "A floating point type object cast to function pointer and vice versa." W0793: classes: - "UNC:X99" format: "A function pointer cast to pointer to point an object and vice versa." W0794: classes: - "UNC:X99" format: "Left shift operation of signed value causes implementation-defined behavior." W0795: classes: - "UNC:X99" format: "The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration." W0796: classes: - "UNC:X99" format: "The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration." W0797: classes: - "UNC:X99" format: "The number of an actual argument in function call is different from the number of a formal argument in the function declaration." W0798: classes: - "UNC:X99" format: "Must not use the value with incomplete union object." W0799: classes: - "UNC:X99" format: "Must not use the value with incomplete structure object." W0800: classes: - "UNC:X99" format: "`%s' is incomplete type which doesn't have a linkage.This is undefined." W0801: classes: - "UNC:X99" format: "This structure or union doesn't have a named member." W0802: classes: - "UNC:X99" format: "A form of after `#include' preprocessing directive is not nor \"file name\"." W0803: classes: - "UNC:X99" format: "A preprocessing directive is described in actual argument of function-like macro." W0804: classes: - "UNC:X99" format: "The 'defined' syntax is not `defined (identifier)' nor `defined identifier'." W0805: classes: - "UNC:X99" format: "An identifier to be actual argument doesn't find in `defined'." W0806: classes: - "UNC:X99" format: "It is trying to define a macro named `defined'." W0807: classes: - "UNC:X99" format: "It is trying to delete pre-defined macro `%s'." W0808: classes: - "UNC:X99" format: "It is trying to redefine pre-defined macro `%s'." W0809: classes: - "UNC:X99" format: "An identifier `%s' is reserved by the library." W0810: classes: - "UNC:X99" format: "`{}' is required to clarify this structure of `if-if-else' statement." W0811: classes: - "UNC:X99" format: "The `defined' token which the expanded result of this macro doesn't allowed." W0827: classes: - "UNC:X99" format: "An initial value of nested structure's element doesn't enclosed in curly brace `{ }'." W0828: classes: - "UNC:X99" format: "An initial value of nested array's element doesn't enclosed in curly brace `{ }'." W0830: classes: - "UNC:X99" format: "There is comma `,' at the end of the enumerator list." W0831: classes: - "UNC:X99" format: "This is language extension for inline assembly. It will be ignored between #asm and #endasm." W0832: classes: - "UNC:X99" format: "An inline assembly syntax is using. This is the language extension. This code will be ignored." W0833: classes: - "UNC:X99" format: "A suffix 'LL' is using." W0834: classes: - "UNC:X99" format: "A long long type is using." W0835: classes: - "UNC:X99" format: "A macro which receives variable argument is defined." W0947: classes: - "UNC:X99" format: "String literal is specified directly." W0948: classes: - "UNC:X99" format: "Character constant %s is specified directly." W0949: classes: - "UNC:X99" format: "A value `%s' is used directly for size definition of bit field." W0950: classes: - "UNC:X99" format: "Integer constant `%s' is specified directly as an array size." W1026: classes: - "UNC:X99" format: "%sth actual argument is not object type." W1027: classes: - "UNC:X99" format: "A base type of array is function type. This is meaningless." W1028: classes: - "UNC:X99" format: "A base type of array is an array with unknown size. Incomplete type of array will not build." W1029: classes: - "UNC:X99" format: "A base type of array is an obscure structure or union. Incomplete type of array will not build." W1030: classes: - "UNC:X99" format: "A label `%s' is used more than two times in this function." W1031: classes: - "UNC:X99" format: "An Object `%s' is declared both external coupling and internal coupling. This action is undefined." W1032: classes: - "UNC:X99" format: "A tentative definition of variable '%s' which has internal linkage must not incomplete type." W1033: classes: - "UNC:X99" format: "A 'volatile' or 'const' qualifier is used for the type of function return value. This action is undefined." W1034: classes: - "UNC:X99" format: "It is declared at function `%s()' with static storage class specifier in block scope. This usage is meaningless." W1035: classes: - "UNC:X99" format: "`%s' declared typedef. It cannot be redeclared inside an inner scope without using explicit type." W1036: classes: - "UNC:X99" format: "`%s' declared typedef. It cannot be redeclared as a member of structure or union without using explicit type." W1037: classes: - "UNC:X99" format: "`%s' which has external coupling is declared more than one, this is incompatible." W1039: classes: - "UNC:X99" format: "`ll' is used in %sth conversion specifier." W1040: classes: - "UNC:X99" format: "An unrecognizable string is described after preprocessing directive." W1041: classes: - "UNC:X99" format: "`%s' is not official preprocessing directive of ISO C standards." W1042: classes: - "UNC:X99" format: "'sizeof' operator is using in preprocessing directive. This is the language extension." W1043: classes: - "UNC:X99" format: "`@ address' is not supported ISO C standards. It will be considered as language extension." W1044: classes: - "UNC:X99" format: "UNUSABLE" W1045: classes: - "UNC:X99" format: "This `@ word' syntax will be ignored." W1046: classes: - "UNC:X99" format: "A space character is ignored between `\\' and line feed." W1047: classes: - "UNC:X99" format: "The struct, union or array's initializer is not literal." W1048: classes: - "UNC:X99" format: "The multi byte string literal is an implementation defined value." W1049: classes: - "UNC:X99" format: "The result of conversion to signed integer type in integer expression might not be expressed by a signed type." W1050: classes: - "UNC:X99" format: "The result of conversion to signed integer type in integer expression is not express by a signed type." W1051: classes: - "UNC:X99" format: "The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow." W1052: classes: - "UNC:X99" format: "The result of unsigned arithmetic expression typed `%s' can be going around by overflow." W1053: classes: - "UNC:X99" format: "A numeric constants is passed to an actual argument which formal argument is enumeration type." W1054: classes: - "UNC:X99" format: "A non enumeration type expression is substituted for the enumeration type." W1055: classes: - "UNC:X99" format: "A non enumeration type expression is returned from the function which return value is enumeration type." W1056: classes: - "UNC:X99" format: "An object of actual argument is different enumeration type which formal argument is enumeration type." W1057: classes: - "UNC:X99" format: "An enumeration value is substituted for different enumeration type object." W1058: classes: - "UNC:X99" format: "A different enumeration type of value is returned from a function which return value is enumeration type." W1059: classes: - "UNC:X99" format: "An enumeration value is passed to actual argument which formal argument is not enumeration type." W1060: classes: - "UNC:X99" format: "An enumeration value is returned from a function which return value is not enumeration type ." W1061: classes: - "UNC:X99" format: "Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type." W1062: classes: - "UNC:X99" format: "Non constant expression is substituted for the enumeration type object." W1063: classes: - "UNC:X99" format: "The return value returned from enumeration type function to non constant expression." W1064: classes: - "UNC:X99" format: "A integer constant is used in switch statement where case label is enumeration type." W1065: classes: - "UNC:X99" format: "A value of different enumeration type is used in switch statement where case label is an enumeration type." W1066: classes: - "UNC:X99" format: "A value of the `float' typed compound expression is explicitly converted into a `double' value." W1067: classes: - "UNC:X99" format: "A value of the `float' typed compound expression is explicitly converted into a `long double' value." W1068: classes: - "UNC:X99" format: "A value of the `double' typed compound expression is explicitly converted into a `long double' value." W1069: classes: - "UNC:X99" format: "No trailing `else' clause is found in this `if-else-if' statements chain." W1070: classes: - "UNC:X99" format: "This `switch' statement can be translated into `if-else' statement because there are only 2 execution paths." W1071: classes: - "UNC:X99" format: "Function `%s' has multiple termination points." W1072: classes: - "UNC:X99" format: "A `goto' statement is found." W1073: classes: - "UNC:X99" format: "Return value of the function `%s' is discarded." W1074: classes: - "UNC:X99" format: "Side-effects in `sizeof' operand will not be recorded because the operand will not be executed actually." W1075: classes: - "UNC:X99" format: "This declaration has no `static' storage-class-specifier while the declaring object has internal-linkage." W1076: classes: - "UNC:X99" format: "`%s' has internal-linkage without any prototype declarations." W1077: classes: - "UNC:X99" format: "Declaring array object without a size." W9001: classes: - "UNC:X99" format: "Control never reaches to this statement." W9002: classes: - "UNC:X99" format: "There is no line feed character at the end of file." W9003: classes: - "UNC:X99" format: "An object typed `%s' is implicitly converted into an object of type `%s'." C0001: classes: - "INF:X99" format: "A warning is detected as a pair of this identifier `%s'." C1000: classes: - "INF:X99" format: "Warning above is detected in the following context." C1001: classes: - "INF:X99" format: "This controlling-expression is evaluated to be true." C1002: classes: - "INF:X99" format: "This controlling-expression is evaluated to be false." C1003: classes: - "INF:X99" format: "The problematic variable is defined here without initializer." C1004: classes: - "INF:X99" format: "NULL value is assigned to the the problematic variable." C1005: classes: - "INF:X99" format: "A value possibly be NULL is assigned to the problematic variable." C1006: classes: - "INF:X99" format: "New value is assigned to the problematic variable." adlint-3.2.0/etc/mesg.d/core/0000755000004100000410000000000012224440633015677 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/core/ja_JP/0000755000004100000410000000000012224440633016662 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/core/ja_JP/messages.yml0000644000004100000410000001073212224440633021217 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # # Default message catalog of core package for ja_JP locale. # # ********************************* # ***** DO NOT EDIT THIS FILE ***** # ********************************* # # To override default messages, edit `change_list' section of the traits file. # # [Example] # # % tail traits.yml # message_traits: # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the fatal error of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the error of E9999." version: "3.2.0" message_definition: X0001: classes: - "ERR:X99" format: "不明な例外条件 `%s' を検出しました。" X0002: classes: - "ERR:X99" format: "不正なメッセージ ID `%s:%s' を検出しました。" X0003: classes: - "ERR:X99" format: "回復不能なエラーにより解析処理を中断しました。詳細は `%s' 及び `%s' を確認して下さい。" X0004: classes: - "ERR:X99" format: "不正なメッセージフォーマット `%s:%s' を検出しました。" E0001: classes: - "ERR:X99" format: "この位置には識別子が必要です。" E0002: classes: - "ERR:X99" format: "この位置にはコンマが必要です。" E0003: classes: - "ERR:X99" format: "識別子リスト(identifier_list)の後に不正なトークンが見つかりました。" E0004: classes: - "ERR:X99" format: "対応する #endif 行がありません。" E0005: classes: - "ERR:X99" format: "#else グループ(else_group)は、#elif グループ(elif_groups)の後に記述しなければなりません。" E0006: classes: - "ERR:X99" format: "トークン `%s' で構文エラーを検知しました。" E0007: classes: - "ERR:X99" format: "条件式中のトークン `%s' で構文エラーを検出しました。条件式を偽として評価します。" E0008: classes: - "ERR:X99" format: "トークン `%s' で構文エラーを検知しました。" E0009: classes: - "ERR:X99" format: "ヘッダファイル <%s> が見つかりません。" E0010: classes: - "ERR:X99" format: "ヘッダファイル \"%s\"が見つかりません。" E0011: classes: - "ERR:X99" format: "ヘッダファイル <%s> の解析中に構文エラーを検出しました。" E0012: classes: - "ERR:X99" format: "ヘッダファイル \"%s\"の解析中に構文エラーを検出しました。" E0013: classes: - "ERR:X99" format: "式に文を含めることはできません。" E0014: classes: - "ERR:X99" format: "ラベルのアドレスを取得するための && 単項演算子は GCC 独自の拡張機能です。" E0015: classes: - "ERR:X99" format: "ラベルのアドレスを指定した goto 文は GCC 独自の拡張機能です。" E0016: classes: - "ERR:X99" format: "終了しないコメントブロックが見つかりました。" E0017: classes: - "ERR:X99" format: "#include ディレクティブに \"ファイル名\" または <ファイル名> が見つかりません。" adlint-3.2.0/etc/mesg.d/core/en_US/0000755000004100000410000000000012224440633016710 5ustar www-datawww-dataadlint-3.2.0/etc/mesg.d/core/en_US/messages.yml0000644000004100000410000000772712224440633021257 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # # Default message catalog of core package for en_US locale. # # ********************************* # ***** DO NOT EDIT THIS FILE ***** # ********************************* # # To override default messages, edit `change_list' section of the traits file. # # [Example] # # % tail traits.yml # message_traits: # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the fatal error of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the error of E9999." version: "3.2.0" message_definition: X0001: classes: - "ERR:X99" format: "An unknown exception `%s' is found." X0002: classes: - "ERR:X99" format: "An illegal message ID `%s:%s' is found." X0003: classes: - "ERR:X99" format: "Analysis processing has been stopped due to unrecoverable error. For the details, refer to `%s' and `%s'." X0004: classes: - "ERR:X99" format: "An illegal message format `%s' is found." E0001: classes: - "ERR:X99" format: "An identifier is required in this position." E0002: classes: - "ERR:X99" format: "A comma is required in this position." E0003: classes: - "ERR:X99" format: "Invalid token is found behind identifier list (identifier_list)." E0004: classes: - "ERR:X99" format: "Corresponding #endif doesn't found." E0005: classes: - "ERR:X99" format: "#else group (else_group) must describe after #elif group (elif_groups)." E0006: classes: - "ERR:X99" format: "Syntax error is found in token `%s'." E0007: classes: - "ERR:X99" format: "Syntax error is found in conditional expression token `%s'. Conditional expression evaluate as false." E0008: classes: - "ERR:X99" format: "Syntax error is found in token `%s'." E0009: classes: - "ERR:X99" format: "A header file of <%s> doesn't found." E0010: classes: - "ERR:X99" format: "A header file of \"%s\" doesn't found." E0011: classes: - "ERR:X99" format: "Syntax error is found under analysis of <%s>." E0012: classes: - "ERR:X99" format: "Syntax error is found under analysis of \"%s\"." E0013: classes: - "ERR:X99" format: "Statement cannot include in syntax." E0014: classes: - "ERR:X99" format: "'&&' monadic operator to get a label address is GCC original add-on." E0015: classes: - "ERR:X99" format: "'goto' statement with specified label address is GCC original add-on." E0016: classes: - "ERR:X99" format: "Unfinished comment block is found." E0017: classes: - "ERR:X99" format: "#include expects \"filename\" or ." adlint-3.2.0/etc/conf.d/0000755000004100000410000000000012224440633014741 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/fallback/0000755000004100000410000000000012224440633016500 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/fallback/cinit.erb0000644000004100000410000000077012224440633020304 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Compiler specific initial header file generated by adlintize <%= AdLint::SHORT_VERSION %> * at <%= Time.now %>. */ /* Put compiler specific predefined macros and types here. */ adlint-3.2.0/etc/conf.d/fallback/traits.erb0000644000004100000410000001656412224440633020514 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Traits file generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %>. # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "<%= AdLint::TRAITS_SCHEMA_VERSION %>" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "<%= project_name %>" # Project root directory. project_root: "<%= vpath %>" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "<%= vpath %>" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "<%= pinit_fpath.basename %>" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "<%= cinit_fpath.basename %>" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "<%= lang %>" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/etc/conf.d/i686-cygwin/0000755000004100000410000000000012224440633016733 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/i686-cygwin/cinit-gcc_4.3.4.erb0000644000004100000410000001163312224440633022017 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Initial header for GCC 4.3.4 on Cygwin generated by adlintize <%= AdLint::SHORT_VERSION %> * at <%= Time.now %>. */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __FLT_MIN__ 1.17549435e-38F #define __DEC64_DEN__ 0.000000000000001E-383DD #define __CHAR_BIT__ 8 #define __WCHAR_MAX__ 65535U #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 4 #define _stdcall __attribute__((__stdcall__)) #define __DEC64_MAX_EXP__ 384 #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __GXX_TYPEINFO_EQUALITY_INLINE 0 #define __UINTMAX_TYPE__ long long unsigned int #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __LDBL_MAX_EXP__ 16384 #define __SCHAR_MAX__ 127 #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ _ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209290e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __SIZEOF_LONG__ 4 #define __DECIMAL_DIG__ 21 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define _cdecl __attribute__((__cdecl__)) #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __i686 1 #define __DBL_MAX__ 1.7976931348623157e+308 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-95) #define _fastcall __attribute__((__fastcall__)) #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __DBL_MIN__ 2.2250738585072014e-308 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __DBL_HAS_DENORM__ 1 #define __cdecl __attribute__((__cdecl__)) #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.3.4 20090804 (release) 1" #define _X86_ 1 #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6143) #define unix 1 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __DEC32_DEN__ 0.000001E-95DF #define __FLT_RADIX__ 2 #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __SIZEOF_PTRDIFF_T__ 4 #define __CYGWIN__ 1 #define __pentiumpro 1 #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __FLT_HAS_INFINITY__ 1 #define __DEC64_MAX__ 9.999999999999999E384DD #define __DEC64_MANT_DIG__ 16 #define __DEC32_MAX_EXP__ 96 #define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL #define __GXX_MERGED_TYPEINFO_NAMES 0 #define __stdcall __attribute__((__stdcall__)) #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __WCHAR_TYPE__ short unsigned int #define __SIZEOF_FLOAT__ 4 #define __DEC64_MIN_EXP__ (-383) #define __FLT_DIG__ 6 #define __INT_MAX__ 2147483647 #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ 2.2204460492503131e-16 #define __SIZEOF_WCHAR_T__ 2 #define __fastcall __attribute__((__fastcall__)) #define __CYGWIN32__ 1 #define __DEC_EVAL_METHOD__ 2 #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846e-45F #define __FLT_MAX__ 3.40282347e+38F #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6144 #define __GNUC_MINOR__ 3 #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __GNUC_GNU_INLINE__ 1 #define __declspec(x) __attribute__((x)) #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_start(a, b) (0) #define __builtin_va_end(a) (0) #define __builtin_va_arg(ar, t) (0) #define __builtin_va_copy(d, s) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb0000644000004100000410000001731112224440633022216 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Traits file generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %>. # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "<%= AdLint::TRAITS_SCHEMA_VERSION %>" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "<%= project_name %>" # Project root directory. project_root: "<%= vpath %>" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "<%= vpath %>" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "<%= pinit_fpath.basename %>" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "<%= cinit_fpath.basename %>" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/lib/gcc/i686-pc-cygwin/4.3.4/include" - "/lib/gcc/i686-pc-cygwin/4.3.4/include-fixed" - "/usr/include" - "/usr/include/w32api" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__cdecl": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" "near": "" "far": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "<%= lang %>" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/etc/conf.d/x86_64-ubuntu_12.04/0000755000004100000410000000000012224440633017743 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/x86_64-ubuntu_12.04/cinit-gcc_4.6.3.erb0000644000004100000410000001750712224440633023037 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Initial header for GCC 4.6.3 on Ubuntu 12.04 LTS (64bit) generated by adlintize <%= AdLint::SHORT_VERSION %> */ #define __DBL_MIN_EXP__ (-1021) #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## L #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __ORDER_LITTLE_ENDIAN__ 1234 #define __SIZE_MAX__ 18446744073709551615UL #define __WCHAR_MAX__ 2147483647 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 0 #define __unix__ 1 #define __x86_64 1 #define __UINT_FAST64_MAX__ 18446744073709551615UL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 3 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615UL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## L #define __DBL_DIG__ 15 #define _FORTIFY_SOURCE 2 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 8 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 8 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __MMX__ 1 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 16 #define __BIGGEST_ALIGNMENT__ 16 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 9223372036854775807L #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ long int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __SSE2_MATH__ 1 #define __PTRDIFF_MAX__ 9223372036854775807L #define __amd64 1 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 8 #define __SIZEOF_WINT_T__ 4 #define __GCC_HAVE_DWARF2_CFI_ASM 1 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __INT_FAST64_TYPE__ long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __LP64__ 1 #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.6.3" #define __UINT64_C(c) c ## UL #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __ORDER_PDP_ENDIAN__ 3412 #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ long int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __SIZE_TYPE__ long unsigned int #define __UINT64_MAX__ 18446744073709551615UL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## UL #define __SSE_MATH__ 1 #define __k8 1 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 8 #define __x86_64__ 1 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __INT_FAST16_MAX__ 9223372036854775807L #define __UINT_FAST32_MAX__ 18446744073709551615UL #define __UINT_LEAST64_TYPE__ long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 9223372036854775807L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ long unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807L #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 9223372036854775807L #define linux 1 #define __SSE2__ 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __k8__ 1 #define __INTPTR_TYPE__ long int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 18446744073709551615UL #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807L #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long unsigned int #define __INT_MAX__ 2147483647 #define __amd64__ 1 #define __INT64_TYPE__ long int #define __FLT_MAX_EXP__ 128 #define __ORDER_BIG_ENDIAN__ 4321 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807L #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __SSE__ 1 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __SSP__ 1 #define __SIZEOF_INT128__ 16 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define _LP64 1 #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DBL_DECIMAL_DIG__ 17 #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807L #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ long unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long int #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 6 #define __UINTMAX_MAX__ 18446744073709551615UL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ long int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ long unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __FLT_DECIMAL_DIG__ 9 #define __UINT_FAST16_MAX__ 18446744073709551615UL #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __builtin_va_list void * #define __builtin_va_start(a, b) (0) #define __builtin_va_end(a) (0) #define __builtin_va_arg(ar, t) (0) #define __builtin_va_copy(d, s) (0) #define __builtin_offsetof(type, member) (0) adlint-3.2.0/etc/conf.d/x86_64-ubuntu_12.04/traits-gcc_4.6.3.erb0000644000004100000410000001752612224440633023240 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Traits file generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %>. # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "<%= AdLint::TRAITS_SCHEMA_VERSION %>" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "<%= project_name %>" # Project root directory. project_root: "<%= vpath %>" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "<%= vpath %>" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "<%= pinit_fpath.basename %>" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: "utf-8" # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "<%= cinit_fpath.basename %>" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/lib/gcc/x86_64-linux-gnu/4.6/include" - "/usr/local/include" - "/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed" - "/usr/include/x86_64-linux-gnu" - "/usr/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 64 # Bit size of the alignment of the `long int' type family. long_alignment: 64 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 128 # Bit size of the alignment of the `long double' type. long_double_alignment: 128 # Bit size of the pointer to functions. code_ptr_size: 64 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 64 # Bit size of the pointer to data. data_ptr_size: 64 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 64 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__asm__ __adlint__any(__adlint__any)": "" "__signed__": "signed" "__const": "const" "__volatile": "volatile" "__restrict": "restrict" "__inline__": "inline" "__inline": "inline" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "<%= lang %>" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/etc/conf.d/i686-linux/0000755000004100000410000000000012224440633016572 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/i686-linux/traits-gcc_4.5.1.erb0000644000004100000410000001720712224440633022060 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Traits file generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %>. # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "<%= AdLint::TRAITS_SCHEMA_VERSION %>" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "<%= project_name %>" # Project root directory. project_root: "<%= vpath %>" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "<%= vpath %>" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "<%= pinit_fpath.basename %>" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "<%= cinit_fpath.basename %>" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "<%= lang %>" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/etc/conf.d/i686-linux/cinit-gcc_4.5.1.erb0000644000004100000410000001667212224440633021665 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Initial header for GCC 4.5.1 on Linux generated by adlintize <%= AdLint::SHORT_VERSION %> * at <%= Time.now %>. */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_start(a, b) (0) #define __builtin_va_end(a) (0) #define __builtin_va_arg(ar, t) (0) #define __builtin_va_copy(d, s) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/etc/conf.d/noarch/0000755000004100000410000000000012224440633016213 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/noarch/pinit.erb0000644000004100000410000000076612224440633020041 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Project specific initial header file generated by adlintize <%= AdLint::SHORT_VERSION %> * at <%= Time.now %>. */ /* Put project specific predefined macros and types here. */ adlint-3.2.0/etc/conf.d/noarch/adlint_all_sh.erb0000644000004100000410000000101512224440633021477 0ustar www-datawww-data#! /bin/sh # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Shell script generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %> adlint -v -t <%= traits_fpath.basename %> -o . -p <%= vpath.components.size %> -l <%= list_fpath.basename %> adlint-3.2.0/etc/conf.d/noarch/adlint_all_bat.erb0000644000004100000410000000102212224440633021631 0ustar www-datawww-data: ___ ____ __ ___ _________ : / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer : / /| | / / / / / / / |/ / / / AdLint - Advanced Lint : / __ |/ /_/ / /___/ / /| / / / : /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. : : MS-Windows BAT file generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %> adlint -v -t <%= traits_fpath.basename %> -o . -p <%= vpath.components.size %> -l <%= list_fpath.basename %> adlint-3.2.0/etc/conf.d/noarch/GNUmakefile.erb0000644000004100000410000000636512224440633021046 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # GNUmakefile generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %>. # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = <%= project_name %> SOURCES = \ <%= Dir.glob("**/*.c").join(" \\\n ") %> VPATH = <%= vpath %> VPATH_COMPONENTS = <%= vpath.components.size %> RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t <%= traits_fpath.basename %> -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t <%= traits_fpath.basename %> -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t <%= traits_fpath.basename %> -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t <%= traits_fpath.basename %> -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/etc/conf.d/i686-devkit/0000755000004100000410000000000012224440633016721 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb0000644000004100000410000001730212224440633022204 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Traits file generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %>. # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "<%= AdLint::TRAITS_SCHEMA_VERSION %>" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "<%= project_name %>" # Project root directory. project_root: "<%= vpath %>" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "<%= vpath %>" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "<%= pinit_fpath.basename %>" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "<%= cinit_fpath.basename %>" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/devkit/mingw/include" - "/devkit/mingw/lib/gcc/mingw32/4.5.2/include" - "/devkit/mingw/lib/gcc/mingw32/4.5.2/include-fixed" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__cdecl": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" "near": "" "far": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "<%= lang %>" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/etc/conf.d/i686-devkit/cinit-gcc_4.5.2.erb0000644000004100000410000001716412224440633022012 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Initial header for GCC 4.5.2 on DevKit generated by adlintize <%= AdLint::SHORT_VERSION %> * at <%= Time.now %>. */ #define __DBL_MIN_EXP__ (-1021) #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define _WIN32 1 #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 65535 #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 65535 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __FLT_EVAL_METHOD__ 2 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 2 #define __UINT_FAST8_MAX__ 255 #define _stdcall __attribute__((__stdcall__)) #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __GXX_TYPEINFO_EQUALITY_INLINE 0 #define __UINTMAX_TYPE__ long long unsigned int #define __DEC32_EPSILON__ 1E-6DF #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ 0 #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ _ #define __STDC_HOSTED__ 1 #define __WIN32 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __MINGW32__ 1 #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define _cdecl __attribute__((__cdecl__)) #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __WINNT 1 #define __DBL_HAS_INFINITY__ 1 #define __WINNT__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ short int #define _fastcall __attribute__((__fastcall__)) #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __USING_SJLJ_EXCEPTIONS__ 1 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __WIN32__ 1 #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 2 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __tune_i386__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __cdecl __attribute__((__cdecl__)) #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.2" #define __UINT64_C(c) c ## ULL #define _X86_ 1 #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __MSVCRT__ 1 #define __INT_FAST16_MAX__ 32767 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ short unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define __GXX_MERGED_TYPEINFO_NAMES 0 #define __stdcall __attribute__((__stdcall__)) #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ short unsigned int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define WIN32 1 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ short unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 2 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __fastcall __attribute__((__fastcall__)) #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define WINNT 1 #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define _INTEGRAL_MAX_BITS 64 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 65535 #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __declspec(x) __attribute__((x)) #define __const const #define __restrict restrict #define __restrict__ restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_start(a, b) (0) #define __builtin_va_end(a) (0) #define __builtin_va_arg(ar, t) (0) #define __builtin_va_copy(d, s) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/etc/conf.d/i686-mingw/0000755000004100000410000000000012224440633016554 5ustar www-datawww-dataadlint-3.2.0/etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb0000644000004100000410000001777712224440633021657 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Initial header for GCC 4.6.1 on MinGW generated by adlintize <%= AdLint::SHORT_VERSION %> * at <%= Time.now %>. */ #define __DBL_MIN_EXP__ (-1021) #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define _WIN32 1 #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 65535 #define __ORDER_LITTLE_ENDIAN__ 1234 #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 65535 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __FLT_EVAL_METHOD__ 2 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define _stdcall __attribute__((__stdcall__)) #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __GXX_TYPEINFO_EQUALITY_INLINE 0 #define __UINTMAX_TYPE__ long long unsigned int #define __DEC32_EPSILON__ 1E-6DF #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ 0 #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ _ #define __STDC_HOSTED__ 1 #define __WIN32 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __MINGW32__ 1 #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define _cdecl __attribute__((__cdecl__)) #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define _thiscall __attribute__((__thiscall__)) #define __INT_FAST32_MAX__ 2147483647 #define __WINNT 1 #define __DBL_HAS_INFINITY__ 1 #define __WINNT__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ short int #define _fastcall __attribute__((__fastcall__)) #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __WIN32__ 1 #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 2 #define __GCC_HAVE_DWARF2_CFI_ASM 1 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __tune_i386__ 1 #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __cdecl __attribute__((__cdecl__)) #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.6.1" #define __UINT64_C(c) c ## ULL #define _X86_ 1 #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __ORDER_PDP_ENDIAN__ 3412 #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __MSVCRT__ 1 #define __INT_FAST16_MAX__ 32767 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ short unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define __GXX_MERGED_TYPEINFO_NAMES 0 #define __stdcall __attribute__((__stdcall__)) #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ short unsigned int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define WIN32 1 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ short unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __thiscall __attribute__((__thiscall__)) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 2 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __fastcall __attribute__((__fastcall__)) #define __DBL_DECIMAL_DIG__ 17 #define __DEC_EVAL_METHOD__ 2 #define __ORDER_BIG_ENDIAN__ 4321 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ #define WINNT 1 #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define _INTEGRAL_MAX_BITS 64 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 6 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __FLT_DECIMAL_DIG__ 9 #define __UINT_FAST16_MAX__ 65535 #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __declspec(x) __attribute__((x)) #define __const const #define __restrict restrict #define __restrict__ restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_start(a, b) (0) #define __builtin_va_end(a) (0) #define __builtin_va_arg(ar, t) (0) #define __builtin_va_copy(d, s) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb0000644000004100000410000001725512224440633022046 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Traits file generated by adlintize <%= AdLint::SHORT_VERSION %> at <%= Time.now %>. # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "<%= AdLint::TRAITS_SCHEMA_VERSION %>" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "<%= project_name %>" # Project root directory. project_root: "<%= vpath %>" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "<%= vpath %>" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "<%= pinit_fpath.basename %>" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "<%= cinit_fpath.basename %>" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/mingw/lib/gcc/mingw32/4.6.1/include" - "/mingw/include" - "/mingw/lib/gcc/mingw32/4.6.1/include-fixed" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__cdecl": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" "near": "" "far": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "<%= lang %>" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/Rakefile0000644000004100000410000001232412224440633014466 0ustar www-datawww-data#-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "rubygems/package_task" require "rdoc/task" require "rspec/core/rake_task" require "cucumber/rake/task" $: << File.expand_path("lib", File.dirname(__FILE__)) require "adlint/version" task :default => [:gem] task :gem => [:parser, :doc] task :package => [:parser, :doc] gemspec = Gem::Specification.new do |s| s.name = "adlint" s.version = AdLint::SHORT_VERSION s.date = AdLint::RELEASE_DATE s.homepage = "http://adlint.sourceforge.net/" s.licenses = ["GPLv3+: GNU General Public License version 3 or later"] s.author = "Yutaka Yanoh" s.email = "yanoh@users.sourceforge.net" s.summary = <= 1.9.3") s.executables = %w(adlint adlint_sma adlint_cma adlint_chk adlintize) s.require_paths = %w(lib) manifest_fpath = File.expand_path("MANIFEST", File.dirname(__FILE__)) s.files = File.readlines(manifest_fpath).map { |str| str.chomp } s.has_rdoc = true s.extra_rdoc_files = %w(README) s.rdoc_options = ["--main", "README", "--charset", "utf-8"] s.post_install_message = <. ------------------------------------------------------------------------------- EOS end Gem::PackageTask.new(gemspec) do |pkg| pkg.need_zip = true pkg.need_tar_bz2 = true end desc "Generate all parsers" task :parser do chdir "lib/adlint/cpp" do racc Dir["*.y"] end chdir "lib/adlint/cc1" do racc Dir["*.y"] end end desc "Build Texinfo HTML files" task :doc do chdir "share/doc" do make "all" end end RDoc::Task.new(:rdoc) do |rd| rd.rdoc_dir = "rdoc" rd.title = "AdLint #{AdLint::SHORT_VERSION} Documentation" rd.main = "README" rd.rdoc_files.include("README") rd.rdoc_files.include("bin/*") rd.rdoc_files.include("lib/**/*.{rb,y}") rd.rdoc_files.exclude("lib/adlint/cpp/constexpr.rb") rd.rdoc_files.exclude("lib/adlint/cc1/parser.rb") rd.options << "--charset=utf-8" << "--all" end desc "Generate tags file" task :tags do ctags *Dir["bin/*", "lib/**/*.rb"] end desc "Remove all temporary products" task :clean do chdir "lib/adlint/cpp" do rm_f Dir["*.output"] end chdir "lib/adlint/cc1" do rm_f Dir["*.output"] end end desc "Remove all generated products" task :clobber => :clean do chdir "lib/adlint/cpp" do rm_f Dir["*.y"].map { |f| "#{File.basename(f, '.y')}.rb" } end chdir "lib/adlint/cc1" do rm_f Dir["*.y"].map { |f| "#{File.basename(f, '.y')}.rb" } end rm_f Dir["share/doc/*.html"] rm_rf ["rdoc", "pkg"] rm_f "tags" end RSpec::Core::RakeTask.new(:spec) do |t| t.ruby_opts = %w(-w) t.rspec_opts = %w(-f html -o spec.html) end Cucumber::Rake::Task.new(:features) do |t| t.cucumber_opts = %w(--strict --quiet -f html -o features.html) end def racc(files) files.each do |file| sh "racc #{file} -o #{File.basename(file, ".y")}.rb" racced_src = File.open("#{File.basename(file, ".y")}.rb") { |io| io.read } File.open("#{File.basename(file, ".y")}.rb", "w") do |io| beautify_racced_source(racced_src).each { |line| io.puts(line) } end end end def beautify_racced_source(src) end_count = 0 src.each_line.reverse_each.map { |line| line.chomp! if end_count < 3 && line =~ /\A\s*(end\b.*)\z/ line = " " * end_count + $1 end_count += 1 end line }.reverse end def make(*targets) sh "make " + targets.join(" ") end def ctags(*files) sh "ctags " + files.join(" ") end adlint-3.2.0/ChangeLog0000644000004100000410000071363412224440633014607 0ustar www-datawww-dataWed Aug 28 10:51:30 2013 Yutaka Yanoh * release.ga : 3.2.0 - Support experimental context-tracing feature so that the warning message can be complemented with the context messages. Tue Aug 27 19:35:30 2013 Yutaka Yanoh * share/doc/users_guide_ja.texi : Add descriptions about newly added context-messages supporting context-tracing. * share/doc/users_guide_en.texi : Ditto. Mon Aug 26 11:44:55 2013 Yutaka Yanoh * release.rc : 3.1.0 - Support experimental context-tracing feature so that the warning message can be complemented with the context messages. Fri Aug 23 15:55:53 2013 Yutaka Yanoh * lib/adlint/cc1/value.rb : Fix value version management degraded during supporting context-tracing. * features/code_check/W0460.feature : Add scenario to reproduce false-positive of W0460 code check. Thu Aug 22 14:17:54 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Fix bad context-tracing during or after evaluation of an iteration statement. * lib/adlint/cc1/object.rb : Ditto. * lib/adlint/cc1/value.rb : Ditto. * lib/adlint/cc1/trace.rb : Revise context-tracing interface in order not to output context messages about futural controlling-expressions. * lib/adlint/exam/c_builtin/cc1_check.rb : Ditto. Wed Aug 7 15:01:04 2013 Yutaka Yanoh * lib/adlint/exam/c_builtin/cc1_check.rb : Fix bad W0570 code check degraded during supporting context-tracing. * features/code_check/W0570.feature : Add scenario to reproduce a known bug. Wed Aug 7 13:40:55 2013 Yutaka Yanoh * lib/adlint/cc1/trace.rb : Fix bad context message emission of undefinable variables. * features/code_check/W0460.feature : Add scenario to reproduce bad context message problem. Wed Aug 7 10:28:42 2013 Yutaka Yanoh * lib/adlint/**/* : Support context-tracing to improve readability of warning messages. * lib/adlint/cc1/trace.rb : Add new context tracing module. * features/code_check/* : Add scenarios for testing context-tracing. Wed Jul 10 15:14:43 2013 Yutaka Yanoh * lib/adlint/cc1/value.rb : Refactor relationships between VersionGroup object and its Version object in order to exactly represent a design of the value version management. Fri Jun 28 10:23:30 2013 Yutaka Yanoh * release.ga : 3.0.10 - Add missing comment handling in the initial state of the preprocessing lexer. - Fix incomplete identifier to typedef name translation when the declaring enumerator name is conflicting with the prior typedef name. - Fix evaluation of the global constant variable definition in order not to ignore value of the initializer. - Revise pointer dereferencing behavior to successfully dereference a pointer only when the value of pointer variable is definite. - Improve heuristics of array subscript evaluation with indefinite subscript. - Fix controlling-expression deduction of iteration-statements in order to adopt the ordinary expression when no control breaking condition is found in the iteration body. - Remove unnecessary controlling expression evaluation at entering a do-statement. - Fix value-domain thinning condition to thin domains discarded by a break-statement in the iteration. - Fix bypassing inner-variable's value mutation in order to correctly propagate mutation to the outer-variable. Wed Jun 26 17:42:13 2013 Yutaka Yanoh * release.rc : 3.0.9 - Add missing comment handling in the initial state of the preprocessing lexer. - Fix incomplete identifier to typedef name translation when the declaring enumerator name is conflicting with the prior typedef name. - Fix evaluation of the global constant variable definition in order not to ignore value of the initializer. - Revise pointer dereferencing behavior to successfully dereference a pointer only when the value of pointer variable is definite. - Improve heuristics of array subscript evaluation with indefinite subscript. - Fix controlling-expression deduction of iteration-statements in order to adopt the ordinary expression when no control breaking condition is found in the iteration body. - Remove unnecessary controlling expression evaluation at entering a do-statement. - Fix value-domain thinning condition to thin domains discarded by a break-statement in the iteration. - Fix bypassing inner-variable's value mutation in order to correctly propagate mutation to the outer-variable. Wed Jun 26 16:07:59 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Fix assignment behavior of the array representative element in order to correctly propagete definiteness of the new value to outer array variable's value. * features/code_check/W0461.feature : Add scenario to reproduce false-positive of W0461 code check when the pointee array is initialized by assignment with indefinite subscript value. Tue Jun 25 15:24:13 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Revise evaluation behavior of for-statement's explicit controlling-expression in order to properly evaluate the branch entering condition. Revise evaluation behavior of conditional-expressions to adopt the non-NULL pointer as the expression value when a value of the controlling-expression is indefinite. * lib/adlint/cc1/mediator.rb : Revise pointer dereferencing behavior to successfully dereference a pointer only when the value of pointer variable is definite again. * features/code_check/W0610.feature : Add scenario to reproduce bad variables' value-domain management problem. Mon Jun 24 17:22:47 2013 Yutaka Yanoh * lib/adlint/cc1/branch.rb : Fix over-thinning of controlling variable's value-domain when the terminating branch is of switch-statement enclosed by an iteration-statement. * features/code_check/W0459.feature : Add scenario to reproduce false-positive of W0459 code check caused by bad break statement evaluation in thinning value-domain of the controlling variable. Mon Jun 24 16:51:36 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Restore scrapped side-effect rollback of inner-variables. Fri Jun 21 19:14:39 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Fix incomplete assignment to the array representative element. * features/code_check/W0459.feature : Add scenario to reproduce false-positive of W0459 code check caused by missing representative element updating. Fri Jun 21 17:59:24 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Add assignment to the array representative element. * features/code_check/W0459.feature : Add scenario to reproduce false-negative of W0459 code check caused by missing representative element updating. Fri Jun 21 16:16:16 2013 Yutaka Yanoh * lib/adlint/cc1/expr.rb : Improve heuristics of array subscript evaluation with indefinite subscript again and again. * lib/adlint/cc1/object.rb : Fix bad management of the representative element of array variables in order to correctly update the array by reassigning new value to its representative element. Add UnmappedMemoryWindow instead of UnmappedMemoryBlock. * features/code_check/W0100.feature : Add scenario to reproduce false-positive of W0100 code check caused by bad representative array element. * MANIFEST : Ditto. Thu Jun 20 17:59:25 2013 Yutaka Yanoh * lib/adlint/cc1/expr.rb : Improve heuristics of array subscript evaluation with indefinite subscript again. * lib/adlint/cc1/object.rb : Add management of the representative element of array variables. Add UnmappedMemoryBlock which is not mapped to the MemoryPool in order to bind representative elements to their values. * lib/adlint/cc1/interp.rb : Scrap interpretation mode for controlling expressions. * lib/adlint/cc1/option.rb : Ditto. Thu Jun 20 11:21:59 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Fix bad value version management in order not to forget histories of a value. * features/code_check/W1050.feature : Add scenario to reproduce bad value version management problem. * MANIFEST : Ditto. Wed Jun 19 17:17:27 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Fix bypassing inner-variable's value mutation in order to correctly propagate mutation to the outer-variable. Add missing value-domain thinning of inner-variables. * lib/adlint/cc1/branch.rb : Fix value-domain thinning condition to thin domains discarded by a break-statement in the iteration. * lib/adlint/cc1/environ.rb : Ditto. * lib/adlint/cc1/interp.rb : Ditto. * lib/adlint/cc1/option.rb : Ditto. * features/code_check/W0422.feature : Add scenario to reproduce false-positive of W0422 code check caused by incomplete value-domain thinning. * lib/adlint/cc1/builtin.rb : Fix broken `__adlint__eval' builtin debug function. Mon Jun 17 16:43:32 2013 Yutaka Yanoh * lib/adlint/cpp/lexer.rb : Add missing comment handling in the initial state of the preprocessing lexer. * features/code_check/E0008.feature : Add scenario to reproduce a parse error when a #define directive appears right after a block comment followed by an escaped newline. * MANIFEST : Ditto. Mon Jun 17 15:24:10 2013 Yutaka Yanoh * features/code_check/W0704.feature : Add scenario to reproduce a parse error when the enumerator name is conflicting with the prior typedef name. * MANIFEST : Ditto. * lib/adlint/cc1/lexer.rb : Rewrite identifier set to track declared identifiers in preparation for fixing incomplete identifier to typedef name translation. * lib/adlint/cc1/parser.y : Fix incomplete identifier to typedef name translation when the declaring enumerator name is conflicting with the prior typedef name. Thu Jun 13 15:53:21 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Remove unnecessary controlling expression evaluation at entering a do-statement. * features/code_check/W9001.feature : Add scenario to reproduce false-positive of W9001 code check about body of the one-shot do-statement. Thu Jun 13 13:42:24 2013 Yutaka Yanoh * lib/adlint/cc1/domain.rb : Fix bad bitwise & evaluation with indefinite value domains. * features/code_check/W0612.feature : Add scenario to reproduce false-positive of W0612 code check when value of an operand is indefinite. * MANIFEST : Ditto. Wed Jun 12 19:57:55 2013 Yutaka Yanoh * lib/adlint/cc1/syntax.rb : Fix controlling-expression deduction of iteration-statements in order to adopt the ordinary expression when no control breaking condition is found in the iteration body. * features/code_check/W0422.feature : Add scenario to reproduce a known bug. Wed Jun 12 15:51:38 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Add missing value coercing in evaluation of variable definition when the variable has already been declared. Wed Jun 12 11:43:35 2013 Yutaka Yanoh * features/code_check/W0459.feature : Add scenario to reproduce a known bug. * lib/adlint/cc1/interp.rb : Fix conditional-expression evaluation in order to evaluate controlling expression in the same manner as that of if-statement. * lib/adlint/cc1/mediator.rb : Fix pointer dereference behavior in order to find possible pointee objects when the pointer value is not definite. Fri Jun 7 11:45:23 2013 Yutaka Yanoh * lib/adlint/cc1/expr.rb : Revise global constant array subscript evaluation policy in order to make undefined-value when the subscript value is indefinite. Fri Jun 7 10:44:06 2013 Yutaka Yanoh * features/code_check/W1071.feature : Add scenario to reproduce the broken array subscript evaluation in controlling expressions. * lib/adlint/cc1/expr.rb : Fix bad array subscript evaluation so that the array-subscript-expression makes undefined-value when no designated object is found. Thu Jun 6 18:36:13 2013 Yutaka Yanoh * features/code_check/W0613.feature : Add scenario to reproduce false-positive of W0613 code check when an array-subscript-expression refers to the global constant array is specified as the controlling expression. * lib/adlint/cc1/expr.rb : Improve heuristics of array subscript evaluation with indefinite subscript only in controlling expressions. * lib/adlint/cc1/interp.rb : Ditto. * lib/adlint/cc1/option.rb : Ditto. Wed Jun 5 17:37:23 2013 Yutaka Yanoh * lib/adlint/cc1/object.rb : Fix variable's value version rollback mechanism in order not to do unnecessary rollback of inner-variables of array or composite value. * lib/adlint/cc1/type.rb : Fix bad type traits predicate methods for array type. * features/code_check/W0097.feature : Add scenario to reproduce a known bug. * features/code_check/W0461.feature : Ditto. * lib/adlint/cc1/value.rb : Add comment to newly added destructive #force_oeverwrite! method. Wed Jun 5 17:21:36 2013 Yutaka Yanoh * lib/adlint/cc1/mediator.rb : Revise pointer dereferencing behavior to successfully dereference a pointer only when the value of pointer variable is definite. Tue Jun 4 20:33:44 2013 Yutaka Yanoh * features/code_check/W0705.feature : Add scenario to reproduce a known bug. * lib/adlint/cc1/interp.rb : Fix evaluation of the global constant variable definition in order not to ignore value of the initializer. * lib/adlint/cc1/object.rb : Ditto. * lib/adlint/cc1/value.rb : Ditto. Fri May 31 10:54:11 2013 Yutaka Yanoh * release.ga : 3.0.8 - Fix abend problem of preprocessor when a block comment is not terminated in the translation-unit. - Fix block comment handling in order not to dive into nested part when a single slash character appears before the comment terminator. - Fix infinite-loop problem of preprocessor when the #include directive appears with undefined macro. - Fix bad expression-constancy check in order to treat an expression derives an address-constant as a constant-expression. - Fix bad variable defining behavor in order to correctly evaluate sizeof-expression that refers defining variable in the initializer. - Revise specification of W0642 code check in order to warn about all the illegal address derivation from the object declared as `register'. - Fix abend problem in parsing unnamed bit-field declaration. - Fix W0786 code check in order not to warn when a typedefed type which is same as signed or unsigned int is specified as a base of the bit-field. - Fix incomplete object cross-reference extraction in order to record object references within global scope in case of global function table initialization. - Fix incomplete object cross-reference graph and function call graph in order to correctly warn about useless objects. - Fix bad `##' operator evaluation in order to comply with the ISO C99 standard. Thu May 30 21:05:44 2013 Yutaka Yanoh * release.rc : 3.0.7 - Fix function call extraction in order to output function calls within the global scope. - Improve performance of FN_CALL metric measurement. - Fix bad function call graph calculation. - Fix bad expression-constancy check in order not to misunderstand that an expression contains object-specifier which designates a variable is constant-expression when a function of the same name has been declared. Thu May 30 20:07:56 2013 Yutaka Yanoh * lib/adlint/cc1/syntax.rb : Fix bad expression-constancy check in order not to misunderstand that an expression contains object-specifier which designates a variable is constant-expression when a function of the same name has been declared. * lib/adlint/cc1/mediator.rb : Ditto. * lib/adlint/cc1/object.rb : Ditto. * features/code_check/W0422.feature : Add scenario to reproduce a known bug. Thu May 30 13:54:20 2013 Yutaka Yanoh * lib/adlint/exam/c_builtin/cc1_code.rb : Fix function call extraction in order to output function calls within the global scope. * lib/adlint/exam/c_builtin/ld_metric.rb : Improve performance of FN_CALL metric measurement. * lib/adlint/ld/object.rb : Fix bad function call graph calculation. * lib/adlint/exam/c_builtin.rb : Fix bad abbreviations of class names. * lib/adlint/code.rb : Ditto. * lib/adlint/report.rb : Ditto. Wed May 29 18:48:01 2013 Yutaka Yanoh * release.rc : 3.0.5 - Fix abend problem of preprocessor when a block comment is not terminated in the translation-unit. - Fix block comment handling in order not to dive into nested part when a single slash character appears before the comment terminator. - Fix infinite-loop problem of preprocessor when the #include directive appears with undefined macro. - Fix bad expression-constancy check in order to treat an expression derives an address-constant as a constant-expression. - Fix bad variable defining behavor in order to correctly evaluate sizeof-expression that refers defining variable in the initializer. - Revise specification of W0642 code check in order to warn about all the illegal address derivation from the object declared as `register'. - Fix abend problem in parsing unnamed bit-field declaration. - Fix W0786 code check in order not to warn when a typedefed type which is same as signed or unsigned int is specified as a base of the bit-field. - Fix incomplete object cross-reference extraction in order to record object references within global scope in case of global function table initialization. - Fix incomplete object cross-reference graph and function call graph in order to correctly warn about useless objects. - Fix bad `##' operator evaluation in order to comply with the ISO C99 standard. Wed May 29 18:31:55 2013 Yutaka Yanoh * features/code_check/W0422.feature : Add scenario to reproduce a known bug. * lib/adlint/cc1/ctrlexpr.rb : Fix controlling expression evaluation in order not to install implicit functions when the effective controlling expression is not a regular one and the controlling variable is declared in the iteration body. Wed May 29 13:26:20 2013 Yutaka Yanoh * features/code_check/W0830.feature : Add scenario to reproduce bad macro replacement problem. * lib/adlint/cpp/macro.rb : Fix bad `##' operator evaluation in order to comply with the ISO C99 standard. Tue May 28 21:47:56 2013 Yutaka Yanoh * lib/adlint/exam/c_builtin/ld_metric.rb : Fix FN_CALL measurement to count a number of caller functions instead of a number of function calls. Tue May 28 20:59:27 2013 Yutaka Yanoh * lib/adlint/exam/c_builtin/ld_check.rb : Fix W0589 code check in order to warn when only one function which is defined in the same translation-unit refers to the object but the function refers to that twice or more. Tue May 28 19:08:41 2013 Yutaka Yanoh * lib/adlint/exam/c_builtin/ld_check.rb : Fix incomplete object cross-reference graph and function call graph in order to correctly warn about useless objects. * lib/adlint/exam/c_builtin/ld_metric.rb : Ditto. * lib/adlint/ld/phase.rb : Ditto. * lib/adlint/ld/util.rb : Ditto. Tue May 28 16:28:11 2013 Yutaka Yanoh * lib/adlint/ld/object.rb : Rewrite object cross-reference graph and function call graph management. * lib/adlint/ld/typedef.rb : Ditto. * lib/adlint/analyzer.rb : Ditto. Tue May 28 11:31:54 2013 Yutaka Yanoh * lib/adlint/cpp/phase.rb : Refine inner object names of phase context. * lib/adlint/cc1/phase.rb : Ditto. * lib/adlint/exam/c_builtin/cpp_check.rb : Ditto. * lib/adlint/exam/c_builtin/cpp_check_shima.rb : Ditto. * lib/adlint/exam/c_builtin/cpp_code.rb : Ditto. * lib/adlint/exam/c_builtin/cc1_check.rb : Ditto. * lib/adlint/exam/c_builtin/cc1_check_shima.rb : Ditto. * lib/adlint/exam/c_builtin/cc1_metric.rb : Ditto. * lib/adlint/cc1/util.rb : Ditto. Mon May 27 15:21:14 2013 Yutaka Yanoh * lib/adlint/exam/c_builtin/cc1_code.rb : Fix incomplete object cross-reference extraction in order to record object references within global scope in case of global function table initialization. * lib/adlint/code.rb : Ditto. Fri May 24 19:11:52 2013 Yutaka Yanoh * lib/adlint/cc1/parser.y : Remove useless state management of the identifier translation in `struct_declaration'. Fri May 24 16:05:07 2013 Yutaka Yanoh * features/code_check/W0491.feature : Add scenario to reproduce abend problem of parser. * lib/adlint/cc1/parser.y : Fix bad state management of the identifier translation again and again. Fri May 24 15:09:25 2013 Yutaka Yanoh * features/code_check/W0542.feature : Add scenario to reproduce abend problem of parser. * lib/adlint/cc1/parser.y : Fix bad state management of the identifier translation again. Fri May 24 13:47:47 2013 Yutaka Yanoh * features/code_check/W0491.feature : Add scenario to reproduce abend problem of parser. * lib/adlint/cc1/parser.y : Fix bad state management of the identifier translation. Fri May 24 12:32:54 2013 Yutaka Yanoh * features/code_check/W0491.feature : Add scenario to reproduce abend problem of parsing the same name in different namespaces. * lib/adlint/cc1/parser.y : Fix incomplete identifier to typedef-name translation. Thu May 23 19:10:38 2013 Yutaka Yanoh * features/code_check/W0492.feature : Add scenario to reproduce abend problem of parsing the same name in different namespaces. * lib/adlint/cc1/parser.y : Fix incomplete identifier to typedef-name translation. * lib/adlint/cc1/lexer.rb : Add note about namespaces of identifiers. Wed May 22 13:12:48 2013 Yutaka Yanoh * features/code_check/W0786.feature : Add scenario to reproduce a known bug. * lib/adlint/exam/c_builtin/cc1_check.rb : Fix W0786 code check in order not to warn when a typedefed type which is same as signed or unsigned int is specified as a base of the bit-field. Tue May 21 19:34:10 2013 Yutaka Yanoh * lib/adlint/cc1/parser.y : Fix abend problem in parsing unnamed bit-field declaration. Sat May 18 15:25:51 2013 Yutaka Yanoh * features/code_check/W1047.feature : Add scenario to reproduce a known bug. * lib/adlint/cc1/syntax.rb : Fix bad expression-constancy check in order to treat an address-expression as a constant-expression. * lib/adlint/exam/c_builtin/cc1_check.rb : Fix W1047 code check to check expression constancy by the newly added unified interface. Fri May 17 17:42:35 2013 Yutaka Yanoh * features/code_check/W0610.feature : Add scenario to reproduce a known bug. * lib/adlint/cc1/interp.rb : Fix bad value domain management of the variable whose storage duration is static. Fri May 17 15:42:42 2013 Yutaka Yanoh * share/doc/users_guide_ja.texi : Revise description of W0642 message. * share/doc/users_guide_en.texi : Ditto. Fri May 17 15:00:25 2013 Yutaka Yanoh * features/code_check/W9003.feature : Add scenario to reproduce a known bug. * lib/adlint/exam/c_builtin/cc1_check.rb : Revise specification of W0642 code check in order to warn about all the illegal address derivation from the object declared as `register'. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * lib/adlint/exam/c_builtin/cc1_check.rb : Add notification about object address derivation. Fri May 17 12:55:38 2013 Yutaka Yanoh * features/code_check/W0642.feature : Add scenario to reproduce a known bug. * lib/adlint/exam/c_builtin/cc1_check.rb : Fix W0642 code check in order to warn only when the original object of implicit conversion is an array. * lib/adlint/cc1/mediator.rb : Add implicit conversion notification in object conversion methods to notify illegal conversions. * lib/adlint/cc1/interp.rb : Ditto. * lib/adlint/cc1/expr.rb : Ditto. * lib/adlint/cc1/ctrlexpr.rb : Ditto. * lib/adlint/cc1/object.rb : Fix argument to parameter assignment behavior in order to notify illegal conversions correctly. Fri May 17 09:35:36 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Fix bad variable defining behavor in order not to predefine a variable of incomplete type. Thu May 16 18:38:40 2013 Yutaka Yanoh * features/code_check/W0580.feature : Add scenario to reproduce a known bug. Thu May 16 17:08:41 2013 Yutaka Yanoh * features/code_check/W0422.feature : Add scenario to reproduce a known bug. * lib/adlint/cc1/interp.rb : Fix bad variable defining behavor in order to correctly evaluate sizeof-expression that refers defining variable in the initializer. Thu May 16 11:00:07 2013 Yutaka Yanoh * features/code_check/W1047.feature : Add scenario to reproduce a known bug. * lib/adlint/cc1/syntax.rb : Fix bad expression-constancy check in order to treat an expression derives an address-constant as a constant-expression. * lib/adlint/cc1/interp.rb : Move runtime object manipulation interface to InterpreterMediator. Fix over-notification of implicit conversion in order not to check the natural conversions suck as function to function-pointer conversion. * lib/adlint/cc1/mediator.rb : Add convenient interface for expression-constancy check and runtime object manipulations. * lib/adlint/cc1/expr.rb : Ditto. * lib/adlint/exam/c_builtin/cc1_check.rb : Ditto. * lib/adlint/cc1/enum.rb : Add enumerator name extraction interface for expression-constancy check. * lib/adlint/cc1/object.rb : Move object conversion responsibilities from Interpreter to TypedObject. Add function name extraction interface for expression-constancy check. Mon May 13 19:19:31 2013 Yutaka Yanoh * lib/adlint/cpp/eval.rb : Fix infinite-loop problem of preprocessor when the #include directive appears with undefined macro. * lib/adlint/error.rb : Ditto. * etc/mesg.d/core/ja_JP/messages.yml : Ditto. * etc/mesg.d/core/en_US/messages.yml : Ditto. Mon May 13 17:41:41 2013 Yutaka Yanoh * lib/adlint/cpp/lexer.rb : Fix block comment handling in order not to dive into nested part when a single slash character appears before the comment terminator. Mon May 13 16:29:47 2013 Yutaka Yanoh * lib/adlint/cpp/lexer.rb : Fix bad handling of block comments in order not to assume comment terminator as a part of comment content. * lib/adlint/cpp/eval.rb : Fix abend problem of preprocessor when a block comment is not terminated in the translation-unit. Sun May 12 21:26:44 2013 Yutaka Yanoh * lib/adlint/memo.rb : Revise cache name generation rule by the example of Lisp naming conventions. Sat May 4 01:29:26 2013 Yutaka Yanoh * lib/adlint/memo.rb : Add `force_nullary' option to Memoizable#memoize and improve performance of memoized unary method. * lib/adlint/cc1/domain.rb : Ditto. * lib/adlint/ld/object.rb : Ditto. * lib/adlint/location.rb : Ditto. Fri Apr 12 13:06:31 2013 Yutaka Yanoh * release.ga : 3.0.4 - Fix abend problem of adlint_chk command. Fri Apr 12 12:06:23 2013 Yutaka Yanoh * release.rc : 3.0.3 - Fix abend problem of adlint_chk command. Fri Apr 12 11:56:59 2013 Yutaka Yanoh * lib/adlint/analyzer.rb : Fix abend problem of adlint_chk command. Thu Apr 12 10:48:11 2013 Yutaka Yanoh * release.ga : 3.0.2 - Add missing transparency between an array and a pointer to its first element in expression evaluation. - Add missing transparency between a function and a function pointer in expression evaluation. - Clarify W0100 message text. - Refactor memoizing utility in preparation for performance tuning. Wed Apr 10 17:18:42 2013 Yutaka Yanoh * lib/adlint/memo.rb : Refactor memoizing utility in preparation for performance improvement. Tue Apr 2 17:22:02 2013 Yutaka Yanoh * release.rc : 3.0.1 - Add missing transparency between an array and a pointer to its first element in expression evaluation. - Add missing transparency between a function and a function pointer in expression evaluation. - Clarify W0100 message text. Tue Apr 2 16:50:12 2013 Yutaka Yanoh * etc/mesg.d/c_builtin/ja_JP/messages.yml : Clarify W0100 message text. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. Mon Apr 1 15:55:03 2013 Yutaka Yanoh * lib/adlint/cc1/expr.rb : Add missing transparency between a function and a function pointer in expression evaluation. * lib/adlint/cc1/interp.rb : Ditto. Thu Apr 1 10:08:45 2013 Yutaka Yanoh * lib/adlint/cc1/expr.rb : Add missing transparency between an array and a pointer to its first element in expression evaluation. * lib/adlint/cc1/interp.rb : Ditto. Tue Mar 26 17:01:16 2013 Yutaka Yanoh * release.ga : 3.0.0 - Support pathname based code-exam selection. - Improve performance of code-exams. - Add ad-hoc traits schema migration for 3.0.0 release. - Support message-class based code-check selection. - Support annotation based message suppression. - Fix traits object freezing in order not to over-freeze memoizing objects. - Rename `individual_selection' item in the traits file to `individual_suppression'. - Fix sma-time annotation parser in order to correctly evaluate suppression specifiers including new-line characters. - Fix cma-time annotation parser in order to correctly evaluate suppression specifiers including new-line characters. - Fix cma-time annotation parser in order to handle the location of each annotation correctly. - Add new field indicates whether the function is declared implicitly or explicitly to DCL(F) record of the metrics file. - Fix bad output validation that lines of the analysis result is fewer than one of the specification. - Add missing function reference notification after insertion of the implicit function declaration. - Fix missing function-call notification problem of the control-breaking standard library functions such as exit(3). - Fix W1063 code check in order to warn when the function returns value of non-constant inconsistent enum-typed expression. - Fix W1062 code check in order to warn when an enum type of the rhs operand is not consistent to one of the lhs operand. - Fix W1061 code check in order to warn when an enum type of the argument expression is not consistent to one of the corresponding parameter. - Fix W0023 code check in order to warn only when the pointer operand appears in an arithmetic expressions. - Improve library interface to support concurrent analysis. - Fix missing literal_prefix of LIT record for the octal-constant. - Improve library interface not to use thread local storage in the library core. - Rename AdLint::C namespace to AdLint::Cc1 in order to distinguish `c' as a language and `cc1' as a analysis phase. - Add missing reference notification of the controlling expression value in switch-statement. - Fix fall-through logic of switch-statement in order to work correctly with consecutive case and default labels. - Fix normalized controlling-expression derivation logic of switch-statement's case and default clause in order to work correctly with consecutive case and default labels. - Fix W0003 code check not to misunderstand that the switch-statement has no default clause when the switch-statement contains consecutive case and default labels. - Fix switch-statement evaluation in order to correctly fall-through when the switch-statement has consecutive case labels. - Fix bad value domain management in order to correctly thin a value domain of the terminating execution path. Tue Mar 23 19:21:08 2013 Yutaka Yanoh * release.rc : 2.7.11 - Fix bad value domain management in order to correctly thin a value domain of the terminating execution path. Tue Mar 22 21:19:43 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Fix bad value domain management in order to correctly thin a value domain of the terminating execution path. * lib/adlint/cc1/branch.rb : Ditto. * lib/adlint/cc1/option.rb : Ditto. * lib/adlint/cc1/ctrlexpr.rb : Ditto. * lib/adlint/cc1/value.rb : Ditto. Tue Mar 20 13:27:15 2013 Yutaka Yanoh * release.rc : 2.7.10 - Fix switch-statement evaluation in order to correctly fall-through when the switch-statement has consecutive case labels. Tue Mar 19 16:44:41 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Fix switch-statement evaluation in order to correctly fall-through when the switch-statement has consecutive case labels. Tue Mar 19 11:30:46 2013 Yutaka Yanoh * release.rc : 2.7.9 - Add missing reference notification of the controlling expression value in switch-statement. - Fix fall-through logic of switch-statement in order to work correctly with consecutive case and default labels. - Fix normalized controlling-expression derivation logic of switch-statement's case and default clause in order to work correctly with consecutive case and default labels. - Fix W0003 code check not to misunderstand that the switch-statement has no default clause when the switch-statement contains consecutive case and default labels. Mon Mar 18 16:05:49 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Fix fall-through logic of switch-statement in order to work correctly with consecutive case and default labels. * lib/adlint/cc1/syntax.rb : Fix normalized controlling-expression derivation logic of switch-statement's case and default clause in order to work correctly with consecutive case and default labels. * lib/adlint/exam/c_builtin/cc1_check.rb : Fix W0003 code check not to misunderstand that the switch-statement has no default clause when the switch-statement contains consecutive case and default labels. Fri Mar 15 17:40:52 2013 Yutaka Yanoh * lib/adlint/cc1/interp.rb : Add missing reference notification of the controlling expression value in switch-statement. Thu Mar 14 17:45:37 2013 Yutaka Yanoh * release.rc : 2.7.8 - Improve library interface not to use thread local storage in the library core. - Rename AdLint::C namespace to AdLint::Cc1 in order to distinguish `c' as a language and `cc1' as a analysis phase. Thu Mar 14 17:43:10 2013 Yutaka Yanoh * lib/adlint/**/* : Rename AdLint::C namespace to AdLint::Cc1 in order to distinguish `c' as a language and `cc1' as a analysis phase. Tue Feb 19 14:19:46 2013 Yutaka Yanoh * lib/adlint/**/* : Improve library interface not to use thread local storage in the library core. * bin/adlint : Ditto. * bin/adlint_sma : Ditto. * bin/adlint_cma : Ditto. * bin/adlint_chk : Ditto. Tue Feb 12 17:34:51 2013 Yutaka Yanoh * release.rc : 2.7.7 - Add missing function reference notification after insertion of the implicit function declaration. - Fix missing function-call notification problem of the control-breaking standard library functions such as exit(3). - Fix W1063 code check in order to warn when the function returns value of non-constant inconsistent enum-typed expression. - Fix W1062 code check in order to warn when an enum type of the rhs operand is not consistent to one of the lhs operand. - Fix W1061 code check in order to warn when an enum type of the argument expression is not consistent to one of the corresponding parameter. - Fix W0023 code check in order to warn only when the pointer operand appears in an arithmetic expressions. - Improve library interface to support concurrent analysis. - Fix missing literal_prefix of LIT record for the octal-constant. Fri Feb 8 18:41:53 2013 Yutaka Yanoh * lib/adlint/c/syntax.rb : Fix missing literal_prefix of LIT record for the octal-constant. Fri Feb 8 15:11:47 2013 Yutaka Yanoh * lib/adlint/**/* : Improve library interface to support concurrent analysis and refactor thoroughly. * bin/adlint : Ditto. * bin/adlint_sma : Ditto. * bin/adlint_cma : Ditto. * bin/adlint_chk : Ditto. Mon Feb 4 15:58:49 2013 Rie Shima * features/code_check/W0023.feature : Add W0023 specification. * features/code_check/W0024.feature : Add W0024 specification. Fri Feb 1 11:29:53 2013 Rie Shima * lib/adlint/exam/c_builtin/c_check.rb : Fix W0023 code check in order to warn only when the pointer operand appears in an arithmetic expressions. Thu Jan 31 15:13:23 2013 Rie Shima * features/code_check/W0018.feature : Add W0018 specification. * features/code_check/W0019.feature : Add W0019 specification. * features/code_check/W0021.feature : Add W0021 specification. Thu Jan 24 17:44:57 2013 Yutaka Yanoh * features/code_check/W1057.feature : Add W1057 specification. Thu Jan 24 14:56:55 2013 Yutaka Yanoh * features/code_check/W1058.feature : Add W1058 specification. Thu Jan 24 14:01:53 2013 Yutaka Yanoh * features/code_check/W1059.feature : Add W1059 specification. Thu Jan 24 13:38:43 2013 Yutaka Yanoh * features/code_check/W1060.feature : Add W1060 specification. Thu Jan 24 13:20:13 2013 Yutaka Yanoh * features/code_check/W1061.feature : Add W1061 specification. * lib/adlint/exam/c_builtin/c_check.rb : Fix W1061 code check in order to warn when an enum type of the argument expression is not consistent to one of the corresponding parameter. Thu Jan 24 11:27:28 2013 Yutaka Yanoh * features/code_check/W1062.feature : Add W1062 specification. * lib/adlint/exam/c_builtin/c_check.rb : Fix W1062 code check in order to warn when an enum type of the rhs operand is not consistent to one of the lhs operand. Thu Jan 24 11:00:16 2013 Yutaka Yanoh * etc/mesg.d/c_builtin/ja_JP/messages.yml : Clarify W1062 and W1063 message text. * share/doc/users_guide_ja.texi : Ditto. Wed Jan 23 17:25:33 2013 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Fix W1063 code check in order to warn when the function returns value of non-constant inconsistent enum-typed expression. * features/code_check/W1064.feature : Fix W1064 specification. * features/code_check/W1063.feature : Fix W1063 specification. * features/code_check/W1065.feature : Fix W1065 specification. Tue Jan 22 13:09:31 2013 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix missing function-call notification problem of the control-breaking standard library functions such as exit(3). Tue Jan 22 11:00:13 2013 Yutaka Yanoh * lib/adlint/c/expr.rb : Add missing function reference notification after insertion of the implicit function declaration. Mon Jan 21 19:49:45 2013 Yutaka Yanoh * release.rc : 2.7.6 - Fix sma-time annotation parser in order to correctly evaluate suppression specifiers including new-line characters. - Fix cma-time annotation parser in order to correctly evaluate suppression specifiers including new-line characters. - Fix cma-time annotation parser in order to handle the location of each annotation correctly. - Add new field indicates whether the function is declared implicitly or explicitly to DCL(F) record of the metrics file. - Fix bad output validation that lines of the analysis result is fewer than one of the specification. Mon Jan 21 19:45:59 2013 Yutaka Yanoh * lib/adlint/c/expr.rb : Correct to run on Ruby 1.9.3-p374 without warnings. Mon Jan 21 19:39:56 2013 Yutaka Yanoh * features/step_definitions/code_check_steps.rb : Fix bad output validation that lines of the analysis result is fewer than one of the specification. * features/support/env.rb : Ditto. Mon Jan 21 18:40:33 2013 Yutaka Yanoh * lib/adlint/c/expr.rb : Add notification about insertion of implicit function declarations. * lib/adlint/c/interp.rb : Ditto. * lib/adlint/c/mediator.rb : Ditto. * lib/adlint/c/object.rb : Add FunctionTable#declare_implicitly for implicit function declaration. * lib/adlint/code.rb : Add new field indicates whether the function is declared implicitly or explicitly to DCL(F) record of the metrics file. * lib/adlint/metric.rb : Ditto. * lib/adlint/report.rb : Ditto. * lib/adlint/ld/object.rb : Ditto. * lib/adlint/exam/c_builtin/c_code.rb : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Correct W0109 code check not to warn about function-calls of same implicitly declared function. * lib/adlint/exam/c_builtin/ld_check.rb : Correct W0770 and W1037 code checks to check only about explicitly declared functions. Mon Jan 21 14:44:40 2013 Yutaka Yanoh * lib/adlint/ld/phase.rb : Fix cma-time annotation parser in order to handle the location of each annotation correctly. Sat Jan 19 14:56:09 2013 Yutaka Yanoh * lib/adlint/ld/phase.rb : Fix cma-time annotation parser in order to correctly evaluate suppression specifiers including new-line characters. Fri Jan 18 15:30:41 2013 Yutaka Yanoh * lib/adlint/annot.rb : Fix sma-time annotation parser in order to correctly evaluate suppression specifiers including new-line characters. Thu Jan 17 17:14:58 2013 Yutaka Yanoh * release.rc : 2.7.5 - Rename `individual_selection' item in the traits file to `individual_suppression'. Thu Jan 17 16:57:27 2013 Yutaka Yanoh * lib/adlint/traits.rb : Rename `individual_selection' item in the traits file to `individual_suppression'. * lib/adlint/cpp/phase.rb : Ditto. * lib/adlint/ld/phase.rb : Ditto. * bin/adlintize : Ditto. * etc/conf.d/**/traits*.erb : Ditto. * features/support/env.rb : Ditto. * spec/conf.d/default_traits.yml : Ditto. Thu Jan 17 13:57:11 2013 Yutaka Yanoh * release.rc : 2.7.4 - Fix traits object freezing in order not to over-freeze memoizing objects. Thu Jan 17 13:32:11 2013 Yutaka Yanoh * lib/adlint/traits.rb : Fix traits object freezing in order not to over-freeze memoizing objects. Thu Jan 17 10:46:03 2013 Yutaka Yanoh * release.rc : 2.7.3 - Support annotation based message suppression. Thu Jan 17 09:25:47 2013 Yutaka Yanoh * lib/adlint/ld/phase.rb : Support cma-time evaluation of annotations for message suppression. * lib/adlint/ld/typedef.rb : Ditto. * lib/adlint/ld/object.rb : Ditto. * lib/adlint/analyzer.rb : Ditto. Thu Jan 15 18:47:43 2013 Yutaka Yanoh * lib/adlint/report.rb : Simplify message output interface and support deferred message output. * lib/adlint/exam.rb : Ditto. * lib/adlint/driver.rb : Ditto. * lib/adlint/supp.rb : Add annotation based message suppression. * MANIFEST : Ditto. * lib/adlint/message.rb : Bump pair of package name and message name to new MessageId object. * lib/adlint/traits.rb : Ditto. * lib/adlint/error.rb : Ditto. * lib/adlint/exam.rb : Ditto. * lib/adlint/report.rb : Ditto. * lib/adlint/cpp/phase.rb : Support sma-time evaluation of annotations for message suppression. * lib/adlint/analyzer.rb : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Revise output method of context messages. * lib/adlint/exam/c_builtin/ld_check.rb : Ditto. * lib/adlint/exam.rb : Support deferred warning message output. * lib/adlint/phase.rb : Ditto. * lib/adlint/exam/c_builtin/cpp_check.rb : Ditto. Thu Jan 10 15:06:15 2013 Yutaka Yanoh * lib/adlint/annot.rb : Add inline annotation feature. * MANIFEST : Ditto. Mon Jan 7 11:13:12 2013 Yutaka Yanoh * release.rc : 2.7.2 - Support message-class based code-check selection. Mon Jan 7 09:35:21 2013 Yutaka Yanoh * lib/adlint/exam.rb : Support message-class based code-check selection. * lib/adlint/phase.rb : Ditto. * lib/adlint/message.rb : Ditto. * lib/adlint/traits.rb : Ditto. Fri Dec 28 11:05:20 2012 Yutaka Yanoh * release.rc : 2.7.1 - Add ad-hoc traits schema migration for 3.0.0 release. Fri Dec 28 10:58:26 2012 Yutaka Yanoh * bin/adlintize : Add ad-hoc traits schema migration for 3.0.0 release. Thu Dec 27 14:40:05 2012 Yutaka Yanoh * release.rc : 2.7.0 - Support pathname based code-exam selection. - Improve performance of code-exams. Wed Dec 26 17:01:36 2012 Yutaka Yanoh * lib/adlint/traits.rb : Revise format of the traits file to remove `message_with_class' controls format of the message file. * lib/adlint/message.rb : Ditto. * etc/conf.d/**/traits*.erb : Ditto. * features/support/env.rb : Ditto. * spec/conf.d/default_traits.yml : Ditto. Wed Dec 26 14:53:47 2012 Yutaka Yanoh * lib/adlint/prelude.rb : Improve performance of methods of Pathname. Tue Dec 25 16:07:02 2012 Yutaka Yanoh * lib/adlint/metric.rb : Fix bad cma behavior that all locations of source files are converted into absolute pathnames not relative pathnames from cma's cwd. Tue Dec 25 15:26:48 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Fix W0117 and W0118 code check to keep existing behavior after supporting pathname based code-exam selection. Tue Dec 25 14:38:38 2012 Yutaka Yanoh * lib/adlint/cpp/util.rb : Fix bad definition of basic source character set table in order to correct W0576 code check. Tue Dec 25 11:00:55 2012 Yutaka Yanoh * lib/adlint/memo.rb : Add new file to split responsibilities for method memoization. * lib/adlint/util.rb : Ditto. * lib/adlint/c/syntax.rb : Fix abend problem when an array parameter declaration without identifier appears. * lib/adlint/metric.rb : Fix abend problem when the working directory of cma is different with one of sma. * lib/adlint/ld/object.rb : Ditto. * lib/adlint/ld/typedef.rb : Ditto. Fri Dec 21 18:43:45 2012 Yutaka Yanoh * lib/adlint/location.rb : Improve performance of #in_analysis_target? predicate method. * lib/adlint/util.rb : Fix Memoizable#memoize to support result caching of predicate methods ends with `?'. * lib/adlint/prelude.rb : Override Pathname#realpath to cache result in order to reduce file-system access. Fri Dec 21 16:43:35 2012 Yutaka Yanoh * lib/adlint/exam.rb : Support pathname based code-exam selection. * lib/adlint/exam/c_builtin/cpp_check.rb : Ditto. * lib/adlint/exam/c_builtin/cpp_check_shima.rb : Ditto. * lib/adlint/exam/c_builtin/cpp_code.rb : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Ditto. * lib/adlint/exam/c_builtin/c_check_shima.rb : Ditto. * lib/adlint/exam/c_builtin/c_code.rb : Ditto. * lib/adlint/exam/c_builtin/c_metric.rb : Ditto. * lib/adlint/exam/c_builtin/ld_check.rb : Ditto. * lib/adlint/exam/c_builtin/ld_metric.rb : Ditto. * lib/adlint/cpp/syntax.rb : Add #analysis_target? predicate method to location aware entities. * lib/adlint/cpp/macro.rb : Ditto. * lib/adlint/c/syntax.rb : Ditto. * lib/adlint/c/seqp.rb : Ditto. * lib/adlint/ld/typedef.rb : Ditto. * lib/adlint/ld/object.rb : Ditto. * lib/adlint/location.rb : Add new file to split responsibilities for code location management. * lib/adlint/token.rb : Ditto. * spec/adlint/location_spec.rb : Ditto. * MANIFEST : Ditto. * lib/adlint/prelude.rb : Add #identical? and #under? methods to standard Pathname class. Tue Dec 18 19:43:46 2012 Yutaka Yanoh * lib/adlint/traits.rb : Revise format of the traits file to support useless warning suppression and selective code checking. * lib/adlint/cpp/eval.rb : Ditto. * lib/adlint/cpp/subst.rb : Ditto. * lib/adlint/c/type.rb : Ditto. * etc/conf.d/**/traits*.erb : Ditto. * features/support/env.rb : Ditto. * spec/conf.d/default_traits.yml : Ditto. Mon Dec 17 15:14:46 2012 Yutaka Yanoh * release.ga : 2.6.14 - Revise specification of code checks about implicit conversion from or to `char' type to clarify warning's intention. - Improve the library interface to easily integrate AdLint with other products. - Support lint and AdLint specific predefined macros; `__LINT__', `lint', `__lint', `__lint__', `__ADLINT__', `adlint', `__adlint' and `__adlint__'. - Revise code checks' output specification of W0051, W0052, W0491, W0492, W0703, W0704, W0770, W0771, W0787, W0788, W0789, W0790 and W1037 to add context messages telling where is the problematic pair identifiers. Fri Dec 14 15:22:10 2012 Yutaka Yanoh * release.rc : 2.6.13 - Revise specification of code checks about implicit conversion from or to `char' type to clarify warning's intention. - Improve the library interface to easily integrate AdLint with other products. - Support lint and AdLint specific predefined macros; `__LINT__', `lint', `__lint', `__lint__', `__ADLINT__', `adlint', `__adlint' and `__adlint__'. - Revise code checks' output specification of W0051, W0052, W0491, W0492, W0703, W0704, W0770, W0771, W0787, W0788, W0789, W0790 and W1037 to add context messages telling where is the problematic pair identifiers. Thu Dec 13 15:33:33 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Revise code checks' output specification of W0051, W0052, W0491, W0492, W0703, W0704, W0771, W0787, W0788, W0789 and W0790 to add context messages telling where is the problematic pair identifiers. * lib/adlint/exam/c_builtin/ld_check.rb : Revise code checks' output specification of W0770, W0791 and W1037 to add context message telling where is the problematic pair identifiers. * share/doc/users_guide_ja.texi : Update descriptions about revised W0051, W0052, W0491, W0492, W0703, W0704, W0770, W0771, W0787, W0788, W0789, W0790, W0791 and W1037 messages. * share/doc/users_guide_en.texi : Ditto. Tue Dec 11 17:55:27 2012 Yutaka Yanoh * lib/adlint/cpp/macro.rb : Support lint and AdLint specific predefined macros; `__LINT__', `lint', `__lint', `__lint__', `__ADLINT__', `adlint', `__adlint' and `__adlint__'. Tue Dec 11 17:18:35 2012 Yutaka Yanoh * lib/adlint.rb : Improve the library interface to easily integrate AdLint with other products. * lib/adlint/message.rb : Ditto. * bin/adlintize : Ditto. * bin/adlint : Ditto. * bin/adlint_sma : Ditto. * bin/adlint_cma : Ditto. * bin/adlint_chk : Ditto. * spec/spec_helper.rb : Ditto. * features/support/env.rb : Ditto. Thu Dec 6 16:21:42 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Revise specification of code checks about implicit conversion from or to `char' type to clarify warning's intention. * lib/adlint/exam/c_builtin/c_check_shima.rb : Ditto. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Clarify warning message texts of the implicit conversion. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. Thu Nov 29 15:49:50 2012 Yutaka Yanoh * release.ga : 2.6.12 - Fix abend problem of huge integer-constant evaluation. - Correct to run on Ruby 2.0.0dev (r37962) without warnings. Thu Nov 29 14:21:04 2012 Yutaka Yanoh * lib/adlint/c/domain.rb : Correct to run on Ruby 2.0.0dev (r37962) without warnings. Fri Nov 9 13:54:59 2012 Yutaka Yanoh * lib/adlint/c/type.rb : Fix abend problem of huge integer-constant evaluation. Thu Nov 8 13:01:03 2012 Yutaka Yanoh * release.ga : 2.6.10 - Fix code checks so that duplicative messages of the same ID at the same location can be unique till the function step-in analysis is supported. - Fix W1069 detection to output a warning message at correct location when an incomplete if-else statements chain appears in a complete if-else-statement. - Fix W0708 detection not to warn when an address of the controlling variable is passes to a function in the controlling part of for-statement. - Fix W0534, W0585, W0611 and w0708 detections to correctly deduct the controlling variable. - Add missing notification of the controlling expression value reference. - Fix W0460 detection to output outermost variable name when the referencing variable is an array element or a member of struct or union. Wed Nov 7 15:17:28 2012 Yutaka Yanoh * release.rc : 2.6.9 - Fix W0460 detection to output outermost variable name when the referencing variable is an array element or a member of struct or union. - Add missing notification of the controlling expression value reference and sequence-point at the end of the 1st expression evaluation in the conditional-expression. Wed Nov 7 14:10:54 2012 Yutaka Yanoh * features/code_check/W0599.feature : Add W0599 specification to reproduce a known bug. * lib/adlint/c/interp.rb : Add missing notification of the controlling expression value reference and sequence-point at the end of the 1st expression evaluation in the conditional-expression. Wed Nov 7 13:37:45 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Fix W0460 detection to output outermost variable name when the referencing variable is an array element or a member of struct or union. Wed Nov 7 11:19:41 2012 Yutaka Yanoh * release.rc : 2.6.7 - Move value reference notification of whole controlling expression to notification suppressible section. Wed Nov 7 11:15:59 2012 Yutaka Yanoh * features/code_check/W0599.feature : Add W0599 specification to reproduce a known bug. * lib/adlint/c/ctrlexpr.rb : Move value reference notification of whole controlling expression to notification suppressible section. Wed Nov 7 10:01:25 2012 Yutaka Yanoh * release.rc : 2.6.5 - Add missing sequence-point notification after referencing value of whole controlling expression in the controlling-statement. Wed Nov 7 09:57:52 2012 Yutaka Yanoh * features/code_check/W0599.feature : Add W0599 specification to reproduce a known bug. * lib/adlint/c/interp.rb : Add missing sequence-point notification after referencing value of whole controlling expression in the controlling-statement. Tue Nov 6 16:48:25 2012 Yutaka Yanoh * release.rc : 2.6.3 - Fix code checks so that duplicative messages of the same ID at the same location can be unique till the function step-in analysis is supported. - Fix W1069 detection to output a warning message at correct location when an incomplete if-else statements chain appears in a complete if-else-statement. - Fix W0708 detection not to warn when an address of the controlling variable is passes to a function in the controlling part of for-statement. - Fix W0534, W0585, W0611 and w0708 detections to correctly deduct the controlling variable. - Add missing notification of the controlling expression value reference. Tue Nov 6 16:17:03 2012 Yutaka Yanoh * features/code_check/W1073.feature : Add W1073 specification to reproduce a known bug. * lib/adlint/c/interp.rb : Add missing notification of the controlling expression value reference. * lib/adlint/c/ctrlexpr.rb : Ditto. Tue Nov 6 13:35:28 2012 Yutaka Yanoh * features/code_check/W0611.feature : Add W0611 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0611 detection to correctly deduct controlling variable of the iteration-statement. Tue Nov 6 11:46:49 2012 Yutaka Yanoh * features/code_check/W0534.feature : Add W0534 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0534 detection not to warn about const variable appears in the controlling expression. Tue Nov 6 10:57:45 2012 Yutaka Yanoh * features/code_check/W0585.feature : Add W0585 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0585 detection not to warn about const variable appears in the controlling expression. Mon Nov 5 15:17:58 2012 Yutaka Yanoh * features/code_check/W0708.feature : Add W0708 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0708 detection not to warn when an address of the controlling variable is passes to a function in the controlling part of for-statement. Fri Nov 2 17:21:20 2012 Yutaka Yanoh * features/code_check/W1069.feature : Add W1069 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check_shima.rb : Fix W1069 detection to output a warning message at correct location when an incomplete if-else statements chain appears in a complete if-else-statement. Thu Nov 1 17:17:10 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Fix code checks so that duplicative messages of the same ID at the same location can be unique till the function step-in analysis is supported. * lib/adlint/exam/c_builtin/c_check_shima.rb : Ditto. Wed Oct 31 10:16:44 2012 Yutaka Yanoh * release.ga : 2.6.2 - Fix compound-assignment-expression evaluation not to propagate initialization status of the rhs operand. - Fix bad traits file parser in order to parse compound pathname strings correctly on mswin. - Clarify W0082 message text by adding underlying type name of the operand. - Clarify W0578 and W0579 message texts by adding source and destination type names of the conversion. - Clarify W0650 message text by adding lhs type name of the shift-expression. - Clarify W0719 message text by adding lhs underlying type name of the shift-expression. - Clarify W1051 and W1052 message texts by adding type name of the arithmetic expression. - Fix the interpreter to place sequence-point at the end of the return-statement evaluation. Tue Oct 30 15:08:22 2012 Yutaka Yanoh * release.rc : 2.6.1 - Fix compound-assignment-expression evaluation not to propagate initialization status of the rhs operand. - Fix bad traits file parser in order to parse compound pathname strings correctly on mswin. - Clarify W0082 message text by adding underlying type name of the operand. - Clarify W0578 and W0579 message texts by adding source and destination type names of the conversion. - Clarify W0650 message text by adding lhs type name of the shift-expression. - Clarify W0719 message text by adding lhs underlying type name of the shift-expression. - Clarify W1051 and W1052 message texts by adding type name of the arithmetic expression. - Fix the interpreter to place sequence-point at the end of the return-statement evaluation. Tue Oct 30 15:05:37 2012 Yutaka Yanoh * features/code_check/W0599.feature : Add W0599 specification. * MANIFEST : Ditto. * lib/adlint/c/interp.rb : Fix the interpreter to place sequence-point at the end of the return-statement evaluation. Mon Oct 29 19:11:17 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W1052 message text by adding type name of the arithmetic expression. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Oct 29 18:56:58 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W1051 message text by adding type name of the arithmetic expression. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Oct 29 18:46:23 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W0719 message text by adding lhs underlying type name of the shift-expression. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Oct 29 18:34:18 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W0650 message text by adding lhs type name of the shift-expression. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Oct 29 17:59:15 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W0579 message text by adding source and destination type names of the conversion. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Oct 29 17:43:41 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W0578 message text by adding source and destination type names of the conversion. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Oct 29 17:14:25 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W0082 message text by adding underlying type name of the operand. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Oct 29 15:21:18 2012 Yutaka Yanoh * lib/adlint/traits.rb : Fix bad traits file parser in order to parse compound pathname strings correctly on mswin. * lib/adlint/util.rb : Ditto. Mon Oct 29 14:37:19 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix compound-assignment-expression evaluation not to propagate initialization status of the rhs operand. Mon Oct 22 15:02:29 2012 Yutaka Yanoh * release.ga : 2.6.0 - Fix W0609 and w0610 detections not to over-warn about explicit controlling expressions of for-statements by adding workarounds for the interpreter. - Fix W0088 detection not to warn about controlling expression of for-statement. - Fix W0723 detection in order to correctly warn about signed `-' expression. - Fix bad parameter type convertibility check and bad type convertibility check of pointer to arbitrary types to void-pointer. - Revise string representation of typedefed type so that message and metric show typedefed type name itself. - Clarify W9003 message text by adding destination type name of the implicit conversion. Mon Oct 22 11:07:37 2012 Yutaka Yanoh * release.rc : 2.5.3 - Clarify W9003 message text by adding destination type name of the implicit conversion. Mon Oct 22 10:59:09 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Clarify W9003 message text by adding destination type name of the implicit conversion. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Fri Oct 19 19:33:19 2012 Yutaka Yanoh * release.rc : 2.5.2 - Fix W0582, W0583, W0584 and W9003 detections to warn about constant pointers except for NULL. Fri Oct 19 19:26:31 2012 Yutaka Yanoh * lib/adlint/c/conv.rb : Fix #untyped_pointer_conversion? predicate method to support consideration about converting value. * features/code_check/W0582.feature : Add W0582 specification to reproduce a known bug. * features/code_check/W0583.feature : Add W0583 specification to reproduce a known bug. * features/code_check/W0584.feature : Add W0584 specification to reproduce a known bug. * features/code_check/W9003.feature : Add W9003 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0582, W0583, W0584 and W9003 detections to warn about constant pointers except for NULL. Fri Oct 19 16:19:35 2012 Yutaka Yanoh * release.rc : 2.5.1 - Fix W0584 detection not to warn when the constant argument is convertible to the corresponding parameter. Fri Oct 19 14:59:29 2012 Yutaka Yanoh * features/code_check/W0584.feature: Add W0584 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0584 detection not to warn when the constant argument is convertible to the corresponding parameter. Fri Oct 19 13:43:34 2012 Yutaka Yanoh * release.rc : 2.5.0 - Fix W0582, W0583 and W0584 detections not to warn about unmatched argument which is considerd as untyped constant pointer such as NULL or 0. Fri Oct 19 13:33:28 2012 Yutaka Yanoh * features/code_check/W0582.feature : Add W0582 specification to reproduce a known bug. * MANIFEST : Ditto. * features/code_check/W0583.feature : Add W0583 specification to reproduce a known bug. * features/code_check/W0584.feature : Add W0584 specification to reproduce a known bug. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0582, W0583 and W0584 detections not to warn about unmatched argument which is considerd as untyped constant pointer such as NULL or 0. Fri Oct 19 11:25:11 2012 Yutaka Yanoh * lib/adlint/c/conv.rb : Move #untyped_pointer_conversion? predicate method to C::Conversion module from CBuiltin::W9003 class. * lib/adlint/exam/c_builtin/c_check.rb : Ditto. Thu Oct 18 16:45:28 2012 Yutaka Yanoh * release.rc : 2.4.17 - Fix W0088 detection not to warn about argument expressions in a function-call-expression. Thu Oct 18 16:35:48 2012 Yutaka Yanoh * features/code_check/W0088.feature : Add W0088 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0088 detection not to warn about argument expressions in a function-call-expression. Thu Oct 18 15:17:34 2012 Yutaka Yanoh * release.rc : 2.4.15 - Fix expression-statement evaluation in order to notify end of the evaluation at all times. Thu Oct 18 15:09:13 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix expression-statement evaluation in order to notify end of the evaluation at all times. Thu Oct 18 14:07:33 2012 Yutaka Yanoh * release.rc : 2.4.13 - Revise W9003 detection not to warn about implicit conversion of untyped constant pointers such as NULL or 0. - Fix W0088 detection not to skip checking when an outmost expression has side-effect but it contains problematic logical-and-expression or logical-or-expression. Thu Oct 18 14:03:00 2012 Yutaka Yanoh * features/code_check/W0088.feature : Add W0088 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0088 detection not to skip checking when an outmost expression has side-effect but it contains problematic logical-and-expression or logical-or-expression. Thu Oct 18 13:19:22 2012 Yutaka Yanoh * features/code_check/W9003.feature : Add W9003 specification of implicit convertion of constant pointers. * lib/adlint/exam/c_builtin/c_check.rb : Revise W9003 detection not to warn about implicit conversion of untyped constant pointers such as NULL or 0. Wed Oct 17 18:28:03 2012 Yutaka Yanoh * release.rc : 2.4.11 - Fix W0609 and w0610 detections not to over-warn about explicit controlling expressions of for-statements by adding workarounds for the interpreter. - Fix W0088 detection not to warn about controlling expression of for-statement. - Fix W0723 detection in order to correctly warn about signed `-' expression. - Fix bad parameter type convertibility check and bad type convertibility check of pointer to arbitrary types to void-pointer. - Revise string representation of typedefed type so that message and metric show typedefed type name itself. Wed Oct 17 18:08:20 2012 Yutaka Yanoh * lib/adlint/c/type.rb : Revise string representation of typedefed type so that message and metric show typedefed type name itself. Wed Oct 17 14:48:23 2012 Yutaka Yanoh * features/code_check/W9003.feature : Add W9003 specification to reproduce a known bug. * lib/adlint/c/type.rb : Fix bad parameter type convertibility check and bad type convertibility check of pointer to arbitrary types to void-pointer. Wed Oct 17 13:30:01 2012 Yutaka Yanoh * features/code_check/W0722.feature : Add W0722 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0723 detection in order to correctly warn about signed `-' expression. Tue Oct 16 18:44:33 2012 Yutaka Yanoh * features/code_check/W0088.feature : Add W0088 specification. * MANIFEST : Ditto. * lib/adlint/c/interp.rb : Add notification about expression-statement evaluation. * lib/adlint/c/mediator.rb : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0088 detection not to warn about controlling expression of a for-statement. Tue Oct 16 16:39:52 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Fix W0609 and w0610 detections not to over-warn about explicit controlling expressions of for-statements by adding workarounds for the abstract interpreter. * lib/adlint/c/syntax.rb : Ditto. * lib/adlint/c/interp.rb : Ditto. Mon Oct 15 13:27:34 2012 Yutaka Yanoh * release.ga : 2.4.10 - Add value version rollback feature so that the value version management is correctly given up at the end of the branch whose controlling expression is too complex. - Fix value version management in order to completely rollback all changes to values of all global variables. - Revise evaluation of sizeof-expression and alignof-expression not to evaluate operand expression actually. - Fix W0488, W0489, W0490, W0495, W0496, W0497, W0498, W0499, W0500, W0501 and W0502 detections to warn when a problematic expression is grouped entirely. Fri Oct 12 17:39:30 2012 Yutaka Yanoh * release.rc : 2.4.9 - Fix W0488 detection to warn about a standalone array-subscript-expression as an operand of a logical-and-expression or a logical-or-expression. - Fix W0499, W0500, W0501 and W0502 detections to warn when a problematic expression is grouped entirely. - Fix interpreter to add missing notification about evaluation of the sizeof-expression. Fri Oct 12 17:21:38 2012 Yutaka Yanoh * features/code_check/W0655.feature : Add W0655 specification. * MANIFEST : Ditto. * lib/adlint/c/expr.rb : Fix interpreter to add missing notification about evaluation of the sizeof-expression. * lib/adlint/c/interp.rb : Ditto. Fri Oct 12 15:07:28 2012 Yutaka Yanoh * features/code_check/W0502.feature : Add W0502 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0502 detection to warn when a problematic expression is grouped entirely. Fri Oct 12 14:27:12 2012 Yutaka Yanoh * features/code_check/W0501.feature : Add W0501 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0501 detection to warn when a problematic expression is grouped entirely. Fri Oct 12 13:59:59 2012 Yutaka Yanoh * features/code_check/W0500.feature : Add W0500 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0500 detection to warn when a problematic expression is grouped entirely. Fri Oct 12 13:17:07 2012 Yutaka Yanoh * features/code_check/W0499.feature : Add W0499 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0499 detection to warn when a problematic expression is grouped entirely. Fri Oct 12 10:55:04 2012 Yutaka Yanoh * features/code_check/W0488.feature : Add W0488 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0488 detection to warn about a standalone array-subscript-expression as an operand of a logical-and-expression or a logical-or-expression. Thu Oct 11 21:00:18 2012 Yutaka Yanoh * release.rc : 2.4.7 - Add value version rollback feature so that the value version management is correctly given up at the end of the branch whose controlling expression is too complex. - Fix value version management in order to completely rollback all changes to values of all global variables. - Revise evaluation of sizeof-expression and alignof-expression not to evaluate operand expression actually. - Fix W0488, W0489, W0490, W0495, W0496, W0497 and W0498 detections to warn when a problematic expression is grouped entirely. Thu Oct 11 20:49:03 2012 Yutaka Yanoh * features/code_check/W0497.feature : Add W0497 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0497 detection to warn when a problematic expression is grouped entirely. Thu Oct 11 20:19:37 2012 Yutaka Yanoh * features/code_check/W0496.feature : Add W0496 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0496 detection to warn when a problematic expression is grouped entirely. Thu Oct 11 19:57:17 2012 Yutaka Yanoh * features/code_check/W0495.feature : Add W0495 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0495 detection to warn when a problematic expression is grouped entirely. Thu Oct 11 19:31:31 2012 Yutaka Yanoh * features/code_check/W0490.feature : Add W0490 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0490 detection to warn when a problematic expression is grouped entirely. Thu Oct 11 18:44:11 2012 Yutaka Yanoh * features/code_check/W0489.feature : Add W0489 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0489 detection to warn when a problematic expression is grouped entirely. Thu Oct 11 18:10:53 2012 Yutaka Yanoh * features/code_check/W0488.feature : Add W0488 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0488 detection to warn when a problematic expression is grouped entirely. Thu Oct 11 17:19:40 2012 Yutaka Yanoh * features/code_check/W0498.feature : Add W0498 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0498 detection to warn when a problematic expression is grouped entirely. Thu Oct 11 14:36:53 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Revise evaluation of sizeof-expression and alignof-expression not to evaluate operand expression actually. Thu Oct 11 11:27:46 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Fix value version management in order to completely rollback all changes to values of all global variables. Wed Oct 10 18:14:38 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Add value version rollback feature so that the value version management is correctly given up at the end of the branch whose controlling expression is too complex. * lib/adlint/c/branch.rb : Ditto. * lib/adlint/c/environ.rb : Ditto. * lib/adlint/c/object.rb : Ditto. Tue Oct 9 10:49:00 2012 Yutaka Yanoh * release.ga : 2.4.6 - Fix bad controlling statement evaluation in order to manage value domain of the controlling variable correctly. - Fix bad argument type specification of `%s', `%p' and `%n' conversion-specifiers of *printf standard functions in order to detect W0635 correctly. Fri Oct 5 16:54:09 2012 Yutaka Yanoh * release.rc : 2.4.5 - Fix bad argument type specification of `%s', `%p' and `%n' conversion-specifiers of *printf standard functions in order to detect W0635 correctly. Fri Oct 5 15:07:03 2012 Yutaka Yanoh * features/code_check/W0635.feature : Add W0635 specification. * MANIFEST : Ditto. * lib/adlint/c/format.rb : Fix bad argument type specification of `%s', `%p' and `%n' conversion-specifiers of *printf standard functions in order to detect W0635 correctly. Fri Oct 5 15:01:55 2012 Yutaka Yanoh * spec/adlint/c/type_spec.rb : Add `==' and `convertible?' unit specifications of QualifiedType. * lib/adlint/c/type.rb : Fix bad type convertibility check of cv-qualified types. Fri Oct 5 11:11:56 2012 Yutaka Yanoh * release.rc : 2.4.3 - Fix abend problem of iteration-statement evaluation. Fri Oct 5 11:02:33 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix abend problem of iteration-statement evaluation. * lib/adlint/c/branch.rb : Ditto. * lib/adlint/c/option.rb : Ditto. Thu Oct 4 18:11:13 2012 Yutaka Yanoh * release.rc : 2.4.1 - Fix bad controlling statement evaluation in order to manage value domain of the controlling variable correctly. Thu Oct 4 17:56:03 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Add expression transformation in order to correctly deduct controlling expression of an iteration-statement. * lib/adlint/c/operator.rb : Ditto. * lib/adlint/c/object.rb : Remove FrozenValue value wrapper. * lib/adlint/c/ctrlexpr.rb : Ditto. * lib/adlint/c/interp.rb : Fix bad controlling statement evaluation to manage value domain of the controlling variable correctly. Fri Sep 21 15:00:34 2012 Yutaka Yanoh * release.ga : 2.4.0 - Fix W0425 detection not to warn when a selection-statement or a iteration-statement is written in a line. - Fix evaluation of sizeof expression to return `size_t' value or `unsigned long' value if size_t is not declared. - Fix evaluation of function-definition in order to refer symbols of return type and parameter types. - Revise format of the traits file in preparation for supporting warning suppression of 3rd-party headers imported in the target project tree. - Support compound pathname as an entry in the directory pathname list item of the traits file. - Fix abend problem when no examination package name is specified in the traits file. - Fix W0100 detection not to over-warn about variables updated in an iteration-statement. - Fix bad preprocess behavior when an empty argument is given to a function-like macro call which applies `##' operator to the empty perameter. - Fix #include directive evaluation in order to correctly read header file with an absolute path when any include_path items are not specified. Fri Sep 21 13:00:47 2012 Yutaka Yanoh * release.rc : 2.3.4 - Fix #include directive evaluation in order to correctly read header file with an absolute path when any include_path items are not specified. Fri Sep 21 12:57:40 2012 Yutaka Yanoh * lib/adlint/cpp/eval.rb : Fix #include directive evaluation in order to correctly read header file with an absolute path when any include_path items are not specified. Fri Sep 21 10:07:05 2012 Yutaka Yanoh * release.rc : 2.3.3 - Fix W0692 detection in order to warn about no argument function-like macro call which has one parameter. Fri Sep 21 09:50:13 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/cpp_check.rb : Fix W0692 detection in order to warn about no argument function-like macro call which has one parameter. Fri Sep 21 05:10:01 2012 Yutaka Yanoh * release.rc : 2.3.2 - Fix bad macro substitution in order not to apply a function-like macro without parameters when value of a token is same as that function-like macro name. Fri Sep 21 04:25:22 2012 Yutaka Yanoh * lib/adlint/cpp/macro.rb : Fix bad macro substitution in order not to apply a function-like macro without parameters when value of a token is same as that function-like macro name. Thu Sep 20 19:45:06 2012 Yutaka Yanoh * release.rc : 2.3.1 - Fix W0100 detection not to over-warn about variables updated in an iteration-statement. - Fix bad preprocess behavior when an empty argument is given to a function-like macro call which applies `##' operator to the empty perameter. Thu Sep 20 19:07:54 2012 Yutaka Yanoh * lib/adlint/cpp/macro.rb : Fix bad preprocess behavior when an empty argument is given to a function-like macro call which applies `##' operator to the empty perameter. Thu Sep 20 11:22:17 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_check.rb : Fix W0100 detection not to over-warn about variables updated in an iteration-statement. Wed Sep 19 17:13:01 2012 Yutaka Yanoh * release.rc : 2.3.0 - Fix evaluation of sizeof expression to return `size_t' value or `unsigned long' value if size_t is not declared. - Fix evaluation of function-definition in order to refer symbols of return type and parameter types. - Revise format of the traits file in preparation for supporting warning suppression of 3rd-party headers imported in the target project tree. - Support compound pathname as an entry in the directory pathname list item of the traits file. - Fix abend problem when no examination package name is specified in the traits file. Wed Sep 19 15:41:38 2012 Yutaka Yanoh * share/doc/users_guide_ja.texi : Update descriptions about revised traits file format. * share/doc/users_guide_en.texi : Ditto. Wed Sep 19 14:19:24 2012 Yutaka Yanoh * lib/adlint/util.rb : Fix abend problem when no examination package name is specified in the traits file. Wed Sep 19 14:00:03 2012 Yutaka Yanoh * lib/adlint/traits.rb : Support compound pathname as an entry in the directory pathname list item of the traits file. Wed Sep 19 13:26:48 2012 Yutaka Yanoh * lib/adlint/traits.rb : Revise format of the traits file in preparation for supporting warning suppression of 3rd-party headers imported in the target project tree. * etc/conf.d/**/traits.erb : Ditto. * spec/conf.d/default_traits.yml : Ditto. * features/support/env.rb : Ditto. * bin/adlintize : Add ad-hoc traits schema migration for 2.4.0 release. Tue Sep 18 16:06:40 2012 Yutaka Yanoh * features/code_check/W9003.feature : Add W9003 specification to reproduce a known bug. * features/code_check/W0070.feature : Add W0070 specification. * features/code_check/W0071.feature : Add W0071 specification. * MANIFEST : Add W0070 and W0071 specifications. * lib/adlint/c/expr.rb : Fix evaluation of sizeof expression to return `size_t' value or `unsigned long' value if size_t is not declared. * lib/adlint/c/interp.rb : Fix evaluation of function-definition in order to refer symbols of return type and parameter types. Tue Sep 18 13:45:50 2012 Yutaka Yanoh * release.rc : 2.2.5 - Fix W0425 detection not to warn about one-liner typedef declaration with struct or union type declaration redundantly. Tue Sep 18 13:38:22 2012 Yutaka Yanoh * features/code_check/W0425.feature : Add W0425 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0425 detection not to warn about one-liner typedef declaration with struct or union type declaration redundantly. Fri Sep 14 14:05:38 2012 Yutaka Yanoh * release.rc : 2.2.3 - Fix W0425 detection to warn about one-liner struct or union member declarations. Fri Sep 14 13:43:23 2012 Yutaka Yanoh * features/code_check/W0425.feature : Add W0425 specification to reproduce a known bug. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0425 detection to warn about one-liner struct or union member declarations. Thu Sep 13 17:53:53 2012 Yutaka Yanoh * release.rc : 2.2.1 - Fix W0425 detection not to warn when a selection-statement or a iteration-statement is written in a line. Thu Sep 13 13:32:44 2012 Yutaka Yanoh * features/code_check/W0425.feature : Add W0425 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0425 detection not to warn when a selection-statement or a iteration-statement is written in a line. Wed Sep 12 10:59:42 2012 Yutaka Yanoh * release.ga : 2.2.0 - Fix W0431 and W0432 detections not to warn about displaced beginning of the line tokens following upon a function-like macro call. - Fix W0787 detection not to warn about a definition of the local variable with type which is different from one of previously defined variable in the other scope. - Clarify W0025 and W0026 message texts. Tue Sep 11 16:00:48 2012 Yutaka Yanoh * release.rc : 2.1.2 - Clarify W0025 and W0026 message texts. Tue Sep 11 15:51:13 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/cpp_check.rb : Clarify W0025 and W0026 message texts. * etc/mesg.d/c_builtin/ja_JP/messages.yml : Ditto. * etc/mesg.d/c_builtin/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Tue Sep 11 15:09:15 2012 Yutaka Yanoh * release.rc : 2.1.1 - Fix W0787 detection not to warn about a definition of the local variable with type which is different from one of previously defined variable in the other scope. Tue Sep 11 14:32:17 2012 Yutaka Yanoh * features/code_check/W0787.feature : Add W0787 specification. * MANIFEST : Ditto. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0787 detection not to warn about a definition of the local variable with type which is different from one of previously defined variable in the other scope. Tue Sep 11 13:03:09 2012 Yutaka Yanoh * release.rc : 2.1.0 - Fix W0431 and W0432 detections not to warn about displaced beginning of the line tokens following upon a function-like macro call. Tue Sep 11 11:26:05 2012 Yutaka Yanoh * features/code_check/W0431.feature : Add W0431 specification. * features/code_check/W0432.feature : Add W0432 specification. * MANIFEST : Add W0431 and W0432 specifications. * lib/adlint/cpp/macro.rb : Fix function-like macro replacement in order to correctly locate substituted argument tokens. * lib/adlint/exam/c_builtin/c_check.rb : Fix W0431 and W0432 detections not to warn about displaced beginning of the line tokens following upon a function-like macro call. Thu Sep 6 15:54:41 2012 Yutaka Yanoh * release.ga : 2.0.10 - Revise value domain management in order not to over-thin value domains of the controlling variables in complexly compounded controlling expression. - Support environment variable substitution in the traits file. Thu Sep 6 11:52:08 2012 Yutaka Yanoh * release.rc : 2.0.9 - Support environment variable substitution in the traits file. Thu Sep 6 11:36:26 2012 Yutaka Yanoh * lib/adlint/prelude.rb : Support environment variable substitution in the traits file. Wed Sep 5 16:40:17 2012 Yutaka Yanoh * release.rc : 2.0.7 - Revise value domain management in order not to over-thin value domains of the controlling variables in complexly compounded controlling expression. Wed Sep 5 16:11:42 2012 Yutaka Yanoh * lib/adlint/c/branch.rb : Revise value domain management in order not to over-thin value domains of the controlling variables in complexly compounded controlling expression. * lib/adlint/c/ctrlexpr.rb : Add #complexly_compounded? predicate method. * lib/adlint/c/syntax.rb : Ditto. Thu Aug 30 09:56:15 2012 Yutaka Yanoh * release.ga : 2.0.6 - Fix huge memory consumption problem when a multi-dimensional variable length array is defined without fully narrowed length. - Revise variable cross-reference extraction in order to output only about the outmost-variable when its element or member is accessed. Wed Aug 29 17:36:59 2012 Yutaka Yanoh * release.rc : 2.0.5 - Revise variable cross-reference extraction in order to output only about the outmost-variable when its element or member is accessed. Wed Aug 29 17:26:26 2012 Yutaka Yanoh * lib/adlint/exam/c_builtin/c_code.rb : Revise variable cross-reference extraction in order to output only about the outmost-variable when its element or member is accessed. Wed Aug 29 13:02:43 2012 Yutaka Yanoh * release.rc : 2.0.3 - Fix huge memory consumption problem when a multi-dimensional variable length array is defined without fully narrowed length. Wed Aug 29 11:45:48 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Revise value sampling behavior of the value domain. * lib/adlint/c/type.rb : Fix array size evaluation not to fall below 0. Tue Aug 28 10:28:41 2012 Yutaka Yanoh * release.ga : 2.0.2 - Fix bad group skipping problem of the preprocessor when a conditional inclusion directive is commented out in the skipping group. - Add templates for gcc 4.6.3-1ubuntu5 on Ubuntu 12.04 LTS (64bit). Mon Aug 27 16:54:52 2012 Yutaka Yanoh * release.rc : 2.0.1 - Fix bad group skipping problem of the preprocessor when a conditional inclusion directive is commented out in the skipping group. - Add templates for gcc 4.6.3-1ubuntu5 on Ubuntu 12.04 LTS (64bit). Mon Aug 27 16:49:19 2012 Yutaka Yanoh * etc/conf.d/x86_64-ubuntu_12.04/traits-gcc_4.6.3.erb : Add templates for gcc 4.6.3-1ubuntu5 on Ubuntu 12.04 LTS (64bit). * etc/conf.d/x86_64-ubuntu_12.04/cinit-gcc_4.6.3.erb : Ditto. Mon Aug 27 15:53:32 2012 Yutaka Yanoh * lib/adlint/cpp/lexer.rb : Fix bad group skipping problem of the preprocessor when a conditional inclusion directive is commented out in the skipping group. * lib/adlint/lexer.rb : Add StringContent#_debug_inspect method in order to ease debugging. Wed Aug 22 14:41:15 2012 Yutaka Yanoh * release.ga : 2.0.0 - In preparation for using optional source code examination packages, refine internal module structure and revise format of the traits file. - Revise format of the traits file and the message definition file in preparation for supporting selective code check feature. - Revise format of the traits file in preparation for supporting warning suppression of unconcerned headers such as system headers. - Add many more functional specifications of builtin code checks. Wed Aug 22 11:41:15 2012 Yutaka Yanoh * release.rc : 1.19.6 - Fix bad schema migraion with space characters between message ID and `:' in the change_list. Wed Aug 22 11:36:02 2012 Yutaka Yanoh * bin/adlintize : Fix bad schema migraion with space characters between message ID and `:' in the change_list. Wed Aug 22 11:05:53 2012 Yutaka Yanoh * release.rc : 1.19.5 - Add ad-hoc traits schema migration to adlintize command. Wed Aug 22 10:59:34 2012 Yutaka Yanoh * bin/adlintize : Add ad-hoc schema migration of the traits file. Tue Aug 21 16:03:45 2012 Yutaka Yanoh * share/doc/users_guide_ja.texi : Update descriptions about revised traits file format. * share/doc/users_guide_en.texi : Ditto. Mon Aug 20 16:23:31 2012 Yutaka Yanoh * release.rc : 1.19.4 - Revise format of the traits file in preparation for supporting warning suppression of unconcerned headers such as system headers. Mon Aug 20 16:04:22 2012 Yutaka Yanoh * lib/adlint/traits.rb : Revise format of the traits file in preparation for supporting warning suppression of unconcerned headers such as system headers. * etc/conf.d/**/traits.erb : Ditto. Fri Aug 17 17:11:17 2012 Yutaka Yanoh * release.rc : 1.19.3 - Revise format of the traits file in preparation for supporting selective code check feature. - Revise format of the message definition file so that a message can belong to multiple categories. Fri Aug 17 16:53:20 2012 Yutaka Yanoh * lib/adlint/traits.rb : Revise format of the traits file in preparation for supporting selective code check feature. * lib/adlint/message.rb : Revise format of the message definition file so that a message can belong to multiple categories. Fri Aug 17 11:09:36 2012 Yutaka Yanoh * lib/adlint/traits.rb : Clarify error message of invalid version of the traits file. * lib/adlint/driver.rb : Suppress unneeded backtrace information of error messages. Fri Aug 17 10:24:37 2012 Yutaka Yanoh * release.rc : 1.19.2 - Fix abend problem when the analyzer encounters a non-fatal error condition. Fri Aug 17 10:10:27 2012 Yutaka Yanoh * features/step_definitions/message_detection_steps.rb : Rename to `code_check_steps.rb'. * features/message_detection : Rename to `code_check'. Fri Aug 17 09:50:56 2012 Yutaka Yanoh * lib/adlint/report.rb : Fix abend problem when the analyzer encounters a non-fatal error condition. Thu Aug 16 19:31:47 2012 Yutaka Yanoh * release.rc : 1.19.1 - Revise format of the traits file and the message definition file in preparation for supporting selective code check feature. Thu Aug 16 19:05:23 2012 Yutaka Yanoh * lib/adlint/traits.rb : Revise format of the traits file and the message definition file in preparation for supporting selective code check feature. * lib/adlint/message.rb : Ditto. Thu Aug 16 15:10:17 2012 Rie Shima * features/message_detection/W0477.feature : Add W0477 specification. * features/message_detection/W0478.feature : Add W0478 specification. * features/message_detection/W0479.feature : Add W0479 specification. * features/message_detection/W0480.feature : Add W0480 specification. * features/message_detection/W0481.feature : Add W0481 specification. * features/message_detection/W0482.feature : Add W0482 specification. * features/message_detection/W0483.feature : Add W0483 specification. * MANIFEST : Add W0477, W0478, W0479, W0480, W0481, W0482 and W0483 specifications. Wed Aug 15 15:18:53 2012 Yutaka Yanoh * release.rc : 1.19.0 - This is the initial release candidate for 2.0.0 GA release. - In preparation for using optional source code examination packages, refine internal module structure and revise format of the traits file. Wed Aug 15 13:42:09 2012 Yutaka Yanoh * lib/**/* : In preparation for using optional source code examination packages, refine internal module structure and revise format of the traits file. * etc/**/* : Ditto. Tue Aug 14 15:59:48 2012 Rie Shima * features/message_detection/W0025.feature : Add W0025 specification. * features/message_detection/W0026.feature : Add W0026 specification. * MANIFEST : Add W0025 and W0026 specifications. Tue Aug 14 14:54:55 2012 Yutaka Yanoh * release.ga : 1.18.6 - Fix abend problem when a variable of typedefed incomplete array type is defined with an initializer. Tue Aug 14 10:49:35 2012 Yutaka Yanoh * release.rc : 1.18.5 - Fix bad array length deduction in an array variable definition with string-literal-specifier as initializer. Tue Aug 14 10:37:24 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix bad array length deduction in an array variable definition with string-literal-specifier as initializer. Mon Aug 13 18:14:49 2012 Yutaka Yanoh * release.rc : 1.18.3 - Fix abend problem when a variable of typedefed incomplete array type is defined with an initializer. Mon Aug 13 18:01:12 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix abend problem when a variable of typedefed incomplete array type is defined with an initializer. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/type.rb : Ditto. Tue Aug 7 11:14:20 2012 Yutaka Yanoh * features/message_detection/W0016.feature : Add W0016 specification. * features/message_detection/W0017.feature : Add W0017 specification. * MANIFEST : Add W0016 and W0017 specifications. Mon Aug 6 17:32:04 2012 Yutaka Yanoh * features/message_detection/W0{119..254}.feature : Add specifications of implicit conversion detections. * features/message_detection/W0{747..769}.feature : Ditto. * MANIFEST : Ditto. Fri Aug 3 13:55:38 2012 Rie Shima * features/message_detection/W0685.feature : Add W0685 specification. * features/message_detection/W0686.feature : Add W0686 specification. * features/message_detection/W0695.feature : Add W0695 specification. * features/message_detection/W0801.feature : Add W0801 specification. * features/message_detection/W1030.feature : Add W1030 specification. * MANIFEST : Add W0685, W0686, W0695, W0801 and W1030 specifications. Fri Aug 3 13:07:04 2012 Yutaka Yanoh * release.ga : 1.18.2 - Fix gem installation problem on mswin. Fri Aug 3 13:01:28 2012 Yutaka Yanoh * share/demo/bad_include : Remove `bad_include' demo project. * share/demo/bad_charset : Remove `bad_charset' demo project. * share/demo/Makefile : Remove `bad_include' and `bad_charset' demos. * MANIFEST : Ditto. Thu Aug 2 15:16:29 2012 Rie Shima * features/message_detection/W0573.feature : Add W0573 specification. * features/message_detection/W0726.feature : Add W0726 specification. * features/message_detection/W0781.feature : Add W0781 specification. * MANIFEST : Add W0573, W0726, W0781 specifications. Wed Aug 1 13:04:03 2012 Rie Shima * features/message_detection/W0806.feature : Add W0806 specification. * features/message_detection/W0807.feature : Add W0807 specification. * features/message_detection/W0808.feature : Add W0808 specification. * features/message_detection/W0809.feature : Add W0809 specification. * MANIFEST : Add W0806, W0807, W0808 and W0809 specifications. Wed Aug 1 09:39:53 2012 Yutaka Yanoh * release.ga : 1.18.0 - Add W0641 detection. - Add W0644 detection. - Add W0649 detection. - Add W0650 detection. - Add W0707 detection. - Add W0719 detection. - Add W0780 detection. - Add W0783 detection. - Add W0792 detection. - Add W0793 detection. - Add W0794 detection. - Add W0830 detection. - Add W0833 detection. - Add W0834 detection. - Add W1026 detection. - Add W1039 detection. - Add W1047 detection. - Add W1071 detection. - Fix W0459 detection to output outermost variable name when the uninitialized variable is an array element or a member of struct or union. - Fix W0705 and W0745 detections to warn about not only array-subscript-expressions but also indirection-expressions only when the subscript is constant. - Revise expression evaluation not to give up when a operand is typed as `void'. - Revise arithmetic type resolution not to abort when one type is `void'. - Fix declarator evaluation in order to construct a function object which returns a function pointer correctly when the function-definition written without typedefed function pointer. - Implement missing semantics of union object initialization. - Revise function-like macro replacement in order to evaluate `#' operator makes an empty string-literal when the parameter corresponding to the operand has no argument. - Fix bad sequence-point timing of logical-and-expression and logical-or-expression. - Add extra notification of variable value reference in evaluation of cast-expression in order not to misunderstand that a return value of a function is discarded when the return value is casted before assigning to a variable. - Fix evaluation of prefix-increment-expression and prefix-decrement-expression to make rvalue of the new incremented or decremented value in order to comply with the ISO C99 standard. Tue Jul 31 17:14:53 2012 Yutaka Yanoh * spec/spec_helper.rb : Add `simplecov' support. * features/support/env.rb : Ditto. * features/step_definitions/message_detection_steps.rb : Ditto. Tue Jul 31 15:35:42 2012 Rie Shima * features/message_detection/W0711.feature : Add W0711 specification. * features/message_detection/W0712.feature : Add W0712 specification. * features/message_detection/W0713.feature : Add W0713 specification. * features/message_detection/W0714.feature : Add W0714 specification. * features/message_detection/W0715.feature : Add W0715 specification. * MANIFEST : Add W0711, W0712, W0713, W0714 and W0700 specifications. Tue Jul 31 13:16:28 2012 Yutaka Yanoh * release.rc : 1.17.3 - Fix W0719 detection to warn only when the rhs operand of a shift-expression is greater than or equal to the bit length of underlying type of the lhs operand and less than the bit length of integer-promoted type of the lhs operand. - Revise W1039 detection to output multiple warnings when the format contains multiple `ll' length-modifiers. Tue Jul 31 13:09:00 2012 Yutaka Yanoh * features/message_detection/W1039.feature : Add W1039 specification of mutiple warnings at a line. * etc/mesg.d/ja_JP/messages.yml : Revise W1039 message text. * etc/mesg.d/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. * lib/adlint/c/message.rb : Revise W1039 detection to output multiple warnings when the format contains multiple `ll' length-modifiers. Tue Jul 31 11:45:07 2012 Yutaka Yanoh * features/message_detection/W0719.feature : Add W0719 specification to reproduce a known bug. * lib/adlint/c/message.rb : Fix W0719 detection to warn only when the rhs operand of a shift-expression is greater than or equal to the bit length of underlying type of the lhs operand and less than the bit length of integer-promoted type of the lhs operand. Mon Jul 30 16:37:33 2012 Yutaka Yanoh * release.rc : 1.17.2 - Fix W0705 and W0745 detections not to cause extra side-effects in evaluation of the subscript expression. - Fix abend problem when a conditional-expression appears in an array subscript of array-subscript-expressions or indirection-expressions. - Fix evaluation of prefix-increment-expression and prefix-decrement-expression to make rvalue of the new incremented or decremented value in order to comply with the ISO C99 standard. Mon Jul 30 16:25:08 2012 Yutaka Yanoh * share/doc/users_guide_ja.texi : Update descriptions about W0641, W0644, W0649, W0650, W0707, W0719, W0780, W0783, W0792, W0793, W0794, W0830, W0833, W0834, W1026, W1039, W1047 and W1071 messages. * share/doc/users_guide_en.texi : Ditto. Mon Jul 30 15:39:38 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix evaluation of prefix-increment-expression and prefix-decrement-expression to make rvalue of the new incremented or decremented value in order to comply with the ISO C99 standard. Mon Jul 30 14:44:44 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix abend problem when a conditional-expression appears in an array subscript of array-subscript-expressions or indirection-expressions. Mon Jul 30 11:57:47 2012 Yutaka Yanoh * features/message_detection/W0705.feature : Add W0705 specification to reproduce a known bug. * lib/adlint/c/interp.rb : Add new interpretation mode to evaluate an expression quietly without any side-effects. * lib/adlint/c/branch.rb : Ditto. * lib/adlint/c/option.rb : Ditto. * lib/adlint/c/message.rb : Fix W0705 and W0745 detections not to cause extra side-effects in evaluation of the subscript expression. Fri Jul 27 17:31:53 2012 Yutaka Yanoh * release.rc : 1.17.1 - Add W0707 detection. - Fix W0705 and W0745 detections to warn about not only array-subscript-expressions but also indirection-expressions only when the subscript is constant. Fri Jul 27 16:22:15 2012 Yutaka Yanoh * features/message_detection/W0705.feature : Add W0705 specification. * MANIFEST : Ditto. * features/message_detection/W0745.feature : Add W0745 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Fix W0705 and W0745 detections to warn about not only array-subscript-expressions but also indirection-expressions only when the subscript is constant. Fri Jul 27 14:24:38 2012 Yutaka Yanoh * features/message_detection/W0707.feature : Add W0707 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0707 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 27 10:23:38 2012 Yutaka Yanoh * release.rc : 1.17.0 - This is the initial release candidate for 1.18.0 GA release. - Add W0641 detection. - Add W0644 detection. - Add W0649 detection. - Add W0650 detection. - Add W0719 detection. - Add W0780 detection. - Add W0783 detection. - Add W0792 detection. - Add W0793 detection. - Add W0794 detection. - Add W0830 detection. - Add W0833 detection. - Add W0834 detection. - Add W1026 detection. - Add W1039 detection. - Add W1047 detection. - Add W1071 detection. - Fix W0459 detection to output outermost variable name when the uninitialized variable is an array element or a member of struct or union. - Revise expression evaluation not to give up when a operand is typed as `void'. - Revise arithmetic type resolution not to abort when one type is `void'. - Fix declarator evaluation in order to construct a function object which returns a function pointer correctly when the function-definition written without typedefed function pointer. - Implement missing semantics of union object initialization. - Revise function-like macro replacement in order to evaluate `#' operator makes an empty string-literal when the parameter corresponding to the operand has no argument. - Fix bad sequence-point timing of logical-and-expression and logical-or-expression. - Add extra notification of variable value reference in evaluation of cast-expression in order not to misunderstand that a return value of a function is discarded when the return value is casted before assigning to a variable. Thu Jul 26 17:53:31 2012 Yutaka Yanoh * lib/adlint/c/ctrlexpr.rb : Add missing sequence-point notification between lhs and rhs evaluation of logical-and-expression and logical-or-expression in the controlling expression. Thu Jul 26 16:43:07 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Add extra notification of variable value reference in evaluation of cast-expression in order not to misunderstand that a return value of a function is discarded when the return value is casted before assigning to a variable. Thu Jul 26 15:36:23 2012 Yutaka Yanoh * lib/adlint/c/object.rb : Add Variable#inner? predicate method for refactoring. * lib/adlint/c/message.rb : Ditto. * lib/adlint/c/expr.rb : Ditto. Thu Jul 26 15:25:09 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix bad sequence-point timing of logical-and-expression and logical-or-expression. * lib/adlint/c/syntax.rb : Ditto. Thu Jul 26 15:15:04 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0459 detection to output outermost variable name when the uninitialized variable is an array element or a member of struct or union. Thu Jul 26 11:05:49 2012 Yutaka Yanoh * lib/adlint/cpp/macro.rb : Revise `#' operator evaluation in order to support " and \ character escape. Wed Jul 25 17:15:45 2012 Yutaka Yanoh * lib/adlint/cpp/macro.rb : Revise function-like macro replacement in order to evaluate `#' operator makes an empty string-literal when the parameter corresponding to the operand has no argument. Wed Jul 25 17:14:46 2012 Yutaka Yanoh * lib/adlint/c/type.rb : Fix function type completeness determination not to consider a type of function whose return type or parameter types contain `void' as the incomplete type. Wed Jul 25 17:13:11 2012 Yutaka Yanoh * features/message_detection/W0783.feature : Add W0783 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0783 detection. * lib/adlint/c/phase.rb : Ditto. Wed Jul 25 14:51:19 2012 Yutaka Yanoh * features/message_detection/W0830.feature : Add W0830 specification. * MANIFEST : Ditto. * lib/adlint/c/syntax.rb : Add trailing comma field to enum-specifier node of the C AST. * lib/adlint/c/parser.y : Ditto. * lib/adlint/c/message.rb : Add W0830 detection. * lib/adlint/c/phase.rb : Ditto. Wed Jul 25 14:15:17 2012 Yutaka Yanoh * features/message_detection/W0794.feature : Add W0794 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0794 detection. * lib/adlint/c/phase.rb : Ditto. Wed Jul 25 11:46:37 2012 Yutaka Yanoh * features/message_detection/W1039.feature : Add W1039 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1039 detection. * lib/adlint/c/phase.rb : Ditto. Tue Jul 24 18:48:31 2012 Yutaka Yanoh * features/message_detection/W0833.feature : Add W0833 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0833 detection. * lib/adlint/c/phase.rb : Ditto. Tue Jul 24 15:56:40 2012 Yutaka Yanoh * features/message_detection/E0013.feature : Add E0013 specification. * MANIFEST : Ditto. * etc/mesg.d/ja_JP/messages.yml : Unify E0013 and W1044 into E0013. * etc/mesg.d/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Tue Jul 24 15:43:11 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W9003 detection not to warn when the object type is undefined or unresolved. Tue Jul 24 15:06:45 2012 Yutaka Yanoh * features/message_detection/W1047.feature : Add W1047 specification. * MANIFEST : Ditto. * lib/adlint/c/interp.rb : Implement missing semantics of union object initialization. * lib/adlint/c/message.rb : Add W1047 detection. * lib/adlint/c/phase.rb : Ditto. Tue Jul 24 11:54:50 2012 Yutaka Yanoh * features/message_detection/W1071.feature : Add W1071 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1071 detection. * lib/adlint/c/phase.rb : Ditto. Mon Jul 23 18:56:16 2012 Yutaka Yanoh * features/message_detection/W0641.feature : Add W0641 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0641 detection. * lib/adlint/c/phase.rb : Ditto. Mon Jul 23 16:52:21 2012 Yutaka Yanoh * features/message_detection/W0793.feature : Add W0793 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0793 detection. * lib/adlint/c/phase.rb : Ditto. Mon Jul 23 15:23:47 2012 Yutaka Yanoh * features/message_detection/W0792.feature : Add W0792 specification. * MANIFEST : Ditto. * lib/adlint/c/syntax.rb : Fix declarator evaluation in order to construct a function object which returns a function pointer correctly when the function-definition written without typedefed function pointer. * lib/adlint/c/message.rb : Add W0792 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 20 18:54:19 2012 Yutaka Yanoh * features/message_detection/W0644.feature : Add W0644 specification. * MANIFEST : Ditto. * lib/adlint/c/expr.rb : Revise expression evaluation not to give up when a operand is typed as `void'. * lib/adlint/c/expr.rb : Add missing notification of variable value reference in logical-and-expression and logical-or-expression. * lib/adlint/c/ctrlexpr.rb : Ditto. * lib/adlint/c/type.rb : Revise arithmetic type resolution not to abort when one type is `void'. * lib/adlint/c/object.rb : Revise arguments to parameters assignment behavior not to skip assignment whenever the parameter is typed as `void'. * lib/adlint/c/message.rb : Add W0644 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 20 14:51:45 2012 Yutaka Yanoh * features/message_detection/W0780.feature : Add W0780 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0780 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 20 14:00:20 2012 Yutaka Yanoh * features/message_detection/W0719.feature : Add W0719 specification. * MANIFEST : Ditto. * lib/adlint/c/expr.rb : Fix bad arguments of shift-expression notification in evaluating `<<=' and `>>=' expressions. * lib/adlint/c/message.rb : Add W0719 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 20 12:56:37 2012 Yutaka Yanoh * features/message_detection/W0650.feature : Add W0650 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0650 detection. * lib/adlint/c/phase.rb : Ditto. Thu Jul 19 17:48:15 2012 Yutaka Yanoh * features/message_detection/W0649.feature : Add W0649 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0649 detection. * lib/adlint/c/phase.rb : Ditto. Thu Jul 19 16:44:17 2012 Yutaka Yanoh * features/message_detection/W1026.feature : Add W1026 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1026 detection. * lib/adlint/c/phase.rb : Ditto. Thu Jul 19 14:53:48 2012 Yutaka Yanoh * features/message_detection/W0834.feature : Add W0834 specification. * MANIFEST : Ditto. * lib/adlint/c/type.rb : Add a visitor of the type-object tree. * lib/adlint/c/resolver.rb : Add type field to parameter-declarations. * lib/adlint/c/syntax.rb : Ditto. * lib/adlint/c/message.rb : Add W0834 detection. * lib/adlint/c/phase.rb : Ditto. Wed Jul 18 11:19:21 2012 Yutaka Yanoh * release.ga : 1.16.0 - Add W0643 detection. - Add W0646 detection. - Add W0691 detection. - Add W0692 detection. - Add W0694 detection. - Add W0805 detection. - Add W0811 detection. - Add W1040 detection. - Add W1041 detection. - Add W1046 detection. - Add W1073 detection. - Add W1074 detection. - Add W1075 detection. - Add W1076 detection. - Add W1077 detection. - Add extra sequence-point notification in the conditional-expression in order not to over-warn about side-effects between sequence-points. - Add extra variable value reference notification not to discard function return values in the 2nd and 3rd expressions of the conditional-expression. - Add missing notification of variable value reference in comparison expressions. Tue Jul 17 17:41:56 2012 Yutaka Yanoh * release.rc : 1.15.1 - Revise W0692 message text. Tue Jul 17 17:29:36 2012 Yutaka Yanoh * lib/adlint/cpp/message.rb : Revise W0692 message text. * etc/mesg.d/ja_JP/messages.yml : Ditto. * etc/mesg.d/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Tue Jul 17 14:17:01 2012 Yutaka Yanoh * release.rc : 1.15.0 - This is the initial release candidate for 1.16.0 GA release. - Add W0643 detection. - Add W0646 detection. - Add W0691 detection. - Add W0692 detection. - Add W0694 detection. - Add W0805 detection. - Add W0811 detection. - Add W1040 detection. - Add W1041 detection. - Add W1046 detection. - Add W1073 detection. - Add W1074 detection. - Add W1075 detection. - Add W1076 detection. - Add W1077 detection. - Add extra sequence-point notification in the conditional-expression in order not to over-warn about side-effects between sequence-points. - Add extra variable value reference notification not to discard function return values in the 2nd and 3rd expressions of the conditional-expression. - Add missing notification of variable value reference in comparison expressions. Wed Jul 11 14:38:16 2012 Yutaka Yanoh * features/message_detection/W0643.feature : Add W0643 specification. * MANIFEST : Ditto. * lib/adlint/cpp/lexer.rb : Revise text-line tokenizing behavior not to discard `\' token which is not at the end of line. * lib/adlint/cpp/macro.rb : Add notification about discarding unwanted `\' token when the operand of `#' operator ends with standalone `\' token. * lib/adlint/cpp/message.rb : Add W0643 detection. * lib/adlint/cpp/phase.rb : Ditto. Wed Jul 11 13:20:45 2012 Yutaka Yanoh * features/message_detection/W1046.feature : Add W1046 specification. * MANIFEST : Ditto. * lib/adlint/cpp/lexer.rb : Add notification about illformed newline escape. * lib/adlint/cpp/eval.rb : Ditto. * lib/adlint/cpp/message.rb : Add W1046 detection. * lib/adlint/cpp/phase.rb : Ditto. Wed Jul 11 11:16:55 2012 Yutaka Yanoh * features/message_detection/W1041.feature : Add W1041 specification. * MANIFEST : Ditto. * lib/adlint/cpp/syntax.rb : Add non-standard preprocessing directive node to abstract-syntax-tree for cpp language. * lib/adlint/cpp/lexer.rb : Add tokenizer method for non-standard preprocessing directive. * lib/adlint/cpp/eval.rb : Add non-standard preprocessing directive evaluation to the preprocessor. * etc/mesg.d/ja_JP/messages.yml : Revise W1041 message text. * etc/mesg.d/en_US/messages.yml : Ditto. * lib/adlint/cpp/message.rb : Add W1041 detection. * lib/adlint/cpp/phase.rb : Ditto. Tue Jul 10 18:03:03 2012 Yutaka Yanoh * features/message_detection/W1040.feature : Add W1040 specification. * MANIFEST : Ditto. * lib/adlint/cpp/lexer.rb : Revise tokenizing behavior in order to pass unwanted extra tokens to the preprocessor. * lib/adlint/cpp/eval.rb : Add notification about extra tokens after preprocessing directives. * lib/adlint/cpp/message.rb : Add W1040 detection. * lib/adlint/cpp/phase.rb : Ditto. Tue Jul 10 15:31:13 2012 Yutaka Yanoh * features/message_detection/W0811.feature : Add W0811 specification. * MANIFEST : Ditto. * lib/adlint/cpp/macro.rb : Add result tokens to notification of macro replacements. * lib/adlint/cpp/message.rb : Add W0811 detection. * lib/adlint/cpp/phase.rb : Ditto. Tue Jul 10 14:27:10 2012 Yutaka Yanoh * features/message_detection/W0805.feature : Add W0805 specification. * MANIFEST : Ditto. * lib/adlint/cpp/constexpr.y : Add argument existence to notification of the illformed `defined' operator evaluation. * lib/adlint/cpp/eval.rb : Ditto. * lib/adlint/cpp/message.rb : Add W0805 detection. * lib/adlint/cpp/phase.rb : Ditto. Tue Jul 10 13:37:13 2012 Yutaka Yanoh * features/message_detection/W0694.feature : Add W0694 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W0694 detection. * lib/adlint/c/phase.rb : Ditto. Mon Jul 9 19:04:48 2012 Yutaka Yanoh * features/message_detection/W0692.feature : Add W0692 specification. * MANIFEST : Ditto. * lib/adlint/cpp/macro.rb : Add pre-parsed arguments to notification of the function-like macro replacement. * lib/adlint/cpp/message.rb : Add W0692 detection. * lib/adlint/cpp/phase.rb : Ditto. Mon Jul 9 17:45:09 2012 Yutaka Yanoh * features/message_detection/W0691.feature : Add W0691 specification. * MANIFEST : Ditto. * lib/adlint/cpp/macro.rb : Add notification about `##' operator evaluation. * lib/adlint/cpp/message.rb : Add W0691 detection. * lib/adlint/cpp/phase.rb : Ditto. Mon Jul 9 15:47:46 2012 Yutaka Yanoh * features/message_detection/W0646.feature : Add W0646 specification. * MANIFEST : Ditto. * lib/adlint/c/lexer.rb : Add notification about string-literal concatenations. * lib/adlint/c/parser.y : Ditto. * lib/adlint/c/message.rb : Add W0646 detection. * lib/adlint/c/phase.rb : Ditto. * lib/adlint/lang.rb : Ditto. Fri Jul 6 17:25:19 2012 Yutaka Yanoh * features/message_detection/W1077.feature : Add W1077 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1077 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 6 17:04:28 2012 Yutaka Yanoh * features/message_detection/W1076.feature : Add W1076 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1076 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 6 13:45:05 2012 Yutaka Yanoh * features/message_detection/W1075.feature : Add W1075 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1075 detection. * lib/adlint/c/phase.rb : Ditto. Fri Jul 6 11:04:19 2012 Yutaka Yanoh * features/message_detection/W1074.feature : Add W1074 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1074 detection. * lib/adlint/c/phase.rb : Ditto. Thu Jul 5 18:07:40 2012 Yutaka Yanoh * features/message_detection/W1073.feature : Add W1073 specification. * MANIFEST : Ditto. * lib/adlint/c/message.rb : Add W1073 detection. * lib/adlint/c/phase.rb : Ditto. Thu Jul 5 17:38:08 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Add extra sequence-point notification in the conditional-expression in order not to over-warn about side-effects between sequence-points. * lib/adlint/c/interp.rb : Add extra variable value reference notification not to discard function return values in the 2nd and 3rd expressions of the conditional-expression. Thu Jul 5 17:02:49 2012 Yutaka Yanoh * lib/adlint/c/ctrlexpr.rb : Add missing notification of variable value reference in comparison expressions. Wed Jul 4 10:42:39 2012 Yutaka Yanoh * release.ga : 1.14.0 - Add W0645 detection. - Add W0697 detection. - Add W0700 detection. - Add W1066 detection. - Add W1067 detection. - Add W1068 detection. - Add W1069 detection. - Add W1070 detection. - Add W1072 detection. - Fix W0104 detection not to warn when the unchanged parameter is typed with `const volatile' qualifiers. - Add W0104, W0645, W0697, W0700, W1066, W1067, W1068, W1069, W1070 and W1072 specifications. Mon Jul 2 17:34:36 2012 Yutaka Yanoh * release.rc : 1.13.0 - This is the initial release candidate for 1.14.0 GA release. - Add W0645 detection. - Add W0697 detection. - Add W0700 detection. - Add W1066 detection. - Add W1067 detection. - Add W1068 detection. - Add W1069 detection. - Add W1070 detection. - Add W1072 detection. - Fix W0104 detection not to warn when the unchanged parameter is typed with `const volatile' qualifiers. - Add W0104, W0645, W0697, W0700, W1066, W1067, W1068, W1069, W1070 and W1072 specifications. Mon Jul 2 17:28:14 2012 Yutaka Yanoh * features/message_detection/W0104.feature : Add W0104 specification to reproduce a known bug. * MANIFEST : Ditto. * lib/adlint/c/type.rb : Fix bad qualified type object structure. Mon Jul 2 13:54:32 2012 Rie Shima * share/doc/users_guide_ja.texi : Update descriptions about W0645, W0697, W0700, W1066, W1067, W1068, W1069, W1070 and W1072 messages. * share/doc/users_guide_en.texi : Ditto. Fri Jun 29 10:04:56 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0645, W0697 and W0700 detections. * lib/adlint/c/phase.rb : Ditto. * features/message_detection/W0645.feature : Add W0645 specification. * features/message_detection/W0697.feature : Add W0697 specification. * features/message_detection/W0700.feature : Add W0700 specification. * MANIFEST : Add W0645, W0697 and W0700 specifications. Thu Jun 28 18:26:16 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Refactor long method of FunctionInterpreter. Wed Jun 27 15:00:25 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Add implicit return notification. * lib/adlint/c/mediator.rb : Ditto. Fri Jun 22 15:37:18 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W1069, W1070 and W1072 detections. * lib/adlint/c/phase.rb : Ditto. * features/message_detection/W1069.feature : Add W1069 specification. * features/message_detection/W1070.feature : Add W1070 specification. * features/message_detection/W1072.feature : Add W1072 specification. * MANIFEST : Add W1069, W1070 and W1072 specifications. Thu Jun 21 14:52:12 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W1066, W1067 and W1068 detections. * lib/adlint/c/phase.rb : Ditto. * features/message_detection/W1066.feature : Add W1066 specification. * features/message_detection/W1067.feature : Add W1067 specification. * features/message_detection/W1068.feature : Add W1068 specification. * MANIFEST : Add W1066, W1067 and W1068 specifications. Wed Jun 20 13:36:49 2012 Yutaka Yanoh * release.ga : 1.12.0 - Add W0732 detection. - Add W0733 detection. - Add W0734 detection. - Add W0735 detection. - Add W9003 detection. - Revise the value domain narrowing in order not to over-narrow and under-narrow a value domain of the controlling variable. - Fix bad multiplication logic in order to detect W0723 and W1052 correctly. - Add unit specifications of domain of variables' value. - Add unit specifications of syntax tree of the C language. - Add W0093, W0687, W0688, W0689, W0690, W0732, W0733, W0734, W0735, W1052, W9001 and W9003 specifications. - Add W1066, W1067, W1068, W1069, W1070, W1071, W1072, W1073, W1074, W1075, W1076, W1077 and W9003 message definitions. Wed Jun 20 10:49:52 2012 Yutaka Yanoh * release.rc : 1.11.2 - Revise W9003 specification not to over-warn about natural conversions. Wed Jun 20 10:46:17 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Revise W9003 specification not to over-warn about natural conversions. Tue Jun 19 17:37:04 2012 Yutaka Yanoh * release.rc : 1.11.1 - Add W9003 detection. Tue Jun 19 16:33:54 2012 Yutaka Yanoh * features/message_detection/W9003.feature : Add W9003 specification. * MANIFEST : Ditto. * lib/adlint/c/type.rb : Add Type#standard? predicate method and insert StandardFloatingType in FloatingType class hierarchy. * lib/adlint/c/type.rb : Revise integer-promotion rule of any enumerated types in order not to over-warn W9003 about enum-enum expressions. * lib/adlint/c/message.rb : Add W9003 detection. * lib/adlint/c/phase.rb : Ditto. Tue Jun 19 14:48:20 2012 Rie Shima * share/doc/users_guide_ja.texi : Update descriptions about W0732, W0733, W0734 and W0735 messages. * share/doc/users_guide_en.texi : Ditto. * share/doc/users_guide_ja.texi : Add W1066, W1067, W1068, W1069, W1070, W1071, W1072, W1073, W1074, W1075, W1076, W1077 and W9003 message definitions. * share/doc/users_guide_en.texi : Ditto. Fri Jun 15 17:25:51 2012 Yutaka Yanoh * release.rc : 1.11.0 - This is the initial release candidate for 1.12.0 GA release. - Add W0732 detection. - Add W0733 detection. - Add W0734 detection. - Add W0735 detection. - Revise the value domain narrowing in order not to over-narrow and under-narrow a value domain of the controlling variable. - Fix bad multiplication logic in order to detect W0723 and W1052 correctly. - Add unit specifications of domain of variables' value. - Add unit specifications of syntax tree of the C language. - Add W0093, W0687, W0688, W0689, W0690, W0732, W0733, W0734, W0735, W1052 and W9001 specifications. - Add W1066, W1067, W1068, W1069, W1070, W1071, W1072, W1073, W1074, W1075, W1076, W1077 and W9003 message definitions. Wed Jun 13 18:20:47 2012 Yutaka Yanoh * features/message_detection/W0723.feature : Add W0723 specification to reproduce a known bug. * features/message_detection/W1052.feature : Add W1052 specification to reproduce a known bug. * MANIFEST : Ditto. * lib/adlint/c/domain.rb : Fix bad multiplication logic of IntersectionValueDomain in order to detect W0723 and W1052 correctly. Wed Jun 13 15:57:32 2012 Rie Shima * lib/adlint/c/syntax.rb : Add predicate methods to check whether an expression is #arithmetic? or #bitwise?. * spec/adlint/c/syntax_spec.rb : Add unit specifications of syntax tree of the C language. * MANIFEST : Ditto. * lib/adlint/c/message_shima.rb : Add W0732, W0733, W0734 and W0735 detections. * lib/adlint/c/phase.rb : Ditto. * features/message_detection/W0732.feature : Add W0732 specification. * features/message_detection/W0733.feature : Add W0733 specification. * features/message_detection/W0734.feature : Add W0734 specification. * features/message_detection/W0735.feature : Add W0735 specification. * MANIFEST : Add W0732, W0733, W0735 and W0690 specifications. Wed Jun 13 11:59:36 2012 Yutaka Yanoh * lib/adlint/c/ctrlexpr.rb : Revise the value domain narrowing in order not to under-narrow a value domain of the controlling variable. * lib/adlint/c/value.rb : Ditto. * features/message_detection/W0093.feature : Add W0093 specification to reproduce a known bug. * MANIFEST : Ditto. Tue Jun 12 18:41:54 2012 Yutaka Yanoh * spec/adlint/c/ctrlexpr_spec.rb : Add unit specifications of controlling expression of selection-statements and iteration-statements. Mon Jun 11 17:49:11 2012 Yutaka Yanoh * lib/adlint/prelude.rb : Add __NOTREACHED__ function in order to ease debugging. * lib/adlint/c/expr.rb : Ditto. * lib/adlint/c/ctrlexpr.rb : Ditto. * lib/adlint/c/domain.rb : Ditto. * lib/adlint/c.rb : Ditto. * lib/adlint/c/operator.rb : Add Operator and ComparisonOperator to represent a comparison operator symbol directly and move responsibilities to Operator from ::Symbol. * spec/adlint/c/operator_spec.rb : Ditto. * spec/adlint/c/domain_spec.rb : Ditto. * lib/adlint/c/interp.rb : Ditto. * lib/adlint/c/ctrlexpr.rb : Ditto. * lib/adlint/c/type.rb : Ditto. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/value.rb : Ditto. * lib/adlint/c/domain.rb : Ditto. * lib/adlint/prelude.rb : Ditto. * MANIFEST : Ditto. Fri Jun 8 14:43:14 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Add Value#definite? to check whether the value is definite. * features/message_detection/W9001.feature : Add W9001 specification to reproduce a known bug. * MANIFEST : Ditto. * lib/adlint/c/ctrlexpr.rb : Revise the value domain narrowing in order not to over-narrow a value domain of the controlling variable. Thu Jun 7 16:30:23 2012 Yutaka Yanoh * spec/adlint/c/domain_spec.rb : Add unit specifications of domain of variables' value. * MANIFEST : Ditto. Thu Jun 7 11:54:09 2012 Yutaka Yanoh * etc/mesg.d/ja_JP/messages.yml : Add W1066, W1067, W1068, W1069, W1070, W1071, W1072, W1073, W1074, W1075, W1076, W1077 and W9003 message definitions. * etc/mesg.d/en_US/messages.yml : Ditto. Wed Jun 6 11:27:32 2012 Rie Shima * features/message_detection/W0687.feature : Add W0687 specification. * features/message_detection/W0688.feature : Add W0688 specification. * features/message_detection/W0689.feature : Add W0689 specification. * features/message_detection/W0690.feature : Add W0690 specification. * MANIFEST : Add W0687, W0688, W0689 and W0690 specifications. Wed Jun 6 10:19:58 2012 Yutaka Yanoh * release.ga : 1.10.0 - Add W0716 detection. - Add W0717 detection. - Add W0718 detection. - Fix W0500 detection not to warn when two standalone binary arithmetic expressions are appears at 2nd and 3rd expressions of a conditional-expression. - Fix W0501 detection not to duplicate warnings about a conditional-expression. - Fix W0582, W0583 and W0584 detections in order to consider type convertibility correctly. - Fix W1031 detection not to warn when the declaration with `static' and definition without storage-class-specifier. - Fix lack of sequence-point notification of controlling expressions. - Add unit specifications of C type models. - Add W0001, W0002, W0003, W0007, W0010, W0013, W0109, W0583, W0606, W0698, W0699, W0703, W0716, W0717, W0718, W0723 and W1031 specifications. Tue Jun 5 16:45:06 2012 Yutaka Yanoh * release.rc : 1.9.2 - Fix W1031 detection to correctly warn when the declaration with `extern' and the definition with `static'. - Remove initialization semantics of the program execution which is not comply with the ISO C99 standard. Tue Jun 5 15:58:40 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Remove initialization semantics of the program execution which is not comply with the ISO C99 standard. * lib/adlint/c/object.rb : Ditto. Tue Jun 5 13:44:28 2012 Yutaka Yanoh * features/message_detection/W0703.feature : Add W0703 specification to reproduce a known bug. * features/message_detection/W0109.feature : Add W0109 specification to reproduce a known bug. * MANIFEST : Ditto. Mon Jun 4 18:23:48 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W1031 detection to correctly warn when the declaration with `extern' and the definition with `static'. * lib/adlint/c/interp.rb : Add notification about function-definition. * lib/adlint/c/mediator.rb : Ditto. * lib/adlint/c/message.rb : Ditto. * lib/adlint/c/code.rb : Ditto. * lib/adlint/c/object.rb : Fix bad linkage determination logic. * features/message_detection/W1031.feature : Add W1031 specification to reproduce a known bug. Fri Jun 1 19:50:31 2012 Yutaka Yanoh * release.rc : 1.9.1 - Fix W1031 detection not to warn when the declaration with `static' and definition without storage-class-specifier. - Support initialization semantics preceding the program starup in order to correctly evaluate expressions in initializers of the static storage duration object definition. - Add W0606, W0698 and W0699 specifications. Fri Jun 1 19:01:13 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Support initialization semantics preceding the program starup in order to correctly evaluate expressions in initializers of the static storage duration object definition. * lib/adlint/c/phase.rb : Ditto. * lib/adlint/c/mediator.rb : Ditto. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/option.rb : Add new module `option.rb' to define whole option constants. * lib/adlint/c/type.rb : Ditto. * lib/adlint/c/branch.rb : Ditto. * lib/adlint/c/ctrlexpr.rb : Ditto. * lib/adlint/c/message.rb : Ditto. * lib/adlint/c.rb : Ditto. * MANIFEST : Ditto. Fri Jun 1 15:42:00 2012 Rie Shima * features/message_detection/W0606.feature : Add W0606 specification. * features/message_detection/W0698.feature : Add W0698 specification. * features/message_detection/W0699.feature : Add W0699 specification. * MANIFEST : Add W0606, W0698 and W0699 specifications. Thu May 31 11:46:58 2012 Yutaka Yanoh * features/message_detection/W0723.feature : Add W0723 specification to reproduce a known bug. Thu May 31 11:32:16 2012 Yutaka Yanoh * features/message_detection/W1031.feature : Add W1031 specification to reproduce a known bug. * lib/adlint/c/message.rb : Fix W1031 detection not to warn when the declaration with `static' and definition without storage-class-specifier. Thu May 31 09:43:09 2012 Yutaka Yanoh * release.rc : 1.9.0 - This is the initial release candidate for 1.10.0 GA release. - Add W0716 detection. - Add W0717 detection. - Add W0718 detection. - Fix W0501 detection not to duplicate warnings about a conditional-expression. - Fix W0500 detection not to warn when two standalone binary arithmetic expressions are appears at 2nd and 3rd expressions of a conditional-expression. - Fix lack of sequence-point notification of controlling expressions. - Fix W0582, W0583 and W0584 detections in order to consider type convertibility correctly. - Add unit specifications of C type models. - Add W0001, W0002, W0003, W0007, W0010, W0013, W0583, W0716, W0717 and W0718 specifications. Wed May 30 22:23:41 2012 Yutaka Yanoh * spec/adlint/c/type_spec.rb : Add `more cv-qualified' unit specification. Wed May 30 20:17:38 2012 Yutaka Yanoh * lib/adlint/c/conv.rb : Fix Type#same_as? method invocation to conform with lhs and rhs order of other invocations. * lib/adlint/c/expr.rb : Ditto. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/message.rb : Ditto. * lib/adlint/c/format.rb : Fix too strict argument type checkings in order to consider type convertibility correctly. * lib/adlint/c/message.rb : Fix W0582, W0583 and W0584 detections in order to consider type convertibility correctly. Wed May 30 19:18:11 2012 Yutaka Yanoh * lib/adlint/c/type.rb : Add Type#convertible?(to_type) method to check whether a type is implicitly convertible to another type. * spec/adlint/c/type_spec.rb : Add more unit specifications of C type models. Wed May 30 15:38:00 2012 Rie Shima * share/doc/users_guide_ja.texi : Update descriptions about added warning messages. * share/doc/users_guide_en.texi : Ditto. Tue May 29 16:18:00 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0716, W0717 and W0718 detections. * lib/adlint/c/phase.rb : Ditto. * features/message_detection/W0716.feature : Add W0716 specification. * features/message_detection/W0717.feature : Add W0717 specification. * features/message_detection/W0718.feature : Add W0718 specification. * MANIFEST : Add W0716, W0717 and W0718 specifications. Tue May 29 15:04:31 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix abend problem of conditional-expression evaluation with the controlling variable's value domain management. Tue May 29 13:11:02 2012 Yutaka Yanoh * features/message_detection/W0013.feature : Add W0013 specification. * MANIFEST : Ditto. Tue May 29 11:55:44 2012 Yutaka Yanoh * lib/adlint/c/ctrlexpr.rb : Fix lack of sequence-point notification of controlling expressions. Mon May 28 17:42:19 2012 Yutaka Yanoh * features/message_detection/W0010.feature : Add W0010 specification. * MANIFEST : Ditto. Mon May 28 17:27:02 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0500 detection not to warn when two standalone binary arithmetic expressions are appears at 2nd and 3rd expressions of a conditional-expression. Mon May 28 17:14:53 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0501 detection not to duplicate warnings about a conditional-expression. Mon May 28 13:53:09 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Move responsibility of conditional-expression evaluation to the upper layer in order to manage value domain of the controlling variable. * lib/adlint/c/interp.rb : Ditto. Mon May 28 11:52:57 2012 Yutaka Yanoh * features/message_detection/W0007.feature : Add W0007 specification. * MANIFEST : Ditto. Mon May 28 11:03:47 2012 Yutaka Yanoh * features/message_detection/W0003.feature : Add W0003 specification. * MANIFEST : Ditto. Mon May 28 10:36:06 2012 Yutaka Yanoh * features/message_detection/W0002.feature : Add W0002 specification. * MANIFEST : Ditto. Mon May 27 12:35:29 2012 Yutaka Yanoh * features/message_detection/W0001.feature : Add W0001 specification. * MANIFEST : Ditto. Tue May 22 12:12:08 2012 Yutaka Yanoh * features/message_detection/W0583.feature : Add W0583 specification to reproduce a known bug. * MANIFEST : Ditto. * Rakefile : Add `features' task to run Cucumber features. Mon May 21 16:33:19 2012 Yutaka Yanoh * spec/adlint/c/type_spec.rb : Add unit specifications of C type models. * MANIFEST : Ditto. * Rakefile : Add `spec' task to run RSpec code examples. Fri May 18 22:04:23 2012 Yutaka Yanoh * release.ga : 1.8.10 - Fix bad narrowing logic of undefined value domain in order to detect W9001 correctly. - Fix W0635 detection not to warn when the expected type of the conversion specifier is a pointer type and the corresponding argument's type is a pointer type whose base type is cv-qualified. - Fix W0583 detection not to warn when the argument type is a cv-qualified one of the corresponding parameter's type. - Fix W0112 detection not to warn about floating point relational-expressions. - Fix W0117 and W0118 detection not to misunderstand linkage of object definitions. - Fix W0101, W0102, W0103 and W0107 detections not to warn when an address of the parameter array variable (an alias of the caller's array) is going to be saved. - Fix W0828 detection not to warn when the member variable is a type of char array and the corresponding initializer is a string-literal-specifier. - Fix W0635 detection not to warn when the `void *' argument passed as the `%p' conversion specifier. - Fix degraded W0118 detection not to warn when the object declaration is in the header file and the same declaration is in the source file, too. - Fix bad value domain multiplication logic in order to correctly detect W0723 about multiplicative-expressions. - Fix W0771 detection not to warn when declarations of the same object are in a source file. - Fix W0080 detection to warn when the file local static variable is defined without initializer. - Fix bad value domain multiplication logic in order to correctly detect W0608 about multiplicative-expressions. - Fix degraded W0771 detection not to warn when declarations of the same object are in two or more files. - Fix degraded W0118 detection to warn when all declarations of an object are in the source file. Fri May 18 21:38:59 2012 Yutaka Yanoh * release.rc : 1.8.9 - Fix degraded W0771 detection not to warn when declarations of the same object are in two or more files. - Fix degraded W0118 detection to warn when all declarations of an object are in the source file. Fri May 18 21:21:29 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix degraded W0118 detection to warn when all declarations of an object are in the source file. Fri May 18 21:12:15 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix degraded W0771 detection not to warn when declarations of the same object are in two or more files. Fri May 18 20:46:33 2012 Yutaka Yanoh * release.rc : 1.8.7 - Fix bad value domain multiplication logic in order to correctly detect W0608 about multiplicative-expressions. Fri May 18 20:38:30 2012 Yutaka Yanoh * lib/adlint/c/domain.rb : Fix bad value domain multiplication logic in order to correctly detect W0608 about multiplicative-expressions. Fri May 18 19:50:35 2012 Yutaka Yanoh * release.rc : 1.8.5 - Fix W0828 detection not to warn when the member variable is a type of char array and the corresponding initializer is a string-literal-specifier. - Fix W0635 detection not to warn when the `void *' argument passed as the `%p' conversion specifier. - Fix degraded W0118 detection not to warn when the object declaration is in the header file and the same declaration is in the source file, too. - Fix bad value domain multiplication logic in order to correctly detect W0723 about multiplicative-expressions. - Fix W0771 detection not to warn when declarations of the same object are in a source file. - Fix W0080 detection to warn when the file local static variable is defined without initializer. Fri May 18 19:10:56 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0080 detection to warn when the file local static variable is defined without initializer. Fri May 18 18:42:02 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0771 detection not to warn when declarations of the same object are in a source file. Fri May 18 18:25:04 2012 Yutaka Yanoh * lib/adlint/c/domain.rb : Fix bad value domain multiplication logic in order to correctly detect W0723 about multiplicative-expressions. Fri May 18 15:58:57 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix degraded W0118 detection not to warn when the object declaration is in the header file and the same declaration is in the source file, too. Fri May 18 15:30:29 2012 Yutaka Yanoh * lib/adlint/c/type.rb : Fix and refactor bad type similarity check not to misunderstand that the `void *' is not same as `void *'. Fri May 18 13:22:41 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0828 detection not to warn when the member variable is a type of char array and the corresponding initializer is a string-literal-specifier. Thu May 17 18:32:49 2012 Yutaka Yanoh * release.rc : 1.8.3 - This is RC for the 2nd patch release of the 1.8 series. - Fix bad narrowing logic of undefined value domain in order to detect W9001 correctly. - Fix W0635 detection not to warn when the expected type of the conversion specifier is a pointer type and the corresponding argument's type is a pointer type whose base type is cv-qualified. - Fix W0583 detection not to warn when the argument type is a cv-qualified one of the corresponding parameter's type. - Fix W0112 detection not to warn about floating point relational-expressions. - Fix W0117 and W0118 detection not to misunderstand linkage of object definitions. - Fix W0101, W0102, W0103 and W0107 detections not to warn when an address of the parameter array variable (an alias of the caller's array) is going to be saved. Thu May 17 16:08:47 2012 Yutaka Yanoh * lib/adlint/c/type.rb : Add query interface tells whether the receiver type is a type of function parameters or not. * lib/adlint/c/message.rb : Fix W0101, W0102, W0103 and W0107 detections not to warn when an address of the parameter array variable (an alias of the caller's array) is going to be saved. Thu May 17 15:24:49 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix scattered object linkage determination logic to use new Object#declared_as_*? method. * lib/adlint/c/code.rb : Ditto. Wed May 16 11:57:18 2012 Yutaka Yanoh * lib/adlint/c/object.rb : Fix bad linkage determination of variables in order not to misunderstand that function local variables have external linkages. * lib/adlint/c/message.rb : Fix W0117 and W0118 detection not to misunderstand linkage of object definitions. Wed May 16 11:33:03 2012 Yutaka Yanoh * lib/adlint/c/ctrlexpr.rb : Fix bad expression evaluation notification not to notify that an equality-expression evaluated when a relational-expression is evaluated. Wed May 16 10:53:56 2012 Yutaka Yanoh * lib/adlint/c/type.rb : Fix bad type similarity check not to misunderstand that the pointer or array of non cv-qualified type is not similar to the pointer or array of cv-qualified type. Wed May 16 02:25:04 2012 Yutaka Yanoh * share/demo/Makefile : Add `integer_promotion' demo. * share/demo/integer_promotion/integer_promotion.c : Ditto. * MANIFEST : Ditto. Tue May 15 18:05:48 2012 Yutaka Yanoh * lib/adlint/c/domain.rb : Fix bad value domain multiplication logic in order not to result NaN when the rhs domain contains 0. Tue May 15 15:19:31 2012 Yutaka Yanoh * lib/adlint/c/domain.rb : Fix bad narrowing logic of undefined value domain in order not to mishandle controlling expressions of uninitialized variables. * lib/adlint/c/ctrlexpr.rb : Remove redundant ValueDomainManipulator registration. Mon May 7 22:56:02 2012 Yutaka Yanoh * release.ga : 1.8.2 - Fix evaluation of array-subscript-expression not to convert the derived array object into a pointer in order to resolve a type of the nested array-subscript-expression correctly. Sat May 5 02:50:24 2012 Yutaka Yanoh * release.rc : 1.8.1 - This is RC for the 1st patch release of the 1.8 series. - Fix evaluation of array-subscript-expression not to convert the derived array object into a pointer in order to resolve a type of the nested array-subscript-expression correctly. Fri May 4 20:59:19 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix evaluation of array-subscript-expression not to convert the derived array object into a pointer variable. Fri Apr 27 17:29:22 2012 Yutaka Yanoh * release.ga : 1.8.0 - Add W0607 detection. - Add W0608 detection. - Add W0625 detection. - Add W0632 detection. - Add W0633 detection. - Add W0634 detection. - Add W0642 detection. - Add W0711 detection. - Add W0712 detection. - Add W0713 detection. - Add W0714 detection. - Add W0715 detection. - Add W0832 detection. - Fix W0629 detection not to warn when the translation-unit local function is referred only to derive a pointer to the function. - Fix W0459 and W0460 detections not to warn about inner variables owned by a temporary variable. - Fix W0461 and W0462 detections not to warn when the length omitted array parameter is specified as an argument. - Fix W1031 detection not to warn when the storage-class-specifier of the object declaration is explicitly specified and the storage-class-specifier of following object definition is omitted. - Fix W0581, W0582, W0583 and W0584 detections not to warn when the corresponding types of argument and parameter are array-array or array-pointer pair. - Fix W0581 detection to warn when the number of arguments in current function call is greater than the number of arguments in previous function calls. - Fix W0582, W0583 and W0584 detections to warn when the number of parameters is greater than the number of arguments. - Fix abend problem when the pathname of #include_next directive is not in the executing environment. - Support mswin path separator in #include or #include_next directives. - Fix bad FN_UELS (number of incomplete if-else-if statement chains) metric measurement. - Improve value version management of the abstract interpreter. Fri Apr 27 16:58:38 2012 Rie Shima * share/doc/users_guide_ja.texi : Update descriptions about added warning messages. * share/doc/users_guide_en.texi : Ditto. Fri Apr 27 15:42:29 2012 Yutaka Yanoh * etc/mesg.d/ja_JP/messages.yml : Revise W0541 message text. * etc/mesg.d/en_US/messages.yml : Ditto. Fri Apr 27 15:36:36 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0629 detection not to warn when the translation-unit local function is referred to derive a pointer to the function. Fri Apr 27 14:24:03 2012 Yutaka Yanoh * release.rc : 1.7.6 - Fix W0582, W0583 and W0584 detections to warn when the number of parameters is greater than the number of arguments. - Fix W0581 detection to warn when the number of arguments in current function call is greater than the number of arguments in previous function calls. - Revise specification of W0541 and W0832 detections to warn at the inline assembly code. Fri Apr 27 14:18:05 2012 Yutaka Yanoh * lib/adlint/cpp/message.rb : Revise specification of W0541 and W0832 detections to warn at the inline assembly code. Fri Apr 27 13:40:05 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0581 detection to warn when the number of arguments in current function call is greater than the number of arguments in previous function calls. * lib/adlint/c/message.rb : Fix W0582, W0583 and W0584 detections to warn when the number of parameters is greater than the number of arguments. Fri Apr 27 11:50:47 2012 Yutaka Yanoh * release.rc : 1.7.5 - Fix W0459 and W0460 detections not to warn about inner variables owned by a temporary variable. - Fix W0461 and W0462 detections not to warn when the length omitted array parameter is specified as an argument. - Fix W1031 detection not to warn when the storage-class-specifier of the object declaration is explicitly specified and the storage-class-specifier of following object definition is omitted. - Fix W0581, W0582, W0583 and W0584 detections not to warn when the corresponding types of argument and parameter are array-array or array-pointer pair. Fri Apr 27 11:20:10 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0581, W0582, W0583 and W0584 detections not to warn when the corresponding types of argument and parameter are array-array or array-pointer pair. * share/demo/invalid_call/invalid_call.c : Add sample code. Fri Apr 27 10:19:32 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W1031 detection not to warn when the storage-class-specifier of the object declaration is explicitly specified and the storage-class-specifier of following object definition is omitted. Thu Apr 26 14:40:36 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0461 and W0462 detections not to warn when the length omitted array parameter is specified as an argument. * lib/adlint/c/value.rb : Ditto. Thu Apr 26 14:31:52 2012 Yutaka Yanoh * lib/adlint/c/object.rb : Fix W0459 and W0460 detections not to warn about inner variables owned by a temporary variable. Thu Apr 26 09:28:26 2012 Yutaka Yanoh * release.rc : 1.7.4 - Fix bad necessity determination of value version forking. - Fix bad necessity determination of value recovery at leaving a versioning group of the value version management. - Remove redundant original value's snapshot of the value version management. Thu Apr 26 06:22:54 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Remove redundant original value's snapshot of the value version management. Wed Apr 25 23:17:06 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Fix bad necessity determination of value version forking. * lib/adlint/c/value.rb : Fix bad necessity determination of value recovery at leaving a versioning group of the value version management. Wed Apr 25 19:13:39 2012 Yutaka Yanoh * release.rc : 1.7.3 - Fix buggy new variable value version management in order not to mismerge value versions at end of a branch group. Wed Apr 25 18:36:53 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Fix buggy new variable value version management in order not to mismerge value versions at end of a branch group. Tue Apr 24 19:11:55 2012 Yutaka Yanoh * release.rc : 1.7.2 - Fix buggy new variable value version management in order not to misunderstand that the effective branches in switch-statement are deadcodes. Tue Apr 24 18:31:18 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Fix buggy new variable value version management in order not to misunderstand that the effective branches in switch-statement are deadcodes. Tue Apr 23 22:21:04 2012 Yutaka Yanoh * release.rc : 1.7.1 - Revise data structure of the variable value versioning in order not to smother narrowed values in branches without reassignments. - Revise default value of uninitialized global or static variables to arbitrary value from 0. - Fix interpretation environment to correctly manage value versions of inner variables of global array or composite typed variables. Tue Apr 23 18:45:14 2012 Yutaka Yanoh * lib/adlint/c/value.rb : Revise data structure of the variable value versioning in order not to smother narrowed values in branches without reassignments. * lib/adlint/c/object.rb : Revise default value of uninitialized global or static variables to arbitrary value from 0. * lib/adlint/c/branch.rb : Rename unfavorite method names. * lib/adlint/c/environ.rb : Ditto. * lib/adlint/c/interp.rb : Ditto. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/environ.rb : Fix interpretation environment to correctly manage value versions of inner variables of global array or composite typed variables. * lib/adlint/c/object.rb : Ditto. Tue Apr 10 18:27:50 2012 Yutaka Yanoh * release.rc : 1.7.0 - This is the initial release candidate for 1.8.0 GA release. - Add W0607 detection. - Add W0608 detection. - Add W0625 detection. - Add W0632 detection. - Add W0633 detection. - Add W0634 detection. - Add W0642 detection. - Add W0711 detection. - Add W0712 detection. - Add W0713 detection. - Add W0714 detection. - Add W0715 detection. - Add W0832 detection. - Fix abend problem when the pathname of #include_next directive is not in the executing environment. - Fix bad FN_UELS (number of incomplete if-else-if statement chains) metric measurement. - Fix W0541 detection to warn once a function only when an inline assembly code is not wrapped by macro. Tue Apr 10 18:25:31 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0711, W0712, W0713, W0714 and W0715 detections. * lib/adlint/c/phase.rb : Ditto. * share/demo/Makefile : Add `logical_expr' demo. * share/demo/logical_expr/logical_expr.c : Ditto. * MANIFEST : Ditto. Tue Apr 10 17:55:04 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Add logicality determination of expressions. Tue Apr 10 17:09:40 2012 Yutaka Yanoh * lib/adlint/lang.rb : Fix phase composition to move up preparation so that commands which depend on both preprocessor and C language processor can be instantiated earlier. * lib/adlint/cpp/phase.rb : Ditto. * lib/adlint/c/phase.rb : Ditto. * lib/adlint/cpp/message.rb : Fix W0541 detection to warn once a function only when an inline assembly code is not wrapped by macro. * lib/adlint/cpp/message.rb : Add W0832 detection. * lib/adlint/cpp/phase.rb : Ditto. * share/demo/inline_asm/inline_asm.c : Add sample code. Tue Apr 10 14:10:31 2012 Yutaka Yanoh * lib/adlint/cpp/subst.rb : Revise code substitution notification to pass the matched token array. * lib/adlint/cpp/message.rb : Ditto. Tue Apr 10 12:30:13 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Add function object parameter to notifications of function evaluation. * lib/adlint/c/syntax.rb : Ditto. * lib/adlint/c/metric.rb : Ditto. * lib/adlint/c/code.rb : Ditto. * lib/adlint/c/message.rb : Ditto. * lib/adlint/c/object.rb : Change interface of Function#signature to return a FunctionSignature object. * lib/adlint/c/message.rb : Add W0625 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/Makefile : Add `typedef_each_src' demo. * share/demo/typedef_each_src/typedef_each_src.c : Ditto. * MANIFEST : Ditto. Tue Apr 10 08:43:43 2012 Yutaka Yanoh * etc/mesg.d/en_US/messages.yml : Refine W0688, W0689 and W0690 message text. * share/doc/users_guide_en.texi : Ditto. Mon Apr 9 23:21:08 2012 Yutaka Yanoh * lib/adlint/c/metric.rb : Fix bad FN_UELS (number of incomplete if-else-if statement chains) metric measurement. * share/demo/Makefile : Add `incomplete_ifelse' demo. * share/demo/incomplete_ifelse/incomplete_ifelse.c : Ditto. * MANIFEST : Ditto. Mon Apr 9 20:34:51 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Add notification about address-expression. * lib/adlint/c/interp.rb : Ditto. * lib/adlint/c/mediator.rb : Ditto. * lib/adlint/c/object.rb : Add storage class determination of objects. * lib/adlint/c/message.rb : Add W0642 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/Makefile : Add `register_vars' demo. * share/demo/register_vars/register_vars.c : Ditto. * MANIFEST : Ditto. Mon Apr 9 13:14:51 2012 Yutaka Yanoh * lib/adlint/cpp/message.rb : Add W0634 detection. * lib/adlint/cpp/phase.rb : Ditto. * lib/adlint/cpp/eval.rb : Fix abend problem when the pathname of #include_next directive is not in the executing environment. * lib/adlint/cpp/eval.rb : Support mswin path separator in #include or #include_next directives. * share/demo/bad_include/bad_include.c : Add sample code. Mon Apr 9 12:03:08 2012 Yutaka Yanoh * lib/adlint/cpp/message.rb : Add W0632 and W0633 detections. * lib/adlint/cpp/phase.rb : Ditto. * etc/mesg.d/ja_JP/messages.yml : Revise W0632 and W0633 message text. * etc/mesg.d/en_US/messages.yml : Ditto. * share/demo/Makefile : Add `bad_include' demo. * share/demo/bad_include/bad_include.c : Ditto. * share/demo/bad_include/test"1".h : Ditto. * share/demo/bad_include/test'1'.h : Ditto. * share/demo/bad_include/test'2'.h : Ditto. * share/doc/users_guide_ja.texi : Update W0632 and W0633 message text. * share/doc/users_guide_en.texi : Ditto. Mon Apr 9 11:22:39 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0607 and W0608 detections. * lib/adlint/c/phase.rb : Ditto. * share/demo/wrap_around/wrap_around.c : Add sample code. Fri Apr 6 20:00:34 2012 Yutaka Yanoh * release.ga : 1.6.0 - Add W0541 detection. - Add W0573 detection. - Add W0579 detection. - Add W0685 detection. - Add W0686 detection. - Add W0781 detection. - Add W0787 detection. - Add W0788 detection. - Add W0789 detection. - Add W0807 detection. - Add W0808 detection. - Add W0809 detection. - Add W1030 detection. - Add W1053 detection. - Add W1054 detection. - Add W1055 detection. - Add W1056 detection. - Add W1057 detection. - Add W1058 detection. - Add W1059 detection. - Add W1060 detection. - Add W1061 detection. - Add W1062 detection. - Add W1063 detection. - Fix W0027 detection not to warn when a pointer variable is compared with NULL constant. - Fix W0728, W0729 and W0730 detections not to warn when the target is a variable of the other enum type. - Fix W0104 detection not to warn about invariant parameter of array type whose base type is qualified as const. - Fix bad W0031, W0100, W0104, W0459 and W0460 detections. - Fix bad FN_UNUV measurement. - Update the user's guide in Japanese. - Update the user's guide in English. Fri Apr 6 19:49:19 2012 Rie Shima * share/doc/users_guide_ja.texi : Update descriptions about added warning messages. * share/doc/users_guide_en.texi : Ditto. Fri Apr 6 19:13:05 2012 Yutaka Yanoh * release.rc : 1.5.5 - Fix W1053 detection to warn only about constant expressions. Fri Apr 6 19:06:34 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W1053 detection to warn only about constant expressions. Fri Apr 6 16:44:17 2012 Yutaka Yanoh * release.rc : 1.5.4 - Fix abend problem of W0461 and W0462 detections when a function is specified as an argument. Fri Apr 6 15:51:59 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix abend problem of W0461 and W0462 detections when a function is specified as an argument. Fri Apr 6 15:35:17 2012 Yutaka Yanoh * release.rc : 1.5.3 - Fix degraded W0581, W0639 and W0640 detections. Fri Apr 6 15:32:44 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix degraded W0581, W0639 and W0640 detections. Fri Apr 6 11:48:37 2012 Yutaka Yanoh * release.rc : 1.5.2 - Fix W0787, W0788 and W0789 detections to consider variable and function definitions. - Fix W0104 detection not to warn about invariant parameter of array type whose base type is qualified as const. - Fix bad W0031, W0100, W0104, W0459 and W0460 detections. - Fix bad FN_UNUV measurement. Fri Apr 6 11:33:43 2012 Yutaka Yanoh * lib/adlint/c/metric.rb : Fix FN_UNUV measurement to watch variable references and variable value references. * lib/adlint/c/message.rb : Fix W0031 detection to watch variable references and variable value references. * lib/adlint/c/message.rb : Fix W0104 detection not to warn about a parameter of const array type. Fri Apr 6 11:18:33 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Revise evaluation of object-specifier not to convert the derived array object into a pointer variable. * lib/adlint/c/expr.rb : Revise evaluation of array-subscript-expression not to notify a value reference of the base array object. * lib/adlint/c/expr.rb : Revise evaluation of array-subscript-expression not to convert the derived array object into a pointer variable. * lib/adlint/c/expr.rb : Revise evaluation of function-call-expression not to notify a value reference of the array argument in assigning an argument to a parameter. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/expr.rb : Revise evaluation of member-access-by-value-expression not to notify a value reference of the base composite object. * lib/adlint/c/expr.rb : Revise evaluation of member-access-by-value-expression not to convert the derived array object into a pointer variable. * lib/adlint/c/expr.rb : Revise evaluation of member-access-by-pointer-expression not to convert the derived array object into a pointer variable. * lib/adlint/c/expr.rb : Revise evaluation of string-literal-specifier not to convert the character array object into a pointer variable. * lib/adlint/c/expr.rb : Revise evaluation of conditional-expression to convert results of 2nd and 3rd expression into scalar variables before unifying those values. * lib/adlint/c/object.rb : Revise function's `value returning via parameters' behavior to return a value when the parameter type is non-const array. Fri Apr 6 09:36:42 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0104 detection not to warn about invariant parameter of array type whose base type is qualified as const. Thu Apr 5 16:43:55 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0787, W0788 and W0789 detections to consider variable and function definitions. * share/demo/multi_decl/multi_decl_1.c : Add sample code. Thu Apr 5 15:05:37 2012 Yutaka Yanoh * release.rc : 1.5.1 - Add W0579 detection. - Add W0686 detection. - Add W0787 detection. - Add W0788 detection. - Add W0789 detection. - Fix W0809 detection not to warn about the AdLint internal tag name. Thu Apr 5 12:03:52 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0579 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/implicit_conv/implicit_conv.c : Add sample code. Thu Apr 5 11:21:23 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0686 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_conv/bad_conv.c : Add sample code. Thu Apr 5 10:37:13 2012 Rie Shima * lib/adlint/c/message_shima.rb : Fix W0809 detection not to warn about the AdLint internal tag name. * share/demo/reserved_ident/reserved_ident.c : Add sample code. Thu Apr 5 10:21:37 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0789 detection. * lib/adlint/c/phase.rb : Ditto. Tue Apr 3 20:12:29 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0788 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/multi_decl/multi_decl_1.c : Add sample code. Tue Apr 3 19:03:44 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0787 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/multi_decl/multi_decl_1.c : Add sample code. Tue Apr 3 16:37:30 2012 Yutaka Yanoh * release.rc : 1.5.0 - This is the initial release candidate for 1.6.0 GA release. - Add W0541 detection. - Add W0573 detection. - Add W0685 detection. - Add W0781 detection. - Add W0807 detection. - Add W0808 detection. - Add W0809 detection. - Add W1030 detection. - Add W1053 detection. - Add W1054 detection. - Add W1055 detection. - Add W1056 detection. - Add W1057 detection. - Add W1058 detection. - Add W1059 detection. - Add W1060 detection. - Add W1061 detection. - Add W1062 detection. - Add W1063 detection. - Fix W0027 detection not to warn when a pointer variable is compared with NULL constant. - Fix W0728, W0729 and W0730 detections not to warn when the target is a variable of the other enum type. Tue Apr 3 16:22:23 2012 Rie Shima * lib/adlint/cpp/message_shima.rb : Add W0807 and W0808 detections. * lib/adlint/cpp/phase.rb : Ditto. * share/demo/bad_macro/bad_macro.c : Add sample code. Tue Apr 3 16:05:54 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0685 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_conv/bad_conv.c : Add sample code. Tue Apr 3 15:35:10 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W1030 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/Makefile : Add `bad_label' demo. * share/demo/bad_label/bad_label.c : Ditto. * MANIFEST : Ditto. Tue Apr 3 15:15:03 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0809 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/Makefile : Add `reserved_ident' demo. * share/demo/reserved_ident/reserved_ident.c : Ditto. * MANIFEST : Ditto. Tue Apr 3 11:22:03 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0781 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/Makefile : Add `redundant_select' demo. * share/demo/redundant_select/redundant_select.c : Ditto. * MANIFEST : Ditto. Tue Apr 3 10:22:45 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0573 detection. * lib/adlint/c/phase.rb : Ditto. Tue Apr 3 09:42:18 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0027 detection not to warn when a pointer variable is compared with NULL constant. Mon Apr 2 17:29:18 2012 Yutaka Yanoh * lib/adlint/cpp/message.rb : Add W0541 detection. * lib/adlint/cpp/phase.rb : Ditto. * share/demo/Makefile : Add `inline_asm' demo. * share/demo/inline_asm/inline_asm.c : Ditto. * MANIFEST : Ditto. Mon Apr 2 17:24:58 2012 Yutaka Yanoh * lib/adlint/cpp/asm.rb : Support extended inline assembly notations. * lib/adlint/cpp/source.rb : Ditto. * lib/adlint/cpp.rb : Ditto. * MANIFEST : Ditto. Mon Apr 2 15:55:22 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1063 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 15:43:19 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1062 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 15:15:39 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1061 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 13:40:40 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1060 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 13:31:52 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1059 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 13:21:52 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1058 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 13:15:48 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1057 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 13:05:00 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1056 detection. * lib/adlint/c/phase.rb : Ditto. Mon Apr 2 11:58:59 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Fix W0728, W0729 and W0730 detections not to warn when the target is a variable of the other enum type. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Apr 2 11:42:24 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Fix incomplete decision about the expression constancy. * lib/adlint/c/expr.rb : Ditto. * lib/adlint/c/type.rb : Ditto. * lib/adlint/c/enum.rb : Ditto. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/mediator.rb : Ditto. * lib/adlint/c.rb : Ditto. * lib/adlint/message.rb : Ditto. * MANIFEST : Ditto. Fri Mar 30 15:09:52 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1055 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Fri Mar 30 15:05:37 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1054 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Fri Mar 30 14:59:19 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W1053 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Thu Mar 29 10:53:48 2012 Yutaka Yanoh * release.ga : 1.4.0 - Add W0606 detection. - Add W0687 detection. - Add W0695 detection. - Add W0698 detection. - Add W0699 detection. - Add W0720 detection. - Add W0721 detection. - Add W0722 detection. - Add W0723 detection. - Add W0726 detection. - Add W0727 detection. - Add W0728 detection. - Add W0729 detection. - Add W0730 detection. - Add W0731 detection. - Add W0737 detection. - Add W0738 detection. - Add W0739 detection. - Add W0740 detection. - Add W0741 detection. - Add W0743 detection. - Add W0801 detection. - Add W0806 detection. - Add W1033 detection. - Add W1064 detection. - Add W1065 detection. - Add missing implicit conversion of return-statement in order to detect W0727 at an expression of return-statement. - Update the user's guide in Japanese. - Update the user's guide in English. Wed Mar 28 15:30:55 2012 Yutaka Yanoh * release.rc : 1.3.3 - Fix interpreter in order to detect W0653 correctly. Wed Mar 28 15:24:20 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix evaluation of a string literal as an initializer of the array variable definition in order to detect W0653 correctly. Wed Mar 28 13:51:55 2012 Yutaka Yanoh * release.rc : 1.3.2 - Fix interpreter in order to detect W0255 family, W0459, W0580, W0653, W0654 and W0730 correctly. - Update the user's guide in Japanese. - Update the user's guide in English. Wed Mar 28 13:48:16 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix initialization of the array variable defined with a string literal as an initializer in order to detect W0580 correctly. Wed Mar 28 13:39:56 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix notification of variable initialization to pass the original object of an implicit conversion in order to detect W0653 and W0654 correctly. Wed Mar 28 12:04:08 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix notification of return-statement evaluation not to confuse W0255 family and W0730 detections. Wed Mar 28 11:39:43 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix access notification of array or composite typeed variable value and add missing reference notification of the array value in evaluation of an array-subscript-expression in order to detect W0459 and W0460 correctly. Wed Mar 28 09:58:58 2012 Yutaka Yanoh * share/doc/users_guide_ja.texi : Update descriptions about added warning messages. * share/doc/users_guide_en.texi : Ditto. Tue Mar 27 17:59:37 2012 Yutaka Yanoh * release.rc : 1.3.1 - Add W0737 detection. - Add W0738 detection. - Add W0739 detection. - Add W0740 detection. - Add W0741 detection. - Add W0743 detection. - Add missing implicit conversion of return-statement in order to detect W0727 at an expression of return-statement. - Update the user's guide in Japanese. - Update the user's guide in English. Tue Mar 27 17:51:06 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0743 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/overflow/overflow.c : Add sample code. Tue Mar 27 17:34:14 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0740 and W0741 detections. * lib/adlint/c/phase.rb : Ditto. * share/demo/wrap_around/wrap_around.c : Add sample code. Tue Mar 27 17:14:34 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0739 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/wrap_around/wrap_around.c : Add sample code. Tue Mar 27 16:20:13 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0738 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/overflow/overflow.c : Add sample code. Tue Mar 27 16:18:14 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Move responsibility of implicit conversion in evaluation of a variable-definition with initializers to InitializerInterpreter in order to detect implicit conversions at expressions in initializers. Tue Mar 27 15:02:45 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0737 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/incomplete_type/incomplete_type.c : Add sample code. Tue Mar 27 12:05:03 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Add missing conversion logic of return-statement evaluation. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Mar 26 17:05:05 2012 Yutaka Yanoh * release.rc : 1.3.0 - This is the initial release candidate for 1.4.0 GA release. - Add W0606 detection. - Add W0687 detection. - Add W0695 detection. - Add W0698 detection. - Add W0699 detection. - Add W0720 detection. - Add W0721 detection. - Add W0722 detection. - Add W0723 detection. - Add W0726 detection. - Add W0727 detection. - Add W0728 detection. - Add W0729 detection. - Add W0730 detection. - Add W0731 detection. - Add W0801 detection. - Add W0806 detection. - Add W1033 detection. - Add W1064 detection. - Add W1065 detection. - Update the user's guide in Japanese. - Update the user's guide in English. Mon Mar 26 16:50:45 2012 Rie Shima * share/doc/users_guide_ja.texi : Update descriptions about added warning messages. * share/doc/users_guide_en.texi : Ditto. Mon Mar 26 16:13:26 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Add notifications about switch-statement. * lib/adlint/c/mediator.rb : Ditto. * lib/adlint/c/message.rb : Add W0731, W1064 and W1065 detections. * lib/adlint/c/phase.rb : Ditto. * share/demo/bad_enum/bad_enum.c : Add sample code. Mon Mar 26 12:23:10 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0727, W0728, W0729 and W0730 detections. * lib/adlint/c/phase.rb : Ditto. * lib/adlint/c/expr.rb : Ditto. * lib/adlint/c/type.rb : Ditto. * share/demo/Makefile : Add `bad_enum' demo. * share/demo/bad_enum/bad_enum.c : Ditto. Mon Mar 26 12:19:13 2012 Yutaka Yanoh * lib/adlint/c/resolver.rb : Add type attribute to enumerators. * lib/adlint/c/syntax.rb : Ditto. Mon Mar 26 10:14:06 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0722 and W0723 detections. * lib/adlint/c/phase.rb : Ditto. * share/demo/wrap_around/wrap_around.c : Add sample code. Fri Mar 23 21:24:08 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0721 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/overflow/overflow.c : Add sample code. Fri Mar 23 20:11:29 2012 Rie Shima * lib/adlint/cpp/message_shima.rb : Add W0687, W0695 and W0806 detections. * lib/adlint/cpp/phase.rb : Ditto. * share/demo/bad_macro/bad_macro.c : Add sample code. Fri Mar 23 20:08:37 2012 Yutaka Yanoh * lib/adlint/cpp/eval.rb : Add #undef notification. Fri Mar 23 19:00:17 2012 Yutaka Yanoh * etc/mesg.d/ja_JP/messages.yml : Refine message text of W0726. * etc/mesg.d/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Fri Mar 23 18:55:29 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Refactor using Enumerable#each_with_object. Fri Mar 23 18:44:30 2012 Rie Shima * lib/adlint/c/message_shima.rb : Add W0606, W0698, W0699, W0726, W0801 and W1033 detections. * lib/adlint/c/phase.rb : Ditto. * lib/adlint/c.rb : Ditto. * MANIFEST : Ditto. * share/demo/Makefile : Add `bad_return' and `unnamed_member' demos. * share/demo/bad_return/bad_return.c : Ditto. * share/demo/unnamed_member/unnamed_member.c : Ditto. * share/demo/union_type/union_type.c : Add sample code. * share/demo/various_fundef/various_fundef.c : Ditto. Fri Mar 23 16:39:13 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0720 detection. * lib/adlint/c/phase.rb : Ditto. * share/demo/overflow/overflow.c : Ditto. Fri Mar 23 14:11:20 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Modify W0457 and W0458 detections to use new #implicitly_typed? method to check whether a definition or declaration is typed implicitly. * lib/adlint/c/syntax.rb : Fix inverted check logic. Fri Mar 23 13:39:12 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Add DeclarationSpecifiersHolder module to commonalize accessors of DeclarationSpecifiers. Fri Mar 23 12:07:52 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Add DeclarationSpecifiers#explicitly_typed? and DeclarationSpecifiers#implicitly_typed? methods. Fri Mar 23 12:03:14 2012 Yutaka Yanoh * lib/adlint/c/syntax.rb : Move common responsibilities of VariableDefinition, FunctionDefinition and ParameterDefinition to Definition class. Wed Mar 21 18:50:39 2012 Yutaka Yanoh * release.ga : 1.2.0 - Add W0597 detection. - Add W0598 detection. - Add W0599 detection. - Add W0600 detection. - Add W0688 detection. - Add W0689 detection. - Add W0690 detection. - Change schema version validation method of input YAML files. - Clarify message text of W0459 and W0460. - Revise specification of W0459 and W0460 detections not to warn when a pointer argument points to an uninitialized object. - Fix bad FN_UNUV metric measurement. - Update the user's guide in Japanese. - Update the user's guide in English. Wed Mar 21 14:36:30 2012 Yutaka Yanoh * release.rc : 1.1.2 - Revise specification of W0459 and W0460 detections not to warn when a pointer argument points to an uninitialized object. - Fix bad FN_UNUV metric measurement. Wed Mar 21 14:28:59 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Fix lack of reference notification of the controlling variable's value in for-statements and c99-for-statements at end of the last iteration. Wed Mar 21 13:07:29 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix lack of notification of array and composite type objects when its inner variable is accessed. Wed Mar 21 13:03:26 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix lack of notification of value references in relational-expressions and equality-expressions. Mon Mar 19 17:48:34 2012 Yutaka Yanoh * release.rc : 1.1.1 - Add W0688 detection. - Add W0689 detection. - Add W0690 detection. - Fix W0459 detection to warn when a pointer argument points to an uninitialized array object. - Clarify message text of W0459 and W0460. - Update the user's guide in Japanese. - Update the user's guide in English. Mon Mar 19 17:27:53 2012 Yutaka Yanoh * lib/adlint/cpp/eval.rb : Fix abend problem of incomplete pp-directive processing. * lib/adlint/cpp/code.rb : Ditto. * lib/adlint/cpp/message.rb : Ditto. * lib/adlint/cpp/syntax.rb : Ditto. Mon Mar 19 17:17:18 2012 Rie Shima * lib/adlint/cpp/message_shima.rb : Add W0688, W0689 and W0690 detections. * lib/adlint/cpp/phase.rb : Ditto. * lib/adlint/cpp.rb : Ditto. * MANIFEST : Ditto. * etc/mesg.d/ja_JP/messages.yml : Ditto. * share/demo/Makefile : Add `bad_line' demo. * share/demo/bad_line : Ditto. * share/demo/bad_line/bad_line.c : Ditto. Mon Mar 19 15:06:29 2012 Yutaka Yanoh * etc/mesg.d/ja_JP/messages.yml : Clarify message text of W0459 and W0460. * etc/mesg.d/en_US/messages.yml : Ditto. * share/doc/users_guide_ja.texi : Ditto. * share/doc/users_guide_en.texi : Ditto. Mon Mar 19 14:49:07 2012 Yutaka Yanoh * lib/adlint/c/expr.rb : Fix lack of notification of the array value reference when the object-specifier specifies an array object. * lib/adlint/c/message.rb : Remove useless branching in W0459 detection. Mon Mar 19 12:43:33 2012 Yutaka Yanoh * release.rc : 1.1.0 - This is the initial release candidate for 1.2.0 GA release. - Add W0597 detection. - Add W0598 detection. - Add W0599 detection. - Add W0600 detection. - Change schema version validation method of input YAML files. - Update the user's guide in Japanese. - Update the user's guide in English. Sat Mar 17 12:29:09 2012 Yutaka Yanoh * lib/adlint/version.rb : Change schema version validation method of input YAML files. * lib/adlint/message.rb : Ditto. * lib/adlint/traits.rb : Ditto. * etc/conf.d/fallback/traits.erb : Ditto. * etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb : Ditto. * etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb : Ditto. * etc/conf.d/i686-linux/traits-gcc_4.5.1.erb : Ditto. * etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb : Ditto. Fri Mar 16 21:05:17 2012 Yutaka Yanoh * lib/adlint/c/message.rb : Add W0599 and W0600 detections. Fri Mar 15 18:17:40 2012 Yutaka Yanoh * lib/adlint/c/phase.rb : Add W0597 and W0598 detections. * lib/adlint/c/message.rb : Ditto. * share/demo/Makefile : Add `sequence_point' demo. * share/demo/sequence_point/sequence_point.c : Ditto. Thu Mar 15 16:21:32 2012 Yutaka Yanoh * lib/adlint/c/interp.rb : Add sequence-points tracking feature to the interpreter. * lib/adlint/c/object.rb : Ditto. * lib/adlint/c/syntax.rb : Ditto. * lib/adlint/c/expr.rb : Ditto. * lib/adlint/c/seqp.rb : Ditto. * lib/adlint/c.rb : Ditto. Wed Mar 7 18:01:54 2012 Yutaka Yanoh * lib/adlint/cpp/message.rb : Fix bad comment about ensuring of uniqueness of duplicative warning messages. Mon Feb 27 17:39:54 2012 Yutaka Yanoh * release.ga : 1.0.0 - This is the initial GA release! - Support single module analysis. - Support cross module analysis. - Support 597 kinds of warning detections. - Support 14 kinds of code structure extractions. - Support 15 kinds of code quality metric measurements. - Fix traits file validation to allow only values greater than 0 as memory alignment items such as `char_alignment'. - Correct to run on Ruby 1.9.3-p125 without warnings. Wed Feb 22 18:48:24 2012 Yutaka Yanoh * release.rc : 0.6.8 - Fix traits file validation to allow nil as `initial_header'. - Fix traits file validation to allow only a numerical value as numerical items such as `tab_width'. - Fix traits file validation to allow a value which is between 1 and 256 as type-size items such as `char_size'. - Fix traits file validation to allow only true or false as boolean items such as `char_as_unsigned_char'. - Refine the message catalog for the locale `ja_JP' and `en_US'. - Update the user's guide in Japanese. - Update the user's guide in English. Tue Feb 21 18:28:05 2012 Yutaka Yanoh * release.rc : 0.6.7 - Implement missing `traits file validation' feature. Mon Feb 20 19:26:03 2012 Yutaka Yanoh * release.rc : 0.6.6 - Revise project_traits:coding_style specification. - Update the user's guide in Japanese. - Update the user's guide in English. Fri Feb 17 18:28:16 2012 Yutaka Yanoh * release.rc : 0.6.5 - Update the user's guide in Japanese. - Update the user's guide in English. Thu Feb 16 18:50:17 2012 Yutaka Yanoh * release.rc : 0.6.4 - Revise specification of W0534 detection to warn when the controlling variable is not initialized in the for-statement including when the initial-statement is empty. - Fix freeze problem of scanning string-literal which contains unescaped newline character. - Fix abend problem of evaluating an indirection-expression as the controlling expression of if-statement when the dereferencing function pointer points nothing. - Fix lack of variable definition records problem when the storage-class-specifier is `register' or `auto'. - Update the user's guide in Japanese. Fri Feb 10 17:26:03 2012 Yutaka Yanoh * release.rc : 0.6.3 - Change gem packaging method. - Update the user's guide in Japanese. Wed Feb 8 11:12:30 2012 Yutaka Yanoh * release.rc : 0.6.2 - Fix abend problem of evaluating the indirection-expression which makes a function object. Tue Feb 7 18:59:44 2012 Yutaka Yanoh * release.rc : 0.6.1 - Fix lack of variable cross-ref records problem of the member-access-by-pointer-expression whose pointer variable is global. - Fix lack of variable cross-ref records problem of the array-subscript-expression whose value is of the global variable. - Fix W0055 detection not to count macro definitions in AdLint specific project's and compiler's initial headers. - Fix lack of variable cross-ref records problem when the inner variable of the global array or composite variable is accessed. - Fix unnecessary variable cross-ref records problem when the global variable definition whose initializer refers to other global variable appears after any function definitions. - Fix lack of variable cross-ref records problem when the global pointer variable is refered in the reassigning context. - Refine the message catalog for the locale `ja_JP'. - Refine the user's guide in Japanese. Mon Feb 6 19:18:59 2012 Yutaka Yanoh * release.rc : 0.6.0 - This is the initial release candidate for 1.0.0 GA release. - Fix abend problem of the interpreter in evaluating an arithmetic operation with operands whose type has not been resolved. - Fix abend problem of the interpreter in evaluating a member-access-by-pointer-expression whose pointer points to an array object or nothing. - Fix incomplete variable name problem of the DEP record in the metrics file. - Update the user's guide in Japanese. - Update the user's guide in English. Wed Feb 1 17:37:02 2012 Yutaka Yanoh * release.beta : 0.5.15 - Fix degraded W0031 detection. - Fix bad value domain of an arbitrary value of the floating type family. - Update the user's guide in Japanese. Mon Jan 30 17:47:11 2012 Yutaka Yanoh * release.beta : 0.5.14 - Fix bootstrap error messages not to contain full pathname of the command. - Fix off-by-one problems in W0055 detection. - Fix W0440 detection to warn at the closing brace. - Fix bad macro expansion problem of the function-like macro whose replacement-list contains consecutive `## #' operators. - Fix abend problem of W0031 detection when the initializer of the global variable definition refers to other variables. - Fix abend problem of W0102 detection when the initializer of the global variable definition refers to other variables. - Fix abend problem of W0104 detection when the initializer of the global variable definition updates value of other variables. - Fix abend problem of W0105 detection when the initializer of the global variable definition contains indirection-expressions. - Fix abend problem of W0580 detection when the initializer of the global variable definition contains assignment-expressions. - Fix W0457 and W0458 detection to correctly warn about implicitly typed function-declarations, parameter-definitions and variable-definitions. - Update the user's guide in Japanese. Thu Jan 26 16:40:52 2012 Yutaka Yanoh * release.beta : 0.5.13 - Fix adlintize command to output files with UTF-8 encoding. - Clarify the error message when adlint, adlint_sma, adlint_cma and adlint_chk commands failed to parse the traits file. - Fix W0072, W0574, W0575 and W0576 detection to correctly warn when the `file_encoding' is "binary" or omitted. - Add usage description of `verbose-cma-only' target to the adlintized GNUmakefile. - Implement missing `change_list' feature. Wed Jan 25 18:09:57 2012 Yutaka Yanoh * release.beta : 0.5.12 - Fix abend problem when the `file_encoding' is "binary" or omitted and messages are not able to be converted into the default external encoding. - Change adlintized default `file_encoding' to be omitted (equivalent to "binary") from "utf-8". - Fix macro replacement algorithm to correctly manage the hide set and to support the rescanning. - Fix abend problem when the pathname of the target source file contains Japanese characters. - Update the user's guide in English. Fri Jan 20 11:22:38 2012 Yutaka Yanoh * release.beta : 0.5.11 - Fix bad lexing problem when an escaped newline appears at the line above a preprocessing directive line. - Fix gcc profile to emulate the __builtin_va_* functions. Thu Jan 19 18:36:36 2012 Yutaka Yanoh * release.beta : 0.5.10 - Add i686-mingw-gcc_4.6.1 profile. - Fix abend problem of W0108 and W0580 detection when the initializer of the global variable definition contains indirection-expressions. Tue Jan 17 16:24:09 2012 Yutaka Yanoh * release.beta : 0.5.9 - Fix W0061 detection not to include newline characters in the ignoring tokens of the message text. - Fix bad token substitution problem when the substitutive pattern is at end of the translation-unit. - Add `verbose-cma-only' target to the adlintized GNUmakefile. - Fix W0586 message duplication. - Fix duplication of messages about the preprocessing phase. - Update the user's guide in Japanese. - Update the user's guide in English. Mon Jan 16 19:33:19 2012 Yutaka Yanoh * release.beta : 0.5.8 - Fix message duplication problem after improving the memory usage on 0.5.7 release. - Correct to run on Ruby 1.9.3-p0 without warnings. Thu Jan 12 18:03:42 2012 Yutaka Yanoh * release.beta : 0.5.7 - Improve the memory usage. - Fix bad macro expansion problem of the function-like macro when two or more function-like macro calls are in the same line and the last call ends at the next line. - Update the user's guide in Japanese. Fri Jan 6 20:46:13 2012 Yutaka Yanoh * release.beta : 0.5.6 - Fix W0553 detection to warn about the explicit conversion between function pointers of different types. - Fix W0578 detection to warn when the `integer conversion rank' of the conversion destination type is greater than the one of the conversion source type. - Improve performance of the C parser. - Fix huge memory consumption problem in evaluating the initializer of a huge array variable. - Fix bad pointer dereference problem that the indirection-expression makes an object whose type is incompatible to the type of the expression. - Fix bad macro expansion problem of the function-like macro whose name is used by other identifiers. - Update the user's guide in Japanese. - Update the user's guide in English. Thu Dec 22 18:59:36 2011 Yutaka Yanoh * release.beta : 0.5.5 - Fix the interpreter not to perform the implicit conversion when it is unnecessary. - Fix W0578 detection not to warn when the destination type of the conversion is smaller than the source type. - Refine the message catalog for the locale `en_US'. Tue Dec 20 17:35:30 2011 Yutaka Yanoh * release.beta : 0.5.4 - Fix W0036 detection to check the total count of pointer-declarators, array-declarators and function-declarators. - Fix degraded W0949 detection. - Fix preprocessor to end the nested block comment at the first `*/' token. - Fix W0043 detection not to misunderstand the number of initial values when the initializer contains useless braces. - Fix W0108 detection to warn when the value of the assignment-expression is directly used by the upper logical operation. - Fix W0446 detection to warn when the value of the assignment-expression is directly used by the upper arithmetic or assignment operation. - Fix W0575 detection to warn when the invalid string literal is found in the macro definition. - Update the user's guide in Japanese. - Add the user's guide in English. Fri Dec 16 16:00:59 2011 Yutaka Yanoh * release.beta : 0.5.3 - Unify W0093 and W0094 detection into W0093. - Unify W0460 and W0463 detection into W0460. - Unify W0462 and W0464 detection into W0462. - Add `-p' option to `adlint', `adlint_sma' and `adlint_chk' command to analyze without overwriting result files when same basenames in the target source files. Tue Dec 13 17:07:24 2011 Yutaka Yanoh * release.beta : 0.5.2 - Improve adlintize command to automatically detect the message language. - Fix W0796 detection not to warn when the callee function has variable arguments. - Fix W0479 detection to warn only when the replacement-list seems like specifier-qualifier-list which consists of two or more tokens. - Correct to run on Ruby 1.9.3-p0 and JRuby 1.6.5 without warnings. - Fix W1027, W1028 and W1029 detection to check both definitions and declarations of variables. - Update the user's guide. - Refine the message catalog for the locale `en_US'. Fri Dec 9 18:43:53 2011 Yutaka Yanoh * release.beta : 0.5.1 - Fix bad macro expansion problem of the function-like macro whose replacement-list contains the token sequence consists of the parameter followed by ## operator. Fri Dec 9 16:09:00 2011 Yutaka Yanoh * release.beta : 0.5.0 - This is the initial beta release for system tests and various reviews. - Add W0795 detection. - Add W0796 detection. - Add W0797 detection. - Add W0581 detection. - Add W0582 detection. - Add W0583 detection. - Add W0584 detection. - Add W0654 detection. - Fix W0653 detection not to warn the unsurrounded initializer with the variable of the same type. - Fix W0744 detection to warn when the constant expression as the controlling expression of the while-statement always makes false. - Fix W0534, W0585 and W0708 detection not to fail to deduct the controlling variable in the for-statement. - Add W1029 detection. - Add W1027 detection. - Add W1028 detection. - Add W0798 detection. - Fix W0019, W0021, W0067, W0105, W0461, W0462, W0464, W0544, W0553, W0565, W0566 and W0567 detection not to mishandle the base type of the pointer type which is cv-qualified. - Add W0799 detection. - Add W0800 detection. - Change the default locale of messages to `en_US' from `ja_JP'. - Add W0785 detection. - Fix W0101 detection not to warn when a pointer to the function scope static variable is assigned to the pointer variable defined at upper scope. - Fix W0102 detection not to warn when a pointer to the function scope static variable is assigned to the pointer parameter. - Add W0580 detection. - Add W1032 detection. - Add W1034 detection. - Add W0810 detection. Tue Dec 6 15:16:22 2011 Yutaka Yanoh * release.alpha : 0.4.11 - Fix W0656 detection to warn when the conversion specifier character of the conversion specifier is undefined in the ISO C99 and when the conversion specifier character is valid but the whole conversion specifier is illformed. - Fix W0673 detection to warn when the conversion specifier character of the conversion specifier is undefined in the ISO C99 and when the conversion specifier character is valid but the whole conversion specifier is illformed. - Fix W0534 detection to improve the accuracy of the controlling variable deduction. - Fix W0708 detection to improve the accuracy of the controlling variable deduction. - Add W0585 detection. - Fix W0704 detection not to warn about two or more declarations or definitions of the same object. - Add W0790 detection. - Add W0744 detection. - Add W0478 detection. - Add W0480 detection. - Add W0481 detection. - Improve interpretation of iteration-statements to manage the value domain of the controlling variable more correctly than 0.4.9 release by considering the initial value of the controlling variable. - Add W0622 detection. - Add W0623 detection. - Fix W0088 detection to warn about only the outmost logical expression and to warn at the location of the logical operator. - Add W1031 detection. - Add W0653 detection. - Add W0827 detection. - Add W0828 detection. Thu Dec 1 18:52:57 2011 Yutaka Yanoh * release.alpha : 0.4.10 - Rewrite the incomplete printf/scanf format analysis to comply with the ISO C99 standard. - Add W0635 detection. - Add W0636 detection. - Add W0637 detection. - Add W0638 detection. - Add W0639 detection. - Add W0640 detection. - Fix W0705 detection not to warn when the constant subscript value is in the valid range. - Fix incomplete W0016 detection to comply with the ISO C99. - Fix incomplete W0017 detection to comply with the ISO C99. - Fix incomplete W0018 detection to comply with the ISO C99. - Fix incomplete W0656 detection to comply with the ISO C99. - Fix incomplete W0657 detection to comply with the ISO C99. - Fix incomplete W0658 detection to comply with the ISO C99. - Fix incomplete W0659 detection to comply with the ISO C99. - Fix incomplete W0660 detection to comply with the ISO C99. - Fix incomplete W0661 detection to comply with the ISO C99. - Fix incomplete W0662 detection to comply with the ISO C99. - Fix incomplete W0663 detection to comply with the ISO C99. - Fix incomplete W0664 detection to comply with the ISO C99. - Fix incomplete W0665 detection to comply with the ISO C99. - Fix incomplete W0666 detection to comply with the ISO C99. - Fix incomplete W0667 detection to comply with the ISO C99. - Fix incomplete W0668 detection to comply with the ISO C99. - Fix incomplete W0669 detection to comply with the ISO C99. - Fix incomplete W0670 detection to comply with the ISO C99. - Fix incomplete W0671 detection to comply with the ISO C99. - Fix incomplete W0672 detection to comply with the ISO C99. - Fix incomplete W0673 detection to comply with the ISO C99. - Fix incomplete W0674 detection to comply with the ISO C99. - Fix incomplete W0675 detection to comply with the ISO C99. - Fix incomplete W0676 detection to comply with the ISO C99. - Fix incomplete W0677 detection to comply with the ISO C99. - Fix incomplete W0678 detection to comply with the ISO C99. - Fix incomplete W0679 detection to comply with the ISO C99. - Fix incomplete W0680 detection to comply with the ISO C99. - Fix incomplete W0681 detection to comply with the ISO C99. - Fix incomplete W0682 detection to comply with the ISO C99. - Fix incomplete W0683 detection to comply with the ISO C99. - Fix incomplete W0684 detection to comply with the ISO C99. - Add the message catalog for the locale `en_US'. Fri Nov 18 19:12:34 2011 Yutaka Yanoh * release.alpha : 0.4.9 - Improve interpretation of iteration-statements to manage the value domain of the controlling variable correctly. - Fix W0609 detection not to misunderstand that the logical-expression in the controlling expression of the iteration-statement is always true. - Fix W0610 detection not to misunderstand that the logical-expression in the controlling expression of the iteration-statement is always false. - Fix W0611 detection not to misunderstand that the controlling expression of the iteration-statement is always true. - Fix W0612 detection not to misunderstand that the logical-expression with the controlling variable in upper iteration-statement is always false. - Fix W0613 detection not to misunderstand that the controlling expression of the iteration-statement is always false. - Fix abend problem of evaluating the function definition whose return type is omitted. - Fix W0578 detection not to warn the implicit conversion between cv-qualified and non-qualified of same base type in variable-definitions. - Add W0624 detection. - Add W0705 detection. - Add W0745 detection. Wed Nov 16 20:37:38 2011 Yutaka Yanoh * release.alpha : 0.4.8 - Fix abend problem of evaluating the conditional-expression whose `true expression' is array-subscript-expression makes an array object and `false expression' is object-specifier designating an array object. - Fix W0422 detection to warn the possibly nullable pointer. - Add W1051 detection. - Fix W0578 detection not to warn the implicit conversion between cv-qualified and non-qualified of the same base type. - Add W1052 detection. - Add W0703 detection. - Add W0704 detection. - Fix W0100 detection to warn the variable which is defined without initializer and assigned only once. - Add W0736 detection. - Add W0696 detection. - Add W0708 detection. - Fix W0038 detection not to mishandle the length of the array type. - Fix W0950 detection to warn all constants in the multi demension array variable definition. - Fix degraded W0088 detection. - Fix W0459 detection not to warn the array variable initialized with the string-literal-specifier. - Fix W0423 and W0424 detection to warn the prefix-increment/decrement-expression of the nullable pointer. - Fix W0578 detection not to warn the implicit conversion of floating values. - Fix degraded W0777, W0778 and W0779 detection. - Fix abend problem of evaluating the function definition which has unnamed parameter which type is a user type. Mon Nov 14 19:59:57 2011 Yutaka Yanoh * release.alpha : 0.4.7 - Add W1050 detection. - Fix abend problem of evaluating the else-if statement sequence. - Fix abend problem of evaluating the negative sized array variable definition. - Fix bad value domain narrowing problem after 0.4.5 release. Fri Nov 11 20:06:19 2011 Yutaka Yanoh * release.alpha : 0.4.6 - Add W0611 detection. - Add W0612 detection. - Add W0613 detection. - Add W0614 detection. - Add W1049 detection. - Improve the variable value version management to reduce the height of the version tree. Fri Nov 4 18:45:16 2011 Yutaka Yanoh * release.alpha : 0.4.5 - Add W0627 detection. - Fix W0629 detection not to misunderstand that all static functions are not called. - Add W0742 detection. - Add W0491 detection. - Add W0492 detection. - Add W0947 detection. - Add W0948 detection. - Add W0950 detection. - Add W0605 detection. - Add W0609 detection. - Add W0610 detection. Mon Oct 31 18:56:14 2011 Yutaka Yanoh * release.alpha : 0.4.4 - Fix abend problem of parsing the function definition whose parameter types are omitted. - Add `adlint_chk' command and add `check' target to the adlintized GNUmakefile for fast configuration files validation. - Add W0629 detection. - Fix W0441 detection not to warn about wide character constants. - Add W0626 detection. - Activate `file_encoding' setting in the `project_traits' section of the traits file. Wed Oct 26 22:06:55 2011 Yutaka Yanoh * release.alpha : 0.4.3 - Fix W0077 detection to warn when the constant is a decimal integer. - Fix W0081 detection to warn when the operand of the unary-minus expression has `unsigned long long' type. - Fix W0082 detection to warn when the operand of the unary-minus expression has bitfield type. - Fix W0114 detection to warn about the condition part of the conditional-expression. - Fix W0115, W0116, W0568, W0569, W0570 and W0571 detection to warn about the bit shifting compound-assignment-expression. - Fix bad variable value version management problem after rewriting the interpreter on 0.2.0 release. - Add `sma-only' and `verbose-sma-only' targets to the adlintized GNUmakefile. - Improve the interpreter to support the value wrap-around semantics of conversions. - Fix variable value version management not to mishandle the version tree at the join point of execution paths. - Fix W0073 detection to warn when the unguarded header is included immediately after the inclusion of the guarded header. - Fix bad character encoding of console and file output on mswin. - Add W0578 detection. Wed Oct 19 17:47:16 2011 Yutaka Yanoh * release.alpha : 0.4.2 - Fix degraded W0043 detection. - Fix W0030, W0423 and W0424 detection to warn about postfix or prefix increment expressions and postfix or prefix decrement expressions. - Fix W0100 detection not to warn about the array of pointers to the const object. - Fix FN_NEST metric meassurement so that the nest level of the top of functions is 0. - Fix computation of the total lines of function definitions so that the function body is from the line of the function name to the line of `}' token which ends the definition. - Rewrite buggy FN_PATH (number of estimated static paths per function) metric measurement. - Add W0576 detection. - Add W0577 detection. Thu Oct 13 19:53:19 2011 Yutaka Yanoh * release.alpha : 0.4.1 - Add W0567 detection. - Add W0568 detection. - Add W0569 detection. - Add W0570 detection. - Fix W0088 detection not to warn about the controlling expression of control statements. - Add W0571 detection. - Add W0572 detection. - Add W0574 detection. - Add W0575 detection. Tue Oct 11 16:28:46 2011 Yutaka Yanoh * release.alpha : 0.4.0 - Fix W0035 detection to warn when the type of right-hand-side operand in a logical expression is a composite type. - Fix degraded W0039 detection. - Add `linker_traits' section to the traits file. - Improve W0051 detection to consider about case-sensitiveness of external symbols. - Fix W0043 detection not to warn when the initializer is `{0}'. - Fix W0566 detection to warn only when one of operands of the cast-expression has type of the function pointer. Thu Oct 6 16:10:37 2011 Yutaka Yanoh * release.alpha : 0.3.4 - Fix branch condition ensuring mechanism to suppress warnings about the implicit condition expressions in switch-statement. - Add W0559 detection. - Add W0560 detection. - Add W0561 detection. - Add W0562 detection. - Fix W0100 detection not to warn about the array of const type whose dimension is greater than 1. - Fix W0080 detection not to warn about function local const variables. - Add W0563 detection. - Add W0564 detection. - Add W0565 detection. - Add W0566 detection. - Fix problem in W0553 detection that the explicit conversion of functions does not cause warnings. - Fix W0117 detection to warn about object definitions, not object declarations. - Fix W0118 detection to warn about object declarations, not object definitions. - Trivial correction to run on Ruby 1.9.3-rc1 without warnings. - Fix off-by-one problems in W0001, W0037, W0049, W0050 and W0054 detection. - Fix W0549 detection not to warn when the parameter is an operand of `#' or `##' operator. Tue Oct 4 17:30:33 2011 Yutaka Yanoh * release.alpha : 0.3.3 - Fix bad value domain reduction problem after improving the interpreter on 0.3.1 release. - Add W0542 detection. - Add W0543 detection. - Add W0544 detection. - Add W0546 detection. - Add W0549 detection. - Fix W0100 detection not to warn when the member variable of the composite variable is written. - Add W0551 detection. - Add W0552 detection. - Add W0553 detection. - Add W0554 detection. - Add W0556 detection. Fri Sep 30 15:36:31 2011 Yutaka Yanoh * release.alpha : 0.3.2 - Add W0534 detection. - Fix bad file path in X0003 error message when `--output-dir' option specified. - Fix bad value domain narrowing problem after improving the interpreter on 0.3.1 release. - Add W0538 detection. - Add W0540 detection. - Fix W0105 detection not to warn about function-pointers. Tue Sep 27 11:40:10 2011 Yutaka Yanoh * release.alpha : 0.3.1 - Improve the interpreter to support the fall-through semantics of switch-statements. - Change short version of the `--verbose' option to `-v'. Tue Sep 6 16:59:02 2011 Yutaka Yanoh * release.alpha : 0.3.0 - Merge 3 traits files into single traits file. - Improve `adlint' command to support the list-file. - Improve `adlintize' command to generate list-file, unix sh script and mswin bat file. Thu Sep 1 11:17:34 2011 Yutaka Yanoh * release.alpha : 0.2.5 - Add W0489 detection. - Add W0490 detection. - Add W0496 detection. - Add W0497 detection. - Add W0532 detection. - Fix problem that the inner switch-statement is not evaluated by the interpreter when the switch-statement is labeled by `default:' of the outer switch-statement. Tue Aug 23 16:07:49 2011 Yutaka Yanoh * release.alpha : 0.2.4 - Fix W0458 detection to warn when type-specifiers in the parameter list are omitted. - Add W0495 detection. - Add W0498 detection. - Add W0499 detection. - Add W0500 detection. - Add W0501 detection. - Add W0502 detection. - Add W0508 detection. - Fix W0432 detection not to warn the standalone composite-statement. - Fix W0105 detection not to be output when the assignment to the result of the indirection-expression occured. - Fix W0028, W0421 and W0422 detections to warn about null pointer dereference in array-subscript-expression with a pointer. - Fix W0100 detection not to warn about an array of const objects. - Fix W0088 detection to warn the logical-expression has right-hand-side without side effect in the initializer. - Add W0488 detection. Tue Aug 16 15:08:56 2011 Yutaka Yanoh * release.alpha : 0.2.3 - Fix abend problem when a bitfield base type is not an `int'. - Fix selection condition evaluation to correctly detect that the condition must be true or may be true. - Fix determination logic of completeness of branches of execution paths to correctly trace alteration of variable values. - Fix W0105 detection not to warn when the parameter type is a pointer to a const object. - Add W0461 detection. - Add W0462 detection. - Add W0463 detection. - Add W0464 detection. Fri Aug 12 13:56:55 2011 Yutaka Yanoh * release.alpha : 0.2.2 - Correct to run on Ruby 1.9.3-preview1 without warnings. - Change the version validation policy of input files. - Fix the interpreter not to misunderstand that the variable defined with an initializer which results to an undefined-value is undefined. - Fix W0028, W0421 and W0422 detections to warn about null pointer dereference in member-access-by-pointer-expressions. - Fix W0459 detection to suppress message with undefined temporary variables. - Fix problem when the recursive object-like macro appears in the argument of the function-like macro. - Fix type resolution problem of the bit-field type. - Improve the value-domain management to support value-domain narrowing to enter the `else' branch. - Fix problem that the indirection-expression results invalid object when the expression designates other than the array object. - Fix abend problem of the builtin `__adlint__eval' function call. - Fix huge memory consumption problem in instantiation of huge variable length array type. Fri Jul 29 19:04:49 2011 Yutaka Yanoh * release.alpha : 0.2.1 - Fix huge memory consumption problem in value-domain management. - Fix argument substitution bug of function-like macros. Tue Jul 26 17:38:17 2011 Yutaka Yanoh * release.alpha : 0.2.0 - Add W9001 detection. - Fix mistaken dead code problem of empty condition statement in for-statement. - Fix unnamed implicit function problem in W0109 detection. - Fix mistaken token location problem of macro expansion. - Fix wchar_t min-max value undefined problem in W0441 detection. - Add logging function. - Change metric file name `*.met' to `*.met.csv'. - Change message file name `*.msg' to `*.msg.csv'. - Add the exec_working_directory field in the version record of the metric file and the message file. - Support #include_next directive of the GNU GCC extension. - Rewrite the interpreter to support the value-domain management to improve the accuracy of the dead code detection. - Fix bad cyclomatic complexity measurement problem of if-else statement. Tue May 17 13:37:17 2011 Yutaka Yanoh * release.alpha : 0.1.6 - Change preprocessed source file name `*.c.i' to `*.i'. - Change exit behavior of `adlint', `adlint_sma' and `adlint_cma' command. - Add W0040 detection. - Add W0655 detection. - Add W0786 detection. - Add W0949 detection. - Add W0059 detection. - Add W0060 detection. - Add W0072 detection. - Add W0440 detection. - Add W0441 detection. - Add W0477 detection. - Add W0479 detection. - Add W0482 detection. - Add W0483 detection. - Add W0493 detection. - Add W0511 detection. - Add W0512 detection. - Add W0528 detection. - Add W0529 detection. - Add W0530 detection. - Fix problem of using `-d' option with adlint command. Fri May 6 15:04:33 2011 Yutaka Yanoh * release.alpha : 0.1.5 - Fix problem in FN_CALL measurement. - Add location of the function-definition in function metric record. Mon May 2 15:26:45 2011 Yutaka Yanoh * release.alpha : 0.1.4 - Revise compiler traits file format. - Add W0525 detection. - Fix inconsistent function call-graph problem in W0555 detection. Wed Apr 27 16:13:23 2011 Yutaka Yanoh * release.alpha : 0.1.3 - Fix bad message catalog entries. Wed Apr 27 12:43:13 2011 Yutaka Yanoh * release.alpha : 0.1.2 - Fix problems about detection of void-function call in logical expressions. - Support separated project tree and Makefile generation. - Fix problems about generic labeled statement in switch statement. - Implement value-narrowing after the error check path termination. Mon Apr 18 10:13:37 2011 Yutaka Yanoh * release.alpha : 0.1.1 - Improve performance of the preprocessor. - Fix problems about implicit conversion detections. - Fix problems about nested composite type instantiations. Wed Apr 13 10:09:52 2011 Yutaka Yanoh * release.alpha : 0.1.0 - This is the initial alpha release for system tests. - Implement `single module analysis' and `cross module analysis'. - Implement 456 kinds of code checkings. - Implement 14 kinds of code structure extractions. - Implement 15 kinds of code quality metric measurements. adlint-3.2.0/features/0000755000004100000410000000000012224440633014635 5ustar www-datawww-dataadlint-3.2.0/features/metric_measurement/0000755000004100000410000000000012224440633020525 5ustar www-datawww-dataadlint-3.2.0/features/metric_measurement/TODO0000644000004100000410000000011312224440633021210 0ustar www-datawww-dataMust write functional specifications about the metric measurement feature. adlint-3.2.0/features/step_definitions/0000755000004100000410000000000012224440633020203 5ustar www-datawww-dataadlint-3.2.0/features/step_definitions/code_check_steps.rb0000644000004100000410000000111512224440633024013 0ustar www-datawww-dataGiven /^a target source named "(.*)" with:$/ do |src_name, content| create_src_file(src_name, content) end When /^I successfully run `(.*)` on noarch$/ do |abbrev_cmd| cmd, src = abbrev_cmd.split run_adlint(cmd, src, "-t", "noarch_traits.yml") end Then /^the output should exactly match with:$/ do |mesg_table| $all_output.lines.to_a.size.should == mesg_table.hashes.size $all_output.each_line.zip(mesg_table.hashes).each do |line, row| if row line.should =~ /#{row[:line]}:#{row[:column]}:.*:.*:#{row[:mesg]}/ else line.should =~ /::.*:/ end end end adlint-3.2.0/features/code_check/0000755000004100000410000000000012224440633016704 5ustar www-datawww-dataadlint-3.2.0/features/code_check/W0751.feature0000644000004100000410000001002312224440633021000 0ustar www-datawww-dataFeature: W0751 W0751 detects that `unsigned int' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned char b = a; /* W0751 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0751 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned char b; b = a; /* W0751 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0751 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned int a) { bar(a); /* W0751 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0751 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned int a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned int a) { return a; /* W0751 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0751 | 3 | 12 | | W0385 | 3 | 5 | | W0104 | 1 | 32 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned int a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 32 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0655.feature0000644000004100000410000000241612224440633021012 0ustar www-datawww-dataFeature: W0655 W0655 detects that a bit-field member appears as an operand of the sizeof-expression. Scenario: bit-field as an operand Given a target source named "fixture.c" with: """ extern struct Foo { unsigned int b1:1, b2:1; } foo; static unsigned long bar(void) { return sizeof(foo.b1); /* W0655 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 48 | | W1076 | 3 | 22 | | W0655 | 5 | 12 | | W0629 | 3 | 22 | | W0425 | 1 | 40 | | W0628 | 3 | 22 | Scenario: arithmetic expression of two bit-fields as an operand Given a target source named "fixture.c" with: """ extern struct Foo { unsigned int b1:1, b2:1; } foo; static unsigned long bar(void) { return sizeof(foo.b1 + foo.b2); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 48 | | W1076 | 3 | 22 | | W0629 | 3 | 22 | | W0425 | 1 | 40 | | W0628 | 3 | 22 | adlint-3.2.0/features/code_check/W0792.feature0000644000004100000410000000716112224440633021016 0ustar www-datawww-dataFeature: W0792 W0792 detects that an explicit conversion between variable of floating point number and pointer to a function is found. Scenario: converting `float' to function pointer Given a target source named "fixture.c" with: """ int (*foo(const float f))(void) { return (int (*)(void)) f; /* W0792 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0792 | 3 | 12 | | W0628 | 1 | 7 | Scenario: converting `double' to function pointer Given a target source named "fixture.c" with: """ int (*foo(const double f))(void) { return (int (*)(void)) f; /* W0792 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0792 | 3 | 12 | | W0628 | 1 | 7 | Scenario: converting `long double' to function pointer Given a target source named "fixture.c" with: """ int (*foo(const long double f))(void) { return (int (*)(void)) f; /* W0792 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0792 | 3 | 12 | | W0628 | 1 | 7 | Scenario: converting function pointer to `float' Given a target source named "fixture.c" with: """ float foo(int (* const p)(void)) { return (float) p; /* W0792 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0792 | 3 | 12 | | W0628 | 1 | 7 | Scenario: converting function pointer to `double' Given a target source named "fixture.c" with: """ double foo(int (* const p)(void)) { return (double) p; /* W0792 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0792 | 3 | 12 | | W0628 | 1 | 8 | Scenario: converting function pointer to `long double' Given a target source named "fixture.c" with: """ long double foo(int (* const p)(void)) { return (long double) p; /* W0792 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0792 | 3 | 12 | | W0628 | 1 | 13 | Scenario: converting `float' to `int' Given a target source named "fixture.c" with: """ int foo(const float f) { return (int) f; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0628 | 1 | 5 | Scenario: converting function pointer to `void *' Given a target source named "fixture.c" with: """ void *foo(int (* const p)(void)) { return (void *) p; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0488.feature0000644000004100000410000001000312224440633021005 0ustar www-datawww-dataFeature: W0488 W0488 detects that multiple function-call-expressions or member-access-expressions or array-subscript-expressions appear in a logical-and-expression or a logical-or-expression without appropriate grouping. Scenario: member-access-expression and array-subscript-expression and function-call-expression as an operand of logical-and-expression Given a target source named "fixture.c" with: """ struct foo { int (*a[3])(void); }; static void foo(struct foo *p) { if (p) { if (p->a[0]() && p->a[1]()) { /* W0488 */ return; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 13 | | W0104 | 3 | 29 | | W0105 | 3 | 29 | | W1071 | 3 | 13 | | W0629 | 3 | 13 | | W0488 | 6 | 13 | | W0508 | 6 | 23 | | W0114 | 5 | 5 | | W0628 | 3 | 13 | Scenario: member-access-expression and array-subscript-expression and function-call-expression as an operand of logical-and-expression with grouping Given a target source named "fixture.c" with: """ struct foo { int (*a[3])(void); }; static void foo(struct foo *p) { if (p) { if (((p->a[0])()) && ((p->a[1])())) { /* OK */ return; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 13 | | W0104 | 3 | 29 | | W0105 | 3 | 29 | | W1071 | 3 | 13 | | W0629 | 3 | 13 | | W0508 | 6 | 27 | | W0114 | 5 | 5 | | W0628 | 3 | 13 | Scenario: member-access-expression and array-subscript-expression and function-call-expression as an operand of logical-and-expression grouped entirely Given a target source named "fixture.c" with: """ struct foo { int (*a[3])(void); }; static void foo(struct foo *p) { if (p) { if ((p->a[0]() && p->a[1]())) { /* W0488 */ return; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 13 | | W0104 | 3 | 29 | | W0105 | 3 | 29 | | W1071 | 3 | 13 | | W0629 | 3 | 13 | | W0488 | 6 | 13 | | W0508 | 6 | 24 | | W0114 | 5 | 5 | | W0628 | 3 | 13 | Scenario: ungrouped array-subscript-expression in a logical-and-expression Given a target source named "fixture.c" with: """ static void foo(int i, int a[]) { if (i && a[0]) { /* W0488 */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0488 | 3 | 9 | | W0628 | 1 | 13 | Scenario: grouped array-subscript-expression in a logical-and-expression Given a target source named "fixture.c" with: """ static void foo(int i, int a[]) { if (i && (a[0])) { /* OK */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0227.feature0000644000004100000410000000771612224440633021015 0ustar www-datawww-dataFeature: W0227 W0227 detects that `double' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned int b = a; /* W0227 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0227 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned int b; b = a; /* W0227 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0227 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(double a) { bar(a); /* W0227 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0227 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(double a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(double a) { return a; /* W0227 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0227 | 3 | 12 | | W0363 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(double a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0104 | 1 | 25 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0013.feature0000644000004100000410000001174012224440633020776 0ustar www-datawww-dataFeature: W0013 W0013 detects that a continue-statement is used in iteration-statement. Scenario: a continue-statement in for-statement Given a target source named "fixture.c" with: """ static void foo(void) { int i; int j; for (i = 1, j = 0; i < 20; i++) { j += 2; if ((j % i) == 3) { continue; /* W0013 */ } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0535 | 6 | 10 | | W0013 | 9 | 13 | | W0628 | 1 | 13 | Scenario: a continue-statement in c99-for-statement Given a target source named "fixture.c" with: """ static void foo(void) { int j = 0; for (int i = 1; i < 20; i++) { j += 2; if ((j % i) == 3) { continue; /* W0013 */ } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0013 | 8 | 13 | | W0628 | 1 | 13 | Scenario: a continue-statement in while-statement Given a target source named "fixture.c" with: """ static void foo(void) { int i = 1; int j = 0; while (i < 20) { i++; j += 2; if ((j % i) == 3) { continue; /* W0013 */ } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0013 | 10 | 13 | | W0628 | 1 | 13 | Scenario: a continue-statement in do-statement Given a target source named "fixture.c" with: """ static void foo(void) { int i = 1; int j = 0; do { i++; j += 2; if ((j % i) == 3) { continue; /* W0013 */ } } while (i < 20); } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0013 | 10 | 13 | | W0628 | 1 | 13 | Scenario: no continue-statement in for-statement Given a target source named "fixture.c" with: """ static void foo(void) { int i; int j; for (i = 1, j = 0; i < 20; i++) { j += 2; if ((j % i) == 3) { break; /* OK */ } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0535 | 6 | 10 | | W0628 | 1 | 13 | Scenario: no continue-statement in c99-for-statement Given a target source named "fixture.c" with: """ static void foo(void) { int j = 0; for (int i = 1; i < 20; i++) { j += 2; if ((j % i) == 3) { break; /* OK */ } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: no continue-statement in while-statement Given a target source named "fixture.c" with: """ static void foo(void) { int i = 1; int j = 0; while (i < 20) { i++; j += 2; if ((j % i) == 3) { break; /* OK */ } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: no continue-statement in do-statement Given a target source named "fixture.c" with: """ static void foo(void) { int i = 1; int j = 0; do { i++; j += 2; if ((j % i) == 3) { break; /* OK */ } } while (i < 20); } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0809.feature0000644000004100000410000000711312224440633021012 0ustar www-datawww-dataFeature: W0809 W0809 detects that an identifier is declared but it already reserved by the library. Scenario: an identifier starts with `__' Given a target source named "fixture.c" with: """ extern int __number; /* W0809 */ extern int __NUMBER; /* W0809 */ extern char __value; /* W0809 */ extern char __VALUE; /* W0809 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W0118 | 3 | 13 | | W0118 | 4 | 13 | | W0809 | 1 | 12 | | W0809 | 2 | 12 | | W0809 | 3 | 13 | | W0809 | 4 | 13 | Scenario: an identifier starts with `_(capital letters)' Given a target source named "fixture.c" with: """ extern int _NUMBER; /* W0809 */ extern int _Number; /* W0809 */ extern char _VALUE; /* W0809 */ extern char _Value; /* W0809 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W0118 | 3 | 13 | | W0118 | 4 | 13 | | W0809 | 1 | 12 | | W0809 | 2 | 12 | | W0809 | 3 | 13 | | W0809 | 4 | 13 | Scenario: an identifier starts with `_' declared as function Given a target source named "fixture.c" with: """ static void _func(void); /* W0809 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0809 | 1 | 13 | Scenario: an identifier starts with `_' declared as struct Given a target source named "fixture.c" with: """ struct _foo { /* W0809 */ int i; }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0809 | 1 | 8 | Scenario: an identifier starts with `_' declared as typedef Given a target source named "fixture.c" with: """ typedef void _type; /* W0809 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0809 | 1 | 14 | Scenario: an identifier starts with `_' declared as enum Given a target source named "fixture.c" with: """ enum _color { Red, Green, Blue}; /* W0809 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0809 | 1 | 6 | Scenario: an identifier starts with `_' declared as enumerators Given a target source named "fixture.c" with: """ enum color { _Red, _Green, _Blue}; /* W0809 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0809 | 1 | 14 | | W0809 | 1 | 20 | | W0809 | 1 | 28 | Scenario: an identifier starts with `_' declared as union Given a target source named "fixture.c" with: """ union _uni { /* W0809 */ int a; int b; }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0551 | 1 | 7 | | W0809 | 1 | 7 | adlint-3.2.0/features/code_check/W0801.feature0000644000004100000410000000432712224440633021006 0ustar www-datawww-dataFeature: W0801 W0801 detects that there is no named member in this struct or union. Scenario: no member exists in the struct Given a target source named "fixture.c" with: """ struct foo { /* W0801 */ }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0801 | 1 | 8 | Scenario: no named member exists in the struct Given a target source named "fixture.c" with: """ struct bar { /* W0801 */ int; int :1; long; double; }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0801 | 1 | 8 | Scenario: named member exists in the struct Given a target source named "fixture.c" with: """ struct baz { /* OK */ int i; long l; double d; }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: no member exists in the union Given a target source named "fixture.c" with: """ union foo { /* W0801 */ }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0551 | 1 | 7 | | W0801 | 1 | 7 | Scenario: no named member exists in the union Given a target source named "fixture.c" with: """ union bar { /* W0801 */ int; int :1; long; }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0551 | 1 | 7 | | W0801 | 1 | 7 | Scenario: named member exists in the union Given a target source named "fixture.c" with: """ union baz { /* OK */ int i; long l; }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0551 | 1 | 7 | adlint-3.2.0/features/code_check/W0153.feature0000644000004100000410000001114112224440633020776 0ustar www-datawww-dataFeature: W0153 W0153 detects that `unsigned long long' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { short b = a; /* W0153 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0153 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 15 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { short b; b = a; /* W0153 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0153 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned long long a) { bar(a); /* W0153 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0153 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned long long a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 29 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned long long a) { return a; /* W0153 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0153 | 3 | 12 | | W0289 | 3 | 5 | | W0104 | 1 | 30 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned long long a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 30 | | W0104 | 1 | 30 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0582.feature0000644000004100000410000000424612224440633021014 0ustar www-datawww-dataFeature: W0582 W0582 detects that number or types of arguments of a function call does not conform with a prototype declaration of the function appears after the function call. Scenario: call with matched arguments Given a target source named "fixture.c" with: """ static void foo(int *p) { bar(NULL, *p); /* OK */ } static void bar(int *, int); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0422 | 3 | 15 | | C1000 | | | | C1005 | 1 | 22 | | W0109 | 3 | 5 | | W0104 | 1 | 22 | | W0105 | 1 | 22 | | W1073 | 3 | 8 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: call with unmatched arguments Given a target source named "fixture.c" with: """ static void foo(int *p) { bar(NULL, p); /* W0582 */ } static void bar(int *, int); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0109 | 3 | 5 | | W0104 | 1 | 22 | | W0105 | 1 | 22 | | W1073 | 3 | 8 | | W0582 | 3 | 8 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: call with unmatched constant pointer Given a target source named "fixture.c" with: """ static void foo(int *p) { bar(3, *p); /* W0582 */ } static void bar(int *, int); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0422 | 3 | 12 | | C1000 | | | | C1005 | 1 | 22 | | W0109 | 3 | 5 | | W0104 | 1 | 22 | | W0105 | 1 | 22 | | W1073 | 3 | 8 | | W0582 | 3 | 8 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W9003.feature0000644000004100000410000002065312224440633021011 0ustar www-datawww-dataFeature: W9003 W9003 detects that an object is implicitly converted into a new object of the different type. Scenario: passing an enum variable whose type differs from one of the corresponding enum parameter Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE }; extern void foo(enum Color); static void bar(void) { foo(ORANGE); /* W9003 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 13 | | W1076 | 6 | 13 | | W9003 | 8 | 9 | | W0728 | 8 | 9 | | W0629 | 6 | 13 | | W0628 | 6 | 13 | Scenario: passing an enum argument as an `int' parameter Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; extern void foo(int); static void bar(void) { foo(RED); /* W9003 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W9003 | 7 | 9 | | W1059 | 7 | 9 | | W0629 | 5 | 13 | | W0628 | 5 | 13 | Scenario: passing an `int' argument as an enum parameter Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; extern void foo(enum Color); static void bar(void) { foo(0); /* W9003 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W9003 | 7 | 9 | | W1053 | 7 | 9 | | W0629 | 5 | 13 | | W0628 | 5 | 13 | Scenario: initializing an `int' variable with an enumerator Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; int i = RED; /* W9003 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W9003 | 2 | 9 | | W0117 | 2 | 5 | Scenario: initializing an enum variable with an `int' value Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Color c = 1; /* W9003 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W9003 | 2 | 16 | | W0117 | 2 | 12 | Scenario: arithmetic expression with an `int' variable and an enum variable Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int foo(enum Color c) { if (c == RED || c == BLUE || c == GREEN) { return c + 10; /* W9003 */ } else { return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0727 | 6 | 20 | | W9003 | 6 | 20 | | W9003 | 6 | 18 | | W1060 | 6 | 18 | | W0104 | 3 | 27 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0490 | 5 | 9 | | W0497 | 5 | 9 | | W0502 | 5 | 9 | | W0628 | 3 | 12 | Scenario: no implicit conversion of size_t value Given a target source named "fixture.c" with: """ #include size_t foo(int a) { return sizeof(a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 8 | | W0031 | 3 | 16 | | W0104 | 3 | 16 | | W0628 | 3 | 8 | Scenario: implicit conversion of size_t value Given a target source named "fixture.c" with: """ #include int foo(int a) { return sizeof(a); /* W9003 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0150 | 5 | 12 | | W9003 | 5 | 12 | | W0286 | 5 | 5 | | W0031 | 3 | 13 | | W0104 | 3 | 13 | | W0070 | 1 | 1 | | W0628 | 3 | 5 | Scenario: explicit conversion of size_t value Given a target source named "fixture.c" with: """ #include int foo(int a) { return (int) sizeof(a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0031 | 3 | 13 | | W0104 | 3 | 13 | | W0070 | 1 | 1 | | W0628 | 3 | 5 | Scenario: implicit conversion to void pointer Given a target source named "fixture.c" with: """ typedef struct foo { int i; } foo_t; extern void foo(foo_t *); typedef struct bar { int i; } bar_t; extern void bar(bar_t *); extern void baz(void *); static void qux(foo_t *f, bar_t *b) { foo(b); /* W9003 */ bar(f); /* W9003 */ foo(f); /* OK */ baz(f); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 2 | 13 | | W0118 | 5 | 13 | | W0118 | 7 | 13 | | W1076 | 9 | 13 | | W9003 | 11 | 9 | | W9003 | 12 | 9 | | W0104 | 9 | 24 | | W0104 | 9 | 34 | | W0105 | 9 | 24 | | W0105 | 9 | 34 | | W0629 | 9 | 13 | | W0628 | 9 | 13 | Scenario: implicit convertion from void pointer Given a target source named "fixture.c" with: """ typedef struct foo { int i; } foo_t; extern void *foo(foo_t *); static void bar(void *p) { foo_t *f = foo(p); /* legal but W9003 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 2 | 14 | | W1076 | 4 | 13 | | W9003 | 6 | 20 | | W9003 | 6 | 19 | | W0100 | 6 | 12 | | W0104 | 4 | 23 | | W0105 | 4 | 23 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | Scenario: implicit convertion of constant pointer Given a target source named "fixture.c" with: """ static void foo(void *p) { int *p1 = NULL; /* OK */ int *p2 = 0; /* OK */ int *p3 = p; /* legal but W9003 */ int *p4 = 3; /* W9003 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W9003 | 5 | 15 | | W9003 | 6 | 15 | | W0100 | 3 | 10 | | W0100 | 4 | 10 | | W0100 | 5 | 10 | | W0100 | 6 | 10 | | W0104 | 1 | 23 | | W0105 | 1 | 23 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: no implicit convertion of register variable Given a target source named "fixture.c" with: """ static void foo(void) { register char a[3]; char *p; p = &a[0]; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0459 | 5 | 9 | | C1000 | | | | C1003 | 3 | 19 | | W0642 | 5 | 9 | | W0100 | 3 | 19 | | W0100 | 4 | 11 | | W0629 | 1 | 13 | | W0950 | 3 | 21 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0242.feature0000644000004100000410000001063612224440633021005 0ustar www-datawww-dataFeature: W0242 W0242 detects that `double' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long long b = a; /* W0242 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0242 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 17 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 17 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long long b; b = a; /* W0242 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0242 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 17 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 17 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(double a) { bar(a); /* W0242 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0242 | 5 | 9 | | W0104 | 3 | 17 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(double a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(double a) { return a; /* W0242 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0242 | 3 | 12 | | W0378 | 3 | 5 | | W0104 | 1 | 31 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(double a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0104 | 1 | 31 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W1030.feature0000644000004100000410000000400312224440633020770 0ustar www-datawww-dataFeature: W1030 W1030 detects that label with the same name is used more than two. Scenario: same named label is used in twice Given a target source named "fixture.c" with: """ extern void func(const int a, const int b) { if (a == 0) { int c = 0; RETRY: b = 10; } if (b != 0) { goto RETRY; } RETRY: /* W1030 */ b = 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0100 | 4 | 13 | | W0564 | 10 | 9 | | W1072 | 10 | 9 | | W1030 | 12 | 1 | | W0628 | 1 | 13 | Scenario: only one label in a function Given a target source named "fixture.c" with: """ extern void func(const int a, const int b) { if (a == 0) { int c = 0; } if (b != 0) { goto RETRY; } RETRY: /* OK */ b = 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0100 | 4 | 13 | | W1072 | 8 | 9 | | W0628 | 1 | 13 | Scenario: two different labels in a function Given a target source named "fixture.c" with: """ extern void func(const int a, const int b) { if (a == 0) { goto ERROR; } if (b != 0) { goto RETRY; } ERROR: /* OK */ b = 0; RETRY: /* OK */ b = 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1072 | 4 | 9 | | W1072 | 8 | 9 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0759.feature0000644000004100000410000001113412224440633021014 0ustar www-datawww-dataFeature: W0759 W0759 detects that `long long' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { signed char b = a; /* W0759 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0759 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { signed char b; b = a; /* W0759 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0759 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(long long a) { bar(a); /* W0759 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0759 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(long long a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(long long a) { return a; /* W0759 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0759 | 3 | 12 | | W0393 | 3 | 5 | | W0104 | 1 | 27 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(long long a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 27 | | W0104 | 1 | 27 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W1071.feature0000644000004100000410000000614012224440633021001 0ustar www-datawww-dataFeature: W1071 W1071 detects that a function has multiple termination points. Scenario: explicit returns and implicit return Given a target source named "fixture.c" with: """ void foo(int i) /* W1071 */ { if (i == 0) { return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 14 | | W1071 | 1 | 6 | | W0628 | 1 | 6 | Scenario: explicit return and no implicit return Given a target source named "fixture.c" with: """ void foo(int i) /* OK */ { switch (i) { default: return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 14 | | W0781 | 3 | 5 | | W0628 | 1 | 6 | Scenario: dead explicit return and implicit return Given a target source named "fixture.c" with: """ void foo(unsigned int ui) /* OK */ { if (ui < 0U) { return; /* dead-code */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0610 | 3 | 12 | | W0613 | 3 | 12 | | W0104 | 1 | 23 | | W9001 | 4 | 9 | | W0628 | 1 | 6 | Scenario: explicit returns and no implicit return Given a target source named "fixture.c" with: """ int foo(int i) /* W1071 */ { if (i == 0) { return 0; } else { return 1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0628 | 1 | 5 | Scenario: array-subscript-expression as the controlling expression Given a target source named "fixture.c" with: """ struct foo { int len; int ary[]; }; static void foo(struct foo *p) { int i; for (i = 0; i < p->len; i++) { if (p->ary[i]) return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 6 | 13 | | W0422 | 9 | 22 | | C1000 | | | | C1005 | 6 | 29 | | W0422 | 10 | 14 | | C1000 | | | | C1005 | 6 | 29 | | W0104 | 6 | 29 | | W0105 | 6 | 29 | | W1071 | 6 | 13 | | W0629 | 6 | 13 | | W0414 | 10 | 24 | | W0114 | 10 | 9 | | W0628 | 6 | 13 | adlint-3.2.0/features/code_check/W0431.feature0000644000004100000410000000250612224440633021002 0ustar www-datawww-dataFeature: W0431 W0431 detects that start of this line is more indented than previous lines of the same indentation level. Scenario: function-like macro replacement Given a target source named "fixture.c" with: """ extern int foo(int, int); #define bar(a, b) ((a) > 0) ? (a) : (b) #define baz(a, b) \ ((a) > 0) ? \ (a) : (b) void qux(void) { int i = 0; i = foo(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, /* OK */ 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2); /* OK */ i = bar(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, /* OK */ 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2); /* OK */ i = baz(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, /* OK */ 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 3 | 1 | | W0442 | 4 | 1 | | W0118 | 1 | 12 | | W0117 | 8 | 6 | | W0609 | 14 | 9 | | W0609 | 16 | 9 | | W0443 | 3 | 1 | | W0443 | 4 | 1 | | W0628 | 8 | 6 | adlint-3.2.0/features/code_check/W0178.feature0000644000004100000410000001120512224440633021006 0ustar www-datawww-dataFeature: W0178 W0178 detects that `long long' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned short b = a; /* W0178 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0178 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 24 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 20 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned short b; b = a; /* W0178 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0178 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 20 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(long long a) { bar(a); /* W0178 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0178 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(long long a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(long long a) { return a; /* W0178 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0178 | 3 | 12 | | W0314 | 3 | 5 | | W0104 | 1 | 30 | | W0834 | 1 | 20 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(long long a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 30 | | W0104 | 1 | 30 | | W0834 | 1 | 20 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0175.feature0000644000004100000410000001140112224440633021001 0ustar www-datawww-dataFeature: W0175 W0175 detects that `int' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long long b = a; /* W0175 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0175 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 14 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 28 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 24 | | W0104 | 1 | 14 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long long b; b = a; /* W0175 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0175 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 14 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 24 | | W0104 | 1 | 14 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(int a) { bar(a); /* W0175 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0175 | 5 | 9 | | W0104 | 3 | 14 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(int a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(int a) { return a; /* W0175 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0175 | 3 | 12 | | W0311 | 3 | 5 | | W0104 | 1 | 28 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(int a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 28 | | W0104 | 1 | 28 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0248.feature0000644000004100000410000000764112224440633021015 0ustar www-datawww-dataFeature: W0248 W0248 detects that `unsigned short' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { int b = a; /* W0248 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0248 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { int b; b = a; /* W0248 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0248 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned short a) { bar(a); /* W0248 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0248 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned short a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned short a) { return a; /* W0248 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0248 | 3 | 12 | | W0404 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned short a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W1026.feature0000644000004100000410000000525512224440633021007 0ustar www-datawww-dataFeature: W1026 W1026 detects that type of an argument is incomplete. Scenario: incomplete struct type as an argument Given a target source named "fixture.c" with: """ extern struct st s; extern void foo(struct st); void bar(void) { foo(s); /* W1026 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 18 | | W0118 | 2 | 13 | | W0117 | 4 | 6 | | W0493 | 6 | 8 | | W1026 | 6 | 9 | | W0628 | 4 | 6 | Scenario: incomplete typedef-ed struct type as an argument Given a target source named "fixture.c" with: """ typedef struct st st_t; extern st_t s; extern void foo(st_t); void bar(void) { foo(s); /* W1026 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W0625 | 1 | 19 | | W0118 | 4 | 13 | | W0117 | 6 | 6 | | W0493 | 8 | 8 | | W1026 | 8 | 9 | | W0628 | 6 | 6 | Scenario: complete struct type as an argument Given a target source named "fixture.c" with: """ typedef struct { int i; } st_t; extern st_t s; extern void foo(st_t); void bar(void) { foo(s); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 5 | 13 | | W0625 | 3 | 3 | | W0118 | 6 | 13 | | W0117 | 8 | 6 | | W0493 | 10 | 8 | | W0628 | 8 | 6 | Scenario: multiple incomplete typed arguments Given a target source named "fixture.c" with: """ typedef struct st st_t; typedef enum en en_t; extern st_t s; extern en_t e; extern void foo(st_t, int, en_t); void bar(void) { foo(s, 0, e); /* two W1026 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 13 | | W0625 | 1 | 19 | | W0118 | 5 | 13 | | W0625 | 2 | 17 | | W0737 | 5 | 13 | | W0118 | 6 | 13 | | W0117 | 8 | 6 | | W0493 | 10 | 8 | | W1026 | 10 | 9 | | W1026 | 10 | 15 | | W0628 | 8 | 6 | adlint-3.2.0/features/code_check/W0177.feature0000644000004100000410000001116612224440633021013 0ustar www-datawww-dataFeature: W0177 W0177 detects that `long long' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned char b = a; /* W0177 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0177 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned char b; b = a; /* W0177 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0177 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(long long a) { bar(a); /* W0177 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0177 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(long long a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(long long a) { return a; /* W0177 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0177 | 3 | 12 | | W0313 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(long long a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 29 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0692.feature0000644000004100000410000000243412224440633021013 0ustar www-datawww-dataFeature: W0692 W0692 detects that no argument is given to a function-like macro. Scenario: empty argument to a function-like macro Given a target source named "fixture.c" with: """ #define MACRO(a) #a const char *s = (char *) MACRO(); /* W0692 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0692 | 3 | 26 | | W0117 | 3 | 13 | Scenario: enough arguments to a function-like macro Given a target source named "fixture.c" with: """ #define MACRO(a) #a const char *s = (char *) MACRO(str); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 3 | 13 | Scenario: no argument to a function-like macro Given a target source named "fixture.c" with: """ #define MACRO() 0 const int i = MACRO(); /* W0692 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 3 | 11 | adlint-3.2.0/features/code_check/W0026.feature0000644000004100000410000000601612224440633021002 0ustar www-datawww-dataFeature: W0026 W0026 detects that there is redundant #include not in a source file but in a translation-unit. Scenario: redundant #include of user header Given a target source named "fixture.c" with: """ #include "test.h" #include "test2.h" /* W0026 */ void foo(void) { } """ And a target source named "test.h" with: """ #ifndef INCLUDED_TEST #define INCLUDED_TEST #include "test2.h" #endif """ And a target source named "test2.h" with: """ #ifndef INCLUDED_TEST2 #define INCLUDED_TEST2 void foo(void); #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0026 | 2 | 1 | | W0071 | 1 | 1 | | W0628 | 4 | 6 | Scenario: no redundant #include of user header Given a target source named "fixture.c" with: """ #include "test.h" /* OK */ void foo(void) { } """ And a target source named "test.h" with: """ #ifndef INCLUDED_TEST #define INCLUDED_TEST #include "test2.h" #endif """ And a target source named "test2.h" with: """ #ifndef INCLUDED_TEST2 #define INCLUDED_TEST2 void foo(void); #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0071 | 1 | 1 | | W0628 | 3 | 6 | Scenario: redundant #include of system header Given a target source named "fixture.c" with: """ #include #include /* W0026 */ void foo(void) { } """ And a target source named "test.h" with: """ #ifndef INCLUDED_TEST #define INCLUDED_TEST #include #endif """ And a target source named "test2.h" with: """ #ifndef INCLUDED_TEST2 #define INCLUDED_TEST2 void foo(void); #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0026 | 2 | 1 | | W0070 | 1 | 1 | | W0628 | 4 | 6 | Scenario: no redundant #include of system header Given a target source named "fixture.c" with: """ #include /* OK */ void foo(void) { } """ And a target source named "test.h" with: """ #ifndef INCLUDED_TEST #define INCLUDED_TEST #include #endif """ And a target source named "test2.h" with: """ #ifndef INCLUDED_TEST2 #define INCLUDED_TEST2 void foo(void); #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0070 | 1 | 1 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0461.feature0000644000004100000410000000617112224440633021007 0ustar www-datawww-dataFeature: W0461 W0461 detects that a pointer to the undefined value is passed as an argument. Scenario: pointer to the global constant array initialized with a string-literal Given a target source named "fixture.c" with: """ static const char str[] = "str"; extern void foo(const void *); static void bar(void) { foo(str); /* OK */ } static void baz(void) { foo(str); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W1076 | 10 | 13 | | W0629 | 5 | 13 | | W0629 | 10 | 13 | | W0947 | 1 | 27 | | W0628 | 5 | 13 | | W0628 | 10 | 13 | Scenario: pointer to the global constant explicitly sized array initialized with a string-literal Given a target source named "fixture.c" with: """ static const char str[4] = "str"; extern void foo(const void *); static void bar(void) { foo(str); /* OK */ } static void baz(void) { foo(str); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W1076 | 10 | 13 | | W0629 | 5 | 13 | | W0629 | 10 | 13 | | W0947 | 1 | 28 | | W0950 | 1 | 23 | | W0628 | 5 | 13 | | W0628 | 10 | 13 | Scenario: array elements may be initialized according to a parameter value Given a target source named "fixture.c" with: """ extern void bar(const int *); void baz(int i) { int a[5]; for (; i < 2; i++) { a[i] = i; } bar(a); /* OK not W0461 but W0462 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0534 | 7 | 10 | | W0705 | 8 | 11 | | C1000 | | | | C1006 | 3 | 14 | | W0462 | 11 | 9 | | C1000 | | | | C1003 | 5 | 9 | | C1002 | 7 | 14 | | W0950 | 5 | 11 | | W0628 | 3 | 6 | Scenario: array elements is initialized by an iteration-statement Given a target source named "fixture.c" with: """ extern void bar(const int *); void baz(void) { int a[3]; for (int i = 0; i < 3; i++) { a[i] = i; } bar(a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0950 | 5 | 11 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0425.feature0000644000004100000410000002053212224440633021004 0ustar www-datawww-dataFeature: W0425 W0425 detects that two or more declarations or statements are in a line. Scenario: two declarations in a line Given a target source named "fixture.c" with: """ int foo(void) { int i = 0; int j = 0; /* W0425 */ return i + j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 9 | | W0100 | 3 | 20 | | W0425 | 3 | 20 | | W0628 | 1 | 5 | Scenario: two declarators in a declaration Given a target source named "fixture.c" with: """ int foo(void) { int i = 0, j = 0; /* W0425 */ return i + j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 9 | | W0100 | 3 | 16 | | W0425 | 3 | 16 | | W0628 | 1 | 5 | Scenario: a declaration and a jump-statement in a line Given a target source named "fixture.c" with: """ int foo(void) { int i = 0; return i + 1; /* W0425 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 9 | | W0425 | 3 | 16 | | W0628 | 1 | 5 | Scenario: a expression-statement and a jump-statement in a line Given a target source named "fixture.c" with: """ int foo(void) { int i; i = 0; return i + 1; /* W0425 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 9 | | W0425 | 4 | 12 | | W0628 | 1 | 5 | Scenario: a if-else-statement in a line Given a target source named "fixture.c" with: """ int foo(int i) { if (i == 0) return 0; else return 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0414 | 3 | 17 | | W0414 | 3 | 32 | | W0628 | 1 | 5 | Scenario: a if-else-statement with compound-statements in a line Given a target source named "fixture.c" with: """ int foo(int i) { if (i == 0) { return 0; } else { return 1; } /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0628 | 1 | 5 | Scenario: a if-statement with compound-statements in a line Given a target source named "fixture.c" with: """ int foo(int i) { if (i == 0) { return 0; } /* OK */ return 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0628 | 1 | 5 | Scenario: a if-statement in a line Given a target source named "fixture.c" with: """ int foo(int i) { if (i == 0) return 0; /* OK */ return 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0414 | 3 | 17 | | W0628 | 1 | 5 | Scenario: a for-statement in a line Given a target source named "fixture.c" with: """ int foo(int i) { int j, k = 1; /* W0425 */ for (j = 0; j < i; j++) k *= 2; /* OK */ return k; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W0414 | 4 | 29 | | W0425 | 3 | 12 | | W0628 | 1 | 5 | Scenario: a for-statement with a compound-statement in a line Given a target source named "fixture.c" with: """ int foo(int i) { int j, k = 1; /* W0425 */ for (j = 0; j < i; j++) { k *= 2; } /* OK */ return k; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W0425 | 3 | 12 | | W0628 | 1 | 5 | Scenario: extra statement after if-statement in a line Given a target source named "fixture.c" with: """ int foo(int i) { if (i == 0) return 0; return 1; /* W0425 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0414 | 3 | 17 | | W0425 | 3 | 27 | | W0628 | 1 | 5 | Scenario: extra statement after for-statement in a line Given a target source named "fixture.c" with: """ int foo(int i) { int j, k = 1; /* W0425 */ for (j = 0; j < i; j++) k *= 2; return k; /* W0425 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W0414 | 4 | 29 | | W0425 | 3 | 12 | | W0425 | 4 | 37 | | W0628 | 1 | 5 | Scenario: two member-declarations in a line Given a target source named "fixture.c" with: """ struct foo { int i; int j; }; /* W0425 */ union bar { int i; int j; }; /* W0425 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0551 | 2 | 7 | | W0425 | 1 | 25 | | W0425 | 2 | 24 | Scenario: two declarators in a member-declaration Given a target source named "fixture.c" with: """ struct foo { int *p, i; }; /* W0425 */ union bar { int *p, i; }; /* W0425 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0551 | 2 | 7 | | W0425 | 1 | 22 | | W0425 | 2 | 21 | Scenario: two declarators in a member-declaration Given a target source named "fixture.c" with: """ extern struct { int i; } foo; /* OK */ extern union { int i; } bar; /* OK */ typedef struct { int i; } baz; /* OK */ typedef union { int i; } qux; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 26 | | W0118 | 2 | 25 | | W0551 | 2 | 8 | | W0551 | 4 | 9 | Scenario: two declarators in a member-declaration Given a target source named "fixture.c" with: """ extern struct { int *p, i; } foo; /* W0425 */ extern union { int *p, i; } bar; /* W0425 */ typedef struct { int *p, i; } baz; /* W0425 */ typedef union { int *p, i; } qux; /* W0425 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 30 | | W0118 | 2 | 29 | | W0551 | 2 | 8 | | W0551 | 4 | 9 | | W0425 | 1 | 25 | | W0425 | 2 | 24 | | W0425 | 3 | 26 | | W0425 | 4 | 25 | adlint-3.2.0/features/code_check/W0745.feature0000644000004100000410000000743512224440633021020 0ustar www-datawww-dataFeature: W0745 W0745 detects that an array subscript must cause out of bound access of the array object. Scenario: array-subscript-expression with non-constant subscript must cause OOB access in an initializer Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { if (i < 0) { int j = a[i - 1]; /* W0745 */ return j; } return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0723 | 6 | 21 | | W0745 | 6 | 21 | | W0100 | 6 | 13 | | W0104 | 3 | 13 | | W1071 | 3 | 5 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with non-constant subscript must cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { int j = 0; if (i > 4) { j = a[i + 1]; /* W0745 */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0723 | 7 | 17 | | W0745 | 7 | 17 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with non-constant subscript must cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { if (i < -2) { a[i + 2] = 0; /* W0745 */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W0745 | 6 | 13 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: indirection-expression with non-constant subscript must cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { int j = 0; if (i > 5) { j = *(a + i + 2); /* W0745 */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W9003 | 7 | 19 | | W0023 | 7 | 17 | | W9003 | 7 | 23 | | W0023 | 7 | 21 | | W0745 | 7 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: indirection-expression with non-constant subscript must cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { if (i < 0) { *(i + a - 1) = 0; /* W0745 */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W9003 | 6 | 11 | | W0023 | 6 | 13 | | W9003 | 6 | 19 | | W0024 | 6 | 17 | | W0745 | 6 | 10 | | W0104 | 3 | 14 | | W0498 | 6 | 10 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0209.feature0000644000004100000410000001034112224440633021001 0ustar www-datawww-dataFeature: W0209 W0209 detects that `unsigned long long' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { float b = a; /* W0209 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0209 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { float b; b = a; /* W0209 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0209 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned long long a) { bar(a); /* W0209 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0209 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned long long a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned long long a) { return a; /* W0209 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0209 | 3 | 12 | | W0345 | 3 | 5 | | W0104 | 1 | 30 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned long long a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 30 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0021.feature0000644000004100000410000000442112224440633020773 0ustar www-datawww-dataFeature: W0021 W0021 detects that a pointer-cast deletes `volatile' qualifier. Scenario: casting volatile int pointer to int pointer Given a target source named "fixture.c" with: """ int foo(volatile int *p) { int *q; q = (int *) p; /* W0021 */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0021 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0105 | 1 | 23 | | W0628 | 1 | 5 | Scenario: casting volatile const int pointer to int pointer Given a target source named "fixture.c" with: """ int foo(volatile const int *p) { int *q; q = (int *) p; /* W0021 */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0019 | 4 | 9 | | W0021 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0628 | 1 | 5 | Scenario: assigning compatible volatile pointers Given a target source named "fixture.c" with: """ int foo(volatile int *p) { volatile int *q; q = p; /* OK */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 19 | | W0104 | 1 | 23 | | W0105 | 1 | 23 | | W0628 | 1 | 5 | Scenario: casting volatile int array pointer to int pointer Given a target source named "fixture.c" with: """ volatile int a[] = { 0, 1, 2 }; int foo(void) { volatile int *p = a; /* OK */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0117 | 3 | 5 | | W0100 | 5 | 19 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0093.feature0000644000004100000410000001077612224440633021016 0ustar www-datawww-dataFeature: W0093 W0093 detects that a multiplicative-expression may cause division-by-zero. Scenario: narrowing denominator variable by an iteration controlling variable which has same value domain of the denominator Given a target source named "fixture.c" with: """ static void foo(void) { int k; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { if (i == j) { k = j / i; /* W0093 */ } else { k = j / i; /* W0093 */ } } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0093 | 8 | 23 | | C1000 | | | | C1006 | 5 | 14 | | W0093 | 11 | 23 | | C1000 | | | | C1006 | 5 | 14 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: narrowing denominator variable by an iteration controlling variable which has narrower value domain than the denominator Given a target source named "fixture.c" with: """ static void foo(void) { int k; for (int i = 0; i < 10; i++) { for (int j = 3; j < 5; j++) { if (i == j) { k = j / i; /* OK */ } else { k = j / i; /* W0093 */ } } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0093 | 11 | 23 | | C1000 | | | | C1006 | 5 | 14 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: narrowing denominator variable by an iteration controlling variable which has narrower value domain contains zero Given a target source named "fixture.c" with: """ static void foo(void) { int k; for (int i = -5; i < 5; i++) { for (int j = -1; j < 2; j++) { if (i == j) { k = j / i; /* W0093 */ } else { k = j / i; /* OK */ } } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0093 | 8 | 23 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: possible zero-devide because of an incomplete if-else-if statement Given a target source named "fixture.c" with: """ int foo(int i) { int j = 0; if (i < 0) { /* false */ j = -i; } else if (i > 0) { /* false */ j = i; } return 5 / j; /* W0093 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0093 | 12 | 14 | | C1000 | | | | C1006 | 3 | 9 | | C1002 | 5 | 11 | | C1002 | 8 | 16 | | W0104 | 1 | 13 | | W1069 | 5 | 5 | | W0628 | 1 | 5 | Scenario: possible zero-devide because of an incomplete if-else-if statement Given a target source named "fixture.c" with: """ int foo(int i) { int j; if (i < 0) { /* false */ j = -i; } else if (i > 0) { j = i; /* false */ } return 5 / j; /* W0093 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0460 | 12 | 14 | | C1000 | | | | C1003 | 3 | 9 | | C1002 | 5 | 11 | | C1002 | 8 | 16 | | W0093 | 12 | 14 | | C1000 | | | | C1006 | 3 | 9 | | C1002 | 5 | 11 | | C1002 | 8 | 16 | | W0104 | 1 | 13 | | W1069 | 5 | 5 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W1050.feature0000644000004100000410000000302312224440633020773 0ustar www-datawww-dataFeature: W1050 W1050 detects that an explicit conversion to signed integer must cause overflow. Scenario: conversion from `int' to `signed char' Given a target source named "fixture.c" with: """ static void foo(const int i) { if (i > 127) { const signed char c = (signed char) i; /* W1050 */ } if (i < -128) { const signed char c = (signed char) i; /* W1050 */ } if (i > 100) { const signed char c = (signed char) i; /* OK but W1049 */ } if (i < -100) { const signed char c = (signed char) i; /* OK but W1049 */ } if (i > -129 && i < 128) { const signed char c = (signed char) i; /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W1050 | 4 | 31 | | C1000 | | | | C1006 | 1 | 27 | | W1050 | 7 | 31 | | C1000 | | | | C1006 | 1 | 27 | | W1049 | 11 | 31 | | C1000 | | | | C1006 | 1 | 27 | | W1049 | 14 | 31 | | C1000 | | | | C1006 | 1 | 27 | | W0629 | 1 | 13 | | W0489 | 17 | 9 | | W0490 | 17 | 9 | | W0499 | 17 | 9 | | W0502 | 17 | 9 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0483.feature0000644000004100000410000000415412224440633021012 0ustar www-datawww-dataFeature: W0483 W0483 detects that the macro defines only storage-class-specifier and type-qualifier. Scenario: storage-class-specifier and `const' qualifier Given a target source named "fixture.c" with: """ #define CONST_1 static const /* W0483 */ #define CONST_2 extern const /* W0483 */ #define CONST_3 auto const /* W0483 */ #define CONST_4 register const /* W0483 */ #define CONST_5 typedef const /* W0483 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0483 | 1 | 1 | | W0483 | 2 | 1 | | W0483 | 3 | 1 | | W0483 | 4 | 1 | | W0483 | 5 | 1 | Scenario: storage-class-specifier and `volatile' qualifier Given a target source named "fixture.c" with: """ #define VOL_1 static volatile /* W0483 */ #define VOL_2 extern volatile /* W0483 */ #define VOL_3 auto volatile /* W0483 */ #define VOL_4 register volatile /* W0483 */ #define VOL_5 typedef volatile /* W0483 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0483 | 1 | 1 | | W0483 | 2 | 1 | | W0483 | 3 | 1 | | W0483 | 4 | 1 | | W0483 | 5 | 1 | Scenario: storage-class-specifier, `const' qualifier and the others Given a target source named "fixture.c" with: """ #define MACRO static const int a /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | Scenario: storage-class-specifier, `volatile' qualifier and the others Given a target source named "fixture.c" with: """ #define MACRO volatile static int a /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | adlint-3.2.0/features/code_check/W0612.feature0000644000004100000410000000144712224440633021006 0ustar www-datawww-dataFeature: W0612 W0612 detects that a controlling expression of the selection-statement always be true. Scenario: bitwise and expression as the controlling expression Given a target source named "fixture.c" with: """ void foo(unsigned int ui) { while (ui) { if (ui & 1) { /* OK not W0612 */ break; } else { ui >>= 1; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0167 | 4 | 18 | | W0572 | 4 | 16 | | W0114 | 3 | 5 | | W0114 | 4 | 9 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0179.feature0000644000004100000410000001115112224440633021007 0ustar www-datawww-dataFeature: W0179 W0179 detects that `long long' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned int b = a; /* W0179 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0179 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 22 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 18 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned int b; b = a; /* W0179 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0179 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 18 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(long long a) { bar(a); /* W0179 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0179 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(long long a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(long long a) { return a; /* W0179 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0179 | 3 | 12 | | W0315 | 3 | 5 | | W0104 | 1 | 28 | | W0834 | 1 | 18 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(long long a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 28 | | W0104 | 1 | 28 | | W0834 | 1 | 18 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W1073.feature0000644000004100000410000001756412224440633021017 0ustar www-datawww-dataFeature: W1073 W1073 detects that a return value of the function is discarded. Scenario: simply discarding a return value Given a target source named "fixture.c" with: """ extern int bar(void); static void foo(void) { bar(); /* W1073 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 2 | 13 | | W1073 | 4 | 8 | | W0629 | 2 | 13 | | W0628 | 2 | 13 | Scenario: calling `void' function Given a target source named "fixture.c" with: """ extern void bar(void); static void foo(void) { bar(); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W1076 | 2 | 13 | | W0629 | 2 | 13 | | W0628 | 2 | 13 | Scenario: discarding return value in comma separated expression Given a target source named "fixture.c" with: """ extern int bar(void); extern int baz(void); static void foo(void) { int i; i = (bar(), baz()); /* W1073 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W1076 | 3 | 13 | | W0100 | 5 | 9 | | W1073 | 6 | 13 | | W0629 | 3 | 13 | | W0447 | 6 | 10 | | W0628 | 3 | 13 | Scenario: discarding return value in for-statement Given a target source named "fixture.c" with: """ extern int bar(void); static void foo(void) { int i; int j; for (i = 0, bar(); i < 10; i++) { /* W1073 */ j = bar(); /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 2 | 13 | | W1073 | 6 | 20 | | W0629 | 2 | 13 | | W0535 | 6 | 10 | | W0628 | 2 | 13 | Scenario: no assignment but not discarding the return value Given a target source named "fixture.c" with: """ extern int bar(void); static void foo(void) { if (bar() == 0) { /* OK */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 2 | 13 | | W1071 | 2 | 13 | | W0629 | 2 | 13 | | W0628 | 2 | 13 | Scenario: propagating the return value Given a target source named "fixture.c" with: """ extern int bar(void); static int foo(void) { return bar(); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 2 | 12 | | W0629 | 2 | 12 | | W0628 | 2 | 12 | Scenario: propagating the return value in a conditional-expression Given a target source named "fixture.c" with: """ extern int bar(void); extern int baz(void); static int foo(void) { return bar() == 0 ? baz() : 0; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0501 | 5 | 23 | | W0010 | 5 | 23 | | W0086 | 5 | 23 | | W0628 | 3 | 12 | Scenario: standalone function-call-expression as the controlling expression of if-statement Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(void) { int i = 0; if (bar(&i)) { /* OK */ return i; } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0114 | 6 | 5 | | W0628 | 3 | 12 | Scenario: standalone function-call-expression as the controlling expression of if-else-statement Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(void) { int i = 0; if (bar(&i)) { /* OK */ return i; } else { return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0114 | 6 | 5 | | W0628 | 3 | 12 | Scenario: standalone function-call-expression as the controlling expression of while-statement Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(void) { int i = 0; while (bar(&i)) { /* OK */ i++; } return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0114 | 6 | 5 | | W0628 | 3 | 12 | Scenario: standalone function-call-expression as the controlling expression of do-statement Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(void) { int i = 0; do { i++; } while (bar(&i)); /* OK */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0114 | 6 | 5 | | W0628 | 3 | 12 | Scenario: standalone function-call-expression as the controlling expression of for-statement Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(void) { int i, j = 0; for (i = 0; bar(&i); i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0114 | 6 | 5 | | W0425 | 5 | 12 | | W0628 | 3 | 12 | Scenario: standalone function-call-expression as the controlling expression of c99-for-statement Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(void) { int j = 0; for (int i = 0; bar(&i); i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0114 | 6 | 5 | | W0628 | 3 | 12 | adlint-3.2.0/features/code_check/W1068.feature0000644000004100000410000000633612224440633021016 0ustar www-datawww-dataFeature: W1068 W1068 detects that a value of the `double' typed compound expression is explicitly converted into a `long double' value. Scenario: explicit conversion from `double' to `long double' when the source value is derived from `+', `-', `*' or `/' expressions Given a target source named "fixture.c" with: """ static void func(double a, double b) { long double c; c = (long double) (a + b); /* W1068 */ c = (long double) (a - b); /* W1068 */ c = (long double) (a * b); /* W1068 */ c = (long double) (a / b); /* W1068 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 4 | 26 | | W1068 | 4 | 26 | | W0723 | 5 | 26 | | W1068 | 5 | 26 | | W0723 | 6 | 26 | | W1068 | 6 | 26 | | W0093 | 7 | 26 | | C1000 | | | | C1006 | 1 | 35 | | W1068 | 7 | 26 | | W0104 | 1 | 25 | | W0104 | 1 | 35 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: explicit conversion from `double' to `long double' when the source value is not derived from `+', `-', `*' or `/' expressions Given a target source named "fixture.c" with: """ static void func(double a, double b) { long double c; c = (long double) (a % b); /* OK */ c = (long double) (a < b); /* OK */ c = (long double) (a << b); /* OK */ c = (long double) (a ^ b); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0093 | 4 | 26 | | C1000 | | | | C1006 | 1 | 35 | | W0570 | 6 | 26 | | C1000 | | | | C1006 | 1 | 25 | | W0572 | 6 | 26 | | W0794 | 6 | 26 | | W0572 | 7 | 26 | | W0104 | 1 | 25 | | W0104 | 1 | 35 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: implicit conversion from `double' to `long double' Given a target source named "fixture.c" with: """ static void func(double a, double b) { long double c; c = a + b; /* W0779 */ c = a - b; /* W0779 */ c = a * b; /* W0779 */ c = a / b; /* W0779 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 4 | 11 | | W0779 | 4 | 11 | | W0723 | 5 | 11 | | W0779 | 5 | 11 | | W0723 | 6 | 11 | | W0779 | 6 | 11 | | W0093 | 7 | 11 | | C1000 | | | | C1006 | 1 | 35 | | W0779 | 7 | 11 | | W0104 | 1 | 25 | | W0104 | 1 | 35 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0210.feature0000644000004100000410000001035612224440633020777 0ustar www-datawww-dataFeature: W0210 W0210 detects that `unsigned long long' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { double b = a; /* W0210 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0210 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { double b; b = a; /* W0210 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0210 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned long long a) { bar(a); /* W0210 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0210 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned long long a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned long long a) { return a; /* W0210 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0210 | 3 | 12 | | W0346 | 3 | 5 | | W0104 | 1 | 31 | | W0834 | 1 | 12 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned long long a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 31 | | W0834 | 1 | 12 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0225.feature0000644000004100000410000000775012224440633021011 0ustar www-datawww-dataFeature: W0225 W0225 detects that `double' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned short b = a; /* W0225 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0225 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned short b; b = a; /* W0225 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0225 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(double a) { bar(a); /* W0225 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0225 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(double a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(double a) { return a; /* W0225 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0225 | 3 | 12 | | W0361 | 3 | 5 | | W0104 | 1 | 27 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(double a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0104 | 1 | 27 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0459.feature0000644000004100000410000000732612224440633021021 0ustar www-datawww-dataFeature: W0459 W0459 detects that the variable is not initialized at point of the expression evaluation. Scenario: variable initialization by a function via the output parameter Given a target source named "fixture.c" with: """ extern void foo(int ***); extern void bar(int **); void baz(int i) { int **p; foo(i == 0 ? NULL : &p); bar(p); } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0118 | 2 | 13 | | W0117 | 4 | 6 | | W0459 | 7 | 25 | | C1000 | | | | C1003 | 6 | 11 | | W0100 | 6 | 11 | | W0104 | 4 | 14 | | W0501 | 7 | 16 | | W0628 | 4 | 6 | Scenario: reference to the uninitialized nested array element of the indefinite subscript Given a target source named "fixture.c" with: """ int foo(int i) { int a[3][3]; /* W0100 */ return a[i][i]; /* W0459 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0705 | 4 | 14 | | C1000 | | | | C1006 | 1 | 13 | | W0705 | 4 | 17 | | C1000 | | | | C1006 | 1 | 13 | | W0459 | 4 | 16 | | C1000 | | | | C1003 | 3 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 13 | | W0950 | 3 | 14 | | W0950 | 3 | 11 | | W0628 | 1 | 5 | Scenario: reference to the initialized array element of the indefinite subscript Given a target source named "fixture.c" with: """ int foo(int i) { int a[3] = { 0 }; if (i < 3) { return a[i]; /* OK not W0459 */ } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0705 | 6 | 18 | | C1000 | | | | C1006 | 1 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0950 | 3 | 11 | | W0628 | 1 | 5 | Scenario: assign value to the variable in a switch-statement in an iteration-statement Given a target source named "fixture.c" with: """ extern void bar(int *); int foo(int a[]) { int i; int j; for (i = 0; a[i]; i++) { switch (a[i]) { case 0: bar(&j); break; case 2: bar(&j); break; default: break; } } return j; /* OK but W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0459 | 14 | 17 | | C1000 | | | | C1003 | 6 | 9 | | W0460 | 21 | 12 | | C1000 | | | | C1003 | 6 | 9 | | C1001 | 8 | 18 | | C1002 | 13 | 9 | | W0104 | 3 | 13 | | W9001 | 10 | 9 | | W9001 | 11 | 13 | | W9001 | 12 | 13 | | W0114 | 8 | 5 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0240.feature0000644000004100000410000001062512224440633021001 0ustar www-datawww-dataFeature: W0240 W0240 detects that `float' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long long b = a; /* W0240 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0240 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long long b; b = a; /* W0240 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0240 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(float a) { bar(a); /* W0240 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0240 | 5 | 9 | | W0104 | 3 | 16 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(float a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(float a) { return a; /* W0240 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0240 | 3 | 12 | | W0376 | 3 | 5 | | W0104 | 1 | 30 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(float a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0104 | 1 | 30 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0787.feature0000644000004100000410000000345612224440633021025 0ustar www-datawww-dataFeature: W0787 W0787 detects that a variable defined with a type which is different with one of previously defined variable in the other scope. Scenario: different types of local variables of the same name Given a target source named "fixture.c" with: """ int foo(void) { int retval = 0; return retval; } long bar(void) { long retval = 0; /* OK */ return retval; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 9 | | W0117 | 7 | 6 | | W0100 | 9 | 10 | | W0628 | 1 | 5 | | W0628 | 7 | 6 | Scenario: different types of `extern' variables of the same name Given a target source named "fixture.c" with: """ void foo(void) { extern int retval; retval = 0; } void bar(void) { extern long retval; /* W0787 */ retval = 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0118 | 3 | 16 | | W0623 | 3 | 16 | | W0117 | 7 | 6 | | W0118 | 9 | 17 | | W0623 | 9 | 17 | | W0787 | 9 | 17 | | C0001 | 3 | 16 | | W0628 | 1 | 6 | | W0628 | 7 | 6 | | W0770 | 3 | 16 | | C0001 | 9 | 17 | | W1037 | 3 | 16 | | C0001 | 9 | 17 | | W0770 | 9 | 17 | | C0001 | 3 | 16 | | W1037 | 9 | 17 | | C0001 | 3 | 16 | adlint-3.2.0/features/code_check/W1039.feature0000644000004100000410000001726012224440633021012 0ustar www-datawww-dataFeature: W1039 W1039 detects that an `ll' length-modifier is found in *printf or *scanf function call. Scenario: an `ll' in printf function call Given a target source named "fixture.c" with: """ #include void foo(long long ll) { printf("%lld", ll); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W0104 | 3 | 20 | | W1073 | 5 | 11 | | W0834 | 3 | 10 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: an `ll' in scanf function call Given a target source named "fixture.c" with: """ #include void foo(void) { long long ll = 0; scanf("%lld", &ll); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 6 | 11 | | W1073 | 6 | 10 | | W0834 | 5 | 5 | | W0947 | 6 | 11 | | W0628 | 3 | 6 | Scenario: an `ll' with one of conversion-specifiers in printf function call Given a target source named "fixture.c" with: """ #include void foo(int i, long long ll, unsigned long ul) { printf("%d %lld %lu", i, ll, ul); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W0104 | 3 | 14 | | W0104 | 3 | 27 | | W0104 | 3 | 45 | | W1073 | 5 | 11 | | W0834 | 3 | 17 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: an `ll' with one of conversion-specifiers in scanf function call Given a target source named "fixture.c" with: """ #include void foo(void) { int i = 0; long long ll = 0; unsigned long ul = 0U; scanf("%d %lld %lu", &i, &ll, &ul); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 8 | 11 | | W1073 | 8 | 10 | | W0834 | 6 | 5 | | W0947 | 8 | 11 | | W0628 | 3 | 6 | Scenario: an `ll' with conversion-specifier `i' in printf function call Given a target source named "fixture.c" with: """ #include void foo(long long ll) { printf("%lli", ll); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W0104 | 3 | 20 | | W1073 | 5 | 11 | | W0834 | 3 | 10 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: an `ll' with conversion-specifier `o' in printf function call Given a target source named "fixture.c" with: """ #include void foo(unsigned long long ull) { printf("%llo", ull); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W0104 | 3 | 29 | | W1073 | 5 | 11 | | W0834 | 3 | 10 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: an `ll' with conversion-specifier `u' in printf function call Given a target source named "fixture.c" with: """ #include void foo(unsigned long long ull) { printf("%llu", ull); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W0104 | 3 | 29 | | W1073 | 5 | 11 | | W0834 | 3 | 10 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: an `ll' with conversion-specifier `x' in printf function call Given a target source named "fixture.c" with: """ #include void foo(unsigned long long ull) { printf("%llx", ull); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W0104 | 3 | 29 | | W1073 | 5 | 11 | | W0834 | 3 | 10 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: an `ll' with conversion-specifier `X' in printf function call Given a target source named "fixture.c" with: """ #include void foo(unsigned long long ull) { printf("%llX", ull); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W0104 | 3 | 29 | | W1073 | 5 | 11 | | W0834 | 3 | 10 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: an `ll' with conversion-specifier `d' in fprintf function call Given a target source named "fixture.c" with: """ #include void foo(long long ll) { fprintf(stdout, "%lld", ll); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 21 | | W0104 | 3 | 20 | | W1073 | 5 | 12 | | W0834 | 3 | 10 | | W0947 | 5 | 21 | | W0628 | 3 | 6 | Scenario: multiple `ll' in printf function call Given a target source named "fixture.c" with: """ #include void foo(long long ll, unsigned long long ull) { printf("%lld %llu", ll, ull); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 5 | 12 | | W1039 | 5 | 12 | | W0104 | 3 | 20 | | W0104 | 3 | 43 | | W1073 | 5 | 11 | | W0834 | 3 | 10 | | W0834 | 3 | 24 | | W0947 | 5 | 12 | | W0628 | 3 | 6 | Scenario: multiple `ll' in scanf function call Given a target source named "fixture.c" with: """ #include void foo(void) { long long ll = 0; unsigned long long ull = 0U; scanf("%lld %llu", &ll, &ull); /* W1039 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W1039 | 7 | 11 | | W1039 | 7 | 11 | | W1073 | 7 | 10 | | W0834 | 5 | 5 | | W0834 | 6 | 5 | | W0947 | 7 | 11 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0222.feature0000644000004100000410000000770112224440633021002 0ustar www-datawww-dataFeature: W0222 W0222 detects that `double' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { signed char b = a; /* W0222 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0222 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { signed char b; b = a; /* W0222 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0222 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(double a) { bar(a); /* W0222 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0222 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(double a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(double a) { return a; /* W0222 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0222 | 3 | 12 | | W0358 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(double a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 24 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0834.feature0000644000004100000410000001364612224440633021020 0ustar www-datawww-dataFeature: W0834 W0834 detects that a `long long' type of the ISO C99 standard is used. Scenario: `long long' global variable declaration Given a target source named "fixture.c" with: """ extern long long ll; /* W0834 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 18 | | W0834 | 1 | 8 | Scenario: `long long' global variable definition Given a target source named "fixture.c" with: """ static long long ll; /* W0834 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0834 | 1 | 8 | Scenario: `long long' parameter in function declaration Given a target source named "fixture.c" with: """ extern void foo(long long ll); /* W0834 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0834 | 1 | 17 | Scenario: `long long' parameter in function definition Given a target source named "fixture.c" with: """ static void foo(long long ll) /* W0834 */ { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0031 | 1 | 27 | | W0104 | 1 | 27 | | W0629 | 1 | 13 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | Scenario: `long long' function local variable definition Given a target source named "fixture.c" with: """ static void foo(void) { long long ll = 0; /* W0834 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0100 | 3 | 15 | | W0629 | 1 | 13 | | W0834 | 3 | 5 | | W0628 | 1 | 13 | Scenario: `long long' as return type in function declaration Given a target source named "fixture.c" with: """ extern long long foo(void); /* W0834 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 18 | | W0834 | 1 | 8 | Scenario: `long long' as return type in function definition Given a target source named "fixture.c" with: """ static long long foo(void) /* W0834 */ { return 0LL; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 18 | | W0833 | 3 | 12 | | W0629 | 1 | 18 | | W0834 | 1 | 8 | | W0628 | 1 | 18 | Scenario: `long long' in cast-expression Given a target source named "fixture.c" with: """ static long long foo(void) /* W0834 */ { return (long long) 0; /* W0834 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 18 | | W0629 | 1 | 18 | | W0834 | 1 | 8 | | W0834 | 3 | 13 | | W0628 | 1 | 18 | Scenario: `long long' in sizeof-expression Given a target source named "fixture.c" with: """ #include static size_t foo(void) { return sizeof(long long); /* W0834 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 15 | | W0629 | 3 | 15 | | W0834 | 5 | 19 | | W0628 | 3 | 15 | Scenario: multiple `long long' parameters in function declaration Given a target source named "fixture.c" with: """ extern void foo(long long a, int b, long long b); /* W0834 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0834 | 1 | 17 | | W0834 | 1 | 37 | Scenario: nested function-declarators with `long long' Given a target source named "fixture.c" with: """ extern void (*p)(long long, int (*)(long long), unsigned long long); /* W0834 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 15 | | W0834 | 1 | 18 | | W0834 | 1 | 37 | | W0834 | 1 | 49 | Scenario: `long long' member in struct and union type. Given a target source named "fixture.c" with: """ struct Foo { int i; long long ll; /* W0834 */ union { int i; long long ll; /* W0834 */ } u; } foo; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 8 | 3 | | W0834 | 3 | 5 | | W0834 | 6 | 9 | | W0551 | 4 | 5 | Scenario: nested function-declarators with `long long' in typedef declaration Given a target source named "fixture.c" with: """ typedef void (*p)(long long, int (*)(long long), signed long long); /* W0834 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0834 | 1 | 19 | | W0834 | 1 | 38 | | W0834 | 1 | 50 | adlint-3.2.0/features/code_check/W0088.feature0000644000004100000410000001111012224440633021001 0ustar www-datawww-dataFeature: W0088 W0088 detects that right-hand-side of the logical-expression in a standalone expression-statement has no side-effect. Scenario: no side-effect in a standalone expression-statement Given a target source named "fixture.c" with: """ static int foo(int n) { int i = bar(); (i < n) && (i < 10); /* W0088 */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0109 | 3 | 13 | | W0088 | 4 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 20 | | W0629 | 1 | 12 | | W0085 | 4 | 5 | | W0628 | 1 | 12 | Scenario: side-effect in a standalone expression-statement Given a target source named "fixture.c" with: """ static int foo(int n) { int i = bar(); (i < n) && (i++); /* OK */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0109 | 3 | 13 | | W0104 | 1 | 20 | | W0629 | 1 | 12 | | W0508 | 4 | 13 | | W0735 | 4 | 16 | | W0512 | 4 | 18 | | W0628 | 1 | 12 | Scenario: no side-effect in controlling expression of for-statement Given a target source named "fixture.c" with: """ static int foo(int n) { int i, j = 0; for (i = 0; (i < n) && (i < 10); i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0629 | 1 | 12 | | W0425 | 3 | 12 | | W0628 | 1 | 12 | Scenario: no side-effect in right-most expression of a standalone expression-statement Given a target source named "fixture.c" with: """ extern int foo(int); extern int bar(int); static void baz(int i, int j, int k) { (i > 0) && foo(i) && bar(j) && k; /* W0088 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W1076 | 4 | 13 | | W0088 | 6 | 33 | | W0104 | 4 | 21 | | W0104 | 4 | 28 | | W0104 | 4 | 35 | | W0629 | 4 | 13 | | W0488 | 6 | 5 | | W0508 | 6 | 23 | | W0508 | 6 | 13 | | W0628 | 4 | 13 | Scenario: no side-effect in right-most expression of an assignment-expression Given a target source named "fixture.c" with: """ extern int foo(int); extern int bar(int); static void baz(int i, int j, int k) { int l = 0; l = (i > 0) && foo(i) && bar(j) && k; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W1076 | 4 | 13 | | W0104 | 4 | 21 | | W0104 | 4 | 28 | | W0104 | 4 | 35 | | W0629 | 4 | 13 | | W0488 | 7 | 5 | | W0508 | 7 | 27 | | W0508 | 7 | 17 | | W0628 | 4 | 13 | Scenario: no side-effect in argument expressions of function-call-expression Given a target source named "fixture.c" with: """ extern int foo(int); extern int bar(int); extern void baz(const char *, ...); static void qux(int i, int j, int k) { baz("", (i > 0) && foo(i) && bar(i || j) && k); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W0104 | 5 | 21 | | W0104 | 5 | 28 | | W0104 | 5 | 35 | | W0629 | 5 | 13 | | W0488 | 7 | 13 | | W0947 | 7 | 9 | | W0508 | 7 | 31 | | W0508 | 7 | 21 | | W0628 | 5 | 13 | adlint-3.2.0/features/code_check/W0713.feature0000644000004100000410000000642712224440633021013 0ustar www-datawww-dataFeature: W0713 W0713 detects that operands of both sides of relational expression is `effectively boolean'. Scenario: relational expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a > b) > (c > d); /* W0713 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0713 | 3 | 20 | | W0628 | 1 | 12 | Scenario: an equality expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a == b) > (c != d); /* W0713 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0713 | 3 | 21 | | W0628 | 1 | 12 | Scenario: logical expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a && b) > (c || d); /* W0713 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0713 | 3 | 21 | | W0628 | 1 | 12 | Scenario: shift expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a << b) > (c ^ d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0570 | 3 | 15 | | C1000 | | | | C1006 | 1 | 20 | | W0572 | 3 | 15 | | W0794 | 3 | 15 | | W0572 | 3 | 26 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: arithmetic expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) > (c - d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 25 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0570.feature0000644000004100000410000000264112224440633021006 0ustar www-datawww-dataFeature: W0570 W0570 detects that a signed left-shift expression may cause undefined behavior because of overflow. Scenario: left-shift expression with `int' operand Given a target source named "fixture.c" with: """ static void foo(int i) { if (i > 0 && i <= 0x1FFFFFFF) { i << 1; /* OK */ i << 2; /* OK */ i << 3; /* W0570 */ i << 4; /* W0570 */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0076 | 3 | 23 | | W0572 | 4 | 11 | | W0794 | 4 | 11 | | W0572 | 5 | 11 | | W0794 | 5 | 11 | | W0570 | 6 | 11 | | C1000 | | | | C1006 | 1 | 21 | | W0572 | 6 | 11 | | W0794 | 6 | 11 | | W0570 | 7 | 11 | | C1000 | | | | C1006 | 1 | 21 | | W0572 | 7 | 11 | | W0794 | 7 | 11 | | W0104 | 1 | 21 | | W0629 | 1 | 13 | | W0490 | 3 | 9 | | W0499 | 3 | 9 | | W0502 | 3 | 9 | | W0085 | 4 | 9 | | W0085 | 5 | 9 | | W0085 | 6 | 9 | | W0085 | 7 | 9 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0154.feature0000644000004100000410000001110512224440633020777 0ustar www-datawww-dataFeature: W0154 W0154 detects that `unsigned long long' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { int b = a; /* W0154 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0154 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 13 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 9 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { int b; b = a; /* W0154 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0154 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 9 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned long long a) { bar(a); /* W0154 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0154 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned long long a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 29 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned long long a) { return a; /* W0154 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0154 | 3 | 12 | | W0290 | 3 | 5 | | W0104 | 1 | 28 | | W0834 | 1 | 9 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned long long a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 28 | | W0104 | 1 | 28 | | W0834 | 1 | 9 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0190.feature0000644000004100000410000000767012224440633021013 0ustar www-datawww-dataFeature: W0190 W0190 detects that `short' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { long double b = a; /* W0190 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0190 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { long double b; b = a; /* W0190 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0190 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(short a) { bar(a); /* W0190 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0190 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(short a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(short a) { return a; /* W0190 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0190 | 3 | 12 | | W0326 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(short a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 23 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0169.feature0000644000004100000410000001051112224440633021005 0ustar www-datawww-dataFeature: W0169 W0169 detects that `long' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned char b = a; /* W0169 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0169 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned char b; b = a; /* W0169 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0169 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(long a) { bar(a); /* W0169 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0169 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(long a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(long a) { return a; /* W0169 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0169 | 3 | 12 | | W0305 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(long a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 24 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0700.feature0000644000004100000410000000314312224440633020777 0ustar www-datawww-dataFeature: W0700 W0700 detects that no `return' statements with expression is in the function which is implicitly declared to return `int' value. Scenario: no `return' statement in the implicitly typed function Given a target source named "fixture.c" with: """ extern func(void) /* W0700 */ { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0697 | 1 | 8 | | W0700 | 1 | 8 | | W0457 | 1 | 8 | | W0628 | 1 | 8 | Scenario: a `return' statement without expression in the implicitly typed function Given a target source named "fixture.c" with: """ extern func(void) /* W0700 */ { return; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0700 | 1 | 8 | | W0457 | 1 | 8 | | W0699 | 3 | 5 | | W0628 | 1 | 8 | Scenario: a `return' statement with expression in the implicitly typed function Given a target source named "fixture.c" with: """ extern func(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0457 | 1 | 8 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W1066.feature0000644000004100000410000000621112224440633021004 0ustar www-datawww-dataFeature: W1066 W1066 detects that a value of the `float' typed compound expression is explicitly converted into a `double' value. Scenario: explicit conversion from `float' to `double' when the source value is derived from `+', `-', `*' or `/' expressions Given a target source named "fixture.c" with: """ static void func(float a, float b) { double c; c = (double) (a + b); /* W1066 */ c = (double) (a - b); /* W1066 */ c = (double) (a * b); /* W1066 */ c = (double) (a / b); /* W1066 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 4 | 21 | | W1066 | 4 | 21 | | W0723 | 5 | 21 | | W1066 | 5 | 21 | | W0723 | 6 | 21 | | W1066 | 6 | 21 | | W0093 | 7 | 21 | | C1000 | | | | C1006 | 1 | 33 | | W1066 | 7 | 21 | | W0104 | 1 | 24 | | W0104 | 1 | 33 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: explicit conversion from `float' to `double' when the source value is not derived from `+', `-', `*' or `/' expressions Given a target source named "fixture.c" with: """ static void func(float a, float b) { double c; c = (double) (a % b); /* OK */ c = (double) (a < b); /* OK */ c = (double) (a << b); /* OK */ c = (double) (a ^ b); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0093 | 4 | 21 | | C1000 | | | | C1006 | 1 | 33 | | W0570 | 6 | 21 | | C1000 | | | | C1006 | 1 | 24 | | W0572 | 6 | 21 | | W0794 | 6 | 21 | | W0572 | 7 | 21 | | W0104 | 1 | 24 | | W0104 | 1 | 33 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: implicit conversion from `float' to `double' Given a target source named "fixture.c" with: """ static void func(float a, float b) { double c; c = a + b; /* W0777 */ c = a - b; /* W0777 */ c = a * b; /* W0777 */ c = a / b; /* W0777 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 4 | 11 | | W0777 | 4 | 11 | | W0723 | 5 | 11 | | W0777 | 5 | 11 | | W0723 | 6 | 11 | | W0777 | 6 | 11 | | W0093 | 7 | 11 | | C1000 | | | | C1006 | 1 | 33 | | W0777 | 7 | 11 | | W0104 | 1 | 24 | | W0104 | 1 | 33 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0807.feature0000644000004100000410000000203212224440633021003 0ustar www-datawww-dataFeature: W0807 W0807 detects that it undefined the macro defined as pre-defined. Scenario: undefine the macro defined as pre-defined Given a target source named "fixture.c" with: """ #undef __STDC_VERSION__ /* W0807 */ #undef __LINE__ /* W0807 */ #undef __FILE__ /* W0807 */ #undef __DATE__ /* W0807 */ #undef __TIME__ /* W0807 */ #undef __STDC__ /* W0807 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0807 | 1 | 8 | | W0807 | 2 | 8 | | W0807 | 3 | 8 | | W0807 | 4 | 8 | | W0807 | 5 | 8 | | W0807 | 6 | 8 | Scenario: undefine the macro defined by the user Given a target source named "fixture.c" with: """ #define LINE !LINE #undef LINE """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W0760.feature0000644000004100000410000001101612224440633021003 0ustar www-datawww-dataFeature: W0760 W0760 detects that `long long' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { short b = a; /* W0760 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0760 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 15 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { short b; b = a; /* W0760 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0760 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(long long a) { bar(a); /* W0760 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0760 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(long long a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(long long a) { return a; /* W0760 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0760 | 3 | 12 | | W0394 | 3 | 5 | | W0104 | 1 | 21 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(long long a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 21 | | W0104 | 1 | 21 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0121.feature0000644000004100000410000000754112224440633021002 0ustar www-datawww-dataFeature: W0121 W0121 detects that `char' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { short b = a; /* W0121 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0121 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { short b; b = a; /* W0121 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0121 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(char a) { bar(a); /* W0121 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0121 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(char a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(char a) { return a; /* W0121 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0121 | 3 | 12 | | W0257 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(char a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0253.feature0000644000004100000410000001053512224440633021005 0ustar www-datawww-dataFeature: W0253 W0253 detects that `unsigned int' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long long b = a; /* W0253 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0253 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 23 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 23 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long long b; b = a; /* W0253 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0253 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 23 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 23 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned int a) { bar(a); /* W0253 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0253 | 5 | 9 | | W0104 | 3 | 23 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned int a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 23 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned int a) { return a; /* W0253 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0253 | 3 | 12 | | W0409 | 3 | 5 | | W0104 | 1 | 28 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned int a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 28 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W9001.feature0000644000004100000410000000265412224440633021010 0ustar www-datawww-dataFeature: W9001 W9001 detects that the control never reach to a statement. Scenario: indefinitive controlling variable narrowing Given a target source named "fixture.c" with: """ static void bar(int); int main(void) { int i; int j; for (i = 0; i < 10; i++) { for (j = 0; j < 10; j++) { if (i == j) { bar(1); } else { bar(2); /* W9001 should not be output */ } } } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: indefinitive controlling variable narrowing Given a target source named "fixture.c" with: """ void foo(int i) { if (i > 0) { do { puts("foo"); /* OK not W9001 */ } while (i == -1); } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0109 | 5 | 13 | | W0610 | 6 | 20 | | W0614 | 6 | 20 | | W0104 | 1 | 14 | | W1073 | 5 | 17 | | W0947 | 5 | 18 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0499.feature0000644000004100000410000000443412224440633021022 0ustar www-datawww-dataFeature: W0499 W0499 detects that different operators of the same priority except for `+', `-', `*', `/' and `%' appear in an expression without appropriate grouping. Scenario: multiple shift-expressions in an expression Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return a << b >> c; /* W0499 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 38 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0499 | 3 | 12 | | W0628 | 1 | 21 | Scenario: multiple shift-expressions in an expression with grouping Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return (a << b) >> c; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0116 | 3 | 15 | | C1000 | | | | C1006 | 1 | 38 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0628 | 1 | 21 | Scenario: multiple shift-expressions in an expression with large grouping Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return (a << b >> c); /* W0499 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0116 | 3 | 15 | | C1000 | | | | C1006 | 1 | 38 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0499 | 3 | 12 | | W0628 | 1 | 21 | adlint-3.2.0/features/code_check/W0734.feature0000644000004100000410000002371712224440633021017 0ustar www-datawww-dataFeature: W0734 W0734 detects that left side of logical expression is bitwise expression or arithmetic expression. Scenario: left side of `&&' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = (a + b) && c; /* W0734 */ r = (a - b) && c; /* W0734 */ r = (a * b) && c; /* W0734 */ r = (a / b) && c; /* W0734 */ r = (a % b) && c; /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 12 | | W0723 | 6 | 12 | | W0723 | 7 | 12 | | W0093 | 8 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 9 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0628 | 1 | 13 | Scenario: left side of `&&' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a + b) && (c == d); /* W0734 */ r = (a - b) && (c = d); /* W0734 */ r = (a * b) && (c && d); /* W0734 */ r = (a / b) && (c < d); /* W0734 */ r = (a / b) && (c != d); /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 12 | | W0723 | 6 | 12 | | W0723 | 7 | 12 | | W0093 | 8 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 9 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0508 | 6 | 17 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0108 | 6 | 23 | | W0628 | 1 | 13 | Scenario: left side of `||' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = (a + b) || c; /* W0734 */ r = (a - b) || c; /* W0734 */ r = (a * b) || c; /* W0734 */ r = (a / b) || c; /* W0734 */ r = (a % b) || c; /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 12 | | W0723 | 6 | 12 | | W0723 | 7 | 12 | | W0093 | 8 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 9 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0628 | 1 | 13 | Scenario: left side of `||' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a + b) || (c == d); /* W0734 */ r = (a - b) || (c = d); /* W0734 */ r = (a * b) || (c || d); /* W0734 */ r = (a / b) || (c < d); /* W0734 */ r = (a / b) || (c != d); /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 12 | | W0723 | 6 | 12 | | W0723 | 7 | 12 | | W0093 | 8 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 9 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0508 | 6 | 17 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0108 | 6 | 23 | | W0628 | 1 | 13 | Scenario: left side of `&&' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = (a << b) && c; /* W0734 */ r = (a >> b) && c; /* W0734 */ r = (a & b) && c; /* W0734 */ r = (a ^ b) && c; /* W0734 */ r = (a | b) && c; /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0572 | 5 | 12 | | W0794 | 5 | 12 | | W0571 | 6 | 12 | | W0572 | 6 | 12 | | W0572 | 7 | 12 | | W0572 | 8 | 12 | | W0572 | 9 | 12 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0628 | 1 | 13 | Scenario: left side of `||' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = (a << b) || c; /* W0734 */ r = (a >> b) || c; /* W0734 */ r = (a & b) || c; /* W0734 */ r = (a ^ b) || c; /* W0734 */ r = (a | b) || c; /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0572 | 5 | 12 | | W0794 | 5 | 12 | | W0571 | 6 | 12 | | W0572 | 6 | 12 | | W0572 | 7 | 12 | | W0572 | 8 | 12 | | W0572 | 9 | 12 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0628 | 1 | 13 | Scenario: left side of `&&' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a << b) && (c == d); /* W0734 */ r = (a >> b) && (c = d); /* W0734 */ r = (a & b) && (c && d); /* W0734 */ r = (a ^ b) && (c < d); /* W0734 */ r = (a | b) && (c != d); /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0572 | 5 | 12 | | W0794 | 5 | 12 | | W0571 | 6 | 12 | | W0572 | 6 | 12 | | W0572 | 7 | 12 | | W0572 | 8 | 12 | | W0572 | 9 | 12 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0508 | 6 | 18 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0108 | 6 | 24 | | W0628 | 1 | 13 | Scenario: left side of `||' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a << b) || (c == d); /* W0734 */ r = (a >> b) || (c = d); /* W0734 */ r = (a & b) || (c && d); /* W0734 */ r = (a ^ b) || (c < d); /* W0734 */ r = (a | b) || (c != d); /* W0734 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0572 | 5 | 12 | | W0794 | 5 | 12 | | W0571 | 6 | 12 | | W0572 | 6 | 12 | | W0572 | 7 | 12 | | W0572 | 8 | 12 | | W0572 | 9 | 12 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0734 | 5 | 9 | | W0508 | 6 | 18 | | W0734 | 6 | 9 | | W0734 | 7 | 9 | | W0734 | 8 | 9 | | W0734 | 9 | 9 | | W0108 | 6 | 24 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0244.feature0000644000004100000410000001071312224440633021003 0ustar www-datawww-dataFeature: W0244 W0244 detects that `long double' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long long b = a; /* W0244 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0244 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long long b; b = a; /* W0244 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0244 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(long double a) { bar(a); /* W0244 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0244 | 5 | 9 | | W0104 | 3 | 22 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(long double a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(long double a) { return a; /* W0244 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0244 | 3 | 12 | | W0380 | 3 | 5 | | W0104 | 1 | 36 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(long double a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0104 | 1 | 36 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0216.feature0000644000004100000410000000773712224440633021016 0ustar www-datawww-dataFeature: W0216 W0216 detects that `float' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned short b = a; /* W0216 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0216 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned short b; b = a; /* W0216 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0216 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(float a) { bar(a); /* W0216 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0216 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(float a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(float a) { return a; /* W0216 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0216 | 3 | 12 | | W0352 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(float a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0104 | 1 | 26 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0100.feature0000644000004100000410000000434512224440633020776 0ustar www-datawww-dataFeature: W0100 W0100 detects that a variable is not reassigned since the initial value is assigned. Scenario: reassigning value to an array element of the indefinite subscript Given a target source named "fixture.c" with: """ void foo(int i) { int a[3]; /* OK not W0100 */ a[i] = 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0705 | 4 | 7 | | C1000 | | | | C1006 | 1 | 14 | | W0104 | 1 | 14 | | W0950 | 3 | 11 | | W0628 | 1 | 6 | Scenario: reassigning value to a nested array element of the indefinite subscript Given a target source named "fixture.c" with: """ void foo(int i) { int a[3][3]; /* OK not W0100 */ a[i][i] = 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0705 | 4 | 7 | | C1000 | | | | C1006 | 1 | 14 | | W0705 | 4 | 10 | | C1000 | | | | C1006 | 1 | 14 | | W0104 | 1 | 14 | | W0950 | 3 | 14 | | W0950 | 3 | 11 | | W0628 | 1 | 6 | Scenario: only reference to a nested array element of the indefinite subscript Given a target source named "fixture.c" with: """ void foo(int i) { int a[3][3]; /* W0100 */ a[i][i]; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0705 | 4 | 7 | | C1000 | | | | C1006 | 1 | 14 | | W0705 | 4 | 10 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 9 | | W0104 | 1 | 14 | | W0950 | 3 | 14 | | W0950 | 3 | 11 | | W0085 | 4 | 5 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0754.feature0000644000004100000410000001034112224440633021006 0ustar www-datawww-dataFeature: W0754 W0754 detects that `long' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { short b = a; /* W0754 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0754 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 15 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { short b; b = a; /* W0754 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0754 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(long a) { bar(a); /* W0754 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0754 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(long a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(long a) { return a; /* W0754 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0754 | 3 | 12 | | W0388 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(long a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 16 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0150.feature0000644000004100000410000001043012224440633020773 0ustar www-datawww-dataFeature: W0150 W0150 detects that `unsigned long' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { int b = a; /* W0150 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0150 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 13 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { int b; b = a; /* W0150 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0150 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned long a) { bar(a); /* W0150 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0150 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned long a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 24 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned long a) { return a; /* W0150 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0150 | 3 | 12 | | W0286 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned long a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 23 | | W0104 | 1 | 23 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0191.feature0000644000004100000410000000767312224440633021017 0ustar www-datawww-dataFeature: W0191 W0191 detects that `unsigned short' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { float b = a; /* W0191 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0191 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { float b; b = a; /* W0191 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0191 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned short a) { bar(a); /* W0191 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0191 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned short a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned short a) { return a; /* W0191 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0191 | 3 | 12 | | W0327 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned short a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 26 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0184.feature0000644000004100000410000001000212224440633020775 0ustar www-datawww-dataFeature: W0184 W0184 detects that `unsigned char' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long double b = a; /* W0184 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0184 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long double b; b = a; /* W0184 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0184 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned char a) { bar(a); /* W0184 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0184 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned char a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned char a) { return a; /* W0184 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0184 | 3 | 12 | | W0320 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned char a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0460.feature0000644000004100000410000002305012224440633021001 0ustar www-datawww-dataFeature: W0460 W0460 detects that a value of the variable is not possibly initialized. Scenario: array element is not possibly initialized Given a target source named "fixture.c" with: """ static int foo(void) { int a[5]; if (a[1] == 0) { /* W0459 */ a[0] = 0; } return a[0]; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0459 | 5 | 14 | | C1000 | | | | C1003 | 3 | 9 | | W0460 | 9 | 13 | | C1000 | | | | C1003 | 3 | 9 | | C1002 | 5 | 14 | | W0629 | 1 | 12 | | W0950 | 3 | 11 | | W0628 | 1 | 12 | Scenario: possible uninitialized value reference because of an incomplete if statement Given a target source named "fixture.c" with: """ void foo(int i) { int j; if (i == 0) { /* false */ j = 0; } return j; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0460 | 9 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1002 | 5 | 11 | | W0100 | 3 | 9 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: possible uninitialized value reference because of an incomplete if statement Given a target source named "fixture.c" with: """ void foo(int i) { int j; if (i < 0) { /* false */ j = 1; if (i < -10) { j = 2; } else if (i < -5) { j = 3; } } return j; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0460 | 15 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1002 | 5 | 11 | | W0104 | 1 | 14 | | W1069 | 7 | 9 | | W0628 | 1 | 6 | Scenario: possible uninitialized value reference because of an incomplete if-else-if statement Given a target source named "fixture.c" with: """ void foo(int i) { int j; if (i < 0) { /* true */ if (i < -10) { /* false */ j = 2; } else if (i < -5) { /* false */ j = 3; } } else { j = 1; } return j; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0460 | 17 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1001 | 5 | 11 | | C1002 | 6 | 15 | | C1002 | 9 | 20 | | W0104 | 1 | 14 | | W1069 | 6 | 9 | | W0628 | 1 | 6 | Scenario: possible uninitialized value reference because of an incomplete if statement Given a target source named "fixture.c" with: """ void foo(int i) { int j; if (i < 0) { /* false */ if (i < -10) { j = 2; } else if (i < -5) { j = 3; } else { j = 1; } } return j; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0460 | 17 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1002 | 5 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: possible uninitialized value reference because of missing assignment in a complete if statement Given a target source named "fixture.c" with: """ void foo(int i) { int j; if (i < 0) { /* true */ if (i < -10) { /* false */ j = 2; } else if (i < -5) { /* false */ j = 3; } else { } } else { j = 1; } return j; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0460 | 19 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1001 | 5 | 11 | | C1002 | 6 | 15 | | C1002 | 9 | 20 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: possible uninitialized value reference because of an incomplete if statement Given a target source named "fixture.c" with: """ void foo(int i) { int j; if (i < 0) { /* false */ j = 1; if (i < -10) { j = 2; } } return j; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0460 | 12 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1002 | 5 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: possible uninitialized value reference because of an incomplete if-else-if statement Given a target source named "fixture.c" with: """ int foo(int i) { int j; if (i > 2) { /* true */ if (i == 5) { /* false */ j = 5; } else if (i == 6) { /* false */ j = 6; } } else if (i < 0) { j = -1; } return j; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0460 | 17 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1001 | 5 | 11 | | C1002 | 6 | 15 | | C1002 | 9 | 20 | | W0104 | 1 | 13 | | W1069 | 5 | 5 | | W1069 | 6 | 9 | | W0628 | 1 | 5 | Scenario: variable is not possibly initialized because of an incomplete selection statement Given a target source named "fixture.c" with: """ struct bar { int x; int y; }; struct bar a[3]; int foo(int i, int j) { int k; if (i < 0) { struct bar b; if (j == 0) { return 0; } k = j < 10 ? b.x : b.y; } else if (i > 10) { k = j ? a[0].x : a[1].y; } return k; /* W0460 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 6 | 12 | | W0117 | 8 | 5 | | W0459 | 17 | 20 | | C1000 | | | | C1003 | 13 | 20 | | W0100 | 13 | 20 | | W0460 | 23 | 12 | | C1000 | | | | C1003 | 10 | 9 | | C1002 | 12 | 11 | | C1002 | 19 | 16 | | W0104 | 8 | 13 | | W0104 | 8 | 20 | | W1071 | 8 | 5 | | W0950 | 6 | 14 | | W1069 | 12 | 5 | | W0501 | 17 | 20 | | W0114 | 20 | 13 | | W0628 | 8 | 5 | | W0589 | 6 | 12 | | W0593 | 6 | 12 | Scenario: variable is initialized by a complete selection statement Given a target source named "fixture.c" with: """ struct bar { int x; int y; }; struct bar a[3]; int foo(int i, int j) { int k; if (i < 0) { struct bar b; if (j == 0) { return 0; } k = j < 10 ? b.x : b.y; } else { k = j ? a[0].x : a[1].y; } return k; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 6 | 12 | | W0117 | 8 | 5 | | W0459 | 17 | 20 | | C1000 | | | | C1003 | 13 | 20 | | W0100 | 13 | 20 | | W0104 | 8 | 13 | | W0104 | 8 | 20 | | W1071 | 8 | 5 | | W0950 | 6 | 14 | | W0501 | 17 | 20 | | W0114 | 20 | 13 | | W0628 | 8 | 5 | | W0589 | 6 | 12 | | W0593 | 6 | 12 | adlint-3.2.0/features/code_check/W0783.feature0000644000004100000410000000475012224440633021017 0ustar www-datawww-dataFeature: W0783 W0783 detects that a cast-expression contains a pointer type of an incomplete type. Scenario: casting to a pointer of an incomplete struct Given a target source named "fixture.c" with: """ extern struct Foo *gp; void foo(int *p) { gp = (struct Foo *) p; /* W0783 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 20 | | W0117 | 3 | 6 | | W0783 | 5 | 10 | | W0104 | 3 | 15 | | W0105 | 3 | 15 | | W0628 | 3 | 6 | Scenario: casting from a pointer of an incomplete struct Given a target source named "fixture.c" with: """ extern struct Foo *gp; void foo(void) { int *p = (int *) gp; /* W0783 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 20 | | W0117 | 3 | 6 | | W0783 | 5 | 14 | | W0100 | 5 | 10 | | W0628 | 3 | 6 | Scenario: casting from and to a pointer of an incomplete struct Given a target source named "fixture.c" with: """ extern struct Foo *p1; extern union Bar *p2; void foo(void) { p2 = (union Bar *) p1; /* W0783 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 20 | | W0118 | 2 | 19 | | W0117 | 4 | 6 | | W0783 | 6 | 10 | | W0628 | 4 | 6 | Scenario: casting from and to a pointer of an complete type Given a target source named "fixture.c" with: """ struct Foo { int i; } *p1; union Bar { int i; char c; } *p2; void foo(void) { p2 = (union Bar *) p1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 4 | | W0117 | 8 | 4 | | W0117 | 10 | 6 | | W0551 | 5 | 7 | | W0628 | 10 | 6 | | W0589 | 3 | 4 | | W0593 | 3 | 4 | | W0589 | 8 | 4 | | W0593 | 8 | 4 | adlint-3.2.0/features/code_check/W0717.feature0000644000004100000410000000370712224440633021015 0ustar www-datawww-dataFeature: W0717 W0717 detects that operand of left side of bitwise expression or arithmetic expression is `effectively boolean'. Scenario: an arithmetic expression Given a target source named "fixture.c" with: """ static int func(int a, int b, int c) { return (a > b) + c; /* W0717 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 20 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W0104 | 1 | 35 | | W0629 | 1 | 12 | | W0717 | 3 | 12 | | W0628 | 1 | 12 | Scenario: a bitwise expression Given a target source named "fixture.c" with: """ static int func(int a, int b, int c) { return (a > b) ^ c; /* W0717 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 20 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W0104 | 1 | 35 | | W0629 | 1 | 12 | | W0717 | 3 | 12 | | W0628 | 1 | 12 | Scenario: a shift expression Given a target source named "fixture.c" with: """ static int func(int a, int b, int c) { return (a > b) << c; /* W0717 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0570 | 3 | 20 | | W0572 | 3 | 20 | | W0794 | 3 | 20 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W0104 | 1 | 35 | | W0629 | 1 | 12 | | W0717 | 3 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0120.feature0000644000004100000410000000760512224440633021002 0ustar www-datawww-dataFeature: W0120 W0120 detects that `char' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned char b = a; /* OK when char_as_unsigned_char: true */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned char b; b = a; /* OK when char_as_unsigned_char: true */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(char a) { bar(a); /* W0120 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(char a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(char a) { return a; /* W0120 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0256 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(char a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0704.feature0000644000004100000410000000130412224440633021000 0ustar www-datawww-dataFeature: W0704 W0704 detects that an ordinary identifier is hiding other identifier. Scenario: hiding typedef name by enumerator name Given a target source named "fixture.c" with: """ typedef double DOUBLE; void foo(void) { enum arg_type { INT, DOUBLE } type; type = DOUBLE; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0704 | 5 | 26 | | C0001 | 1 | 16 | | W0789 | 5 | 26 | | C0001 | 1 | 16 | | W0100 | 5 | 35 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0149.feature0000644000004100000410000001046212224440633021010 0ustar www-datawww-dataFeature: W0149 W0149 detects that `unsigned long' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { short b = a; /* W0149 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0149 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 15 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { short b; b = a; /* W0149 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0149 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned long a) { bar(a); /* W0149 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0149 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned long a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 24 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned long a) { return a; /* W0149 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0149 | 3 | 12 | | W0285 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned long a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 25 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0207.feature0000644000004100000410000001023312224440633020777 0ustar www-datawww-dataFeature: W0207 W0207 detects that `long long' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { double b = a; /* W0207 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0207 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { double b; b = a; /* W0207 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0207 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(long long a) { bar(a); /* W0207 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0207 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(long long a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(long long a) { return a; /* W0207 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0207 | 3 | 12 | | W0343 | 3 | 5 | | W0104 | 1 | 22 | | W0834 | 1 | 12 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(long long a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 22 | | W0834 | 1 | 12 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0502.feature0000644000004100000410000000447312224440633021006 0ustar www-datawww-dataFeature: W0502 W0502 detects that operators of the different priority except for `+', `-', `*', `/' and `%' appear in an expression without appropriate grouping. Scenario: shift-expression and and-expression in an expression Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return a << b & c; /* W0502 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 38 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0502 | 3 | 12 | | W0628 | 1 | 21 | Scenario: shift-expression and and-expression in an expression with grouping Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return a << (b & c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 38 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0628 | 1 | 21 | Scenario: shift-expression and and-expression in an expression with large grouping Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return (a << b & c); /* W0502 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0116 | 3 | 15 | | C1000 | | | | C1006 | 1 | 38 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0502 | 3 | 12 | | W0628 | 1 | 21 | adlint-3.2.0/features/code_check/W0432.feature0000644000004100000410000000247512224440633021010 0ustar www-datawww-dataFeature: W0432 W0432 detects that indentation of this line does not match with the project's indentation style. Scenario: function-like macro replacement Given a target source named "fixture.c" with: """ extern int foo(int, int); #define bar(a, b) ((a) > 0) ? (a) : (b) #define baz(a, b) \ ((a) > 0) ? \ (a) : (b) void qux(void) { int i = 0; i = foo(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, /* OK */ 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2); /* OK */ i = bar(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, /* OK */ 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2); /* OK */ i = baz(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, /* OK */ 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 3 | 1 | | W0442 | 4 | 1 | | W0118 | 1 | 12 | | W0117 | 8 | 6 | | W0609 | 14 | 9 | | W0609 | 16 | 9 | | W0443 | 3 | 1 | | W0443 | 4 | 1 | | W0628 | 8 | 6 | adlint-3.2.0/features/code_check/W0186.feature0000644000004100000410000000765512224440633021023 0ustar www-datawww-dataFeature: W0186 W0186 detects that `signed char' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { double b = a; /* W0186 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0186 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { double b; b = a; /* W0186 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0186 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(signed char a) { bar(a); /* W0186 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0186 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(signed char a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(signed char a) { return a; /* W0186 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0186 | 3 | 12 | | W0322 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(signed char a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 24 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0134.feature0000644000004100000410000001033512224440633021001 0ustar www-datawww-dataFeature: W0134 W0134 detects that `short' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { char b = a; /* W0134 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0134 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 14 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { char b; b = a; /* W0134 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0134 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(short a) { bar(a); /* W0134 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0134 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(short a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 16 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(short a) { return a; /* W0134 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0134 | 3 | 12 | | W0270 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(short a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 16 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0611.feature0000644000004100000410000000746312224440633021011 0ustar www-datawww-dataFeature: W0611 W0611 detects that a controlling expression of the iteration-statement always be true. Scenario: controlling variable of for-statement is not updated Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0, j = 0; for (; i < 10; ) { /* W0611 */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0534 | 4 | 10 | | W0609 | 4 | 14 | | W0708 | 5 | 10 | | W0611 | 4 | 14 | | W0100 | 3 | 9 | | W0629 | 1 | 12 | | W0425 | 3 | 16 | | W0628 | 1 | 12 | Scenario: controlling variable of for-statement is updated Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0, j = 0; for (; i < 10; i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0534 | 4 | 10 | | W0629 | 1 | 12 | | W0425 | 3 | 16 | | W0628 | 1 | 12 | Scenario: controlling variable of while-statement is not updated Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0, j = 0; while (i < 10) { /* W0611 */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0609 | 4 | 14 | | W0611 | 4 | 14 | | W0100 | 3 | 9 | | W0629 | 1 | 12 | | W0425 | 3 | 16 | | W0628 | 1 | 12 | Scenario: controlling variable of while-statement is updated Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0, j = 0; while (i < 10) { /* OK */ i++; j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0425 | 3 | 16 | | W0628 | 1 | 12 | Scenario: controlling variable of do-statement is not updated Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0, j = 0; do { j++; } while (i < 10); /* W0611 */ return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0609 | 6 | 16 | | W0611 | 6 | 16 | | W0100 | 3 | 9 | | W0629 | 1 | 12 | | W0425 | 3 | 16 | | W0628 | 1 | 12 | Scenario: controlling variable of do-statement is updated Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0, j = 0; do { i++; j++; } while (i < 10); /* OK */ return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0425 | 3 | 16 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0241.feature0000644000004100000410000001044712224440633021004 0ustar www-datawww-dataFeature: W0241 W0241 detects that `double' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { long long b = a; /* W0241 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0241 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 17 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 17 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { long long b; b = a; /* W0241 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0241 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 17 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 17 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(double a) { bar(a); /* W0241 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0241 | 5 | 9 | | W0104 | 3 | 17 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(double a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(double a) { return a; /* W0241 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0241 | 3 | 12 | | W0377 | 3 | 5 | | W0104 | 1 | 22 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(double a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 22 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W0189.feature0000644000004100000410000000756712224440633021030 0ustar www-datawww-dataFeature: W0189 W0189 detects that `short' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { double b = a; /* W0189 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0189 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { double b; b = a; /* W0189 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0189 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(short a) { bar(a); /* W0189 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0189 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(short a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(short a) { return a; /* W0189 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0189 | 3 | 12 | | W0325 | 3 | 5 | | W0104 | 1 | 18 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(short a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 18 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0198.feature0000644000004100000410000000766612224440633021030 0ustar www-datawww-dataFeature: W0198 W0198 detects that `unsigned int' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { double b = a; /* W0198 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0198 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { double b; b = a; /* W0198 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0198 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned int a) { bar(a); /* W0198 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0198 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned int a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned int a) { return a; /* W0198 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0198 | 3 | 12 | | W0334 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned int a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 25 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0212.feature0000644000004100000410000000753512224440633021006 0ustar www-datawww-dataFeature: W0212 W0212 detects that `float' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { char b = a; /* W0212 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0212 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { char b; b = a; /* W0212 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0212 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(float a) { bar(a); /* W0212 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0212 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(float a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(float a) { return a; /* W0212 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0212 | 3 | 12 | | W0348 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(float a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0642.feature0000644000004100000410000000361612224440633021011 0ustar www-datawww-dataFeature: W0642 W0642 detects that an expression trys to derive address of the array declared as `register'. Scenario: register array passed as function parameter Given a target source named "fixture.c" with: """ extern void foo(char *); static void bar(void) { register char a[3]; foo(a); /* W0642 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W1076 | 3 | 13 | | W0642 | 6 | 9 | | W0100 | 5 | 19 | | W0629 | 3 | 13 | | W0950 | 5 | 21 | | W0628 | 3 | 13 | Scenario: register array designated in initializer Given a target source named "fixture.c" with: """ static void foo(void) { register char a[3]; char *p = a; /* W0642 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0642 | 4 | 15 | | W0100 | 3 | 19 | | W0100 | 4 | 11 | | W0629 | 1 | 13 | | W0950 | 3 | 21 | | W0628 | 1 | 13 | Scenario: register array designated in assignment Given a target source named "fixture.c" with: """ static void foo(void) { register char a[3]; char *p; p = a; /* W0642 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0642 | 5 | 9 | | W0100 | 3 | 19 | | W0100 | 4 | 11 | | W0629 | 1 | 13 | | W0950 | 3 | 21 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0646.feature0000644000004100000410000000741212224440633021013 0ustar www-datawww-dataFeature: W0646 W0646 detects that a string-literal of narrow characters and a string-literal of wide characters are neighboring. Scenario: a string-literal of narrow characters followed by one of wide characters Given a target source named "fixture.c" with: """ static const char *str = "foo" L"bar"; /* W0646 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0646 | 1 | 32 | | W0947 | 1 | 26 | Scenario: a string-literal of narrow characters followed by a compatible string-literal Given a target source named "fixture.c" with: """ static const char *str = "foo" "bar"; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0947 | 1 | 26 | Scenario: a string-literal of wide characters followed by one of narrow characters Given a target source named "fixture.c" with: """ static const char *str = L"foo" "bar"; /* W0646 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0646 | 1 | 33 | | W9003 | 1 | 26 | | W0626 | 1 | 26 | | W0947 | 1 | 26 | Scenario: a string-literal of wide characters followed by a compatible string-literal Given a target source named "fixture.c" with: """ static const char *str = L"foo" L"bar"; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W9003 | 1 | 26 | | W0626 | 1 | 26 | | W0947 | 1 | 26 | Scenario: a string-literal of narrow characters followed by one of wide characters those are replaced by macros Given a target source named "fixture.c" with: """ #define STR1 "foo" #define STR2 L"bar" static const char *str = STR1 STR2; /* W0646 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0646 | 4 | 31 | Scenario: a string-literal of narrow characters followed by a compatible string-literal those are replaced by macros Given a target source named "fixture.c" with: """ #define STR1 "foo" #define STR2 "bar" static const char *str = STR1 STR2; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: a string-literal of wide characters followed by one of narrow characters those are replaced by macros Given a target source named "fixture.c" with: """ #define STR1 L"foo" #define STR2 "bar" static const char *str = STR1 STR2; /* W0646 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0646 | 4 | 31 | | W9003 | 4 | 26 | | W0626 | 4 | 26 | Scenario: a string-literal of wide characters followed by a compatible string-literal those are replaced by macros Given a target source named "fixture.c" with: """ #define STR1 L"foo" #define STR2 L"bar" static const char *str = STR1 STR2; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W9003 | 4 | 26 | | W0626 | 4 | 26 | adlint-3.2.0/features/code_check/W0129.feature0000644000004100000410000000765712224440633021022 0ustar www-datawww-dataFeature: W0129 W0129 detects that `char' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { long double b = a; /* W0129 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0129 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { long double b; b = a; /* W0129 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0129 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(char a) { bar(a); /* W0129 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0129 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(char a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(char a) { return a; /* W0129 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0129 | 3 | 12 | | W0265 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(char a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0708.feature0000644000004100000410000000363712224440633021017 0ustar www-datawww-dataFeature: W0708 W0708 detects that a controlling variable of for-statement is updated in the loop body. Scenario: address of the controlling variable is passed to a function in the controlling part of for-statement Given a target source named "fixture.c" with: """ static int bar(int *); static void foo(void) { int i; for (i = 0; (bar(&i)) && (i < 10); ) { /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 13 | | W0629 | 3 | 13 | | W0628 | 3 | 13 | Scenario: address of the controlling variable is passed to a function in the controlling part of for-statement Given a target source named "fixture.c" with: """ static int bar(int *); static void foo(void) { int i; for (i = 0; (bar(&i)) && (i < 10); i++) { /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 13 | | W0629 | 3 | 13 | | W0628 | 3 | 13 | Scenario: address of the controlling variable is passed to a function in the controlling part of for-statement Given a target source named "fixture.c" with: """ static int bar(int *); static void foo(void) { int i; for (i = 0; (bar(&i)) && (i < 10); i++) { if (i == 5) { i++; } /* W0708 */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 13 | | W0708 | 7 | 24 | | W0629 | 3 | 13 | | W0628 | 3 | 13 | adlint-3.2.0/features/code_check/W0157.feature0000644000004100000410000001061212224440633021004 0ustar www-datawww-dataFeature: W0157 W0157 detects that `signed char' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned char b = a; /* W0157 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0157 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned char b; b = a; /* W0157 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0157 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(signed char a) { bar(a); /* W0157 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0157 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(signed char a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 22 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(signed char a) { return a; /* W0157 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0157 | 3 | 12 | | W0293 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(signed char a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 31 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0170.feature0000644000004100000410000001052612224440633021003 0ustar www-datawww-dataFeature: W0170 W0170 detects that `long' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned short b = a; /* W0170 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0170 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 24 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned short b; b = a; /* W0170 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0170 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(long a) { bar(a); /* W0170 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0170 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(long a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(long a) { return a; /* W0170 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0170 | 3 | 12 | | W0306 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(long a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 25 | | W0104 | 1 | 25 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W1058.feature0000644000004100000410000000552512224440633021014 0ustar www-datawww-dataFeature: W1058 W1058 detects that a function of enum return type is returning a value of inconsistently enum typed non-constant expression. Scenario: returning a value of the consistently enum typed constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static enum Color foo(void) { return RED + 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 19 | | W9003 | 6 | 18 | | W0629 | 4 | 19 | | W0628 | 4 | 19 | Scenario: returning a value of the consistently enum typed non-constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static enum Color foo(const enum Color c) { return c + 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 19 | | W9003 | 6 | 16 | | W0723 | 6 | 14 | | W0629 | 4 | 19 | | W0628 | 4 | 19 | Scenario: returning a value of the inconsistently enum typed constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static enum Color foo(void) { return ORANGE + 1; /* OK but W0730 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 19 | | W9003 | 6 | 21 | | W0727 | 6 | 19 | | W9003 | 6 | 19 | | W0730 | 6 | 19 | | W0629 | 4 | 19 | | W0628 | 4 | 19 | Scenario: returning a value of the inconsistently enum typed non-constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static enum Color foo(const enum Fruit f) { return f + 1; /* W1058 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 19 | | W9003 | 6 | 16 | | W0723 | 6 | 14 | | W0727 | 6 | 14 | | W9003 | 6 | 14 | | W1058 | 6 | 14 | | W1063 | 6 | 14 | | W0629 | 4 | 19 | | W0628 | 4 | 19 | adlint-3.2.0/features/code_check/W0764.feature0000644000004100000410000001052612224440633021014 0ustar www-datawww-dataFeature: W0764 W0764 detects that `unsigned long long' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned short b = a; /* W0764 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0764 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned short b; b = a; /* W0764 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0764 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(unsigned long long a) { bar(a); /* W0764 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0764 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(unsigned long long a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(unsigned long long a) { return a; /* W0764 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0764 | 3 | 12 | | W0398 | 3 | 5 | | W0104 | 1 | 39 | | W0834 | 1 | 20 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(unsigned long long a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0104 | 1 | 39 | | W0834 | 1 | 20 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0071.feature0000644000004100000410000000242112224440633020776 0ustar www-datawww-dataFeature: W0071 W0071 detects that contents of a header included by #include "..." directive are not referred by other files in a translation-unit. Scenario: a typedef in the header and no reference to it Given a target source named "fixture.c" with: """ #include "test.h" /* W0071 */ int bar(void) { return 0; } """ And a target source named "test.h" with: """ #if !defined(TEST_H) #define TEST_H typedef int foo; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0071 | 1 | 1 | | W0628 | 3 | 5 | Scenario: a typedef in the header and reference to it in other file. Given a target source named "fixture.c" with: """ #include "test.h" /* OK */ foo bar(void) { return 0; } """ And a target source named "test.h" with: """ #if !defined(TEST_H) #define TEST_H typedef int foo; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W1072.feature0000644000004100000410000000131112224440633020775 0ustar www-datawww-dataFeature: W1072 W1072 detects that a `goto' statement is found. Scenario: `goto' statement is found Given a target source named "fixture.c" with: """ static int func(int i) { if (i == 1) { goto Label1; /* W1072 */ } goto Label2; /* W1072 */ Label1: i = 10; Label2: i = 20; return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W1072 | 4 | 9 | | W1072 | 7 | 5 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0247.feature0000644000004100000410000000764512224440633021020 0ustar www-datawww-dataFeature: W0247 W0247 detects that `unsigned char' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long b = a; /* W0247 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0247 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long b; b = a; /* W0247 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0247 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned char a) { bar(a); /* W0247 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0247 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned char a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned char a) { return a; /* W0247 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0247 | 3 | 12 | | W0403 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned char a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0542.feature0000644000004100000410000000120512224440633021000 0ustar www-datawww-dataFeature: W0542 W0542 detects that some of parameters have an identifier. Scenario: hard to parse Given a target source named "fixture.c" with: """ typedef unsigned int VALUE; typedef void *ANYARGS; VALUE foo(VALUE(*p1)(VALUE),VALUE,VALUE(*p2)(ANYARGS),VALUE); /* W0542 */ VALUE bar(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 7 | | W0625 | 1 | 22 | | W0118 | 5 | 7 | | W0542 | 4 | 7 | adlint-3.2.0/features/code_check/W0019.feature0000644000004100000410000000431212224440633021001 0ustar www-datawww-dataFeature: W0019 W0019 detects that a pointer-cast deletes `const' qualifier. Scenario: casting const int pointer to int pointer Given a target source named "fixture.c" with: """ int foo(const int *p) { int *q; q = (int *) p; /* W0019 */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0019 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0628 | 1 | 5 | Scenario: casting const unsigned short pointer to short pointer Given a target source named "fixture.c" with: """ int foo(const unsigned short *p) { unsigned short *q; q = (short *) p; /* W0019 */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0019 | 4 | 9 | | W9003 | 4 | 9 | | W0100 | 3 | 21 | | W0104 | 1 | 31 | | W0628 | 1 | 5 | Scenario: assigning compatible const pointers Given a target source named "fixture.c" with: """ int foo(const int *p) { const int *q; q = p; /* OK */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 16 | | W0104 | 1 | 20 | | W0628 | 1 | 5 | Scenario: casting const int array pointer to int pointer Given a target source named "fixture.c" with: """ const int a[] = { 0, 1, 2 }; int foo(void) { const int *p = a; /* OK */ return -1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0117 | 3 | 5 | | W0100 | 5 | 16 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0768.feature0000644000004100000410000000764012224440633021023 0ustar www-datawww-dataFeature: W0768 W0768 detects that `long double' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { float b = a; /* W0768 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0768 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { float b; b = a; /* W0768 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0768 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(long double a) { bar(a); /* W0768 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0768 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(long double a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(long double a) { return a; /* W0768 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0768 | 3 | 12 | | W0775 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(long double a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 23 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0245.feature0000644000004100000410000000766212224440633021015 0ustar www-datawww-dataFeature: W0245 W0245 detects that `unsigned char' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { short b = a; /* W0245 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0245 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { short b; b = a; /* W0245 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0245 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned char a) { bar(a); /* W0245 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0245 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned char a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned char a) { return a; /* W0245 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0245 | 3 | 12 | | W0401 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned char a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0199.feature0000644000004100000410000000777112224440633021026 0ustar www-datawww-dataFeature: W0199 W0199 detects that `unsigned int' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long double b = a; /* W0199 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0199 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long double b; b = a; /* W0199 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0199 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned int a) { bar(a); /* W0199 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0199 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned int a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned int a) { return a; /* W0199 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0199 | 3 | 12 | | W0335 | 3 | 5 | | W0104 | 1 | 30 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned int a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 30 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W1076.feature0000644000004100000410000000340012224440633021002 0ustar www-datawww-dataFeature: W1076 W1076 detects that a `static' function definition appears with no anterior function declarations. Scenario: `static' function definition Given a target source named "fixture.c" with: """ static int foo(void) /* W1076 */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: `static' function declaration followed by the `static' function definition Given a target source named "fixture.c" with: """ static int foo(void); static int foo(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: `extern' function definition Given a target source named "fixture.c" with: """ extern int foo(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0628 | 1 | 12 | Scenario: function definition without storage-class-specifier Given a target source named "fixture.c" with: """ int foo(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0793.feature0000644000004100000410000001041412224440633021012 0ustar www-datawww-dataFeature: W0793 W0793 detects that an explicit conversion between pointer to variable and pointer to function is found. Scenario: converting `float *' to function pointer Given a target source named "fixture.c" with: """ typedef int (*funptr_t)(void); funptr_t foo(float *p) { return (funptr_t) p; /* W0793 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 10 | | W0625 | 1 | 15 | | W0793 | 5 | 12 | | W0104 | 3 | 21 | | W0105 | 3 | 21 | | W0628 | 3 | 10 | Scenario: converting `double *' to function pointer Given a target source named "fixture.c" with: """ typedef int (*funptr_t)(void); funptr_t foo(double *p) { return (funptr_t) p; /* W0793 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 10 | | W0625 | 1 | 15 | | W0793 | 5 | 12 | | W0104 | 3 | 22 | | W0105 | 3 | 22 | | W0628 | 3 | 10 | Scenario: converting `long double *' to function pointer Given a target source named "fixture.c" with: """ typedef int (*funptr_t)(void); funptr_t foo(long double *p) { return (funptr_t) p; /* W0793 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 10 | | W0625 | 1 | 15 | | W0793 | 5 | 12 | | W0104 | 3 | 27 | | W0105 | 3 | 27 | | W0628 | 3 | 10 | Scenario: converting function pointer to `float *' Given a target source named "fixture.c" with: """ typedef int (*funptr_t)(void); float *foo(funptr_t p) { return (float *) p; /* W0793 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 8 | | W0793 | 5 | 12 | | W0104 | 3 | 21 | | W0628 | 3 | 8 | Scenario: converting function pointer to `double *' Given a target source named "fixture.c" with: """ typedef int (*funptr_t)(void); double *foo(funptr_t p) { return (double *) p; /* W0793 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 9 | | W0793 | 5 | 12 | | W0104 | 3 | 22 | | W0628 | 3 | 9 | Scenario: converting function pointer to `long double *' Given a target source named "fixture.c" with: """ typedef int (*funptr_t)(void); long double *foo(funptr_t p) { return (long double *) p; /* W0793 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 14 | | W0793 | 5 | 12 | | W0104 | 3 | 27 | | W0628 | 3 | 14 | Scenario: converting `float *' to `int *' Given a target source named "fixture.c" with: """ int *foo(float *p) { return (int *) p; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 17 | | W0105 | 1 | 17 | | W0628 | 1 | 6 | Scenario: converting function pointer to `void *' Given a target source named "fixture.c" with: """ typedef int (*funptr_t)(void); void *foo(funptr_t p) { return (void *) p; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 7 | | W0104 | 3 | 20 | | W0628 | 3 | 7 | adlint-3.2.0/features/code_check/W0010.feature0000644000004100000410000000452112224440633020772 0ustar www-datawww-dataFeature: W0010 W0010 detects that a side-effect may occur in the conditional-expression. Scenario: postfix-increment-expression and postfix-decrement-expression Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a > 0) ? b++ : b--; /* W0010 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0629 | 1 | 12 | | W0010 | 3 | 20 | | W0628 | 1 | 12 | Scenario: object-specifier and postfix-decrement-expression Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a > 0) ? b : b--; /* W0010 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0629 | 1 | 12 | | W0010 | 3 | 20 | | W0086 | 3 | 20 | | W0628 | 1 | 12 | Scenario: function-call-expression and constant-specifier Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a > 0) ? foo(1, b) : 0; /* W0010 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0556 | 3 | 25 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0010 | 3 | 20 | | W0086 | 3 | 20 | | W0555 | 1 | 12 | Scenario: additive-expression and multiplicative-expression Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a > 0) ? b / a : a + b; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 32 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0501 | 3 | 20 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0811.feature0000644000004100000410000000432612224440633021006 0ustar www-datawww-dataFeature: W0811 W0811 detects that token sequence replaced by macro contains `defined' operator. Scenario: no macro replacement Given a target source named "fixture.c" with: """ #if defined(FOO) /* OK */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: expanding a wellformed `defined' operator Given a target source named "fixture.c" with: """ #define COND defined(FOO) #if COND /* W0811 */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0811 | 3 | 5 | Scenario: expanding a wellformed expression contains `defined' operator from object-like macro Given a target source named "fixture.c" with: """ #define COND defined(FOO) && !defined(BAR) #if COND /* W0811 */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0811 | 3 | 5 | Scenario: expanding a wellformed `defined' operator from function-like macro Given a target source named "fixture.c" with: """ #define COND(id) defined(id) #if COND(FOO) /* W0811 */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0811 | 3 | 5 | | W0443 | 1 | 1 | Scenario: expanding a wellformed expression contains `defined' operator from function-like macro Given a target source named "fixture.c" with: """ #define COND(id1, id2) defined(id1) && !defined(id2) #if COND(FOO, BAR) /* W0811 */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0811 | 3 | 5 | | W0443 | 1 | 1 | adlint-3.2.0/features/code_check/W0201.feature0000644000004100000410000000755612224440633021007 0ustar www-datawww-dataFeature: W0201 W0201 detects that `long' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { double b = a; /* W0201 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0201 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { double b; b = a; /* W0201 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0201 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(long a) { bar(a); /* W0201 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0201 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(long a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(long a) { return a; /* W0201 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0201 | 3 | 12 | | W0337 | 3 | 5 | | W0104 | 1 | 17 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(long a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 17 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0161.feature0000644000004100000410000001052212224440633020777 0ustar www-datawww-dataFeature: W0161 W0161 detects that `short' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned char b = a; /* W0161 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0161 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned char b; b = a; /* W0161 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0161 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(short a) { bar(a); /* W0161 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0161 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(short a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 16 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(short a) { return a; /* W0161 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0161 | 3 | 12 | | W0297 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(short a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 25 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0166.feature0000644000004100000410000001051512224440633021006 0ustar www-datawww-dataFeature: W0166 W0166 detects that `int' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned short b = a; /* W0166 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0166 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 24 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 20 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned short b; b = a; /* W0166 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0166 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 20 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(int a) { bar(a); /* W0166 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0166 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(int a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(int a) { return a; /* W0166 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0166 | 3 | 12 | | W0302 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(int a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 24 | | W0104 | 1 | 24 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W1061.feature0000644000004100000410000001003312224440633020774 0ustar www-datawww-dataFeature: W1061 W1061 detects that a value of the inconsistently typed non-constant expression is passed to a enum typed parameter. Scenario: non-constant `int' typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; extern void foo(enum Color); static void bar(const int i) { foo(i + 1); /* W1061 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 13 | | W1076 | 6 | 13 | | W0723 | 8 | 11 | | W0727 | 8 | 11 | | W9003 | 8 | 11 | | W1061 | 8 | 11 | | W0629 | 6 | 13 | | W0628 | 6 | 13 | Scenario: non-constant consistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; extern void foo(enum Color); static void bar(const enum Color c) { foo(c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 13 | | W1076 | 6 | 13 | | W0629 | 6 | 13 | | W0628 | 6 | 13 | Scenario: non-constant inconsistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; extern void foo(enum Color); static void bar(const enum Fruit f) { foo(f); /* W1061 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 13 | | W1076 | 6 | 13 | | W0727 | 8 | 9 | | W9003 | 8 | 9 | | W1056 | 8 | 9 | | W1061 | 8 | 9 | | W0629 | 6 | 13 | | W0628 | 6 | 13 | Scenario: constant consistent `int' typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; extern void foo(enum Color); static void bar(void) { foo(2); /* OK but W1053 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W9003 | 7 | 9 | | W1053 | 7 | 9 | | W0629 | 5 | 13 | | W0628 | 5 | 13 | Scenario: constant consistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; extern void foo(enum Color); static void bar(void) { foo(RED + 1); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W9003 | 7 | 15 | | W0629 | 5 | 13 | | W0628 | 5 | 13 | Scenario: constant inconsistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; extern void foo(enum Color); static void bar(void) { foo(ORANGE + 1); /* OK but W0728 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 13 | | W1076 | 6 | 13 | | W9003 | 8 | 18 | | W0727 | 8 | 16 | | W9003 | 8 | 16 | | W0728 | 8 | 16 | | W0629 | 6 | 13 | | W0628 | 6 | 13 | adlint-3.2.0/features/code_check/W0794.feature0000644000004100000410000000531012224440633021012 0ustar www-datawww-dataFeature: W0794 W0794 detects that a value of the signed integer variable is shifted to left. Scenario: left shifting a `signed int' value Given a target source named "fixture.c" with: """ int func(int i) { return i << 1; /* W0794 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0570 | 3 | 14 | | C1000 | | | | C1006 | 1 | 14 | | W0572 | 3 | 14 | | W0794 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: right shifting a `signed int' value Given a target source named "fixture.c" with: """ int func(int i) { return i >> 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0571 | 3 | 14 | | W0572 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: left shifting an `unsigned int' value Given a target source named "fixture.c" with: """ unsigned int func(unsigned int ui) { return ui << 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0116 | 3 | 15 | | C1000 | | | | C1006 | 1 | 32 | | W0104 | 1 | 32 | | W0628 | 1 | 14 | Scenario: left shifting a `signed int' constant Given a target source named "fixture.c" with: """ int func(void) { return 123 << 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0572 | 3 | 16 | | W0628 | 1 | 5 | Scenario: left shifting an `unsigned char' value which will be integer-promoted to `signed int' Given a target source named "fixture.c" with: """ int func(unsigned char uc) { return uc << 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0246 | 3 | 12 | | W0116 | 3 | 15 | | C1000 | | | | C1006 | 1 | 24 | | W0104 | 1 | 24 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0017.feature0000644000004100000410000001620312224440633021001 0ustar www-datawww-dataFeature: W0017 W0017 detects that field-width of the conversion-specifier in `*scanf' function call is greater than 509. Scenario: field-width of `%d' conversion-specifier in `scanf' function call is greater than 509 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return scanf("%512d", p); /* W0017 */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0017 | 7 | 22 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 22 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `scanf' function call is equal to 510 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return scanf("%510d", p); /* W0017 */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0017 | 7 | 22 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 22 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `scanf' function call is equal to 509 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return scanf("%509d", p); /* OK */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 22 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `scanf' function call is less than 509 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return scanf("%500d", p); /* OK */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 22 | | W0628 | 3 | 5 | Scenario: no field-width of `%d' conversion-specifier in `scanf' function call Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return scanf("%d", p); /* OK */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 22 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fscanf' function call is greater than 509 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return fscanf(stdin, "%512d", p); /* W0017 */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0017 | 7 | 30 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 30 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fscanf' function call is equal to 510 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return fscanf(stdin, "%510d", p); /* W0017 */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0017 | 7 | 30 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 30 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fscanf' function call is equal to 509 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return fscanf(stdin, "%509d", p); /* OK */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 30 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fscanf' function call is less than 509 Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return fscanf(stdin, "%500d", p); /* OK */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 30 | | W0628 | 3 | 5 | Scenario: no field-width of `%d' conversion-specifier in `fscanf' function call Given a target source named "fixture.c" with: """ #include int foo(int *p) { if (p != NULL) { *p = 0; return fscanf(stdin, "%d", p); /* OK */ } else { return -1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 14 | | W1071 | 3 | 5 | | W0947 | 7 | 30 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0202.feature0000644000004100000410000000765712224440633021012 0ustar www-datawww-dataFeature: W0202 W0202 detects that `long' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { long double b = a; /* W0202 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0202 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { long double b; b = a; /* W0202 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0202 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(long a) { bar(a); /* W0202 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0202 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(long a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(long a) { return a; /* W0202 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0202 | 3 | 12 | | W0338 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(long a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0767.feature0000644000004100000410000000756312224440633021026 0ustar www-datawww-dataFeature: W0767 W0767 detects that `double' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { float b = a; /* W0767 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0767 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { float b; b = a; /* W0767 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0767 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(double a) { bar(a); /* W0767 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0767 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(double a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(double a) { return a; /* W0767 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0767 | 3 | 12 | | W0774 | 3 | 5 | | W0104 | 1 | 18 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(double a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 18 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0243.feature0000644000004100000410000001052412224440633021002 0ustar www-datawww-dataFeature: W0243 W0243 detects that `long double' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { long long b = a; /* W0243 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0243 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 22 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { long long b; b = a; /* W0243 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0243 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(long double a) { bar(a); /* W0243 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0243 | 5 | 9 | | W0104 | 3 | 22 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(long double a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(long double a) { return a; /* W0243 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0243 | 3 | 12 | | W0379 | 3 | 5 | | W0104 | 1 | 27 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(long double a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 27 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W0127.feature0000644000004100000410000000754112224440633021010 0ustar www-datawww-dataFeature: W0127 W0127 detects that `char' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { float b = a; /* W0127 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0127 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { float b; b = a; /* W0127 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0127 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(char a) { bar(a); /* W0127 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0127 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(char a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(char a) { return a; /* W0127 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0127 | 3 | 12 | | W0263 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(char a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0220.feature0000644000004100000410000000772212224440633021003 0ustar www-datawww-dataFeature: W0220 W0220 detects that `float' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long b = a; /* W0220 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0220 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long b; b = a; /* W0220 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0220 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(float a) { bar(a); /* W0220 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0220 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(float a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(float a) { return a; /* W0220 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0220 | 3 | 12 | | W0356 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(float a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0805.feature0000644000004100000410000000515512224440633021012 0ustar www-datawww-dataFeature: W0805 W0805 detects that no identifier as argument for the `defined' operator. Scenario: no arguments Given a target source named "fixture.c" with: """ #if defined /* OK */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | E0007 | 1 | | | W0804 | 1 | 5 | Scenario: an argument specified but not an identifier Given a target source named "fixture.c" with: """ #if defined "foo" /* W0805 */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | E0007 | 1 | 13 | | W0804 | 1 | 5 | | W0805 | 1 | 5 | Scenario: an identifier specified Given a target source named "fixture.c" with: """ #if defined FOO /* OK */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: an identifier specified in parenthesis Given a target source named "fixture.c" with: """ #if defined(FOO) /* OK */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: no arguments for latter `defined' operator Given a target source named "fixture.c" with: """ #if defined(FOO) && defined /* OK */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | E0007 | 1 | | | W0804 | 1 | 21 | Scenario: non identifier for latter `defined' operator Given a target source named "fixture.c" with: """ #if defined(FOO) && defined "foo" /* W0805 */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | E0007 | 1 | 29 | | W0804 | 1 | 21 | | W0805 | 1 | 21 | Scenario: identifiers for two `defined' operator Given a target source named "fixture.c" with: """ #if defined(FOO) && defined BAR /* OK */ int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W0070.feature0000644000004100000410000000242112224440633020775 0ustar www-datawww-dataFeature: W0070 W0070 detects that contents of a header included by #include <...> directive are not referred by other files in a translation-unit. Scenario: a typedef in the header and no reference to it Given a target source named "fixture.c" with: """ #include /* W0070 */ int bar(void) { return 0; } """ And a target source named "test.h" with: """ #if !defined(TEST_H) #define TEST_H typedef int foo; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0070 | 1 | 1 | | W0628 | 3 | 5 | Scenario: a typedef in the header and reference to it in other file. Given a target source named "fixture.c" with: """ #include /* OK */ foo bar(void) { return 0; } """ And a target source named "test.h" with: """ #if !defined(TEST_H) #define TEST_H typedef int foo; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W1069.feature0000644000004100000410000001015312224440633021007 0ustar www-datawww-dataFeature: W1069 W1069 detects that no trailing `else' clause is found in this `if-else-if' statements chain. Scenario: no trailing `else' in `if-else-if' statements chain Given a target source named "fixture.c" with: """ static int func(int i) { if (i == 2) { /* W1069 */ return 0; } else if (i == 4) { return 1; } return 2; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W1069 | 3 | 5 | | W0628 | 1 | 12 | Scenario: no trailing `else' in `if-else-if-else-if' statements chain Given a target source named "fixture.c" with: """ static int func(int i) { if (i == 2) { /* W1069 */ return 0; } else if (i == 4) { return 1; } else if (i == 6) { return 2; } return 4; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W1069 | 3 | 5 | | W0628 | 1 | 12 | Scenario: `else' clause at the last of `if-else-if-else-if' statements chain Given a target source named "fixture.c" with: """ static int func(int i) { if (i == 2) { /* OK */ return 0; } else if (i == 4) { return 1; } else if (i == 6) { return 2; } else { return 3; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: standalone `if' statement Given a target source named "fixture.c" with: """ static int func(int i) { if (i == 2) { /* OK */ return 0; } return 10; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: `else' clause at the last of `if-else-if' statements chain Given a target source named "fixture.c" with: """ static int func(int i) { if (i == 2) { /* OK */ return 0; } else if (i == 4) { return 1; } else { return 2; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: incomplete `if-else-if' statement chain in a complete `if-else' statement Given a target source named "fixture.c" with: """ static void foo(int i) { if (i == 0) { return; } else { if (i == 1) { /* W1069 */ } else if (i == 2) { } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 21 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W1069 | 7 | 9 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W1065.feature0000644000004100000410000000423712224440633021011 0ustar www-datawww-dataFeature: W1065 W1065 detects that an enum type of the case-label's value is different from the enum type of controlling variable. Scenario: different enum types Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static int foo(const enum Color c) { switch (c) { case RED: /* OK */ return 1; case ORANGE: /* W1065 */ return 2; default: return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 12 | | W1065 | 9 | 10 | | W1071 | 4 | 12 | | W0629 | 4 | 12 | | W0628 | 4 | 12 | Scenario: same enum types Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int foo(const enum Color c) { switch (c) { case RED: /* OK */ return 1; case GREEN: /* OK */ return 2; default: return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: enum type and `int' Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int foo(const enum Color c) { switch (c) { case RED: /* OK */ return 1; case 1: /* OK but W1064 */ return 2; default: return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W1064 | 8 | 10 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | adlint-3.2.0/features/code_check/W0213.feature0000644000004100000410000000767012224440633021007 0ustar www-datawww-dataFeature: W0213 W0213 detects that `float' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { signed char b = a; /* W0213 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0213 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { signed char b; b = a; /* W0213 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0213 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(float a) { bar(a); /* W0213 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0213 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(float a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(float a) { return a; /* W0213 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0213 | 3 | 12 | | W0349 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(float a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 23 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0228.feature0000644000004100000410000000754612224440633021017 0ustar www-datawww-dataFeature: W0228 W0228 detects that `double' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { long b = a; /* W0228 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0228 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { long b; b = a; /* W0228 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0228 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(double a) { bar(a); /* W0228 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0228 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(double a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(double a) { return a; /* W0228 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0228 | 3 | 12 | | W0364 | 3 | 5 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(double a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0124.feature0000644000004100000410000000767412224440633021014 0ustar www-datawww-dataFeature: W0124 W0124 detects that `char' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned int b = a; /* W0124 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0124 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned int b; b = a; /* W0124 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0124 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(char a) { bar(a); /* W0124 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0124 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(char a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(char a) { return a; /* W0124 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0124 | 3 | 12 | | W0260 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(char a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0104 | 1 | 23 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0158.feature0000644000004100000410000001062712224440633021013 0ustar www-datawww-dataFeature: W0158 W0158 detects that `signed char' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned short b = a; /* W0158 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0158 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 24 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned short b; b = a; /* W0158 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0158 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(signed char a) { bar(a); /* W0158 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0158 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(signed char a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 22 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(signed char a) { return a; /* W0158 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0158 | 3 | 12 | | W0294 | 3 | 5 | | W0104 | 1 | 32 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(signed char a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 32 | | W0104 | 1 | 32 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W1074.feature0000644000004100000410000000751312224440633021011 0ustar www-datawww-dataFeature: W1074 W1074 detects that an expression with possible side-effects appears in the `sizeof' expression. Scenario: postfix-increment-expression in the sizeof-expression Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0; if (sizeof(i++) == 4) { /* W1074 */ return 0; } else { return 1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0168 | 5 | 24 | | W0609 | 5 | 21 | | W0612 | 5 | 21 | | W0100 | 3 | 9 | | W0629 | 1 | 12 | | W1074 | 5 | 15 | | W9001 | 9 | 9 | | W0628 | 1 | 12 | Scenario: nested sizeof-expression Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0; if (sizeof(1 + sizeof(i++)) == 5) { /* W1074 */ return 0; } else { return 1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0168 | 5 | 36 | | W0610 | 5 | 33 | | W0613 | 5 | 33 | | W0100 | 3 | 9 | | W0629 | 1 | 12 | | W1074 | 5 | 26 | | W9001 | 6 | 9 | | W0628 | 1 | 12 | Scenario: ungrouped postfix-increment-expression in the sizeof-expression Given a target source named "fixture.c" with: """ static int foo(void) { int i = 0; if (sizeof i++ == 4) { /* W1074 */ return 0; } else { return 1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0168 | 5 | 23 | | W0609 | 5 | 20 | | W0612 | 5 | 20 | | W0100 | 3 | 9 | | W0629 | 1 | 12 | | W1074 | 5 | 17 | | W9001 | 9 | 9 | | W0628 | 1 | 12 | Scenario: function-call-expression in the sizeof-expression Given a target source named "fixture.c" with: """ extern int bar(void); static int foo(void) { if (sizeof(bar()) == 4) { /* W1074 */ return 0; } else { return 1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 3 | 12 | | W0168 | 5 | 26 | | W0609 | 5 | 23 | | W0612 | 5 | 23 | | W0629 | 3 | 12 | | W1074 | 5 | 15 | | W9001 | 9 | 9 | | W0628 | 3 | 12 | Scenario: array-subscript-expression in the sizeof-expression Given a target source named "fixture.c" with: """ extern int a[]; static int foo(void) { if (sizeof(a[0]) == 4) { /* OK */ return 0; } else { return 1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1077 | 1 | 12 | | W1076 | 3 | 12 | | W0168 | 5 | 25 | | W0609 | 5 | 22 | | W0612 | 5 | 22 | | W0629 | 3 | 12 | | W9001 | 9 | 9 | | W0628 | 3 | 12 | adlint-3.2.0/features/code_check/W0168.feature0000644000004100000410000001050012224440633021002 0ustar www-datawww-dataFeature: W0168 W0168 detects that `int' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long b = a; /* W0168 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0168 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long b; b = a; /* W0168 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0168 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(int a) { bar(a); /* W0168 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0168 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(int a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(int a) { return a; /* W0168 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0168 | 3 | 12 | | W0304 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(int a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 23 | | W0104 | 1 | 23 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0203.feature0000644000004100000410000000766212224440633021007 0ustar www-datawww-dataFeature: W0203 W0203 detects that `unsigned long' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { float b = a; /* W0203 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0203 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { float b; b = a; /* W0203 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0203 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned long a) { bar(a); /* W0203 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0203 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned long a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned long a) { return a; /* W0203 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0203 | 3 | 12 | | W0339 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned long a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0707.feature0000644000004100000410000001500712224440633021010 0ustar www-datawww-dataFeature: W0707 W0707 detects that a constant-expression array subscript must cause out of bound access of the array object. Scenario: array-subscript-expression with constant subscript must cause OOB access in an initializer Given a target source named "fixture.c" with: """ extern int a[5]; int foo(void) { int i = a[5]; /* W0707 */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0707 | 5 | 15 | | W0100 | 5 | 9 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with constant subscript must cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(void) { int i = 0; i = a[-1]; /* W0707 */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0707 | 6 | 11 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with constant subscript must cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { a[5] = i; /* W0707 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W0707 | 5 | 7 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: indirection-expression with constant subscript must cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(void) { int i = 0; i = *(a + 5 - 6); /* W0707 */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W9003 | 6 | 15 | | W0023 | 6 | 13 | | W9003 | 6 | 19 | | W0023 | 6 | 17 | | W0707 | 6 | 10 | | W0498 | 6 | 10 | | W0628 | 3 | 5 | Scenario: indirection-expression with constant subscript must cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { *(a - 1 + 6) = i; /* W0707 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W9003 | 5 | 11 | | W0024 | 5 | 9 | | W9003 | 5 | 15 | | W0023 | 5 | 13 | | W0707 | 5 | 6 | | W0104 | 3 | 14 | | W0498 | 5 | 6 | | W0628 | 3 | 6 | Scenario: array-subscript-expression with constant subscript must not cause OOB access in an initializer Given a target source named "fixture.c" with: """ extern int a[5]; int foo(void) { int i = a[3]; /* OK */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0100 | 5 | 9 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with constant subscript must not cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(void) { int i = 0; i = a[0]; /* OK */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with constant subscript must not cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { a[4] = i; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: indirection-expression with constant subscript must not cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(void) { int i = 0; i = *(a - 2 + 3); /* OK */ return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W9003 | 6 | 15 | | W0023 | 6 | 13 | | W9003 | 6 | 19 | | W0023 | 6 | 17 | | W0498 | 6 | 10 | | W0628 | 3 | 5 | Scenario: indirection-expression with constant subscript must not cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { *(a + 4 - 1) = i; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W9003 | 5 | 11 | | W0023 | 5 | 9 | | W9003 | 5 | 15 | | W0024 | 5 | 13 | | W0104 | 3 | 14 | | W0498 | 5 | 6 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0422.feature0000644000004100000410000003214712224440633021006 0ustar www-datawww-dataFeature: W0422 W0422 detects that an inconstant expression may cause NULL pointer dereference. Scenario: pointer variable definition with self referring sizeof-expression in the initializer Given a target source named "fixture.c" with: """ struct foo { int i; }; extern void *malloc(unsigned long); static int bar(void) { struct foo * const p = (struct foo *) malloc(sizeof *p); return p->i; /* W0422 */ } static int baz(void) { struct foo * const p = (struct foo *) malloc(sizeof(struct foo)); return p->i; /* W0422 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 2 | 14 | | W1076 | 4 | 12 | | W0422 | 7 | 13 | | C1000 | | | | C1005 | 6 | 24 | | W1076 | 10 | 12 | | W0422 | 13 | 13 | | C1000 | | | | C1005 | 12 | 24 | | W0629 | 4 | 12 | | W0629 | 10 | 12 | | W0628 | 4 | 12 | | W0628 | 10 | 12 | Scenario: pointer variable as a part of controlling expression Given a target source named "fixture.c" with: """ struct node { struct node *prev; }; void foo(const struct node *list) { if (list != NULL) { while (1) { list = list->prev; /* OK */ if (list == NULL) { break; } } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0114 | 7 | 9 | | W0628 | 3 | 6 | Scenario: pointer variable as a part of controlling expression is declared in the iteration body Given a target source named "fixture.c" with: """ static int *bar(void); void foo(void) { if (1) { int *p1; p1 = bar(); while (1) { int *p2; p2 = p1; while (*p2 != 3) { /* W0422 */ p2++; } if (*p2 == 4) { break; } else { p1 = bar(); } } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0422 | 11 | 20 | | C1000 | | | | C1001 | 5 | 9 | | C1005 | 9 | 18 | | C1005 | 10 | 16 | | W0024 | 12 | 19 | | W0114 | 5 | 5 | | W0114 | 8 | 9 | | W0628 | 3 | 6 | Scenario: pointer variable has the same name with previously declared function Given a target source named "fixture.c" with: """ extern void instr(void); void foo(char *instr) { if (instr[0] == '*') { /* W0422 */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0704 | 3 | 16 | | C0001 | 1 | 13 | | W0422 | 5 | 14 | | C1000 | | | | C1005 | 3 | 16 | | W0123 | 5 | 14 | | W0104 | 3 | 16 | | W0105 | 3 | 16 | | W1071 | 3 | 6 | | W0948 | 5 | 21 | | W0628 | 3 | 6 | Scenario: value of the global pointer is correctly null-checked by the controlling-expression of while-statement Given a target source named "fixture.c" with: """ int *ptr = NULL; static void foo(void) { while (ptr) { int i, *p = ptr; i = *p; /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1076 | 3 | 13 | | W0100 | 6 | 17 | | W0629 | 3 | 13 | | W0114 | 5 | 5 | | W0425 | 6 | 17 | | W0628 | 3 | 13 | | W0589 | 1 | 6 | | W0593 | 1 | 6 | Scenario: global pointer array as the controlling-expression of if-statement Given a target source named "fixture.c" with: """ int *a[3] = { 0 }; int foo(void) { if (a[2] == NULL) { return *a[2]; } else if (a[2] == 1) { return *a[2]; } return *a[2]; /* OK not W0422 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0117 | 3 | 5 | | W0421 | 6 | 16 | | C1000 | | | | C1004 | 1 | 6 | | W9003 | 8 | 22 | | W0027 | 8 | 19 | | W1071 | 3 | 5 | | W0950 | 1 | 8 | | W1069 | 5 | 5 | | W0628 | 3 | 5 | | W0589 | 1 | 6 | | W0593 | 1 | 6 | Scenario: global pointer as the controlling-expression of if-statement Given a target source named "fixture.c" with: """ int *ptr = 0; int bar(void) { if (ptr == NULL) { return *ptr; } else if (ptr == 1) { return *ptr; } return *ptr; /* OK not W0422 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0117 | 3 | 5 | | W0421 | 6 | 16 | | C1000 | | | | C1004 | 1 | 6 | | W9003 | 8 | 21 | | W0027 | 8 | 18 | | W1071 | 3 | 5 | | W1069 | 5 | 5 | | W0628 | 3 | 5 | | W0589 | 1 | 6 | | W0593 | 1 | 6 | Scenario: global pointer as the controlling-expression of if-statement in an iteration-statement Given a target source named "fixture.c" with: """ int *a[3] = { 0 }; int foo(unsigned int ui) { for (; ui < 3; ui++) { if (a[ui] == NULL) { break; } return *a[ui]; /* OK not W0422 */ } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0117 | 3 | 5 | | W0534 | 5 | 10 | | W0167 | 5 | 17 | | W0147 | 6 | 15 | | W0147 | 9 | 19 | | W0104 | 3 | 22 | | W1071 | 3 | 5 | | W0950 | 1 | 8 | | W0628 | 3 | 5 | | W0589 | 1 | 6 | | W0593 | 1 | 6 | Scenario: global pointer as the controlling-expression of if-statement in an iteration-statement Given a target source named "fixture.c" with: """ int *ptr = 0; int bar(unsigned int ui) { for (; ui < 3; ui++) { if (ptr == NULL) { break; } else if (ptr == 1) { return *ptr; /* OK */ } return *ptr; /* OK not W0422 */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0117 | 3 | 5 | | W0534 | 5 | 10 | | W0167 | 5 | 17 | | W9003 | 9 | 25 | | W0027 | 9 | 22 | | W0697 | 3 | 5 | | W0104 | 3 | 22 | | W1071 | 3 | 5 | | W1069 | 6 | 9 | | W0628 | 3 | 5 | | W0589 | 1 | 6 | | W0593 | 1 | 6 | Scenario: possible null-dereference because of an incomplete if statement Given a target source named "fixture.c" with: """ int *bar(void); int foo(int i) { int *p; if (i == 0) { /* true */ p = bar(); } return *p; /* W0422 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 6 | | W0117 | 3 | 5 | | W0460 | 11 | 12 | | C1000 | | | | C1003 | 5 | 10 | | C1002 | 7 | 11 | | W0422 | 11 | 12 | | C1000 | | | | C1005 | 5 | 10 | | C1001 | 7 | 11 | | C1005 | 8 | 11 | | W0100 | 5 | 10 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: possible null-dereference because of an incomplete selection statement Given a target source named "fixture.c" with: """ static void foo(void) { int i; int *p; switch (rand()) { case 0: /* false */ p = &i; break; case 1: /* true */ p = NULL; break; default: return; } *p = 5; /* W0422 */ if (i < rand()) { /* false */ p = &i; } *p = 6; /* W0422 */ if (rand() < 1) { /* false */ p = &i; } *p = 7; /* W0422 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0109 | 6 | 13 | | W0459 | 8 | 13 | | C1000 | | | | C1003 | 3 | 9 | | W0422 | 17 | 5 | | C1000 | | | | C1005 | 4 | 10 | | C1002 | 7 | 5 | | C1001 | 10 | 5 | | C1004 | 11 | 11 | | W0459 | 19 | 11 | | C1000 | | | | C1003 | 3 | 9 | | W0459 | 20 | 13 | | C1000 | | | | C1003 | 3 | 9 | | W0422 | 23 | 5 | | C1000 | | | | C1005 | 4 | 10 | | C1002 | 7 | 5 | | C1001 | 10 | 5 | | C1004 | 11 | 11 | | C1002 | 19 | 11 | | W0459 | 26 | 13 | | C1000 | | | | C1003 | 3 | 9 | | W0422 | 29 | 5 | | C1000 | | | | C1005 | 4 | 10 | | C1002 | 7 | 5 | | C1001 | 10 | 5 | | C1004 | 11 | 11 | | C1002 | 19 | 11 | | C1002 | 25 | 16 | | W0100 | 3 | 9 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: possible null-dereference because of an incomplete iteration statement Given a target source named "fixture.c" with: """ static void foo(void) { int i; int *p; switch (rand()) { case 0: /* false */ p = &i; break; case 1: /* true */ p = NULL; break; default: return; } *p = 5; /* W0422 */ for (i = 0; i < rand(); ++i) { /* false */ p = &i; } *p = 6; /* W0422 */ while (rand() < 1) { /* false */ p = &i; } *p = 7; /* W0422 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0109 | 6 | 13 | | W0459 | 8 | 13 | | C1000 | | | | C1003 | 3 | 9 | | W0422 | 17 | 5 | | C1000 | | | | C1005 | 4 | 10 | | C1002 | 7 | 5 | | C1001 | 10 | 5 | | C1004 | 11 | 11 | | W0422 | 23 | 5 | | C1000 | | | | C1005 | 4 | 10 | | C1002 | 7 | 5 | | C1001 | 10 | 5 | | C1004 | 11 | 11 | | C1002 | 19 | 19 | | W0422 | 29 | 5 | | C1000 | | | | C1005 | 4 | 10 | | C1002 | 7 | 5 | | C1001 | 10 | 5 | | C1004 | 11 | 11 | | C1002 | 19 | 19 | | C1002 | 25 | 19 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0238.feature0000644000004100000410000001001212224440633020776 0ustar www-datawww-dataFeature: W0238 W0238 detects that `long double' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long b = a; /* W0238 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0238 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long b; b = a; /* W0238 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0238 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(long double a) { bar(a); /* W0238 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0238 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(long double a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(long double a) { return a; /* W0238 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0238 | 3 | 12 | | W0374 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(long double a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0206.feature0000644000004100000410000001021612224440633020777 0ustar www-datawww-dataFeature: W0206 W0206 detects that `long long' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { float b = a; /* W0206 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0206 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { float b; b = a; /* W0206 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0206 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(long long a) { bar(a); /* W0206 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0206 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(long long a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(long long a) { return a; /* W0206 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0206 | 3 | 12 | | W0342 | 3 | 5 | | W0104 | 1 | 21 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(long long a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 21 | | W0834 | 1 | 11 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0761.feature0000644000004100000410000001076412224440633021015 0ustar www-datawww-dataFeature: W0761 W0761 detects that `long long' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { int b = a; /* W0761 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0761 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 13 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 9 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { int b; b = a; /* W0761 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0761 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 9 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(long long a) { bar(a); /* W0761 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0761 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(long long a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(long long a) { return a; /* W0761 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0761 | 3 | 12 | | W0395 | 3 | 5 | | W0104 | 1 | 19 | | W0834 | 1 | 9 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(long long a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 19 | | W0104 | 1 | 19 | | W0834 | 1 | 9 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0718.feature0000644000004100000410000000401012224440633021002 0ustar www-datawww-dataFeature: W0718 W0718 detects that operand of right side of bitwise expression or arithmetic expression is `effectively boolean'. Scenario: an arithmetic expression Given a target source named "fixture.c" with: """ static int func(int a, int b, int c) { return a + (b > c); /* W0718 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W0104 | 1 | 35 | | W0629 | 1 | 12 | | W0718 | 3 | 16 | | W0628 | 1 | 12 | Scenario: a bitwise expression Given a target source named "fixture.c" with: """ static int func(int a, int b, int c) { return a ^ (b > c); /* W0718 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 14 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W0104 | 1 | 35 | | W0629 | 1 | 12 | | W0718 | 3 | 16 | | W0628 | 1 | 12 | Scenario: a shift expression Given a target source named "fixture.c" with: """ static int func(int a, int b, int c) { return a << (b > c); /* W0718 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0570 | 3 | 14 | | C1000 | | | | C1006 | 1 | 21 | | W0572 | 3 | 14 | | W0794 | 3 | 14 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W0104 | 1 | 35 | | W0629 | 1 | 12 | | W0718 | 3 | 17 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0185.feature0000644000004100000410000000764012224440633021014 0ustar www-datawww-dataFeature: W0185 W0185 detects that `signed char' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { float b = a; /* W0185 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0185 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { float b; b = a; /* W0185 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0185 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(signed char a) { bar(a); /* W0185 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0185 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(signed char a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(signed char a) { return a; /* W0185 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0185 | 3 | 12 | | W0321 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(signed char a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 23 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0749.feature0000644000004100000410000001044612224440633021020 0ustar www-datawww-dataFeature: W0749 W0749 detects that `int' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { signed char b = a; /* W0749 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0749 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { signed char b; b = a; /* W0749 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0749 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(int a) { bar(a); /* W0749 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0749 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(int a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(int a) { return a; /* W0749 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0749 | 3 | 12 | | W0383 | 3 | 5 | | W0104 | 1 | 21 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(int a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 21 | | W0104 | 1 | 21 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0018.feature0000644000004100000410000001326112224440633021003 0ustar www-datawww-dataFeature: W0018 W0018 detects that precision of the conversion-specifier in `*printf' function call is greater than 509. Scenario: precision of `%f' conversion-specifier in `printf' function call is greater than 509 Given a target source named "fixture.c" with: """ #include int foo(double d) { return printf("%.512f", d); /* W0018 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0018 | 5 | 19 | | W0104 | 3 | 16 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: precision of `%f' conversion-specifier in `printf' function call is equal to 510 Given a target source named "fixture.c" with: """ #include int foo(double d) { return printf("%.510f", d); /* W0018 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0018 | 5 | 19 | | W0104 | 3 | 16 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: precision of `%f' conversion-specifier in `printf' function call is equal to 509 Given a target source named "fixture.c" with: """ #include int foo(double d) { return printf("%.509f", d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 16 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: precision of `%f' conversion-specifier in `printf' function call is less than 509 Given a target source named "fixture.c" with: """ #include int foo(double d) { return printf("%.500f", d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 16 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: no precision of `%f' conversion-specifier in `printf' function call Given a target source named "fixture.c" with: """ #include int foo(double d) { return printf("%f", d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 16 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: precision of `%f' conversion-specifier in `fprintf' function call is greater than 509 Given a target source named "fixture.c" with: """ #include int foo(double d) { return fprintf(stdout, "%.512f", d); /* W0018 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0018 | 5 | 28 | | W0104 | 3 | 16 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: precision of `%f' conversion-specifier in `fprintf' function call is equal to 510 Given a target source named "fixture.c" with: """ #include int foo(double d) { return fprintf(stdout, "%.510f", d); /* W0018 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0018 | 5 | 28 | | W0104 | 3 | 16 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: precision of `%f' conversion-specifier in `fprintf' function call is equal to 509 Given a target source named "fixture.c" with: """ #include int foo(double d) { return fprintf(stdout, "%.509f", d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 16 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: precision of `%f' conversion-specifier in `fprintf' function call is less than 509 Given a target source named "fixture.c" with: """ #include int foo(double d) { return fprintf(stdout, "%.500f", d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 16 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: no precision of `%f' conversion-specifier in `fprintf' function call Given a target source named "fixture.c" with: """ #include int foo(double d) { return fprintf(stdout, "%f", d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 16 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0128.feature0000644000004100000410000000755612224440633021017 0ustar www-datawww-dataFeature: W0128 W0128 detects that `char' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { double b = a; /* W0128 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0128 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { double b; b = a; /* W0128 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0128 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(char a) { bar(a); /* W0128 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0128 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(char a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(char a) { return a; /* W0128 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0128 | 3 | 12 | | W0264 | 3 | 5 | | W0104 | 1 | 17 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(char a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 17 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0119.feature0000644000004100000410000001045712224440633021011 0ustar www-datawww-dataFeature: W0119 W0119 detects that `char' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { signed char b = a; /* W0119 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0119 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { signed char b; b = a; /* W0119 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0119 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(char a) { bar(a); /* W0119 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0119 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(char a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(char a) { return a; /* W0119 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0119 | 3 | 12 | | W0255 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(char a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0208.feature0000644000004100000410000001033412224440633021002 0ustar www-datawww-dataFeature: W0208 W0208 detects that `long long' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { long double b = a; /* W0208 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0208 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { long double b; b = a; /* W0208 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0208 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(long long a) { bar(a); /* W0208 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0208 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(long long a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(long long a) { return a; /* W0208 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0208 | 3 | 12 | | W0344 | 3 | 5 | | W0104 | 1 | 27 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(long long a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 27 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0218.feature0000644000004100000410000000770512224440633021013 0ustar www-datawww-dataFeature: W0218 W0218 detects that `float' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned int b = a; /* W0218 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0218 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned int b; b = a; /* W0218 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0218 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(float a) { bar(a); /* W0218 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0218 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(float a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(float a) { return a; /* W0218 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0218 | 3 | 12 | | W0354 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(float a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0104 | 1 | 24 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0007.feature0000644000004100000410000001461112224440633021001 0ustar www-datawww-dataFeature: W0007 W0007 detects that the previous case or default clause does not have a jump-statement at the last statement. Scenario: no jump-statement in the previous case clause Given a target source named "fixture.c" with: """ static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; case 2: j = 2; case 3: /* W0007 */ j = 3; break; default: j = 0; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0007 | 11 | 5 | | W0628 | 1 | 12 | Scenario: a break-statement at the middle of the previous case clause Given a target source named "fixture.c" with: """ extern int rand(void); static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; case 2: if (rand() == 0) { j = -1; break; } j = 2; case 3: /* W0007 */ j = 3; break; default: j = 0; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0007 | 17 | 5 | | W0532 | 14 | 13 | | W0628 | 3 | 12 | Scenario: a break-statement at the bottom of the previous case clause Given a target source named "fixture.c" with: """ static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; case 2: j = 2; break; case 3: /* OK */ j = 3; break; default: j = 0; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: a return-statement at the bottom of the previous case clause Given a target source named "fixture.c" with: """ static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; case 2: j = 2; return j; case 3: /* OK */ j = 3; break; default: j = 0; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: no jump-statement in the previous default clause Given a target source named "fixture.c" with: """ static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; default: j = 2; case 3: /* W0007 */ j = 3; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0007 | 11 | 5 | | W0538 | 9 | 5 | | W0628 | 1 | 12 | Scenario: a break-statement at the middle of the previous default clause Given a target source named "fixture.c" with: """ extern int rand(void); static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; default: if (rand() == 0) { j = -1; break; } j = 2; case 3: /* W0007 */ j = 3; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0007 | 17 | 5 | | W0532 | 14 | 13 | | W0538 | 11 | 5 | | W0628 | 3 | 12 | Scenario: a break-statement at the bottom of the previous default clause Given a target source named "fixture.c" with: """ static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; case 2: j = 2; break; case 3: /* OK */ j = 3; break; default: j = 0; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: a return-statement at the bottom of the previous default clause Given a target source named "fixture.c" with: """ static int foo(const int i) { int j; switch (i) { case 1: j = 1; break; default: j = 2; return j; case 3: /* OK */ j = 3; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0538 | 9 | 5 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0223.feature0000644000004100000410000000773312224440633021010 0ustar www-datawww-dataFeature: W0223 W0223 detects that `double' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned char b = a; /* W0223 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0223 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned char b; b = a; /* W0223 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0223 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(double a) { bar(a); /* W0223 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0223 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(double a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(double a) { return a; /* W0223 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0223 | 3 | 12 | | W0359 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(double a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 26 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0165.feature0000644000004100000410000001050012224440633020777 0ustar www-datawww-dataFeature: W0165 W0165 detects that `int' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned char b = a; /* W0165 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0165 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned char b; b = a; /* W0165 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0165 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 19 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(int a) { bar(a); /* W0165 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0165 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(int a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(int a) { return a; /* W0165 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0165 | 3 | 12 | | W0301 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(int a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 23 | | W0104 | 1 | 23 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0237.feature0000644000004100000410000000762312224440633021013 0ustar www-datawww-dataFeature: W0237 W0237 detects that `long double' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { long b = a; /* W0237 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0237 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { long b; b = a; /* W0237 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0237 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(long double a) { bar(a); /* W0237 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0237 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(long double a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(long double a) { return a; /* W0237 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0237 | 3 | 12 | | W0373 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(long double a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0003.feature0000644000004100000410000000606112224440633020775 0ustar www-datawww-dataFeature: W0003 W0003 detects that no default clause is in the switch-statement. Scenario: no default clause Given a target source named "fixture.c" with: """ int foo(int i) { int j; switch(i) { /* W0003 */ case 1: j = 1; break; case 2: j = 2; break; case 3: j = 3; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0460 | 17 | 12 | | C1000 | | | | C1003 | 3 | 9 | | C1002 | 6 | 5 | | C1002 | 9 | 5 | | C1002 | 12 | 5 | | W0104 | 1 | 13 | | W0003 | 5 | 5 | | W0628 | 1 | 5 | Scenario: a default clause at the bottom Given a target source named "fixture.c" with: """ int foo(int i) { int j; switch(i) { /* OK */ case 1: j = 1; break; case 2: j = 2; break; case 3: j = 3; break; default: j = 4; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W0628 | 1 | 5 | Scenario: a default clause at the middle Given a target source named "fixture.c" with: """ int foo(int i) { int j; switch(i) { /* OK */ case 1: j = 1; break; default: j = 4; break; case 2: j = 2; break; case 3: j = 3; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W0538 | 9 | 5 | | W0628 | 1 | 5 | Scenario: a default clause at the top Given a target source named "fixture.c" with: """ int foo(int i) { int j; switch(i) { /* OK */ default: j = 4; break; case 1: j = 1; break; case 2: j = 2; break; case 3: j = 3; break; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 13 | | W0538 | 6 | 5 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0716.feature0000644000004100000410000000411612224440633021007 0ustar www-datawww-dataFeature: W0716 W0716 detects that operands of both sides of bitwise expression or arithmetic expression are `effectively boolean'. Scenario: an arithmetic expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a > b) + (c > d); /* W0716 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 20 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0716 | 3 | 20 | | W0628 | 1 | 12 | Scenario: a bitwise expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a > b) ^ (c > d); /* W0716 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 20 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0716 | 3 | 20 | | W0628 | 1 | 12 | Scenario: a shift expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a > b) << (c > d); /* W0716 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0570 | 3 | 20 | | W0572 | 3 | 20 | | W0794 | 3 | 20 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0716 | 3 | 20 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0001.feature0000644000004100000410000000244112224440633020771 0ustar www-datawww-dataFeature: W0001 W0001 detects that a number of the expression grouping is greater than 32. Scenario: deeply grouped in initializer Given a target source named "fixture.c" with: """ static void foo(void) { const int a = 10; const int b = 20; const int c = (((((((((((((((((((((((((((((((((a + b))))))))))))))))))))))))))))))))); /* W0001 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0001 | 5 | 51 | | W0628 | 1 | 13 | Scenario: deeply grouped in expression-statement Given a target source named "fixture.c" with: """ static void foo(void) { const int a = 10; const int b = 20; int c; c = (((((((((((((((((((((((((((((((((a + b))))))))))))))))))))))))))))))))); /* W0001 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0100 | 5 | 9 | | W0629 | 1 | 13 | | W0001 | 6 | 41 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0125.feature0000644000004100000410000000752412224440633021007 0ustar www-datawww-dataFeature: W0125 W0125 detects that `char' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { long b = a; /* W0125 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0125 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { long b; b = a; /* W0125 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0125 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(char a) { bar(a); /* W0125 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0125 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(char a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(char a) { return a; /* W0125 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0125 | 3 | 12 | | W0261 | 3 | 5 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(char a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0254.feature0000644000004100000410000001054612224440633021010 0ustar www-datawww-dataFeature: W0254 W0254 detects that `unsigned long' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long long b = a; /* W0254 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0254 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long long b; b = a; /* W0254 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0254 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned long a) { bar(a); /* W0254 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0254 | 5 | 9 | | W0104 | 3 | 24 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned long a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned long a) { return a; /* W0254 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0254 | 3 | 12 | | W0410 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned long a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W0635.feature0000644000004100000410000000301612224440633021005 0ustar www-datawww-dataFeature: W0635 W0635 detects that the argument type is not suitable for the corresponding conversion-specifier. Scenario: `%s' conversion-specifiers with various arguments Given a target source named "fixture.c" with: """ #include int main(void) { const char * const foo = "foo"; const unsigned char * const bar = "bar"; signed char *baz = "baz"; char * const qux = "qux"; return printf("%s %s %s %s", foo, bar, baz, qux); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W9003 | 7 | 24 | | W0100 | 7 | 18 | | W0947 | 5 | 30 | | W0947 | 6 | 39 | | W0947 | 7 | 24 | | W0947 | 8 | 24 | | W0947 | 10 | 19 | Scenario: `%s' conversion-specifiers with bad arguments Given a target source named "fixture.c" with: """ #include int main(void) { int foo = 0; const int bar = 0; const int * const baz = 0; return printf("%s %s %s", foo, bar, baz); /* W0635 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0635 | 9 | 19 | | W0635 | 9 | 19 | | W0635 | 9 | 19 | | W0100 | 5 | 9 | | W0947 | 9 | 19 | adlint-3.2.0/features/code_check/W0236.feature0000644000004100000410000000777512224440633021022 0ustar www-datawww-dataFeature: W0236 W0236 detects that `long double' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned int b = a; /* W0236 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0236 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned int b; b = a; /* W0236 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0236 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(long double a) { bar(a); /* W0236 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0236 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(long double a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(long double a) { return a; /* W0236 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0236 | 3 | 12 | | W0372 | 3 | 5 | | W0104 | 1 | 30 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(long double a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0104 | 1 | 30 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0156.feature0000644000004100000410000001202512224440633021003 0ustar www-datawww-dataFeature: W0156 W0156 detects that `unsigned long long' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long long b = a; /* W0156 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0156 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 19 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 15 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long long b; b = a; /* W0156 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0156 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 15 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned long long a) { bar(a); /* W0156 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0156 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 1 | 17 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned long long a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 29 | | W0104 | 3 | 29 | | W0834 | 1 | 17 | | W0834 | 3 | 10 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned long long a) { return a; /* W0156 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0156 | 3 | 12 | | W0292 | 3 | 5 | | W0104 | 1 | 34 | | W0834 | 1 | 1 | | W0834 | 1 | 15 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned long long a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 34 | | W0104 | 1 | 34 | | W0834 | 1 | 1 | | W0834 | 1 | 15 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W1077.feature0000644000004100000410000000666512224440633021023 0ustar www-datawww-dataFeature: W1077 W1077 detects that an array variable declared without number of its elements. Scenario: 1-dimensional array variable declaration without size Given a target source named "fixture.c" with: """ extern int a[]; /* W1077 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1077 | 1 | 12 | Scenario: 1-dimensional array variable declaration with size Given a target source named "fixture.c" with: """ extern int a[3]; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | Scenario: 2-dimensional array variable declaration without all sizes Given a target source named "fixture.c" with: """ extern int a[][]; /* W1077 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1028 | 1 | 12 | | W1077 | 1 | 12 | Scenario: 2-dimensional array variable declaration without outer size Given a target source named "fixture.c" with: """ extern int a[][3]; /* W1077 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1077 | 1 | 12 | Scenario: 2-dimensional array variable declaration with all sizes Given a target source named "fixture.c" with: """ extern int a[2][3]; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | Scenario: 3-dimensional array variable declaration without all sizes Given a target source named "fixture.c" with: """ extern int a[][][]; /* W1077 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1028 | 1 | 12 | | W1077 | 1 | 12 | Scenario: 3-dimensional array variable declaration with all sizes Given a target source named "fixture.c" with: """ extern int a[1][2][3]; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | Scenario: cv-qualified 3-dimensional array variable declaration without all sizes Given a target source named "fixture.c" with: """ extern const int a[][][]; /* W1077 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 18 | | W1028 | 1 | 18 | | W1077 | 1 | 18 | Scenario: cv-qualified 3-dimensional array variable declaration with all sizes Given a target source named "fixture.c" with: """ extern const int a[1][2][3]; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 18 | adlint-3.2.0/features/code_check/W0479.feature0000644000004100000410000000377512224440633021027 0ustar www-datawww-dataFeature: W0479 W0479 detects that the macro can replace with a typedef declaration. Scenario: having the two type specifier Given a target source named "fixture.c" with: """ #define UINT unsigned int /* W0479 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | Scenario: having the type specifier and qualifier Given a target source named "fixture.c" with: """ #define CINT const int /* W0479 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | Scenario: having the type specifier and pointer Given a target source named "fixture.c" with: """ #define PLONG long * /* W0479 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | Scenario: having the type specifier, qualifier and pointer Given a target source named "fixture.c" with: """ #define V_CLONG volatile long * const /* W0479 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | Scenario: having a type specifier Given a target source named "fixture.c" with: """ #define INT int /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0482 | 1 | 1 | Scenario: having a type qualifier Given a target source named "fixture.c" with: """ #define CONST const /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0483 | 1 | 1 | adlint-3.2.0/features/code_check/W0753.feature0000644000004100000410000001045712224440633021015 0ustar www-datawww-dataFeature: W0753 W0753 detects that `long' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { signed char b = a; /* W0753 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0753 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { signed char b; b = a; /* W0753 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0753 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 17 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(long a) { bar(a); /* W0753 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0753 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(long a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(long a) { return a; /* W0753 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0753 | 3 | 12 | | W0387 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(long a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0104 | 1 | 22 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/E0013.feature0000644000004100000410000000153312224440633020753 0ustar www-datawww-dataFeature: E0013 E0013 detects that an expression contains statements. Scenario: statements in initializer Given a target source named "fixture.c" with: """ int foo(int i) { int j = ({ volatile int *p = &i; i - 1; }); /* E0013 */ if (j == 0) { return 0; } else { return foo(j); } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | E0013 | 3 | 13 | | W0117 | 1 | 5 | | W0556 | 9 | 19 | | W0100 | 3 | 9 | | W0031 | 1 | 13 | | W0104 | 1 | 13 | | W1071 | 1 | 5 | | W0555 | 1 | 5 | | W0589 | 1 | 5 | | W0591 | 1 | 5 | adlint-3.2.0/features/code_check/W0025.feature0000644000004100000410000000376612224440633021012 0ustar www-datawww-dataFeature: W0025 W0025 detects that there is redundant #include in a source file. Scenario: redundant #include of user header Given a target source named "fixture.c" with: """ #include "test.h" #include "test2.h" #include "test.h" /* W0025 */ """ And a target source named "test.h" with: """ """ And a target source named "test2.h" with: """ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0025 | 3 | 1 | | W0071 | 1 | 1 | | W0071 | 2 | 1 | | W0071 | 3 | 1 | Scenario: no redundant #include of user header Given a target source named "fixture.c" with: """ #include "test.h" #include "test2.h" /* OK */ """ And a target source named "test.h" with: """ """ And a target source named "test2.h" with: """ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0071 | 1 | 1 | | W0071 | 2 | 1 | Scenario: redundant #include of system header Given a target source named "fixture.c" with: """ #include #include #include /* W0025 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0025 | 3 | 1 | | W0070 | 1 | 1 | | W0070 | 2 | 1 | | W0070 | 3 | 1 | Scenario: no redundant #include of system header Given a target source named "fixture.c" with: """ #include #include /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0070 | 1 | 1 | | W0070 | 2 | 1 | adlint-3.2.0/features/code_check/W0246.feature0000644000004100000410000000763012224440633021011 0ustar www-datawww-dataFeature: W0246 W0246 detects that `unsigned char' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { int b = a; /* W0246 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0246 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { int b; b = a; /* W0246 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0246 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned char a) { bar(a); /* W0246 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0246 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned char a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned char a) { return a; /* W0246 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0246 | 3 | 12 | | W0402 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned char a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W1046.feature0000644000004100000410000000346012224440633021005 0ustar www-datawww-dataFeature: W1046 W1046 detects that a space or tab character is found after newline escaping `\' character. Scenario: illformed newline escape in #define directive Given a target source named "fixture.c" with: """ #define FOO(a, b) /* OK */ \ ( /* W1046 */ \ (a) + (b) /* W1046 */ \ ) """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1046 | 2 | 33 | | W1046 | 3 | 33 | | W0442 | 1 | 1 | | W0443 | 1 | 1 | Scenario: illformed newline escape in declaration Given a target source named "fixture.c" with: """ const char *str = "foo" /* OK */ \ "bar" /* W1046 */ \ "baz" /* W1046 */ \ "qux"; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1046 | 2 | 41 | | W1046 | 3 | 41 | | W0117 | 1 | 13 | | W0947 | 1 | 19 | Scenario: illformed newline escape in expression Given a target source named "fixture.c" with: """ static void bar(const char *str); void foo(void) { bar("foo" /* OK */ \ "bar" /* W1046 */ \ "baz" /* W1046 */ \ "qux"); } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1046 | 6 | 31 | | W1046 | 7 | 31 | | W0117 | 3 | 6 | | W0947 | 5 | 9 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0498.feature0000644000004100000410000000724512224440633021024 0ustar www-datawww-dataFeature: W0498 W0498 detects that different operators of the same priority appear in an expression without appropriate grouping. Scenario: multiple additive-expressions in an expression Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a + b - 5; /* W0498 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0723 | 3 | 18 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0498 | 3 | 12 | | W0628 | 1 | 12 | Scenario: multiple additive-expressions in an expression with grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a + (b - 5); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 19 | | W0723 | 3 | 14 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: multiple additive-expressions in an expression with large grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a + b - 5); /* W0498 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 19 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0498 | 3 | 12 | | W0628 | 1 | 12 | Scenario: multiple multiplicative-expressions in an expression Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a * b / 5; /* W0498 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0498 | 3 | 12 | | W0628 | 1 | 12 | Scenario: multiple multiplicative-expressions in an expression with grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a * (b / 5); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: multiple multiplicative-expressions in an expression grouped entirely Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a * b / 5); /* W0498 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0498 | 3 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0686.feature0000644000004100000410000000526512224440633021023 0ustar www-datawww-dataFeature: W0686 W0686 detects that the same characters exist in a scanset. Scenario: same characters exist in a scanset Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[aa]", &c); /* W0686 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 28 | | C1000 | | | | C1003 | 5 | 10 | | W0686 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: same characters exist in a scanset Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[111]", &c); /* W0686 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0686 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: same characters exist in a scanset Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[ababa]", &c); /* W0686 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 31 | | C1000 | | | | C1003 | 5 | 10 | | W0686 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: proper character list in a scanset Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[abcde]", &c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 31 | | C1000 | | | | C1003 | 5 | 10 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0146.feature0000644000004100000410000001045112224440633021003 0ustar www-datawww-dataFeature: W0146 W0146 detects that `unsigned int' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { short b = a; /* W0146 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0146 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 15 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { short b; b = a; /* W0146 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0146 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned int a) { bar(a); /* W0146 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0146 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned int a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 23 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned int a) { return a; /* W0146 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0146 | 3 | 12 | | W0282 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned int a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 24 | | W0104 | 1 | 24 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0180.feature0000644000004100000410000001116612224440633021005 0ustar www-datawww-dataFeature: W0180 W0180 detects that `long long' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long b = a; /* W0180 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0180 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long b; b = a; /* W0180 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0180 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 19 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(long long a) { bar(a); /* W0180 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0180 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(long long a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(long long a) { return a; /* W0180 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0180 | 3 | 12 | | W0316 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(long long a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 29 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0786.feature0000644000004100000410000000224612224440633021020 0ustar www-datawww-dataFeature: W0786 W0786 detects that a bit-field whose base type is not in signed or unsigned `int' is declared. Scenario: typedefed `unsigned long' bit-field declaration Given a target source named "fixture.c" with: """ typedef unsigned long base_t; static struct { /* W0786 */ base_t :1; /* bit padding */ base_t foo:1; base_t :1; /* bit padding */ base_t bar:1; base_t :1; /* bit padding */ } bf; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0786 | 3 | 8 | Scenario: typedefed `unsigned int' bit-field declaration Given a target source named "fixture.c" with: """ typedef unsigned int base_t; static struct { /* OK */ base_t :1; /* bit padding */ base_t foo:1; base_t :1; /* bit padding */ base_t bar:1; base_t :1; /* bit padding */ } bf; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W0144.feature0000644000004100000410000001047312224440633021005 0ustar www-datawww-dataFeature: W0144 W0144 detects that `unsigned short' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { short b = a; /* W0144 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0144 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 15 | | C1000 | | | | C1006 | 1 | 25 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { short b; b = a; /* W0144 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0144 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 25 | | W0100 | 3 | 11 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned short a) { bar(a); /* W0144 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0144 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(unsigned short a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 25 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned short a) { return a; /* W0144 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0144 | 3 | 12 | | W0280 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(unsigned short a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 26 | | W0104 | 1 | 26 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0159.feature0000644000004100000410000001057512224440633021016 0ustar www-datawww-dataFeature: W0159 W0159 detects that `signed char' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned int b = a; /* W0159 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0159 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 22 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned int b; b = a; /* W0159 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0159 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(signed char a) { bar(a); /* W0159 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0159 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(signed char a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 22 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(signed char a) { return a; /* W0159 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0159 | 3 | 12 | | W0295 | 3 | 5 | | W0104 | 1 | 30 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(signed char a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 30 | | W0104 | 1 | 30 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0250.feature0000644000004100000410000001043412224440633021000 0ustar www-datawww-dataFeature: W0250 W0250 detects that `unsigned int' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long b = a; /* W0250 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0250 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 14 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long b; b = a; /* W0250 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0250 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned int a) { bar(a); /* W0250 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0250 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned int a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 23 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned int a) { return a; /* W0250 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0250 | 3 | 12 | | W0406 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned int a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 23 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0197.feature0000644000004100000410000000765112224440633021021 0ustar www-datawww-dataFeature: W0197 W0197 detects that `unsigned int' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { float b = a; /* W0197 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0197 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { float b; b = a; /* W0197 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0197 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned int a) { bar(a); /* W0197 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0197 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned int a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned int a) { return a; /* W0197 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0197 | 3 | 12 | | W0333 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned int a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 24 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0231.feature0000644000004100000410000000775612224440633021014 0ustar www-datawww-dataFeature: W0231 W0231 detects that `long double' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { signed char b = a; /* W0231 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0231 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { signed char b; b = a; /* W0231 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0231 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(long double a) { bar(a); /* W0231 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0231 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(long double a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(long double a) { return a; /* W0231 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0231 | 3 | 12 | | W0367 | 3 | 5 | | W0104 | 1 | 29 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(long double a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 29 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0023.feature0000644000004100000410000001623212224440633021000 0ustar www-datawww-dataFeature: W0023 W0023 detects that a pointer variable appears in the arithmetic operation. Scenario: additive-expression with a pointer variable Given a target source named "fixture.c" with: """ long func(const int * const p) { const long r = p + 10L; /* W0023 */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W9003 | 3 | 24 | | W0023 | 3 | 22 | | W0424 | 3 | 20 | | C1000 | | | | C1005 | 1 | 29 | | W9003 | 3 | 22 | | W0628 | 1 | 6 | Scenario: multiplicative-expression with a pointer variable Given a target source named "fixture.c" with: """ long func(const int * const p) { const long r = p * 2L; /* W0023 */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W9003 | 3 | 24 | | W0023 | 3 | 22 | | W0424 | 3 | 20 | | C1000 | | | | C1005 | 1 | 29 | | W9003 | 3 | 22 | | W0628 | 1 | 6 | Scenario: additive-expression with pointer variables Given a target source named "fixture.c" with: """ long func(const int * const p, const int * const q) { const long r = p - q; /* W0023 */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0023 | 3 | 22 | | W0424 | 3 | 20 | | C1000 | | | | C1005 | 1 | 29 | | W0424 | 3 | 24 | | C1000 | | | | C1005 | 1 | 50 | | W1052 | 3 | 22 | | W9003 | 3 | 22 | | W0628 | 1 | 6 | Scenario: multiplicative-expression with pointer variables Given a target source named "fixture.c" with: """ long func(const int * const p, const int * const q) { const long r = p / q; /* W0023 */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0023 | 3 | 22 | | W0093 | 3 | 22 | | C1000 | | | | C1006 | 1 | 50 | | W0424 | 3 | 20 | | C1000 | | | | C1005 | 1 | 29 | | W0424 | 3 | 24 | | C1000 | | | | C1005 | 1 | 50 | | W9003 | 3 | 22 | | W0628 | 1 | 6 | Scenario: additive-expression and multiplicative-expression with pointer variables Given a target source named "fixture.c" with: """ long func(const int * const p, const int * const q, const int * const r) { const long s = (p + q) * r; /* W0023 */ return s; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0023 | 3 | 23 | | W0424 | 3 | 21 | | C1000 | | | | C1005 | 1 | 29 | | W0424 | 3 | 25 | | C1000 | | | | C1005 | 1 | 50 | | W1052 | 3 | 23 | | W0023 | 3 | 28 | | W0424 | 3 | 20 | | W0424 | 3 | 30 | | C1000 | | | | C1005 | 1 | 71 | | W1052 | 3 | 28 | | W9003 | 3 | 28 | | W0628 | 1 | 6 | Scenario: additive-expression and increment operation with pointer variables Given a target source named "fixture.c" with: """ long func(const int * const p, const int * const q) { const long r = q - p + 1; /* W0023 */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0023 | 3 | 22 | | W0424 | 3 | 20 | | C1000 | | | | C1005 | 1 | 50 | | W0424 | 3 | 24 | | C1000 | | | | C1005 | 1 | 29 | | W1052 | 3 | 22 | | W9003 | 3 | 28 | | W0024 | 3 | 26 | | W0424 | 3 | 22 | | W9003 | 3 | 26 | | W0498 | 3 | 20 | | W0628 | 1 | 6 | Scenario: additive-expression with an array vairable Given a target source named "fixture.c" with: """ long func(void) { const long a[] = { 0, 1, 2 }; const long r = a + 10L; /* W0023 */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W9003 | 4 | 24 | | W0023 | 4 | 22 | | W9003 | 4 | 22 | | W0628 | 1 | 6 | Scenario: shift-expression with pointer variables Given a target source named "fixture.c" with: """ long func(const int * const p, const int * const q) { const long r = p << q; /* OK */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0116 | 3 | 22 | | C1000 | | | | C1006 | 1 | 29 | | W0424 | 3 | 20 | | C1000 | | | | C1005 | 1 | 29 | | W0424 | 3 | 25 | | C1000 | | | | C1005 | 1 | 50 | | W9003 | 3 | 22 | | W0628 | 1 | 6 | Scenario: equality-expression with pointer variables Given a target source named "fixture.c" with: """ int func(const int * const p, const int * const q) { return p != q; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0027 | 3 | 14 | | W0628 | 1 | 5 | Scenario: assignment-expression with a pointer variable Given a target source named "fixture.c" with: """ long func(const int * const p) { long r = 0; r += p; /* OK */ return r; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W9003 | 4 | 5 | | W0023 | 4 | 7 | | W0424 | 4 | 10 | | C1000 | | | | C1005 | 1 | 29 | | W9003 | 4 | 5 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0833.feature0000644000004100000410000001521012224440633021004 0ustar www-datawww-dataFeature: W0833 W0833 detects that an integer-constant has a long-long-suffix `LL'. Scenario: LL-ed decimal-constant in initializer Given a target source named "fixture.c" with: """ long long ll = 123LL; /* W0833 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0833 | 1 | 16 | | W0117 | 1 | 11 | | W0834 | 1 | 1 | Scenario: LL-ed octal-constant in initializer Given a target source named "fixture.c" with: """ long long ll = 0123LL; /* W0833 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0833 | 1 | 16 | | W0117 | 1 | 11 | | W0529 | 1 | 16 | | W0834 | 1 | 1 | Scenario: LL-ed hexadecimal-constant in initializer Given a target source named "fixture.c" with: """ long long ll = 0x123LL; /* W0833 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0833 | 1 | 16 | | W0117 | 1 | 11 | | W0834 | 1 | 1 | Scenario: ULL-ed decimal-constant in initializer Given a target source named "fixture.c" with: """ unsigned long long ull = 123ULL; /* W0833 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0833 | 1 | 26 | | W0117 | 1 | 20 | | W0834 | 1 | 1 | Scenario: ULL-ed octal-constant in initializer Given a target source named "fixture.c" with: """ unsigned long long ull = 0123LLU; /* W0833 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0833 | 1 | 26 | | W0117 | 1 | 20 | | W0529 | 1 | 26 | | W0834 | 1 | 1 | Scenario: ULL-ed hexadecimal-constant in initializer Given a target source named "fixture.c" with: """ unsigned long long ull = 0x123LLU; /* W0833 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0833 | 1 | 26 | | W0117 | 1 | 20 | | W0834 | 1 | 1 | Scenario: LL-ed decimal-constant in assignment-expression Given a target source named "fixture.c" with: """ void foo(void) { long long ll; ll = 123LL; /* W0833 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0833 | 4 | 10 | | W0100 | 3 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: LL-ed octal-constant in assignment-expression Given a target source named "fixture.c" with: """ void foo(void) { long long ll; ll = 0123LL; /* W0833 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0833 | 4 | 10 | | W0100 | 3 | 15 | | W0834 | 3 | 5 | | W0529 | 4 | 10 | | W0628 | 1 | 6 | Scenario: LL-ed hexadecimal-constant in assignment-expression Given a target source named "fixture.c" with: """ void foo(void) { long long ll; ll = 0x123LL; /* W0833 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0833 | 4 | 10 | | W0100 | 3 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: ULL-ed decimal-constant in assignment-expression Given a target source named "fixture.c" with: """ void foo(void) { unsigned long long ull; ull = 123LLU; /* W0833 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0833 | 4 | 11 | | W0100 | 3 | 24 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: ULL-ed octal-constant in assignment-expression Given a target source named "fixture.c" with: """ void foo(void) { unsigned long long ull; ull = 0123ULL; /* W0833 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0833 | 4 | 11 | | W0100 | 3 | 24 | | W0834 | 3 | 5 | | W0529 | 4 | 11 | | W0628 | 1 | 6 | Scenario: ULL-ed hexadecimal-constant in assignment-expression Given a target source named "fixture.c" with: """ void foo(void) { unsigned long long ull; ull = 0x123LLU; /* W0833 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0833 | 4 | 11 | | W0100 | 3 | 24 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: L-ed decimal-constant in initializer Given a target source named "fixture.c" with: """ long l = 123L; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | Scenario: LL-ed octal-constant in initializer Given a target source named "fixture.c" with: """ long l = 0123L; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0529 | 1 | 10 | Scenario: LL-ed hexadecimal-constant in initializer Given a target source named "fixture.c" with: """ long l = 0x123L; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | adlint-3.2.0/features/code_check/W1052.feature0000644000004100000410000000405212224440633021000 0ustar www-datawww-dataFeature: W1052 W1052 detects that an arithmetic operation of unsigned values may be overflow. Scenario: multiplication of two arbitrary `unsigned char' values Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned char a, unsigned char b) { return a * b; /* W1052 should not be output */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0246 | 3 | 12 | | W0246 | 3 | 16 | | W0167 | 3 | 14 | | W0303 | 3 | 5 | | W0104 | 1 | 39 | | W0104 | 1 | 56 | | W0629 | 1 | 21 | | W0628 | 1 | 21 | Scenario: multiplication of two arbitrary `unsigned short' values Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned short a, unsigned short b) { return a * b; /* W1052 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W0248 | 3 | 12 | | W0248 | 3 | 16 | | W1052 | 3 | 14 | | W0167 | 3 | 14 | | W0303 | 3 | 5 | | W0104 | 1 | 40 | | W0104 | 1 | 58 | | W0629 | 1 | 21 | | W0628 | 1 | 21 | Scenario: multiplication of two arbitrary `unsigned int' values Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b) { return a * b; /* W1052 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W1052 | 3 | 14 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0629 | 1 | 21 | | W0628 | 1 | 21 | adlint-3.2.0/features/code_check/W0215.feature0000644000004100000410000000755212224440633021010 0ustar www-datawww-dataFeature: W0215 W0215 detects that `float' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { short b = a; /* W0215 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0215 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { short b; b = a; /* W0215 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0215 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(float a) { bar(a); /* W0215 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0215 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(float a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(float a) { return a; /* W0215 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0215 | 3 | 12 | | W0351 | 3 | 5 | | W0104 | 1 | 17 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(float a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 17 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0148.feature0000644000004100000410000001060212224440633021003 0ustar www-datawww-dataFeature: W0148 W0148 detects that `unsigned long' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { signed char b = a; /* W0148 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0148 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { signed char b; b = a; /* W0148 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0148 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned long a) { bar(a); /* W0148 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0148 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned long a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 24 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned long a) { return a; /* W0148 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0148 | 3 | 12 | | W0284 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned long a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 31 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0230.feature0000644000004100000410000000762312224440633021004 0ustar www-datawww-dataFeature: W0230 W0230 detects that `long double' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { char b = a; /* W0230 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0230 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { char b; b = a; /* W0230 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0230 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(long double a) { bar(a); /* W0230 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0230 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(long double a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(long double a) { return a; /* W0230 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0230 | 3 | 12 | | W0366 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(long double a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0024.feature0000644000004100000410000001670412224440633021005 0ustar www-datawww-dataFeature: W0024 W0024 detects that a pointer variable appears in the increment or decrement operation. Scenario: postfix-increment-expression with a pointer variable Given a target source named "fixture.c" with: """ const int *func(const int *p) { return p++; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0024 | 3 | 13 | | W0628 | 1 | 12 | Scenario: prefix-increment-expression with a pointer variable Given a target source named "fixture.c" with: """ const int *func(const int *p) { return ++p; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0024 | 3 | 12 | | W0424 | 3 | 14 | | C1000 | | | | C1005 | 1 | 28 | | W0628 | 1 | 12 | Scenario: a pointer variable as lhs of the additive-expression Given a target source named "fixture.c" with: """ const int *func(const int * const p) { return p + 1; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W9003 | 3 | 16 | | W0024 | 3 | 14 | | W0424 | 3 | 12 | | C1000 | | | | C1005 | 1 | 35 | | W0628 | 1 | 12 | Scenario: a pointer variable as rhs of the additive-expression Given a target source named "fixture.c" with: """ const int *func(const int * const p) { return 1 + p; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W9003 | 3 | 12 | | W0024 | 3 | 14 | | W0424 | 3 | 16 | | C1000 | | | | C1005 | 1 | 35 | | W0628 | 1 | 12 | Scenario: a pointer variable as lhs of the additive-expression Given a target source named "fixture.c" with: """ const int *func(const int *p) { p = p + 1; /* W0024 */ return p; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W9003 | 3 | 14 | | W0024 | 3 | 12 | | W0424 | 3 | 10 | | C1000 | | | | C1005 | 1 | 28 | | W0628 | 1 | 12 | Scenario: postfix-decrement-expression with a pointer variable Given a target source named "fixture.c" with: """ const int *func(const int *p) { return p--; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0024 | 3 | 13 | | W0424 | 3 | 12 | | C1000 | | | | C1005 | 1 | 28 | | W0628 | 1 | 12 | Scenario: prefix-decrement-expression with a pointer variable Given a target source named "fixture.c" with: """ const int *func(const int *p) { return --p; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0024 | 3 | 12 | | W0424 | 3 | 14 | | C1000 | | | | C1005 | 1 | 28 | | W0628 | 1 | 12 | Scenario: a pointer variable as lhs of the additive-expression Given a target source named "fixture.c" with: """ const int *func(const int * const p) { return p - 1; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W9003 | 3 | 16 | | W0024 | 3 | 14 | | W0424 | 3 | 12 | | C1000 | | | | C1005 | 1 | 35 | | W0628 | 1 | 12 | Scenario: a pointer variable as rhs of the additive-expression Given a target source named "fixture.c" with: """ const int *func(const int * const p) { return 1 - p; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W9003 | 3 | 12 | | W0024 | 3 | 14 | | W0424 | 3 | 16 | | C1000 | | | | C1005 | 1 | 35 | | W0628 | 1 | 12 | Scenario: pointer variables are incremented and decremented Given a target source named "fixture.c" with: """ const int *func(const int *p, const int *q) { return p++ & q--; /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0024 | 3 | 13 | | W0024 | 3 | 19 | | W0424 | 3 | 18 | | C1000 | | | | C1005 | 1 | 42 | | W0424 | 3 | 13 | | W0424 | 3 | 19 | | W0628 | 1 | 12 | Scenario: pointer variables are incremented in arithmetic operations Given a target source named "fixture.c" with: """ const int *func(const int *p, const int *q) { return (p++) * (q++); /* W0024 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0024 | 3 | 14 | | W0024 | 3 | 22 | | W0023 | 3 | 18 | | W0424 | 3 | 12 | | W0424 | 3 | 20 | | W1052 | 3 | 18 | | W0628 | 1 | 12 | Scenario: pointer variable plus 2 Given a target source named "fixture.c" with: """ const int *func(const int * const p) { return p + 2; /* Ok but W0023 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W9003 | 3 | 16 | | W0023 | 3 | 14 | | W0424 | 3 | 12 | | C1000 | | | | C1005 | 1 | 35 | | W0628 | 1 | 12 | Scenario: pointer variable minus 2 Given a target source named "fixture.c" with: """ const int *func(const int * const p) { return p - 2; /* Ok but W0023 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W9003 | 3 | 16 | | W0023 | 3 | 14 | | W0424 | 3 | 12 | | C1000 | | | | C1005 | 1 | 35 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0688.feature0000644000004100000410000000353112224440633021017 0ustar www-datawww-dataFeature: W0688 W0688 detects that the line number of #line directive is less than 1 or greater than 32767. Scenario: zero as the line number Given a target source named "fixture.c" with: """ #line 0 "test.c" /* W0688 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0688 | 1 | 7 | Scenario: valid min line number Given a target source named "fixture.c" with: """ #line 1 "test.c" /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: valid line number Given a target source named "fixture.c" with: """ #line 1024 "test.c" /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: valid max line number Given a target source named "fixture.c" with: """ #line 32767 "test.c" /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: 32768 as the line number Given a target source named "fixture.c" with: """ #line 32768 "test.c" /* W0688 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0688 | 1 | 7 | Scenario: too big as the line number Given a target source named "fixture.c" with: """ #line 4294967296 "test.c" /* W0688 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0688 | 1 | 7 | adlint-3.2.0/features/code_check/W0643.feature0000644000004100000410000000464612224440633021016 0ustar www-datawww-dataFeature: W0643 W0643 detects that the last backslash of argument tokens will confuse the `#' operator in the function-like macro. Scenario: one backslash Given a target source named "fixture.c" with: """ #define MACRO(x) #x const char *str = MACRO(foo\); /* W0643 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0643 | 2 | 28 | | W0117 | 2 | 13 | Scenario: two backslashes Given a target source named "fixture.c" with: """ #define MACRO(x) #x const char *str = MACRO(foo\\); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 2 | 13 | Scenario: three backslashes Given a target source named "fixture.c" with: """ #define MACRO(x) #x const char *str = MACRO(foo\\\); /* W0643 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0643 | 2 | 30 | | W0117 | 2 | 13 | Scenario: four backslashes Given a target source named "fixture.c" with: """ #define MACRO(x) #x const char *str = MACRO(foo\\\\); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 2 | 13 | Scenario: no backslashes Given a target source named "fixture.c" with: """ #define MACRO(x) #x const char *str = MACRO(foo); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 2 | 13 | Scenario: backslashes middle of argument tokens Given a target source named "fixture.c" with: """ #define MACRO(x) #x const char *str = MACRO(foo \ bar \\ baz); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 2 | 13 | adlint-3.2.0/features/code_check/W0752.feature0000644000004100000410000001004012224440633021000 0ustar www-datawww-dataFeature: W0752 W0752 detects that `unsigned int' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned short b = a; /* W0752 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0752 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned short b; b = a; /* W0752 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0752 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(unsigned int a) { bar(a); /* W0752 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0752 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(unsigned int a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(unsigned int a) { return a; /* W0752 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0752 | 3 | 12 | | W0386 | 3 | 5 | | W0104 | 1 | 33 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(unsigned int a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0104 | 1 | 33 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0109.feature0000644000004100000410000000237112224440633021004 0ustar www-datawww-dataFeature: W0109 W0703 detects that a function-call is performed before declaring the target function. Scenario: calling function is not declared Given a target source named "fixture.c" with: """ int main(void) { return foo(); /* W0109 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0109 | 3 | 12 | Scenario: calling function is forward declared Given a target source named "fixture.c" with: """ extern int foo(void); int main(void) { return foo(); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | Scenario: calling function is backward declared Given a target source named "fixture.c" with: """ int main(void) { return foo(); /* W0109 */ } extern int foo(void); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0109 | 3 | 12 | | W0118 | 6 | 12 | adlint-3.2.0/features/code_check/W0500.feature0000644000004100000410000000425212224440633020777 0ustar www-datawww-dataFeature: W0500 W0500 detects that `+', `-', `*' and `%' operators of the different priority appear in an expression without appropriate grouping. Scenario: additives and multiplicatives in an expression Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return a + b * c; /* W0500 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W1052 | 3 | 18 | | W1052 | 3 | 14 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0500 | 3 | 12 | | W0628 | 1 | 21 | Scenario: additives and multiplicatives in an expression with grouping Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return a + (b * c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W1052 | 3 | 19 | | W1052 | 3 | 14 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0628 | 1 | 21 | Scenario: additives and multiplicatives in an expression with large grouping Given a target source named "fixture.c" with: """ static unsigned int foo(unsigned int a, unsigned int b, unsigned int c) { return (a + b * c); /* W0500 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 21 | | W1052 | 3 | 19 | | W1052 | 3 | 15 | | W0104 | 1 | 38 | | W0104 | 1 | 54 | | W0104 | 1 | 70 | | W0629 | 1 | 21 | | W0500 | 3 | 12 | | W0628 | 1 | 21 | adlint-3.2.0/features/code_check/W0122.feature0000644000004100000410000000772612224440633021010 0ustar www-datawww-dataFeature: W0122 W0122 detects that `char' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned short b = a; /* W0122 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0122 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned short b; b = a; /* W0122 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0122 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(char a) { bar(a); /* W0122 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0122 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(char a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(char a) { return a; /* W0122 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0122 | 3 | 12 | | W0258 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(char a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0104 | 1 | 25 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0711.feature0000644000004100000410000000657112224440633021011 0ustar www-datawww-dataFeature: W0711 W0711 detects that operand of right side of relational expression is `effectively boolean'. Scenario: a relational expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) > (c > d); /* W0711 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0711 | 3 | 22 | | W0628 | 1 | 12 | Scenario: an equality expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) > (c == d); /* W0711 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0711 | 3 | 22 | | W0628 | 1 | 12 | Scenario: a logical expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) > (c && d); /* W0711 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0711 | 3 | 22 | | W0628 | 1 | 12 | Scenario: a shift expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) > (c << d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0570 | 3 | 25 | | C1000 | | | | C1006 | 1 | 34 | | W0572 | 3 | 25 | | W0794 | 3 | 25 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: an arithmetic expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) > (c + d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 25 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0756.feature0000644000004100000410000001003412224440633021007 0ustar www-datawww-dataFeature: W0756 W0756 detects that `unsigned long' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned char b = a; /* W0756 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0756 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned char b; b = a; /* W0756 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0756 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned long a) { bar(a); /* W0756 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0756 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned long a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned long a) { return a; /* W0756 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0756 | 3 | 12 | | W0390 | 3 | 5 | | W0104 | 1 | 33 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned long a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 33 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0695.feature0000644000004100000410000000432412224440633021016 0ustar www-datawww-dataFeature: W0695 W0695 detects that the function named `assert' is called because standard `assert' macro is undefined. Scenario: undefining `assert' macro and then declaring `assert' function Given a target source named "fixture.c" with: """ #undef assert /* W0695 */ extern void assert(int); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0695 | 1 | 8 | | W0118 | 2 | 13 | Scenario: undefining `assert' macro in function and then declaring `assert' function Given a target source named "fixture.c" with: """ extern void foo(void) { #undef assert extern void assert(int); } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0695 | 3 | 8 | | W0117 | 1 | 13 | | W0118 | 4 | 17 | | W0622 | 4 | 17 | | W0624 | 3 | 1 | | W0628 | 1 | 13 | Scenario: calling `assert' macro Given a target source named "fixture.c" with: """ #include void foo(void) { assert("should not be reached" == ""); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0085 | 5 | 5 | | W0628 | 3 | 6 | Scenario: `assert' function declared but calling `assert' macro Given a target source named "fixture.c" with: """ extern void assert(int); #define assert(expr) ((void *) 0) /* to simulate #include */ void foo(void) { assert("should not be reached" == ""); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 3 | 1 | | W0118 | 1 | 13 | | W0117 | 5 | 6 | | W0567 | 7 | 5 | | W0085 | 7 | 5 | | W0628 | 5 | 6 | adlint-3.2.0/features/code_check/W0132.feature0000644000004100000410000000763512224440633021010 0ustar www-datawww-dataFeature: W0132 W0132 detects that `unsigned char' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { char b = a; /* OK when char_as_unsigned_char: true */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { char b; b = a; /* OK when char_as_unsigned_char: true */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned char a) { bar(a); /* OK when char_as_unsigned_char: true */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned char a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned char a) { return a; /* OK when char_as_unsigned_char: true */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0268 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned char a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0239.feature0000644000004100000410000001043612224440633021011 0ustar www-datawww-dataFeature: W0239 W0239 detects that `float' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { long long b = a; /* W0239 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0239 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 16 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { long long b; b = a; /* W0239 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0239 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(float a) { bar(a); /* W0239 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0239 | 5 | 9 | | W0104 | 3 | 16 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(float a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(float a) { return a; /* W0239 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0239 | 3 | 12 | | W0375 | 3 | 5 | | W0104 | 1 | 21 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(float a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 21 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W0152.feature0000644000004100000410000001125712224440633021005 0ustar www-datawww-dataFeature: W0152 W0152 detects that `unsigned long long' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { signed char b = a; /* W0152 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0152 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { signed char b; b = a; /* W0152 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0152 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned long long a) { bar(a); /* W0152 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0152 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned long long a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 29 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned long long a) { return a; /* W0152 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0152 | 3 | 12 | | W0288 | 3 | 5 | | W0104 | 1 | 36 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned long long a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 36 | | W0104 | 1 | 36 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0690.feature0000644000004100000410000000200212224440633021000 0ustar www-datawww-dataFeature: W0690 W0690 detects that no line number is in the #line directive. Scenario: an identifier as arguments Given a target source named "fixture.c" with: """ #line LINE1000 /* W0690 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0690 | 1 | 7 | Scenario: inverted arguments Given a target source named "fixture.c" with: """ #line __FILE__ 35 /* W0690 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0689 | 1 | 16 | | W0690 | 1 | 7 | Scenario: line number and macro replaceable filename Given a target source named "fixture.c" with: """ #line 35 __FILE__ 35 /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W0167.feature0000644000004100000410000001046312224440633021011 0ustar www-datawww-dataFeature: W0167 W0167 detects that `int' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned int b = a; /* W0167 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0167 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 22 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 18 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned int b; b = a; /* W0167 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0167 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 18 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(int a) { bar(a); /* W0167 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0167 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(int a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(int a) { return a; /* W0167 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0167 | 3 | 12 | | W0303 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(int a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0104 | 1 | 22 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W1041.feature0000644000004100000410000000066612224440633021005 0ustar www-datawww-dataFeature: W1041 W1041 detects that a non-standard preprocessing directive is found. Scenario: a compiler-specific preprocessing directive Given a target source named "fixture.c" with: """ #compiler_specific_extension 1 2.3 "4" /* W1041 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1041 | 1 | 1 | adlint-3.2.0/features/code_check/W0490.feature0000644000004100000410000000504412224440633021007 0ustar www-datawww-dataFeature: W0490 W0490 detects that multiple precedence binary-expressions appear as an operand of a logical-and-expression or a logical-or-expression without appropriate grouping. Scenario: precedence binary-expressions appear as an operand of a logical-and-expression Given a target source named "fixture.c" with: """ static void foo(int i, int j) { if (i + j && i * j) { /* W0490 */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 3 | 11 | | W0723 | 3 | 20 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0490 | 3 | 9 | | W0500 | 3 | 9 | | W0502 | 3 | 9 | | W0732 | 3 | 15 | | W0628 | 1 | 13 | Scenario: precedence binary-expressions appear as an operand of a logical-and-expression with grouping Given a target source named "fixture.c" with: """ static void foo(int i, int j) { if ((i + j) && (i * j)) { /* OK */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 3 | 12 | | W0723 | 3 | 23 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0732 | 3 | 17 | | W0628 | 1 | 13 | Scenario: precedence binary-expressions appear as an operand of a logical-and-expression grouped entirely Given a target source named "fixture.c" with: """ static void foo(int i, int j) { if ((i + j && i * j)) { /* W0490 */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 3 | 12 | | W0723 | 3 | 21 | | W0104 | 1 | 21 | | W0104 | 1 | 28 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0490 | 3 | 9 | | W0500 | 3 | 9 | | W0502 | 3 | 9 | | W0732 | 3 | 16 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0732.feature0000644000004100000410000001222412224440633021004 0ustar www-datawww-dataFeature: W0732 W0732 detects that both sides of `&&' operator are bitwise expression or arithmetic expression. Scenario: both sides of `&&' operator are arithmetic expressions Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a + b) && (c + d); /* W0732 */ r = (a - b) && (c - d); /* W0732 */ r = (a * b) && (c * d); /* W0732 */ r = (a / b) && (c / d); /* W0732 */ r = (a % b) && (c % d); /* W0732 */ r = (a += b) && (c -= d); /* W0732 */ r = (a *= b) && (c /= d); /* W0732 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 12 | | W0723 | 5 | 23 | | W0723 | 6 | 12 | | W0723 | 6 | 23 | | W0723 | 7 | 12 | | W0723 | 7 | 23 | | W0093 | 8 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 8 | 23 | | C1000 | | | | C1006 | 1 | 43 | | W0093 | 9 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 9 | 23 | | C1000 | | | | C1006 | 1 | 43 | | W0093 | 12 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 12 | 24 | | C1000 | | | | C1006 | 1 | 43 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0732 | 5 | 17 | | W0732 | 6 | 17 | | W0732 | 7 | 17 | | W0732 | 8 | 17 | | W0732 | 9 | 17 | | W0508 | 11 | 18 | | W0732 | 11 | 18 | | W0508 | 12 | 18 | | W0732 | 12 | 18 | | W0108 | 11 | 12 | | W0108 | 11 | 24 | | W0108 | 12 | 12 | | W0108 | 12 | 24 | | W0628 | 1 | 13 | Scenario: both sides of `&&' operator are bitwise expressions Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a << b) && (c << d); /* W0732 */ r = (a >> b) && (c >> d); /* W0732 */ r = (a & b) && (c & d); /* W0732 */ r = (a ^ b) && (c ^ d); /* W0732 */ r = (a | b) && (c | d); /* W0732 */ r = (a &= b) && (c ^= d); /* W0732 */ r = (a <<= b) && (c >>= d); /* W0732 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0572 | 5 | 12 | | W0794 | 5 | 12 | | W0570 | 5 | 24 | | C1000 | | | | C1006 | 1 | 36 | | W0572 | 5 | 24 | | W0794 | 5 | 24 | | W0571 | 6 | 12 | | W0572 | 6 | 12 | | W0571 | 6 | 24 | | W0572 | 6 | 24 | | W0572 | 7 | 12 | | W0572 | 7 | 23 | | W0572 | 8 | 12 | | W0572 | 8 | 23 | | W0572 | 9 | 12 | | W0572 | 9 | 23 | | W0572 | 11 | 12 | | W0572 | 11 | 24 | | W0570 | 12 | 12 | | C1000 | | | | C1006 | 11 | 12 | | W0572 | 12 | 12 | | W0794 | 12 | 12 | | W0571 | 12 | 25 | | W0572 | 12 | 25 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0732 | 5 | 18 | | W0732 | 6 | 18 | | W0732 | 7 | 17 | | W0732 | 8 | 17 | | W0732 | 9 | 17 | | W0508 | 11 | 18 | | W0732 | 11 | 18 | | W0508 | 12 | 19 | | W0732 | 12 | 19 | | W0108 | 11 | 12 | | W0108 | 11 | 24 | | W0108 | 12 | 12 | | W0108 | 12 | 25 | | W0628 | 1 | 13 | Scenario: both sides of `&&' operator are neither arithmetic nor bitwise Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; /* equality expression */ r = (a == b) && (c != d); /* OK */ /* relational expression */ r = (a < b) && (c > d); /* OK */ r = (a <= b) && (c >= d); /* OK */ /* logical expression */ r = (a && b) && (c && d); /* OK */ r = (a || b) && (c || d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0606.feature0000644000004100000410000000067412224440633021012 0ustar www-datawww-dataFeature: W0606 W0606 detects that floating point in union. Scenario: floating point in union Given a target source named "fixture.c" with: """ union UNI { /* W0606 */ float a; int b; }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0551 | 1 | 7 | | W0606 | 1 | 7 | adlint-3.2.0/features/code_check/W1075.feature0000644000004100000410000000451512224440633021011 0ustar www-datawww-dataFeature: W1075 W1075 detects that a declaration has no `static' specifier while the anterior declaration is specified as `static'. Scenario: colliding global variable declarations Given a target source named "fixture.c" with: """ static int i; extern int i; /* W1075 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1031 | 2 | 12 | | W1075 | 2 | 12 | Scenario: `static' function declaration followed by its definition without storage-class-specifier Given a target source named "fixture.c" with: """ static int foo(void); int foo(void) /* W1075 */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1075 | 3 | 5 | | W0629 | 3 | 5 | | W0628 | 3 | 5 | Scenario: colliding function declarations with `static' and `extern' Given a target source named "fixture.c" with: """ static int foo(void); extern int foo(void) /* W1075 */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1031 | 3 | 12 | | W1075 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: all function declarations with `static' Given a target source named "fixture.c" with: """ static int foo(void); static int foo(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: all function declarations with `extern' Given a target source named "fixture.c" with: """ extern int foo(void); extern int foo(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0628 | 3 | 12 | adlint-3.2.0/features/code_check/W1062.feature0000644000004100000410000001042312224440633021000 0ustar www-datawww-dataFeature: W1062 W1062 detects that a value of the inconsistently typed non-constant expression is assigned to an enum typed variable. Scenario: non-constant `int' typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static enum Color foo(const int i) { enum Color c; c = i + 1; /* W1062 */ return c; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 19 | | W0723 | 8 | 11 | | W0727 | 8 | 11 | | W9003 | 8 | 11 | | W1054 | 8 | 7 | | W1062 | 8 | 7 | | W0100 | 6 | 16 | | W0629 | 4 | 19 | | W0628 | 4 | 19 | Scenario: non-constant consistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; extern enum Color color(void); static enum Color foo(void) { enum Color c; c = color(); /* OK */ return c; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 19 | | W1076 | 6 | 19 | | W0100 | 8 | 16 | | W0629 | 6 | 19 | | W0628 | 6 | 19 | Scenario: non-constant inconsistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; extern enum Fruit fruit(void); static enum Color foo(void) { enum Color c; c = fruit(); /* W1062 */ return c; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 19 | | W1076 | 6 | 19 | | W0727 | 10 | 14 | | W9003 | 10 | 14 | | W1057 | 10 | 7 | | W1062 | 10 | 7 | | W0100 | 8 | 16 | | W0629 | 6 | 19 | | W0628 | 6 | 19 | Scenario: constant consistent `int' typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static enum Color foo(void) { enum Color c; c = 2; /* OK but W1054 */ return c; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 19 | | W9003 | 7 | 9 | | W1054 | 7 | 7 | | W0100 | 5 | 16 | | W0629 | 3 | 19 | | W0628 | 3 | 19 | Scenario: constant consistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static enum Color foo(void) { enum Color c; c = RED + 1; /* OK */ return c; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 19 | | W9003 | 7 | 15 | | W0100 | 5 | 16 | | W0629 | 3 | 19 | | W0628 | 3 | 19 | Scenario: constant inconsistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static enum Color foo(void) { enum Color c; c = ORANGE + 1; /* OK but W0729 */ return c; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 19 | | W9003 | 8 | 18 | | W0727 | 8 | 16 | | W9003 | 8 | 16 | | W0729 | 8 | 7 | | W0100 | 6 | 16 | | W0629 | 4 | 19 | | W0628 | 4 | 19 | adlint-3.2.0/features/code_check/W0489.feature0000644000004100000410000000444312224440633021021 0ustar www-datawww-dataFeature: W0489 W0489 detects that multiple unary-expressions appear as an operand of a logical-and-expression or a logical-or-expression without appropriate grouping. Scenario: unary-expressions appear as an operand of a logical-and-expression Given a target source named "fixture.c" with: """ static void foo(int i, int *p) { if (p) { if (-i++ && !*p) { /* W0489 */ return; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 29 | | W0105 | 1 | 29 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0489 | 4 | 13 | | W0114 | 3 | 5 | | W0628 | 1 | 13 | Scenario: unary-expressions appear as an operand of a logical-and-expression with grouping Given a target source named "fixture.c" with: """ static void foo(int i, int *p) { if (p) { if ((-i++) && (!*p)) { /* OK */ return; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 29 | | W0105 | 1 | 29 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0114 | 3 | 5 | | W0628 | 1 | 13 | Scenario: unary-expressions appear as an operand of a logical-and-expression grouped entirely Given a target source named "fixture.c" with: """ static void foo(int i, int *p) { if (p) { if ((-i++ && !*p)) { /* W0489 */ return; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 29 | | W0105 | 1 | 29 | | W1071 | 1 | 13 | | W0629 | 1 | 13 | | W0489 | 4 | 13 | | W0114 | 3 | 5 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0123.feature0000644000004100000410000000750712224440633021006 0ustar www-datawww-dataFeature: W0123 W0123 detects that `char' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { int b = a; /* W0123 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0123 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { int b; b = a; /* W0123 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0123 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(char a) { bar(a); /* W0123 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0123 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(char a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(char a) { return a; /* W0123 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0259 | 3 | 5 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(char a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0689.feature0000644000004100000410000000264312224440633021023 0ustar www-datawww-dataFeature: W0689 W0689 detects that the syntax of #line directive is illformed. Scenario: line number as an arithmetic-expression and no file name Given a target source named "fixture.c" with: """ #line 35 * 100 /* W0689 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0689 | 1 | 10 | Scenario: line number as an arithmetic-expression and valid file name Given a target source named "fixture.c" with: """ #line 35 * 100 "test.c" /* W0689 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0689 | 1 | 10 | Scenario: valid line number and invalid file name Given a target source named "fixture.c" with: """ #line 35 L"******.c" /* W0689 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0689 | 1 | 10 | Scenario: inverted arguments Given a target source named "fixture.c" with: """ #line __FILE__ 35 /* W0689 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0689 | 1 | 16 | | W0690 | 1 | 7 | adlint-3.2.0/features/code_check/W0251.feature0000644000004100000410000001054612224440633021005 0ustar www-datawww-dataFeature: W0251 W0251 detects that `unsigned char' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long long b = a; /* W0251 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0251 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long long b; b = a; /* W0251 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0251 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 24 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned char a) { bar(a); /* W0251 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0251 | 5 | 9 | | W0104 | 3 | 24 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned char a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned char a) { return a; /* W0251 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0251 | 3 | 12 | | W0407 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned char a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W0723.feature0000644000004100000410000000310412224440633021001 0ustar www-datawww-dataFeature: W0723 W0723 detects that signed arithmetic-expression may overflow. Scenario: an arithmetic operation in initializer of a global variable Given a target source named "fixture.c" with: """ static int i = 5; static unsigned int j = (unsigned int) &i + 1; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0567 | 2 | 25 | | W0167 | 2 | 45 | Scenario: multiplication of two arbitrary `signed short' values Given a target source named "fixture.c" with: """ static int foo(short a, short b) { return a * b; /* W0723 should not be output */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 22 | | W0104 | 1 | 31 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: multiplication of two arbitrary `signed int' values Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a * b; /* W0723 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0573.feature0000644000004100000410000000514012224440633021006 0ustar www-datawww-dataFeature: W0573 W0573 detects that `-' is included at `[]' scanset. Scenario: a `-' in scanset Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[-]", &c); /* W0573 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 27 | | C1000 | | | | C1003 | 5 | 10 | | W0573 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: a `-' in scanset with other character Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[a-z]", &c); /* W0573 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0573 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: a `-' in scanset with other character Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[a,b]", &c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: proper scanf Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%c", &c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 25 | | C1000 | | | | C1003 | 5 | 10 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0160.feature0000644000004100000410000001061212224440633020776 0ustar www-datawww-dataFeature: W0160 W0160 detects that `signed char' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long b = a; /* W0160 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0160 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long b; b = a; /* W0160 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0160 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(signed char a) { bar(a); /* W0160 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0160 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(signed char a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 22 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(signed char a) { return a; /* W0160 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0160 | 3 | 12 | | W0296 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(signed char a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 31 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0766.feature0000644000004100000410000001051112224440633021010 0ustar www-datawww-dataFeature: W0766 W0766 detects that `unsigned long long' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned long b = a; /* W0766 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0766 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned long b; b = a; /* W0766 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0766 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(unsigned long long a) { bar(a); /* W0766 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0766 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(unsigned long long a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(unsigned long long a) { return a; /* W0766 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0766 | 3 | 12 | | W0400 | 3 | 5 | | W0104 | 1 | 38 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(unsigned long long a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 38 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0769.feature0000644000004100000410000000765512224440633021032 0ustar www-datawww-dataFeature: W0769 W0769 detects that `long double' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { double b = a; /* W0769 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0769 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { double b; b = a; /* W0769 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0769 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(long double a) { bar(a); /* W0769 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0769 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(long double a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(long double a) { return a; /* W0769 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0769 | 3 | 12 | | W0776 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(long double a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 24 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0233.feature0000644000004100000410000000764012224440633021006 0ustar www-datawww-dataFeature: W0233 W0233 detects that `long double' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { short b = a; /* W0233 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0233 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { short b; b = a; /* W0233 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0233 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(long double a) { bar(a); /* W0233 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0233 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(long double a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(long double a) { return a; /* W0233 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0233 | 3 | 12 | | W0369 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(long double a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 23 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0747.feature0000644000004100000410000001047012224440633021013 0ustar www-datawww-dataFeature: W0747 W0747 detects that `short' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { signed char b = a; /* W0747 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0747 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { signed char b; b = a; /* W0747 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0747 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 17 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(short a) { bar(a); /* W0747 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0747 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(short a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 16 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(short a) { return a; /* W0747 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0747 | 3 | 12 | | W0381 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(short a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 23 | | W0104 | 1 | 23 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0781.feature0000644000004100000410000001000312224440633021001 0ustar www-datawww-dataFeature: W0781 W0781 detects that there is only one execution path in the switch-statement. Scenario: `switch' statement which has only one execution path Given a target source named "fixture.c" with: """ static int func(const int i) { switch (i) { /* W0781 */ default: return 8; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0781 | 3 | 5 | | W0628 | 1 | 12 | Scenario: `switch' statement which has three execution paths, but the control never reaches to only one of that paths Given a target source named "fixture.c" with: """ static int func(const int i) { if (i > 5) { switch (i) { /* W0781 */ case 0: return 1; case 5: return 2; default: return 3; } } return 10; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W9001 | 5 | 9 | | W9001 | 6 | 13 | | W9001 | 7 | 9 | | W9001 | 8 | 13 | | W0781 | 4 | 9 | | W0628 | 1 | 12 | Scenario: `switch' statement which has only two execution paths and the control never reaches to one of that paths Given a target source named "fixture.c" with: """ static int func(const int i) { if (i > 5) { return 0; } switch (i) { /* OK */ case 0: return 4; default: switch (i) { /* W0781 */ case 10: return 5; default: return 6; } } return 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W9001 | 12 | 9 | | W9001 | 13 | 13 | | W0781 | 11 | 9 | | W1070 | 11 | 9 | | W1070 | 7 | 5 | | W9001 | 18 | 5 | | W0628 | 1 | 12 | Scenario: `switch' statement which has only two execution paths and the control never reaches to one of that paths Given a target source named "fixture.c" with: """ static int func(const int i) { if (i > 5) { switch (i) { /* OK */ case 5: return 2; default: return 3; } } return 10; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W9001 | 5 | 9 | | W9001 | 6 | 13 | | W0781 | 4 | 9 | | W1070 | 4 | 9 | | W0628 | 1 | 12 | Scenario: `switch' statement which has several execution paths Given a target source named "fixture.c" with: """ static int func(const int i) { switch (i) { /* OK */ case 5: return 2; case 6: return 3; default: return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0173.feature0000644000004100000410000001151312224440633021003 0ustar www-datawww-dataFeature: W0173 W0173 detects that `signed char' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long long b = a; /* W0173 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0173 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 28 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long long b; b = a; /* W0173 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0173 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 24 | | W0104 | 1 | 22 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(signed char a) { bar(a); /* W0173 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0173 | 5 | 9 | | W0104 | 3 | 22 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(signed char a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 22 | | W0104 | 3 | 22 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(signed char a) { return a; /* W0173 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0173 | 3 | 12 | | W0309 | 3 | 5 | | W0104 | 1 | 36 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(signed char a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 36 | | W0104 | 1 | 36 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0194.feature0000644000004100000410000000753012224440633021012 0ustar www-datawww-dataFeature: W0194 W0194 detects that `int' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { float b = a; /* W0194 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0194 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { float b; b = a; /* W0194 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0194 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(int a) { bar(a); /* W0194 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0194 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(int a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(int a) { return a; /* W0194 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0194 | 3 | 12 | | W0330 | 3 | 5 | | W0104 | 1 | 15 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(int a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 15 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0610.feature0000644000004100000410000000511712224440633021002 0ustar www-datawww-dataFeature: W0610 W0610 detects that a logical expression makes always true. Scenario: comparison of static storage duration variable Given a target source named "fixture.c" with: """ struct { char *p; } foo = { NULL }; int *p = NULL; static void bar(void) { if (p != NULL) { /* OK */ return; } if (foo.p != NULL) { /* OK */ return; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 21 | | W0117 | 2 | 6 | | W0492 | 2 | 6 | | C0001 | 1 | 16 | | W1076 | 4 | 13 | | W1071 | 4 | 13 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | | W0589 | 1 | 21 | | W0593 | 1 | 21 | | W0589 | 2 | 6 | | W0593 | 2 | 6 | Scenario: no explicit controlling-expression in for-statement Given a target source named "fixture.c" with: """ void foo(void) { int i; for (i = 0; ; i++) { if (i < 0) { /* W0610 */ i++; } if (i == 3) { /* OK not W0610 */ i++; } if (i == 5) { /* OK */ break; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0610 | 5 | 15 | | W0613 | 5 | 15 | | W0708 | 9 | 14 | | W9001 | 6 | 13 | | W0114 | 4 | 5 | | W0628 | 1 | 6 | Scenario: no explicit controlling-expression in c99-for-statement Given a target source named "fixture.c" with: """ void foo(void) { for (int i = 0; ; i++) { if (i < 0) { /* W0610 */ i++; } if (i == 3) { /* OK not W0610 */ i++; } if (i == 5) { /* OK */ break; } } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0610 | 4 | 15 | | W0613 | 4 | 15 | | W0708 | 8 | 14 | | W9001 | 5 | 13 | | W0114 | 3 | 5 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0249.feature0000644000004100000410000000765612224440633021024 0ustar www-datawww-dataFeature: W0249 W0249 detects that `unsigned short' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long b = a; /* W0249 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0249 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long b; b = a; /* W0249 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0249 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned short a) { bar(a); /* W0249 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0249 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned short a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned short a) { return a; /* W0249 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0249 | 3 | 12 | | W0405 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned short a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0694.feature0000644000004100000410000000735512224440633021024 0ustar www-datawww-dataFeature: W0694 W0694 detects that the function named `assert' is called because standard `assert' macro is undefined. Scenario: undefining `assert' macro and then declaring `assert' function Given a target source named "fixture.c" with: """ #undef assert extern void assert(int); void foo(void) { assert("should not be reached" == ""); /* W0694 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0695 | 1 | 8 | | W0118 | 2 | 13 | | W0117 | 4 | 6 | | W0027 | 6 | 36 | | W0610 | 6 | 36 | | W0694 | 6 | 11 | | W0947 | 6 | 12 | | W0947 | 6 | 39 | | W0628 | 4 | 6 | Scenario: declaring `assert' function and then undefining `assert' macro Given a target source named "fixture.c" with: """ extern void assert(int); #undef assert void foo(void) { assert("should not be reached" == ""); /* W0694 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0695 | 2 | 8 | | W0118 | 1 | 13 | | W0117 | 4 | 6 | | W0027 | 6 | 36 | | W0610 | 6 | 36 | | W0694 | 6 | 11 | | W0947 | 6 | 12 | | W0947 | 6 | 39 | | W0628 | 4 | 6 | Scenario: undefining `assert' macro in function and then declaring `assert' function Given a target source named "fixture.c" with: """ void foo(void) { #undef assert extern void assert(int); assert("should not be reached" == ""); /* W0694 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0695 | 3 | 8 | | W0117 | 1 | 6 | | W0118 | 4 | 17 | | W0622 | 4 | 17 | | W0027 | 5 | 36 | | W0610 | 5 | 36 | | W0694 | 5 | 11 | | W0624 | 3 | 1 | | W0947 | 5 | 12 | | W0947 | 5 | 39 | | W0628 | 1 | 6 | Scenario: declaring `assert' function and then undefining `assert' macro in function Given a target source named "fixture.c" with: """ extern void assert(int); void foo(void) { #undef assert assert("should not be reached" == ""); /* W0694 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0695 | 5 | 8 | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0027 | 6 | 36 | | W0610 | 6 | 36 | | W0694 | 6 | 11 | | W0624 | 5 | 1 | | W0947 | 6 | 12 | | W0947 | 6 | 39 | | W0628 | 3 | 6 | Scenario: `assert' function declared but calling `assert' macro Given a target source named "fixture.c" with: """ extern void assert(int); #define assert(expr) ((void *) 0) /* to simulate #include */ void foo(void) { assert("should not be reached" == ""); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 3 | 1 | | W0118 | 1 | 13 | | W0117 | 5 | 6 | | W0567 | 7 | 5 | | W0085 | 7 | 5 | | W0628 | 5 | 6 | adlint-3.2.0/features/code_check/W0699.feature0000644000004100000410000000105412224440633021017 0ustar www-datawww-dataFeature: W0699 W0699 detects that`return;' statement is found at except void function. Scenario: return statement Given a target source named "fixture.c" with: """ extern func(void) { return; /* W0699 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0700 | 1 | 8 | | W0457 | 1 | 8 | | W0699 | 3 | 5 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W1047.feature0000644000004100000410000001427312224440633021012 0ustar www-datawww-dataFeature: W1047 W1047 detects that an initializer of struct, union or array variable contains non-constant expressions. Scenario: initializing array with non-constant expressions Given a target source named "fixture.c" with: """ int foo(int i, int j) { int a[] = { 0, i, j }; /* W1047 */ return a[1]; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W1047 | 3 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 13 | | W0104 | 1 | 20 | | W0628 | 1 | 5 | Scenario: initializing struct with non-constant expressions Given a target source named "fixture.c" with: """ struct Coord { int x; int y; int z; }; int foo(int i, int j) { struct Coord c = { i, j, 0 }; /* W1047 */ return c.y; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 7 | 5 | | W1047 | 9 | 18 | | W0100 | 9 | 18 | | W0104 | 7 | 13 | | W0104 | 7 | 20 | | W0628 | 7 | 5 | Scenario: initializing union with non-constant expressions Given a target source named "fixture.c" with: """ struct Color { int r; int g; int b; }; struct Coord { int x; int y; }; struct Event { int type; union { struct Color color; struct Coord coord; } body; }; int foo(int i, int j) { struct Event ev = { 0, { i, j, 0 } }; /* W1047 */ return ev.body.color.g; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 20 | 5 | | W1047 | 22 | 18 | | W0100 | 22 | 18 | | W0104 | 20 | 13 | | W0104 | 20 | 20 | | W0551 | 14 | 5 | | W0628 | 20 | 5 | Scenario: initializing array with all constant expressions Given a target source named "fixture.c" with: """ int foo(void) { int a[] = { 0, 1, 2 }; /* OK */ return a[1]; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0100 | 3 | 9 | | W0628 | 1 | 5 | Scenario: initializing struct with all constant expressions Given a target source named "fixture.c" with: """ struct Coord { int x; int y; int z; }; int foo(void) { struct Coord c = { 2, 1, 0 }; /* OK */ return c.y; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 7 | 5 | | W0100 | 9 | 18 | | W0628 | 7 | 5 | Scenario: initializing union with all constant expressions Given a target source named "fixture.c" with: """ struct Color { int r; int g; int b; }; struct Coord { int x; int y; }; struct Event { int type; union { struct Color color; struct Coord coord; } body; }; int foo(void) { struct Event ev = { 0, { 2, 1, 0 } }; /* OK */ return ev.body.color.g; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 20 | 5 | | W0100 | 22 | 18 | | W0551 | 14 | 5 | | W0628 | 20 | 5 | Scenario: initializing array with address-constant Given a target source named "fixture.c" with: """ extern int foo(void); extern int bar(void); extern int baz(void); static int (*fun_tbl[])(void) = { foo, bar, baz }; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0118 | 2 | 12 | | W0118 | 3 | 12 | Scenario: initializing struct with constant-specifier and address-constant Given a target source named "fixture.c" with: """ typedef struct handler { int id; int (*ptr)(void); } handler_t; extern int foo(void); extern int bar(void); extern int baz(void); static handler_t h = { 1, foo }; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 6 | 12 | | W0118 | 7 | 12 | | W0118 | 8 | 12 | Scenario: initializing struct with inconstant expression and address-constant Given a target source named "fixture.c" with: """ typedef struct handler { int id; int (*ptr)(void); } handler_t; extern int foo(void); extern int bar; extern int baz; static handler_t h = { bar + baz, foo }; /* W1047 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 6 | 12 | | W0118 | 7 | 12 | | W0118 | 8 | 12 | | W0723 | 10 | 28 | | W1047 | 10 | 18 | Scenario: initializing array with address-constant Given a target source named "fixture.c" with: """ static int i, j, k; static int *var_tbl[] = { &i, &j, &k }; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0425 | 1 | 15 | | W0425 | 1 | 18 | adlint-3.2.0/features/code_check/W0138.feature0000644000004100000410000001032412224440633021003 0ustar www-datawww-dataFeature: W0138 W0138 detects that `long' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { char b = a; /* W0138 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0138 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 14 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { char b; b = a; /* W0138 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0138 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 10 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(long a) { bar(a); /* W0138 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0138 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(long a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(long a) { return a; /* W0138 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0138 | 3 | 12 | | W0274 | 3 | 5 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(long a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 15 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W1059.feature0000644000004100000410000000461012224440633021007 0ustar www-datawww-dataFeature: W1059 W1059 detects that a value of enum typed expression is passed to a non-enum typed parameter. Scenario: passing a value of the enum typed constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; extern void foo(int); static void bar(void) { foo(RED + 1); /* W1059 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W9003 | 7 | 15 | | W9003 | 7 | 13 | | W1059 | 7 | 13 | | W0629 | 5 | 13 | | W0628 | 5 | 13 | Scenario: passing a value of the enum typed non-constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; extern void foo(int); static void bar(const enum Color c) { foo(c); /* W1059 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 13 | | W1076 | 5 | 13 | | W9003 | 7 | 9 | | W1059 | 7 | 9 | | W0629 | 5 | 13 | | W0628 | 5 | 13 | Scenario: passing a value of consistently typed constant expression Given a target source named "fixture.c" with: """ extern void foo(int); static void bar(void) { foo(1 + 1); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W1076 | 3 | 13 | | W0629 | 3 | 13 | | W0628 | 3 | 13 | Scenario: passing a value of inconsistently typed constant expression Given a target source named "fixture.c" with: """ extern void foo(int); static void bar(void) { foo(1.0 * .1); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W1076 | 3 | 13 | | W0226 | 5 | 13 | | W0629 | 3 | 13 | | W0628 | 3 | 13 | adlint-3.2.0/features/code_check/W0645.feature0000644000004100000410000000764212224440633021017 0ustar www-datawww-dataFeature: W0645 W0645 detects that a function parameter is typed as `void'. Scenario: a `void' parameter of a `void' function Given a target source named "fixture.c" with: """ extern void func(a) /* W0645 */ void a; { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0031 | 2 | 6 | | W0104 | 2 | 6 | | W0002 | 1 | 13 | | W0645 | 1 | 13 | | W0628 | 1 | 13 | Scenario: a `void' parameter of a `int' function Given a target source named "fixture.c" with: """ extern int func(a) /* W0645 */ void a; { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0031 | 2 | 6 | | W0104 | 2 | 6 | | W0002 | 1 | 12 | | W0645 | 1 | 12 | | W0628 | 1 | 12 | Scenario: multiple parameters including `void' typed one Given a target source named "fixture.c" with: """ extern void func(a, b) /* W0645 */ int a; void b; { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0031 | 2 | 5 | | W0031 | 3 | 6 | | W0104 | 2 | 5 | | W0104 | 3 | 6 | | W0002 | 1 | 13 | | W0645 | 1 | 13 | | W0628 | 1 | 13 | Scenario: a `void *' parameter Given a target source named "fixture.c" with: """ extern void func(p) /* OK */ void* p; { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0031 | 2 | 7 | | W0104 | 2 | 7 | | W0105 | 2 | 7 | | W0002 | 1 | 13 | | W0628 | 1 | 13 | Scenario: an `int' parameter Given a target source named "fixture.c" with: """ extern void func(a) /* OK */ int a; { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0031 | 2 | 5 | | W0104 | 2 | 5 | | W0002 | 1 | 13 | | W0628 | 1 | 13 | Scenario: a `void' as a parameter-type-list Given a target source named "fixture.c" with: """ extern void func(void); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | Scenario: a qualified `void' parameter Given a target source named "fixture.c" with: """ extern void func(a) /* W0645 */ const void a; { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0031 | 2 | 12 | | W0002 | 1 | 13 | | W0645 | 1 | 13 | | W0628 | 1 | 13 | Scenario: a more qualified `void' parameter Given a target source named "fixture.c" with: """ extern void func(a) /* W0645 */ const volatile void a; { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0031 | 2 | 21 | | W0002 | 1 | 13 | | W0645 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0641.feature0000644000004100000410000000750612224440633021012 0ustar www-datawww-dataFeature: W0641 W0641 detects that an explicit conversion between variable of floating point number and pointer to a variable is found. Scenario: converting `float' into pointer to `int' variable Given a target source named "fixture.c" with: """ int *foo(const float f) { return (int *) f; /* W0641 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0641 | 3 | 12 | | W0628 | 1 | 6 | Scenario: converting `double' into pointer to `int' variable Given a target source named "fixture.c" with: """ int *foo(const double f) { return (int *) f; /* W0641 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0641 | 3 | 12 | | W0628 | 1 | 6 | Scenario: converting `long double' into pointer to `int' variable Given a target source named "fixture.c" with: """ int *foo(const long double f) { return (int *) f; /* W0641 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0641 | 3 | 12 | | W0628 | 1 | 6 | Scenario: converting `int' into pointer to `float' variable Given a target source named "fixture.c" with: """ float foo(int *p) { return (float) p; /* W0641 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0641 | 3 | 12 | | W0104 | 1 | 16 | | W0105 | 1 | 16 | | W0628 | 1 | 7 | Scenario: converting `int' into pointer to `double' variable Given a target source named "fixture.c" with: """ double foo(int *p) { return (double) p; /* W0641 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0641 | 3 | 12 | | W0104 | 1 | 17 | | W0105 | 1 | 17 | | W0628 | 1 | 8 | Scenario: converting `int' into pointer to `long double' Given a target source named "fixture.c" with: """ long double foo(int *p) { return (long double) p; /* W0641 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0641 | 3 | 12 | | W0104 | 1 | 22 | | W0105 | 1 | 22 | | W0628 | 1 | 13 | Scenario: converting `float' to `int' Given a target source named "fixture.c" with: """ int foo(const float f) { return (int) f; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0628 | 1 | 5 | Scenario: converting `float' into pointer to `void *' Given a target source named "fixture.c" with: """ void *foo(float f) { return (void *) f; /* W0641 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0641 | 3 | 12 | | W0104 | 1 | 17 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0583.feature0000644000004100000410000000653212224440633021015 0ustar www-datawww-dataFeature: W0583 W0583 detects that arguments specified to call the function does not match with the corresponding function-definition appears after the function-call. Scenario: array as an argument Given a target source named "fixture.c" with: """ int main(void) { int a[] = { 0, 1, 2 }; return foo(a); } int foo(const int *p) { /* W0583 should not be output */ return *p; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0109 | 4 | 12 | | W0117 | 7 | 5 | | W0422 | 8 | 12 | | C1000 | | | | C1005 | 7 | 20 | | W0104 | 7 | 20 | | W0589 | 7 | 5 | | W0591 | 7 | 5 | Scenario: call with matched arguments Given a target source named "fixture.c" with: """ static void foo(int *p) { bar(NULL, *p); /* OK */ } static void bar(int *p, int i) { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0422 | 3 | 15 | | C1000 | | | | C1005 | 1 | 22 | | W0109 | 3 | 5 | | W0104 | 1 | 22 | | W0105 | 1 | 22 | | W1073 | 3 | 8 | | W1076 | 6 | 13 | | W0031 | 6 | 22 | | W0031 | 6 | 29 | | W0104 | 6 | 22 | | W0104 | 6 | 29 | | W0105 | 6 | 22 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: call with unmatched arguments Given a target source named "fixture.c" with: """ static void foo(int *p) { bar(NULL, p); /* W0583 */ } static void bar(int *p, int i) { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0109 | 3 | 5 | | W0104 | 1 | 22 | | W0105 | 1 | 22 | | W1073 | 3 | 8 | | W0583 | 3 | 8 | | W1076 | 6 | 13 | | W0031 | 6 | 22 | | W0031 | 6 | 29 | | W0104 | 6 | 22 | | W0104 | 6 | 29 | | W0105 | 6 | 22 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: call with unmatched constant pointer Given a target source named "fixture.c" with: """ static void foo(int *p) { bar(3, p); /* W0583 */ } static void bar(int *p, int i) { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0109 | 3 | 5 | | W0104 | 1 | 22 | | W0105 | 1 | 22 | | W1073 | 3 | 8 | | W0583 | 3 | 8 | | W1076 | 6 | 13 | | W0031 | 6 | 22 | | W0031 | 6 | 29 | | W0104 | 6 | 22 | | W0104 | 6 | 29 | | W0105 | 6 | 22 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0183.feature0000644000004100000410000000767712224440633021024 0ustar www-datawww-dataFeature: W0183 W0183 detects that `unsigned char' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { double b = a; /* W0183 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0183 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { double b; b = a; /* W0183 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0183 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned char a) { bar(a); /* W0183 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0183 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned char a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned char a) { return a; /* W0183 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0183 | 3 | 12 | | W0319 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned char a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 26 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0755.feature0000644000004100000410000000750712224440633021021 0ustar www-datawww-dataFeature: W0755 W0755 detects that `long' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { int b = a; /* W0755 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0755 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { int b; b = a; /* W0755 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0755 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(long a) { bar(a); /* W0755 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0755 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(long a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(long a) { return a; /* W0755 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0755 | 3 | 12 | | W0389 | 3 | 5 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(long a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0252.feature0000644000004100000410000001056112224440633021003 0ustar www-datawww-dataFeature: W0252 W0252 detects that `unsigned short' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long long b = a; /* W0252 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0252 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 25 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 25 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long long b; b = a; /* W0252 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0252 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 25 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 25 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned short a) { bar(a); /* W0252 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0252 | 5 | 9 | | W0104 | 3 | 25 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(unsigned short a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned short a) { return a; /* W0252 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0252 | 3 | 12 | | W0408 | 3 | 5 | | W0104 | 1 | 30 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(unsigned short a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 30 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W0187.feature0000644000004100000410000000775612224440633021026 0ustar www-datawww-dataFeature: W0187 W0187 detects that `signed char' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { long double b = a; /* W0187 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0187 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { long double b; b = a; /* W0187 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0187 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(signed char a) { bar(a); /* W0187 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0187 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(signed char a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(signed char a) { return a; /* W0187 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0187 | 3 | 12 | | W0323 | 3 | 5 | | W0104 | 1 | 29 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(signed char a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 29 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W1070.feature0000644000004100000410000001051112224440633020775 0ustar www-datawww-dataFeature: W1070 W1070 detects that a `switch' statement can be translated into if-else statement because there are only two execution paths. Scenario: `switch' statement which has only two execution paths Given a target source named "fixture.c" with: """ static int func(const int i) { switch (i) { /* W1070 */ case 0: return 4; default: return 8; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W1070 | 3 | 5 | | W0628 | 1 | 12 | Scenario: `switch' statement which has only two execution paths and doesn't have `default' clause Given a target source named "fixture.c" with: """ static int func(const int i) { switch (i) { /* W1070 */ case 0: return 4; case 1: return 6; } return 10; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0003 | 3 | 5 | | W1070 | 3 | 5 | | W0628 | 1 | 12 | Scenario: `switch' statement which has only two execution paths and the control never reaches to one of that paths Given a target source named "fixture.c" with: """ static int func(const int i) { if (i > 5) { switch (i) { /* W1070 */ case 5: return 2; default: return 3; } } return 10; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W9001 | 5 | 9 | | W9001 | 6 | 13 | | W0781 | 4 | 9 | | W1070 | 4 | 9 | | W0628 | 1 | 12 | Scenario: `switch' statement which has only one execution path Given a target source named "fixture.c" with: """ static int func(const int i) { switch (i) { /* OK */ default: return 8; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0781 | 3 | 5 | | W0628 | 1 | 12 | Scenario: `switch' statement which has three execution paths, but the control never reaches to only one of that paths Given a target source named "fixture.c" with: """ static int func(const int i) { if (i > 5) { switch (i) { /* OK */ case 0: return 1; case 5: return 2; default: return 3; } } return 10; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W9001 | 5 | 9 | | W9001 | 6 | 13 | | W9001 | 7 | 9 | | W9001 | 8 | 13 | | W0781 | 4 | 9 | | W0628 | 1 | 12 | Scenario: `switch' statement which has three execution paths Given a target source named "fixture.c" with: """ static int func(const int i) { switch (i) { /* OK */ case 0: return 4; case 1: return 6; default: return 8; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0585.feature0000644000004100000410000000740712224440633021021 0ustar www-datawww-dataFeature: W0585 W0585 detects that a controlling variable of for-statement is not updated in the 3rd part of for-statement. Scenario: the 3rd part of for-statement does not increment the controlling variable Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int i, j = 0; for (i = 0; (bar(&i)) && (i < num); j++) { /* W0585 */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0585 | 6 | 42 | | W0629 | 3 | 12 | | W0425 | 5 | 12 | | W0628 | 3 | 12 | Scenario: the 3rd part of for-statement is empty Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int i, j = 0; for (i = 0; (bar(&i)) && (i < num); ) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0425 | 5 | 12 | | W0628 | 3 | 12 | Scenario: the 3rd part of for-statement increments the controlling variable Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int i, j = 0; for (i = 0; (bar(&i)) && (i < num); i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0425 | 5 | 12 | | W0628 | 3 | 12 | Scenario: the 3rd part of c99-for-statement does not increment the controlling variable Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int j = 0; for (int i = 0; (bar(&i)) && (i < num); j++) { /* W0585 */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0585 | 6 | 46 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: the 3rd part of c99-for-statement is empty Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int j = 0; for (int i = 0; (bar(&i)) && (i < num); ) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: the 3rd part of for-statement increments the controlling variable Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int j = 0; for (int i = 0; (bar(&i)) && (i < num); i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | adlint-3.2.0/features/code_check/W0164.feature0000644000004100000410000001052212224440633021002 0ustar www-datawww-dataFeature: W0164 W0164 detects that `short' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long b = a; /* W0164 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0164 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long b; b = a; /* W0164 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0164 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(short a) { bar(a); /* W0164 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0164 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(short a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 16 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(short a) { return a; /* W0164 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0164 | 3 | 12 | | W0300 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(short a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 25 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0584.feature0000644000004100000410000000765212224440633021022 0ustar www-datawww-dataFeature: W0584 W0584 detects that type of the argument of a function call does not conform with one of the corresponding parameter of the old style function definition. Scenario: call with matched arguments Given a target source named "fixture.c" with: """ int foo(p, i) int *p; int i; { return *p + i; } int bar(p) int *p; { return foo(NULL, *p); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0422 | 5 | 12 | | C1000 | | | | C1005 | 2 | 6 | | W0723 | 5 | 15 | | W0104 | 2 | 6 | | W0104 | 3 | 5 | | W0105 | 2 | 6 | | W0117 | 8 | 5 | | W0422 | 11 | 22 | | C1000 | | | | C1005 | 9 | 6 | | W0104 | 9 | 6 | | W0105 | 9 | 6 | | W0002 | 1 | 5 | | W0002 | 8 | 5 | | W0589 | 1 | 5 | | W0591 | 1 | 5 | | W0628 | 8 | 5 | Scenario: call with unmatched arguments Given a target source named "fixture.c" with: """ int foo(p, i) int *p; int i; { return *p + i; } int bar(p) int *p; { return foo(NULL, p); /* W0584 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0422 | 5 | 12 | | C1000 | | | | C1005 | 2 | 6 | | W0723 | 5 | 15 | | W0104 | 2 | 6 | | W0104 | 3 | 5 | | W0105 | 2 | 6 | | W0117 | 8 | 5 | | W9003 | 11 | 22 | | W0584 | 11 | 22 | | W0104 | 9 | 6 | | W0105 | 9 | 6 | | W0002 | 1 | 5 | | W0002 | 8 | 5 | | W0589 | 1 | 5 | | W0591 | 1 | 5 | | W0628 | 8 | 5 | Scenario: call with unmatched constant pointer Given a target source named "fixture.c" with: """ int foo(p, i) int *p; int i; { return *p + i; } int bar(p) int *p; { return foo(3, *p); /* W0584 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0422 | 5 | 12 | | C1000 | | | | C1005 | 2 | 6 | | W0723 | 5 | 15 | | W0104 | 2 | 6 | | W0104 | 3 | 5 | | W0105 | 2 | 6 | | W0117 | 8 | 5 | | W0422 | 11 | 19 | | C1000 | | | | C1005 | 9 | 6 | | W9003 | 11 | 16 | | W0584 | 11 | 16 | | W0104 | 9 | 6 | | W0105 | 9 | 6 | | W0002 | 1 | 5 | | W0002 | 8 | 5 | | W0589 | 1 | 5 | | W0591 | 1 | 5 | | W0628 | 8 | 5 | Scenario: call with convertible arguments Given a target source named "fixture.c" with: """ void print(p) const char *p; { } void foo() { print("foo"); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0031 | 2 | 13 | | W0104 | 2 | 13 | | W0117 | 6 | 6 | | W0002 | 1 | 6 | | W0540 | 6 | 6 | | W0947 | 8 | 11 | | W0589 | 1 | 6 | | W0591 | 1 | 6 | | W0628 | 6 | 6 | adlint-3.2.0/features/code_check/W0143.feature0000644000004100000410000001061312224440633021000 0ustar www-datawww-dataFeature: W0143 W0143 detects that `unsigned short' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { signed char b = a; /* W0143 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0143 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 25 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { signed char b; b = a; /* W0143 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0143 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 25 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned short a) { bar(a); /* W0143 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0143 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned short a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 25 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned short a) { return a; /* W0143 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0143 | 3 | 12 | | W0279 | 3 | 5 | | W0104 | 1 | 32 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned short a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 32 | | W0104 | 1 | 32 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0176.feature0000644000004100000410000001141212224440633021004 0ustar www-datawww-dataFeature: W0176 W0176 detects that `long' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long long b = a; /* W0176 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0176 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 28 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long long b; b = a; /* W0176 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0176 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(long a) { bar(a); /* W0176 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0176 | 5 | 9 | | W0104 | 3 | 15 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(long a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(long a) { return a; /* W0176 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0176 | 3 | 12 | | W0312 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(long a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0192.feature0000644000004100000410000000771012224440633021010 0ustar www-datawww-dataFeature: W0192 W0192 detects that `unsigned short' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { double b = a; /* W0192 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0192 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { double b; b = a; /* W0192 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0192 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned short a) { bar(a); /* W0192 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0192 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned short a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned short a) { return a; /* W0192 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0192 | 3 | 12 | | W0328 | 3 | 5 | | W0104 | 1 | 27 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned short a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 27 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0808.feature0000644000004100000410000000202112224440633021002 0ustar www-datawww-dataFeature: W0808 W0808 detects that it pre-defined macro is re-defined. Scenario: pre-defined macro is re-defined Given a target source named "fixture.c" with: """ #define __STDC_VERSION__ "1" /* W0808 */ #define __LINE__ "2" /* W0808 */ #define __FILE__ "3" /* W0808 */ #define __DATE__ "4" /* W0808 */ #define __TIME__ "5" /* W0808 */ #define __STDC__ "6" /* W0808 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0808 | 1 | 9 | | W0808 | 2 | 9 | | W0808 | 3 | 9 | | W0808 | 4 | 9 | | W0808 | 5 | 9 | | W0808 | 6 | 9 | Scenario: undefine the macro defined by the user Given a target source named "fixture.c" with: """ #define LINE !LINE """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W0495.feature0000644000004100000410000000336012224440633021013 0ustar www-datawww-dataFeature: W0495 W0495 detects that different arithmetic operators appear with modulo operator in an expression without appropriate grouping. Scenario: without grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a + b % 5; /* W0495 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0495 | 3 | 12 | | W0628 | 1 | 12 | Scenario: with appropriate grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a + b) % 5; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: entirely grouped Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a + b % 5); /* W0495 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0495 | 3 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0131.feature0000644000004100000410000001061212224440633020774 0ustar www-datawww-dataFeature: W0131 W0131 detects that `char' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long long b = a; /* W0131 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0131 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long long b; b = a; /* W0131 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0131 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 24 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(char a) { bar(a); /* W0131 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0131 | 5 | 9 | | W0104 | 3 | 15 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(char a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(char a) { return a; /* W0131 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0131 | 3 | 12 | | W0267 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(char a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0104 | 1 | 29 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0141.feature0000644000004100000410000001032212224440633020773 0ustar www-datawww-dataFeature: W0141 W0141 detects that `unsigned long long' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { char b = a; /* W0141 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0141 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { char b; b = a; /* W0141 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0141 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned long long a) { bar(a); /* W0141 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0141 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned long long a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned long long a) { return a; /* W0141 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0141 | 3 | 12 | | W0277 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned long long a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0204.feature0000644000004100000410000000767712224440633021016 0ustar www-datawww-dataFeature: W0204 W0204 detects that `unsigned long' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { double b = a; /* W0204 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0204 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { double b; b = a; /* W0204 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0204 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned long a) { bar(a); /* W0204 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0204 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(unsigned long a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned long a) { return a; /* W0204 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0204 | 3 | 12 | | W0340 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(unsigned long a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 26 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_check/W0133.feature0000644000004100000410000001042312224440633020776 0ustar www-datawww-dataFeature: W0133 W0133 detects that `signed char' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { char b = a; /* W0133 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0133 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(signed char a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 14 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { char b; b = a; /* W0133 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0133 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(signed char a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 22 | | W0100 | 3 | 10 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(signed char a) { bar(a); /* W0133 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0133 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(signed char a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 22 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(signed char a) { return a; /* W0133 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0133 | 3 | 12 | | W0269 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(signed char a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0224.feature0000644000004100000410000000756312224440633021012 0ustar www-datawww-dataFeature: W0224 W0224 detects that `double' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { short b = a; /* W0224 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0224 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { short b; b = a; /* W0224 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0224 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(double a) { bar(a); /* W0224 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0224 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(double a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(double a) { return a; /* W0224 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0224 | 3 | 12 | | W0360 | 3 | 5 | | W0104 | 1 | 18 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(double a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 18 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0482.feature0000644000004100000410000000375712224440633021021 0ustar www-datawww-dataFeature: W0482 W0482 detects that the macro defines type specifier. Scenario: macro defines type specifier. Given a target source named "fixture.c" with: """ #define VOID void /* W0482 */ #define INT int /* W0482 */ #define LONG long /* W0482 */ #define FLOAT float /* W0482 */ #define DOUBLE double /* W0482 */ #define SHORT short /* W0482 */ #define CHAR char /* W0482 */ #define STR struct /* W0482 */ #define UNI union /* W0482 */ #define ENUM enum /* W0482 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0482 | 1 | 1 | | W0482 | 2 | 1 | | W0482 | 3 | 1 | | W0482 | 4 | 1 | | W0482 | 5 | 1 | | W0482 | 6 | 1 | | W0482 | 7 | 1 | | W0482 | 8 | 1 | | W0482 | 9 | 1 | | W0482 | 10 | 1 | Scenario: macro defines signed specifier Given a target source named "fixture.c" with: """ #define SIGNED signed /* W0482 */ #define UNSIGNED unsigned /* W0482 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0482 | 1 | 1 | | W0482 | 2 | 1 | Scenario: macro defines type specifier and a value Given a target source named "fixture.c" with: """ #define UINT unisgned int 10 /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: macro defines a struct Given a target source named "fixture.c" with: """ #define STR struct{int a; int b} /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | adlint-3.2.0/features/code_check/W0097.feature0000644000004100000410000000165712224440633021020 0ustar www-datawww-dataFeature: W0097 W0097 detects that a multiplicative-expression must cause division-by-zero. Scenario: dividing by global constant variable initialized with 0 Given a target source named "fixture.c" with: """ static const int i = 0; static int foo(void) { return 3 / i; /* W0097 */ } static int bar(void) { return 3 / i; /* W0097 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0097 | 5 | 14 | | C1000 | | | | C1006 | 1 | 18 | | W1076 | 8 | 12 | | W0097 | 10 | 14 | | C1000 | | | | C1006 | 1 | 18 | | W0629 | 3 | 12 | | W0629 | 8 | 12 | | W0628 | 3 | 12 | | W0628 | 8 | 12 | adlint-3.2.0/features/code_check/W0763.feature0000644000004100000410000001051112224440633021005 0ustar www-datawww-dataFeature: W0763 W0763 detects that `unsigned long long' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned char b = a; /* W0763 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0763 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned char b; b = a; /* W0763 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0763 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned long long a) { bar(a); /* W0763 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0763 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned long long a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned long long a) { return a; /* W0763 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0763 | 3 | 12 | | W0397 | 3 | 5 | | W0104 | 1 | 38 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned long long a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 38 | | W0834 | 1 | 19 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0477.feature0000644000004100000410000000424712224440633021020 0ustar www-datawww-dataFeature: W0477 W0477 detects that there is unpaired `[]',`()',`{}' in macro definition. Scenario: unpaired `[]' in macro Given a target source named "fixture.c" with: """ #define BEGIN [ /* W0477 */ #define END ] /* W0477 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0477 | 1 | 1 | | W0477 | 2 | 1 | | W0480 | 1 | 1 | | W0480 | 2 | 1 | Scenario: paired `[]' in macro Given a target source named "fixture.c" with: """ #define BEGIN [] /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: unpaired `()' in macro Given a target source named "fixture.c" with: """ #define BEGIN ( /* W0477 */ #define END ) /* W0477 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0477 | 1 | 1 | | W0477 | 2 | 1 | | W0480 | 1 | 1 | | W0480 | 2 | 1 | Scenario: paired `()' in macro Given a target source named "fixture.c" with: """ #define BEGIN () /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: unpaired `{}' in macro Given a target source named "fixture.c" with: """ #define BEGIN { /* W0477 */ #define END } /* W0477 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0477 | 1 | 1 | | W0477 | 2 | 1 | | W0480 | 1 | 1 | | W0480 | 2 | 1 | Scenario: paired `{}' in macro Given a target source named "fixture.c" with: """ #define BEGIN {} /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W1057.feature0000644000004100000410000001003412224440633021002 0ustar www-datawww-dataFeature: W1057 W1057 detects that a value of enum typed non-constant expression is assigned to the inconsistently enum typed variable. Scenario: assigning a value of the consistently enum typed constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static void foo(void) { enum Color c = RED; c = BLUE; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 13 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | Scenario: assigning a value of the consistently enum typed non-constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static void foo(const enum Color p) { enum Color c = RED; c = p; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 13 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | Scenario: assigning a value of the inconsistently enum typed constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static void foo(void) { enum Color c = RED; c = ORANGE; /* OK but W0729 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 13 | | W9003 | 8 | 9 | | W0729 | 8 | 7 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | Scenario: assigning a value of the inconsistently enum typed non-constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static void foo(const enum Fruit f) { enum Color c = RED; c = f; /* W1057 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 13 | | W0727 | 8 | 9 | | W9003 | 8 | 9 | | W1057 | 8 | 7 | | W1062 | 8 | 7 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | Scenario: assigning a value of `int' typed constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static void foo(void) { enum Color c = RED; c = 2; /* OK but W1054 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 13 | | W9003 | 8 | 9 | | W1054 | 8 | 7 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | Scenario: assigning a value of `int' typed non-constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; static void foo(const int i) { enum Color c = RED; c = i + 1; /* OK but W1062 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 4 | 13 | | W0723 | 8 | 11 | | W0727 | 8 | 11 | | W9003 | 8 | 11 | | W1054 | 8 | 7 | | W1062 | 8 | 7 | | W0629 | 4 | 13 | | W0628 | 4 | 13 | adlint-3.2.0/features/code_check/W0193.feature0000644000004100000410000001001312224440633020777 0ustar www-datawww-dataFeature: W0193 W0193 detects that `unsigned short' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long double b = a; /* W0193 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0193 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long double b; b = a; /* W0193 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0193 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned short a) { bar(a); /* W0193 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0193 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned short a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned short a) { return a; /* W0193 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0193 | 3 | 12 | | W0329 | 3 | 5 | | W0104 | 1 | 32 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned short a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 32 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0137.feature0000644000004100000410000000763412224440633021014 0ustar www-datawww-dataFeature: W0137 W0137 detects that `unsigned int' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { char b = a; /* W0137 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0137 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { char b; b = a; /* W0137 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0137 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned int a) { bar(a); /* W0137 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0137 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned int a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned int a) { return a; /* W0137 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0137 | 3 | 12 | | W0273 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned int a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0234.feature0000644000004100000410000001002712224440633021000 0ustar www-datawww-dataFeature: W0234 W0234 detects that `long double' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned short b = a; /* W0234 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0234 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned short b; b = a; /* W0234 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0234 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(long double a) { bar(a); /* W0234 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0234 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(long double a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(long double a) { return a; /* W0234 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0234 | 3 | 12 | | W0370 | 3 | 5 | | W0104 | 1 | 32 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(long double a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0104 | 1 | 32 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0155.feature0000644000004100000410000001112212224440633020777 0ustar www-datawww-dataFeature: W0155 W0155 detects that `unsigned long long' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long b = a; /* W0155 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0155 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 14 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long b; b = a; /* W0155 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0155 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 29 | | W0100 | 3 | 10 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned long long a) { bar(a); /* W0155 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0155 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned long long a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 29 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned long long a) { return a; /* W0155 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0155 | 3 | 12 | | W0291 | 3 | 5 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned long long a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0229.feature0000644000004100000410000000773312224440633021016 0ustar www-datawww-dataFeature: W0229 W0229 detects that `double' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long b = a; /* W0229 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0229 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long b; b = a; /* W0229 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0229 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(double a) { bar(a); /* W0229 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0229 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(double a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(double a) { return a; /* W0229 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0229 | 3 | 12 | | W0365 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(double a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 26 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0171.feature0000644000004100000410000001047412224440633021006 0ustar www-datawww-dataFeature: W0171 W0171 detects that `long' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned int b = a; /* W0171 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0171 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 22 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned int b; b = a; /* W0171 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0171 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 18 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(long a) { bar(a); /* W0171 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0171 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(long a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(long a) { return a; /* W0171 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0171 | 3 | 12 | | W0307 | 3 | 5 | | W0104 | 1 | 23 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(long a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 23 | | W0104 | 1 | 23 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0712.feature0000644000004100000410000000657012224440633021011 0ustar www-datawww-dataFeature: W0712 W0712 detects that operand of left side of relational expression is `effectively boolean'. Scenario: a relational expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a > b) > (c + d); /* W0712 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 25 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0712 | 3 | 12 | | W0628 | 1 | 12 | Scenario: an equality expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a == b) > (c + d); /* W0712 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 26 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0712 | 3 | 12 | | W0628 | 1 | 12 | Scenario: a logical expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a && b) > (c + d); /* W0712 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 26 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0712 | 3 | 12 | | W0628 | 1 | 12 | Scenario: a shift expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a << b) > (c + d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0570 | 3 | 15 | | C1000 | | | | C1006 | 1 | 20 | | W0572 | 3 | 15 | | W0794 | 3 | 15 | | W0723 | 3 | 26 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: an arithmetic expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) > (c + d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 25 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0235.feature0000644000004100000410000000760612224440633021012 0ustar www-datawww-dataFeature: W0235 W0235 detects that `long double' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { int b = a; /* W0235 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0235 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { int b; b = a; /* W0235 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0235 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(long double a) { bar(a); /* W0235 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0235 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(long double a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(long double a) { return a; /* W0235 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0235 | 3 | 12 | | W0371 | 3 | 5 | | W0104 | 1 | 21 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(long double a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 21 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0762.feature0000644000004100000410000001100112224440633020777 0ustar www-datawww-dataFeature: W0762 W0762 detects that `long long' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { long b = a; /* W0762 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0762 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 14 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { long b; b = a; /* W0762 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0762 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(long long a) { bar(a); /* W0762 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0762 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(long long a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(long long a) { return a; /* W0762 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0762 | 3 | 12 | | W0396 | 3 | 5 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(long long a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 20 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0691.feature0000644000004100000410000000575712224440633021025 0ustar www-datawww-dataFeature: W0691 W0691 detects that `##' operator makes invalid preprocessing token. Scenario: resulting a decimal-constant `123456' Given a target source named "fixture.c" with: """ #define MACRO(a, b) a ## b double d = (double) MACRO(123, 456); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 3 | 8 | Scenario: resulting a floating-constant `.123' Given a target source named "fixture.c" with: """ #define MACRO(a, b) a ## b double d = (double) MACRO(., 123); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 3 | 8 | Scenario: resulting a floating-constant `3.1415'. Given a target source named "fixture.c" with: """ #define MACRO(a, b) a ## b double d = (double) MACRO(3., 1415); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 3 | 8 | Scenario: resulting a floating-constant `1.23e3' Given a target source named "fixture.c" with: """ #define MACRO(a, b) a ## b double d = (double) MACRO(1.23, e3); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0117 | 3 | 8 | Scenario: resulting an expression `-123' Given a target source named "fixture.c" with: """ #define MACRO(a, b) a ## b double d = (double) MACRO(-, 123); /* W0691 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0691 | 3 | 21 | | W0117 | 3 | 8 | Scenario: resulting an expression `1 / 23' Given a target source named "fixture.c" with: """ #define MACRO(a, b) a ## b double d = (double) MACRO(1/, 23); /* W0691 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0691 | 3 | 21 | | W0195 | 3 | 21 | | W0117 | 3 | 8 | Scenario: resulting an expression `1.2 * 3.4' Given a target source named "fixture.c" with: """ #define MACRO(a, b) a ## b double d = (double) MACRO(1.2*, 3.4); /* W0691 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0691 | 3 | 21 | | W0117 | 3 | 8 | adlint-3.2.0/features/code_check/W0139.feature0000644000004100000410000000764512224440633021020 0ustar www-datawww-dataFeature: W0139 W0139 detects that `unsigned long' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { char b = a; /* W0139 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0139 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { char b; b = a; /* W0139 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0139 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned long a) { bar(a); /* W0139 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0139 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned long a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned long a) { return a; /* W0139 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0139 | 3 | 12 | | W0275 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned long a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0750.feature0000644000004100000410000001033012224440633021000 0ustar www-datawww-dataFeature: W0750 W0750 detects that `int' value is converted into `short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { short b = a; /* W0750 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0750 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { short b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 15 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { short b; b = a; /* W0750 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0750 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { short b; b = (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 11 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(int a) { bar(a); /* W0750 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0750 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(short); void foo(int a) { bar((short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ short foo(int a) { return a; /* W0750 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0750 | 3 | 12 | | W0384 | 3 | 5 | | W0104 | 1 | 15 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ short foo(int a) { return (short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 15 | | W0104 | 1 | 15 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0649.feature0000644000004100000410000002046612224440633021022 0ustar www-datawww-dataFeature: W0649 W0649 detects that right hand side of the shift-expression is a constant-expression of negative value. Scenario: left shift-expression with negative constant rhs value Given a target source named "fixture.c" with: """ int foo(int i) { return i << -1; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0570 | 3 | 14 | | C1000 | | | | C1006 | 1 | 13 | | W0572 | 3 | 14 | | W0649 | 3 | 14 | | W0794 | 3 | 14 | | W0104 | 1 | 13 | | W0628 | 1 | 5 | Scenario: right shift-expression with negative constant rhs value Given a target source named "fixture.c" with: """ int foo(int i) { return i >> -1; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0571 | 3 | 14 | | W0572 | 3 | 14 | | W0649 | 3 | 14 | | W0104 | 1 | 13 | | W0628 | 1 | 5 | Scenario: left shift-expression with negative constant rhs value derived by macro Given a target source named "fixture.c" with: """ #define VAL (-1) int foo(int i) { return i << VAL; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0570 | 5 | 14 | | C1000 | | | | C1006 | 3 | 13 | | W0572 | 5 | 14 | | W0649 | 5 | 14 | | W0794 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: right shift-expression with negative constant rhs value derived by macro Given a target source named "fixture.c" with: """ #define VAL (-1) int foo(int i) { return i >> VAL; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0571 | 5 | 14 | | W0572 | 5 | 14 | | W0649 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: left shift-expression with positive constant rhs value Given a target source named "fixture.c" with: """ int foo(int i) { return i << 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0570 | 3 | 14 | | C1000 | | | | C1006 | 1 | 13 | | W0572 | 3 | 14 | | W0794 | 3 | 14 | | W0104 | 1 | 13 | | W0628 | 1 | 5 | Scenario: right shift-expression with positive constant rhs value Given a target source named "fixture.c" with: """ int foo(int i) { return i >> 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0571 | 3 | 14 | | W0572 | 3 | 14 | | W0104 | 1 | 13 | | W0628 | 1 | 5 | Scenario: left shift-expression with zero constant rhs value Given a target source named "fixture.c" with: """ int foo(int i) { return i << 0; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0570 | 3 | 14 | | C1000 | | | | C1006 | 1 | 13 | | W0572 | 3 | 14 | | W0794 | 3 | 14 | | W0104 | 1 | 13 | | W0628 | 1 | 5 | Scenario: right shift-expression with zero constant rhs value Given a target source named "fixture.c" with: """ int foo(int i) { return i >> 0; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0571 | 3 | 14 | | W0572 | 3 | 14 | | W0104 | 1 | 13 | | W0628 | 1 | 5 | Scenario: left shift compound-assignment-expression with negative constant rhs value Given a target source named "fixture.c" with: """ void foo(int i) { i <<= -1; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0570 | 3 | 7 | | C1000 | | | | C1006 | 1 | 14 | | W0572 | 3 | 7 | | W0649 | 3 | 7 | | W0794 | 3 | 7 | | W0628 | 1 | 6 | Scenario: right shift compound-assignment-expression with negative constant rhs value Given a target source named "fixture.c" with: """ void foo(int i) { i >>= -1; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0571 | 3 | 7 | | W0572 | 3 | 7 | | W0649 | 3 | 7 | | W0628 | 1 | 6 | Scenario: left shift-expression with negative constant rhs value derived by enumerator Given a target source named "fixture.c" with: """ enum e { VAL = -2 }; int foo(int i) { return i << VAL; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0570 | 5 | 14 | | C1000 | | | | C1006 | 3 | 13 | | W0572 | 5 | 14 | | W0649 | 5 | 14 | | W0794 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: right shift-expression with negative constant rhs value derived by enumerator Given a target source named "fixture.c" with: """ enum e { VAL = -2 }; int foo(int i) { return i >> VAL; /* W0649 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0571 | 5 | 14 | | W0572 | 5 | 14 | | W0649 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: left shift-expression with positive constant rhs value derived by enumerator Given a target source named "fixture.c" with: """ enum e { VAL = 2 }; int foo(int i) { return i << VAL; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0570 | 5 | 14 | | C1000 | | | | C1006 | 3 | 13 | | W0572 | 5 | 14 | | W0794 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: right shift-expression with positive constant rhs value derived by enumerator Given a target source named "fixture.c" with: """ enum e { VAL = 2 }; int foo(int i) { return i >> VAL; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0571 | 5 | 14 | | W0572 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0650.feature0000644000004100000410000001457312224440633021014 0ustar www-datawww-dataFeature: W0650 W0650 detects that right hand side of shift-expression is greater than the bit length of left hand side value. Scenario: 32-bit left shift-expression of `int' value Given a target source named "fixture.c" with: """ unsigned int foo(unsigned int i) { return i << 32; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 31 | | W0650 | 3 | 14 | | W0104 | 1 | 31 | | W0628 | 1 | 14 | Scenario: 32-bit right shift-expression of `int' value Given a target source named "fixture.c" with: """ unsigned int foo(unsigned int i) { return i >> 32; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0650 | 3 | 14 | | W0104 | 1 | 31 | | W0628 | 1 | 14 | Scenario: 31-bit left shift-expression of `int' value Given a target source named "fixture.c" with: """ unsigned int foo(unsigned int i) { return i << 31; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 31 | | W0104 | 1 | 31 | | W0628 | 1 | 14 | Scenario: 31-bit right shift-expression of `int' value Given a target source named "fixture.c" with: """ unsigned int foo(unsigned int i) { return i >> 31; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0104 | 1 | 31 | | W0628 | 1 | 14 | Scenario: 64-bit left shift-expression of `int' value Given a target source named "fixture.c" with: """ unsigned int foo(unsigned int i) { return i << 64; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 31 | | W0650 | 3 | 14 | | W0104 | 1 | 31 | | W0628 | 1 | 14 | Scenario: 64-bit right shift-expression of `int' value Given a target source named "fixture.c" with: """ unsigned int foo(unsigned int i) { return i >> 64; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0650 | 3 | 14 | | W0104 | 1 | 31 | | W0628 | 1 | 14 | Scenario: 32-bit left shift compound-assignment-expression of `int' value Given a target source named "fixture.c" with: """ void foo(unsigned int i) { i <<= 32; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0116 | 3 | 7 | | C1000 | | | | C1006 | 1 | 23 | | W0650 | 3 | 7 | | W0628 | 1 | 6 | Scenario: 32-bit right shift compound-assignment-expression of `int' value Given a target source named "fixture.c" with: """ void foo(unsigned int i) { i >>= 32; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0650 | 3 | 7 | | W0628 | 1 | 6 | Scenario: 31-bit left shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c << 31; /* OK because of the integer-promotion */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 14 | | W0719 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 31-bit right shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c >> 31; /* OK because of the integer-promotion */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0719 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 31-bit left shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c << 32; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 14 | | W0650 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 31-bit right shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c >> 32; /* W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0650 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0687.feature0000644000004100000410000000133012224440633021011 0ustar www-datawww-dataFeature: W0687 W0687 detects that #undef directive deletes the `defined' operator. Scenario: #undef directive with the `defined' operator Given a target source named "fixture.c" with: """ #undef defined /* W0687 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0687 | 1 | 8 | Scenario: #undef directive with ordinary macro name Given a target source named "fixture.c" with: """ #define MACRO (0) #undef MACRO /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W0136.feature0000644000004100000410000001031312224440633020777 0ustar www-datawww-dataFeature: W0136 W0136 detects that `int' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { char b = a; /* W0136 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0136 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 14 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { char b; b = a; /* W0136 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0136 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(int a) { bar(a); /* W0136 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0136 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(int a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 14 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(int a) { return a; /* W0136 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0136 | 3 | 12 | | W0272 | 3 | 5 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(int a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0748.feature0000644000004100000410000001004512224440633021012 0ustar www-datawww-dataFeature: W0748 W0748 detects that `unsigned short' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { unsigned char b = a; /* W0748 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0748 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { unsigned char b; b = a; /* W0748 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0748 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned short a) { bar(a); /* W0748 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0748 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(unsigned short a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned short a) { return a; /* W0748 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0748 | 3 | 12 | | W0382 | 3 | 5 | | W0104 | 1 | 34 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(unsigned short a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 34 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0126.feature0000644000004100000410000000771112224440633021006 0ustar www-datawww-dataFeature: W0126 W0126 detects that `char' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long b = a; /* W0126 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0126 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long b; b = a; /* W0126 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0126 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(char a) { bar(a); /* W0126 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0126 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(char a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(char a) { return a; /* W0126 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0126 | 3 | 12 | | W0262 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(char a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0481.feature0000644000004100000410000000157312224440633021012 0ustar www-datawww-dataFeature: W0481 W0481 detects that the macro is enclosed by `{}' and have semicolon. Scenario: enclosed by `{}' and have code block Given a target source named "fixture.c" with: """ #define INI(x, n) {int i;for (i=0; i < n; ++i) { x[i] = 0; }} /* W0481 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0549 | 1 | 50 | | W0549 | 1 | 40 | | W0481 | 1 | 1 | Scenario: enclosed by `{}', but it's not code block Given a target source named "fixture.c" with: """ #define INI(x, n) { (x) + (n) } /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | adlint-3.2.0/features/code_check/W0181.feature0000644000004100000410000001207112224440633021002 0ustar www-datawww-dataFeature: W0181 W0181 detects that `long long' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long long b = a; /* W0181 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0181 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 28 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 24 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long long b; b = a; /* W0181 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0181 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 24 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(long long a) { bar(a); /* W0181 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0181 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 1 | 17 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(long long a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 1 | 17 | | W0834 | 3 | 10 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(long long a) { return a; /* W0181 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0181 | 3 | 12 | | W0317 | 3 | 5 | | W0104 | 1 | 34 | | W0834 | 1 | 1 | | W0834 | 1 | 24 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(long long a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 34 | | W0104 | 1 | 34 | | W0834 | 1 | 1 | | W0834 | 1 | 24 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0580.feature0000644000004100000410000000137312224440633021010 0ustar www-datawww-dataFeature: W0580 W0580 detects that address of the function local static variable is assigned to the global pointer variable declared in wider scope. Scenario: assigning address of an array element to the global pointer Given a target source named "fixture.c" with: """ extern int *p; static void foo(void) { static int a[] = { 1, 2, 3 }; p = &a[1]; /* W0580 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W1076 | 3 | 13 | | W0580 | 6 | 7 | | W0100 | 5 | 16 | | W0629 | 3 | 13 | | W0628 | 3 | 13 | adlint-3.2.0/features/code_check/W0002.feature0000644000004100000410000000353112224440633020773 0ustar www-datawww-dataFeature: W0002 W0002 detects that an old style function-definition is found. Scenario: all arguments are type specified Given a target source named "fixture.c" with: """ int func(arg1, arg2) /* W0002 */ int arg1; char arg2; { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0031 | 2 | 5 | | W0031 | 3 | 6 | | W0104 | 2 | 5 | | W0104 | 3 | 6 | | W0002 | 1 | 5 | | W0628 | 1 | 5 | Scenario: no arguments are type specified Given a target source named "fixture.c" with: """ int func(arg1, arg2) /* W0002 */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0031 | 1 | 10 | | W0031 | 1 | 16 | | W0104 | 1 | 10 | | W0104 | 1 | 16 | | W0002 | 1 | 5 | | W0458 | 1 | 10 | | W0458 | 1 | 16 | | W0628 | 1 | 5 | Scenario: arguments are partly type specified Given a target source named "fixture.c" with: """ int func(arg1, arg2) /* W0002 */ char arg2; { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0031 | 1 | 10 | | W0031 | 2 | 6 | | W0104 | 1 | 10 | | W0104 | 2 | 6 | | W0002 | 1 | 5 | | W0458 | 1 | 10 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0162.feature0000644000004100000410000001053712224440633021006 0ustar www-datawww-dataFeature: W0162 W0162 detects that `short' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned short b = a; /* W0162 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0162 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 24 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned short b; b = a; /* W0162 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0162 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 20 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(short a) { bar(a); /* W0162 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0162 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(short a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 16 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(short a) { return a; /* W0162 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0162 | 3 | 12 | | W0298 | 3 | 5 | | W0104 | 1 | 26 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(short a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 26 | | W0104 | 1 | 26 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W0217.feature0000644000004100000410000000752012224440633021005 0ustar www-datawww-dataFeature: W0217 W0217 detects that `float' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { int b = a; /* W0217 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0217 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { int b; b = a; /* W0217 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0217 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(float a) { bar(a); /* W0217 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0217 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(float a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(float a) { return a; /* W0217 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0217 | 3 | 12 | | W0353 | 3 | 5 | | W0104 | 1 | 15 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(float a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 15 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0719.feature0000644000004100000410000001064212224440633021013 0ustar www-datawww-dataFeature: W0719 W0719 detects that the right hand side of the shift-expression is greater than the bit length of underlying type of the left hand side. Scenario: 31-bit left shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c << 31; /* W0719 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 14 | | W0719 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 31-bit right shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c >> 31; /* W0719 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0719 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 7-bit left shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c << 7; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 7-bit right shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c >> 7; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 31-bit left shift compound-assignment-expression of `char' value Given a target source named "fixture.c" with: """ void foo(char c) { c <<= 31; /* W0719 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0123 | 3 | 5 | | W0116 | 3 | 7 | | C1000 | | | | C1006 | 1 | 15 | | W0719 | 3 | 7 | | W0136 | 3 | 5 | | W0628 | 1 | 6 | Scenario: 31-bit right shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c >> 31; /* W0719 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0719 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | Scenario: 63-bit left shift compound-assignment-expression of `char' value Given a target source named "fixture.c" with: """ void foo(char c) { c <<= 63; /* OK but W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0123 | 3 | 5 | | W0116 | 3 | 7 | | C1000 | | | | C1006 | 1 | 15 | | W0650 | 3 | 7 | | W0136 | 3 | 5 | | W0628 | 1 | 6 | Scenario: 63-bit right shift-expression of `char' value Given a target source named "fixture.c" with: """ int foo(char c) { return c >> 63; /* OK but W0650 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0123 | 3 | 12 | | W0650 | 3 | 14 | | W0104 | 1 | 14 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W1031.feature0000644000004100000410000002277112224440633021005 0ustar www-datawww-dataFeature: W1031 W1031 detects that two or more object declarations have inconsistent storage-class-specifiers. Scenario: function declaration with `static' and function definition without storage-class-specifier Given a target source named "fixture.c" with: """ static int foo(long); int foo(long l) { /* OK */ return (int) l; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1075 | 3 | 5 | | W0104 | 3 | 14 | | W0629 | 3 | 5 | | W0628 | 3 | 5 | Scenario: function declaration with `extern' and function definition without storage-class-specifier Given a target source named "fixture.c" with: """ extern int foo(long); int foo(long l) { /* OK */ return (int) l; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0104 | 3 | 14 | | W0628 | 3 | 5 | Scenario: function declaration without storage-class-specifier and function definition without storage-class-specifier Given a target source named "fixture.c" with: """ int foo(long); int foo(long l) { /* OK */ return (int) l; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 5 | | W0104 | 3 | 14 | | W0628 | 3 | 5 | Scenario: function declaration without storage-class-specifier and function definition with `static' Given a target source named "fixture.c" with: """ int foo(long); static int foo(long l) { /* W1031 */ return (int) l; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 5 | | W1031 | 3 | 12 | | W0104 | 3 | 21 | | W0628 | 3 | 12 | Scenario: function declaration without storage-class-specifier and function definition with `extern' Given a target source named "fixture.c" with: """ int foo(long); extern int foo(long l) { /* OK */ return (int) l; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 5 | | W0104 | 3 | 21 | | W0628 | 3 | 12 | Scenario: function declaration with `static' and function definition with `extern' Given a target source named "fixture.c" with: """ static int foo(long); extern int foo(long l) { /* W1031 */ return (int) l; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1031 | 3 | 12 | | W1075 | 3 | 12 | | W0104 | 3 | 21 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: function declaration with `extern' and function definition with `static' Given a target source named "fixture.c" with: """ extern int foo(long); static int foo(long l) { /* W1031 */ return (int) l; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1031 | 3 | 12 | | W0104 | 3 | 21 | | W0628 | 3 | 12 | Scenario: variable declaration with `extern' and variable definition without storage-class-specifier Given a target source named "fixture.c" with: """ extern int i; int i = 0; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | Scenario: variable definition without storage-class-specifier and variable declaration with `extern' Given a target source named "fixture.c" with: """ int i; extern int i; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0118 | 2 | 12 | Scenario: function declaration with `static' and function definition with `extern' Given a target source named "fixture.c" with: """ static int i; extern int i = 0; /* W1031 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1031 | 2 | 12 | | W1075 | 2 | 12 | Scenario: variable declaration with `extern' and variable definition with `static' Given a target source named "fixture.c" with: """ extern int i; static int i = 0; /* W1031 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1031 | 2 | 12 | Scenario: function definition with `static' and function declaration without storage-class-specifier Given a target source named "fixture.c" with: """ static int foo(long l) { return (int) l; } int foo(long); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 21 | | W1075 | 5 | 5 | | W0629 | 1 | 12 | | W0543 | 1 | 12 | | W0628 | 1 | 12 | Scenario: function definition with `extern' and function declaration without storage-class-specifier Given a target source named "fixture.c" with: """ extern int foo(long l) { return (int) l; } int foo(long); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0104 | 1 | 21 | | W0118 | 5 | 5 | | W0543 | 1 | 12 | | W0628 | 1 | 12 | Scenario: function definition without storage-class-specifier and function declaration without storage-class-specifier Given a target source named "fixture.c" with: """ int foo(long l) { return (int) l; } int foo(long); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 14 | | W0118 | 5 | 5 | | W0543 | 1 | 5 | | W0628 | 1 | 5 | Scenario: function definition without storage-class-specifier and function declaration with `static' Given a target source named "fixture.c" with: """ int foo(long l) { return (int) l; } static int foo(long); /* W1031 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 14 | | W0118 | 5 | 12 | | W1031 | 5 | 12 | | W0543 | 1 | 5 | | W0628 | 1 | 5 | Scenario: function definition without storage-class-specifier and function declaration with `extern' Given a target source named "fixture.c" with: """ int foo(long l) { return (int) l; } extern int foo(long); /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 14 | | W0118 | 5 | 12 | | W0543 | 1 | 5 | | W0628 | 1 | 5 | Scenario: function definition with `static' and function declaration with `extern' Given a target source named "fixture.c" with: """ static int foo(long l) { return (int) l; } extern int foo(long l); /* W1031 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 21 | | W1031 | 5 | 12 | | W1075 | 5 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: function definition with `extern' and function declaration with `static' Given a target source named "fixture.c" with: """ extern int foo(long l) { return (int) l; } static int foo(long); /* W1031 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0104 | 1 | 21 | | W0118 | 5 | 12 | | W1031 | 5 | 12 | | W0543 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0722.feature0000644000004100000410000000375112224440633021010 0ustar www-datawww-dataFeature: W0722 W0722 detects that signed arithmetic-expression must overflow. Scenario: additive-expression must not overflow Given a target source named "fixture.c" with: """ static int foo(int i, int j) { if ((i > -10) && (i < 10) && (j > -20) && (j < 20)) { return i + j; /* OK */ } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: additive-expression may overflow Given a target source named "fixture.c" with: """ static int foo(int i, int j) { if ((i > -10) && (i < 10) && (j < 20)) { return i + j; /* OK but W0723 */ } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 4 | 18 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: additive-expression must overflow Given a target source named "fixture.c" with: """ static int foo(int i, int j) { if ((i > 2000000000) && (j > 2000000000)) { return i + j; /* W0722 */ } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0722 | 4 | 18 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0478.feature0000644000004100000410000000671212224440633021020 0ustar www-datawww-dataFeature: W0478 W0478 detects that the macro defined as an unrecognizable piece of code. Scenario: including `{}' and control statement Given a target source named "fixture.c" with: """ #define CHECK(ptr) if (!ptr) { exit(1) }; /* W0478 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0549 | 1 | 25 | | W0478 | 1 | 1 | Scenario: including semicolon and control statement Given a target source named "fixture.c" with: """ #define CHECK(ptr) ptr = malloc(size); if (!ptr) exit(1);/* W0478 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0549 | 1 | 20 | | W0549 | 1 | 45 | | W0478 | 1 | 1 | Scenario: including storage-class specifier Given a target source named "fixture.c" with: """ #define CONV(num) return (static int) (num) /* W0478 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0478 | 1 | 1 | Scenario: including `{]',but it also including initializer Given a target source named "fixture.c" with: """ #define SUM(num) { num, num + 10 } /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0549 | 1 | 20 | | W0549 | 1 | 25 | Scenario: including `{]',but it also including code block Given a target source named "fixture.c" with: """ #define INI(x, n) {int i; for (i = 0; i < n; ++i) { x[i] = 0; }} /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0549 | 1 | 53 | | W0549 | 1 | 43 | | W0481 | 1 | 1 | Scenario: including `{}' but have `do-while-zero' structure Given a target source named "fixture.c" with: """ #define DO_WHILE(x) do { x = x + 1 } while (0) /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0549 | 1 | 26 | | W0549 | 1 | 30 | Scenario: have the semicolon but it's list of specifier and qualifier Given a target source named "fixture.c" with: """ #define U_INT unsigned int; /* OK */ #define C_INT const int; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0479 | 1 | 1 | | W0479 | 2 | 1 | Scenario: have the semicolon but it's list of storage-class specifier and type specifier Given a target source named "fixture.c" with: """ #define CONV(x) static const int y = x; return y; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0549 | 1 | 38 | adlint-3.2.0/features/code_check/W0644.feature0000644000004100000410000003565412224440633021022 0ustar www-datawww-dataFeature: W0644 W0644 detects that an expression refers the value of a `void' expression. Scenario: casting value of the `void' function Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return (int) foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 12 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in array-subscript-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int a[]) { return a[foo()]; /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 13 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in function-call-expression Given a target source named "fixture.c" with: """ extern void foo(void); extern void bar(int); void baz(void) { bar(foo()); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0118 | 2 | 13 | | W0117 | 4 | 6 | | W0644 | 6 | 12 | | W1026 | 6 | 12 | | W0628 | 4 | 6 | Scenario: referring value of the `void' function in multiplicative-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i * foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in multiplicative-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() / foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in additive-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i + foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in additive-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() + foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in shift-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i << foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0570 | 5 | 14 | | C1000 | | | | C1006 | 3 | 13 | | W0572 | 5 | 14 | | W0794 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in shift-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() << foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in relational-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i < foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0610 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in relational-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() > foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in equality-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i == foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in relational-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() != foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in and-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i & foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0572 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in and-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() & foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in exclusive-or-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i ^ foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0572 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in exclusive-or-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() ^ foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in inclusive-or-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { return i | foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 14 | | W0572 | 5 | 14 | | W0104 | 3 | 13 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in inclusive-or-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { return foo() | foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in logical-and-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { if (i && foo()) { /* W0644 */ return 0; } return i && foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 11 | | W0035 | 5 | 11 | | W0644 | 9 | 14 | | W0035 | 9 | 14 | | W0104 | 3 | 13 | | W1071 | 3 | 5 | | W0488 | 5 | 9 | | W0508 | 5 | 11 | | W0488 | 9 | 12 | | W0508 | 9 | 14 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in exclusive-or-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { if (foo() && foo()) { /* W0644 */ return 0; } return foo() && foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 15 | | W0035 | 5 | 15 | | W0644 | 9 | 18 | | W0035 | 9 | 18 | | W1071 | 3 | 5 | | W0488 | 5 | 9 | | W0508 | 5 | 15 | | W0488 | 9 | 12 | | W0508 | 9 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in logical-or-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(int i) { if (i || foo()) { /* W0644 */ return 0; } return i || foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 11 | | W0035 | 5 | 11 | | W0644 | 9 | 14 | | W0035 | 9 | 14 | | W0104 | 3 | 13 | | W1071 | 3 | 5 | | W0488 | 5 | 9 | | W0508 | 5 | 11 | | W0488 | 9 | 12 | | W0508 | 9 | 14 | | W0628 | 3 | 5 | Scenario: referring two values of the `void' function in exclusive-or-expression Given a target source named "fixture.c" with: """ extern void foo(void); int bar(void) { if (foo() || foo()) { /* W0644 */ return 0; } return foo() || foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 5 | | W0644 | 5 | 15 | | W0035 | 5 | 15 | | W0644 | 9 | 18 | | W0035 | 9 | 18 | | W1071 | 3 | 5 | | W0488 | 5 | 9 | | W0508 | 5 | 15 | | W0488 | 9 | 12 | | W0508 | 9 | 18 | | W0628 | 3 | 5 | Scenario: referring value of the `void' function in assignment-expression Given a target source named "fixture.c" with: """ extern void foo(void); void bar(int i) { i = foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0644 | 5 | 7 | | W0628 | 3 | 6 | Scenario: referring value of the `void' function in compound-assignment-expression Given a target source named "fixture.c" with: """ extern void foo(void); void bar(int i) { i += foo(); /* W0644 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0644 | 5 | 7 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0135.feature0000644000004100000410000000765612224440633021016 0ustar www-datawww-dataFeature: W0135 W0135 detects that `unsigned short' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { char b = a; /* W0135 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0135 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned short a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { char b; b = a; /* W0135 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0135 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned short a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned short a) { bar(a); /* W0135 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0135 | 5 | 9 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(unsigned short a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 25 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned short a) { return a; /* W0135 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0135 | 3 | 12 | | W0271 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(unsigned short a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 25 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0534.feature0000644000004100000410000000405412224440633021006 0ustar www-datawww-dataFeature: W0534 W0534 detects that a controlling variable of for-statement is not initialized in the 1st part of for-statement. Scenario: the 1st part of for-statement does not initialize the controlling variable Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int i = 0, j; for (j = 0; (bar(&i)) && (i < num); i++) { /* W0534 */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0534 | 6 | 10 | | W0629 | 3 | 12 | | W0425 | 5 | 16 | | W0628 | 3 | 12 | Scenario: the 1st part of for-statement is empty Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int i = 0, j = 0; for (; (bar(&i)) && (i < num); i++) { /* W0534 */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0534 | 6 | 10 | | W0629 | 3 | 12 | | W0425 | 5 | 16 | | W0628 | 3 | 12 | Scenario: the 1st part of for-statement initializes the controlling variable Given a target source named "fixture.c" with: """ static int bar(int *); static int foo(const int num) { int i, j = 0; for (i = 0; (bar(&i)) && (i < num); i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W0629 | 3 | 12 | | W0425 | 5 | 12 | | W0628 | 3 | 12 | adlint-3.2.0/features/code_check/W0757.feature0000644000004100000410000001005112224440633021007 0ustar www-datawww-dataFeature: W0757 W0757 detects that `unsigned long' value is converted into `unsigned short' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned short b = a; /* W0757 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0757 | 3 | 24 | | W0100 | 3 | 20 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned short b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned short b; b = a; /* W0757 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0757 | 4 | 9 | | W0100 | 3 | 20 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned short b; b = (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 20 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(unsigned long a) { bar(a); /* W0757 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0757 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned short); void foo(unsigned long a) { bar((unsigned short) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(unsigned long a) { return a; /* W0757 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0757 | 3 | 12 | | W0391 | 3 | 5 | | W0104 | 1 | 34 | | W0628 | 1 | 16 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned short foo(unsigned long a) { return (unsigned short) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 16 | | W0104 | 1 | 34 | | W0628 | 1 | 16 | adlint-3.2.0/features/code_check/W1060.feature0000644000004100000410000000441412224440633021001 0ustar www-datawww-dataFeature: W1060 W1060 detects that a function of non-enum return type is returning a value of enum typed expression. Scenario: returning a value of the enum typed constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int bar(void) { return RED + 1; /* W1060 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W9003 | 5 | 18 | | W9003 | 5 | 16 | | W1060 | 5 | 16 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: returning a value of the enum typed non-constant expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int bar(const enum Color c) { return c + 1; /* W1060 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W9003 | 5 | 16 | | W0723 | 5 | 14 | | W9003 | 5 | 14 | | W1060 | 5 | 14 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: returning a value of consistently typed constant expression Given a target source named "fixture.c" with: """ static int foo(void) { return 1 + 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: returning a value of inconsistently typed constant expression Given a target source named "fixture.c" with: """ static int foo(void) { return 1.0 * .1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0226 | 3 | 16 | | W0362 | 3 | 5 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0685.feature0000644000004100000410000000700112224440633021010 0ustar www-datawww-dataFeature: W0685 W0685 detects that the order of the character which including `-' is not correct in the scanset. Scenario: bigger lower-case character to smaller one Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[z-a]", &c); /* W0685 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0573 | 6 | 19 | | W0685 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: bigger number to smaller one Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[9-1]", &c); /* W0685 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0573 | 6 | 19 | | W0685 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: lower-case character to number Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[a-0]", &c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0573 | 6 | 19 | | W0685 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: lower-case character to uppercase one Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[a-A]", &c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0573 | 6 | 19 | | W0685 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | Scenario: proper older Given a target source named "fixture.c" with: """ #include void foo(void) { char c; int i = scanf("%[a-z]", &c); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 6 | | W0459 | 6 | 29 | | C1000 | | | | C1003 | 5 | 10 | | W0573 | 6 | 19 | | W0100 | 5 | 10 | | W0100 | 6 | 9 | | W0947 | 6 | 19 | | W0628 | 3 | 6 | adlint-3.2.0/features/code_check/W0714.feature0000644000004100000410000000701612224440633021007 0ustar www-datawww-dataFeature: W0714 W0714 detects that operands of both sides of and-expression is `effectively boolean'. Scenario: relational expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a > b) & (c > d); /* W0714 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 20 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0714 | 3 | 20 | | W0716 | 3 | 20 | | W0628 | 1 | 12 | Scenario: equality expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a == b) & (c != d); /* W0714 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 21 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0714 | 3 | 21 | | W0716 | 3 | 21 | | W0628 | 1 | 12 | Scenario: logical expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a && b) & (c || d); /* W0714 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 21 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0714 | 3 | 21 | | W0716 | 3 | 21 | | W0628 | 1 | 12 | Scenario: shift expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a << b) & (c ^ d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0570 | 3 | 15 | | C1000 | | | | C1006 | 1 | 20 | | W0572 | 3 | 15 | | W0794 | 3 | 15 | | W0572 | 3 | 26 | | W0572 | 3 | 21 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: arithmetic expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) & (c - d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 25 | | W0572 | 3 | 20 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0613.feature0000644000004100000410000000153712224440633021007 0ustar www-datawww-dataFeature: W0613 W0613 detects that a controlling expression of the iteration-statement always be false. Scenario: array-subscript-expression refers to global constant table Given a target source named "fixture.c" with: """ static const int a[256] = { 0, 1, 0, 0, 1 }; extern unsigned char foo(int); int main(void) { int i, j = 0; for (i = 0; a[foo(i)]; i++) { /* OK */ j++; } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 22 | | W0246 | 9 | 22 | | W0736 | 1 | 18 | | W0043 | 1 | 27 | | W0950 | 1 | 20 | | W0114 | 9 | 5 | | W0425 | 7 | 12 | adlint-3.2.0/features/code_check/W0496.feature0000644000004100000410000000357112224440633021020 0ustar www-datawww-dataFeature: W0496 W0496 detects that multiple conditional-expressions appear in an expression without appropriate grouping. Scenario: without grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a < 0 ? a : b > 0 ? a + b : b; /* W0496 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 34 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0496 | 3 | 12 | | W0501 | 3 | 18 | | W0628 | 1 | 12 | Scenario: with appropriate grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return a < 0 ? a : (b > 0 ? a + b : b); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 35 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0501 | 3 | 18 | | W0628 | 1 | 12 | Scenario: entirely grouped Given a target source named "fixture.c" with: """ static int foo(int a, int b) { return (a < 0 ? a : b > 0 ? a + b : b); /* W0496 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 35 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0629 | 1 | 12 | | W0496 | 3 | 13 | | W0501 | 3 | 19 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0830.feature0000644000004100000410000000573212224440633021011 0ustar www-datawww-dataFeature: W0830 W0830 detects that an extra comma appears after enumerator-list. Scenario: an extra comma after enumerator-list in the named enum-specifier Given a target source named "fixture.c" with: """ enum Color { Red, Green, Blue, }; /* W0830 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0830 | 1 | 30 | Scenario: an extra comma after enumerator-list in the unnamed enum-specifier Given a target source named "fixture.c" with: """ enum { Red, Green, Blue, }; /* W0830 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0830 | 1 | 24 | Scenario: no extra comma after enumerator-list in the named enum-specifier Given a target source named "fixture.c" with: """ enum Color { Red, Green, Blue }; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: no extra comma after enumerator-list in the unnamed enum-specifier Given a target source named "fixture.c" with: """ enum { Red, Green, Blue }; /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: an extra comma after initialized enumerator-list in the named enum-specifier Given a target source named "fixture.c" with: """ enum Color { Red = 1, Green = 2, Blue = 3, }; /* W0830 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0830 | 1 | 42 | Scenario: an extra comma after initialized enumerator-list in the unnamed enum-specifier Given a target source named "fixture.c" with: """ enum { Red = 1, Green = 2, Blue = 3, }; /* W0830 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0830 | 1 | 36 | Scenario: hard to preprocess Given a target source named "fixture.c" with: """ #include "config.h" """ And a target source named "config.h" with: """ typedef enum jid { #define DEFINE_JOB(id, func) JOBID_##id, #include "job_tbl.h" #undef DEFINE_JOB } jid_t; """ And a target source named "job_tbl.h" with: """ DEFINE_JOB(1id, func1) DEFINE_JOB(id2, func2) """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 2 | 1 | | W0073 | 1 | 1 | | W0073 | 1 | 1 | | W0830 | 2 | 1 | | W0071 | 3 | 1 | adlint-3.2.0/features/code_check/W0232.feature0000644000004100000410000001001212224440633020770 0ustar www-datawww-dataFeature: W0232 W0232 detects that `long double' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned char b = a; /* W0232 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0232 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned char b; b = a; /* W0232 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0232 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long double a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 22 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(long double a) { bar(a); /* W0232 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0232 | 5 | 9 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(long double a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 22 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(long double a) { return a; /* W0232 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0232 | 3 | 12 | | W0368 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(long double a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 31 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0501.feature0000644000004100000410000000423512224440633021001 0ustar www-datawww-dataFeature: W0501 W0501 detects that a binary-expression appars in a conditional-expression without appropriate grouping. Scenario: binary-expressions in a conditional-expression Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c) { return a + b ? a + b : c; /* W0501 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0723 | 3 | 22 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0629 | 1 | 12 | | W0501 | 3 | 18 | | W0114 | 3 | 14 | | W0628 | 1 | 12 | Scenario: binary-expressions in a conditional-expression with grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c) { return (a + b) ? (a + b) : c; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 25 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0629 | 1 | 12 | | W0114 | 3 | 12 | | W0628 | 1 | 12 | Scenario: binary-expressions in a conditional-expression with large grouping Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c) { return (a + b ? a + b : c); /* W0501 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 23 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0629 | 1 | 12 | | W0501 | 3 | 19 | | W0114 | 3 | 15 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W1067.feature0000644000004100000410000000631212224440633021007 0ustar www-datawww-dataFeature: W1067 W1067 detects that a value of the `float' typed compound expression is explicitly converted into a `long double' value. Scenario: explicit conversion from `float' to `double' when the source value is derived from `+', `-', `*' or `/' expressions Given a target source named "fixture.c" with: """ static void func(float a, float b) { long double c; c = (long double) (a + b); /* W1067 */ c = (long double) (a - b); /* W1067 */ c = (long double) (a * b); /* W1067 */ c = (long double) (a / b); /* W1067 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 4 | 26 | | W1067 | 4 | 26 | | W0723 | 5 | 26 | | W1067 | 5 | 26 | | W0723 | 6 | 26 | | W1067 | 6 | 26 | | W0093 | 7 | 26 | | C1000 | | | | C1006 | 1 | 33 | | W1067 | 7 | 26 | | W0104 | 1 | 24 | | W0104 | 1 | 33 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: explicit conversion from `float' to `double' when the source value is not derived from `+', `-', `*' or `/' expressions Given a target source named "fixture.c" with: """ static void func(float a, float b) { long double c; c = (long double) (a % b); /* OK */ c = (long double) (a < b); /* OK */ c = (long double) (a << b); /* OK */ c = (long double) (a ^ b); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0093 | 4 | 26 | | C1000 | | | | C1006 | 1 | 33 | | W0570 | 6 | 26 | | C1000 | | | | C1006 | 1 | 24 | | W0572 | 6 | 26 | | W0794 | 6 | 26 | | W0572 | 7 | 26 | | W0104 | 1 | 24 | | W0104 | 1 | 33 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | Scenario: implicit conversion from `float' to `long double' Given a target source named "fixture.c" with: """ static void func(float a, float b) { long double c; c = a + b; /* W0778 */ c = a - b; /* W0778 */ c = a * b; /* W0778 */ c = a / b; /* W0778 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 4 | 11 | | W0778 | 4 | 11 | | W0723 | 5 | 11 | | W0778 | 5 | 11 | | W0723 | 6 | 11 | | W0778 | 6 | 11 | | W0093 | 7 | 11 | | C1000 | | | | C1006 | 1 | 33 | | W0778 | 7 | 11 | | W0104 | 1 | 24 | | W0104 | 1 | 33 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0697.feature0000644000004100000410000001225112224440633021016 0ustar www-datawww-dataFeature: W0697 W0697 detects that some execution paths terminate implicitly without explicit `return' statements in the non-void function. Scenario: no `return' statement in non-void function Given a target source named "fixture.c" with: """ extern int func(void) /* W0697 */ { } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0697 | 1 | 12 | | W0628 | 1 | 12 | Scenario: a `return' statement is only in a `if' statement Given a target source named "fixture.c" with: """ extern int func(int value) /* W0697 */ { if (value == 0) { return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0697 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0628 | 1 | 12 | Scenario: `return' statements are only in a `if-else-if' statements chain Given a target source named "fixture.c" with: """ extern int func(int value) /* W0697 */ { if (value == 0) { return 0; } else if (value == 1) { return 1; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0697 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W1069 | 3 | 5 | | W0628 | 1 | 12 | Scenario: `return' statements are in all `case' clauses but not in the `default` clause Given a target source named "fixture.c" with: """ extern int func(int value) /* W0697 */ { switch (value) { case 1: return 0; case 2: return 1; case 3: return 2; default: break; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0697 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0628 | 1 | 12 | Scenario: a `return' statement in non-void function Given a target source named "fixture.c" with: """ extern int func(void) /* OK */ { return 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0628 | 1 | 12 | Scenario: no implicit termination in all execution paths Given a target source named "fixture.c" with: """ extern int func(int value) /* OK */ { if (value == 0) { return 0; } return 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0628 | 1 | 12 | Scenario: no implicit termination in `if-else-if' statements chain Given a target source named "fixture.c" with: """ extern int func(int value) /* OK */ { if (value == 0) { return 0; } else if (value == 1) { return 1; } else { return 2; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0628 | 1 | 12 | Scenario: no implicit termination with `switch' statement Given a target source named "fixture.c" with: """ extern int func(int value) /* OK */ { switch (value) { case 1: return 0; case 2: return 1; case 3: return 2; default: break; } return 10; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0104 | 1 | 21 | | W1071 | 1 | 12 | | W0628 | 1 | 12 | Scenario: no implicit termination with `goto' statement Given a target source named "fixture.c" with: """ extern int func(int value) /* OK */ { if (value == 10) { goto A; } A: return 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W0104 | 1 | 21 | | W1072 | 4 | 9 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0145.feature0000644000004100000410000001057112224440633021005 0ustar www-datawww-dataFeature: W0145 W0145 detects that `unsigned int' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { signed char b = a; /* W0145 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0145 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { signed char b; b = a; /* W0145 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0145 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 17 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned int a) { bar(a); /* W0145 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0145 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned int a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 23 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned int a) { return a; /* W0145 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0145 | 3 | 12 | | W0281 | 3 | 5 | | W0104 | 1 | 30 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned int a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 30 | | W0104 | 1 | 30 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/E0008.feature0000644000004100000410000000072612224440633020762 0ustar www-datawww-dataFeature: E0008 E0008 detects that a syntax error occured. Scenario: statements in initializer Given a target source named "fixture.c" with: """ #ifdef FOOFOO void foo1(void); #endif void foo2(void); /* OK not E0008 */ /**/\ #define FOO 1 """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 5 | 6 | adlint-3.2.0/features/code_check/W0726.feature0000644000004100000410000000521212224440633021006 0ustar www-datawww-dataFeature: W0726 W0726 detects that `return' statement is found in qualified void function. Scenario: `return' with value statement in const void function Given a target source named "fixture.c" with: """ const void func(void) /* W0726 */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W1033 | 1 | 12 | | W0726 | 3 | 5 | | W0628 | 1 | 12 | Scenario: `return' with value statement in volatile void function Given a target source named "fixture.c" with: """ volatile void func(void) /* W0726 */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W1033 | 1 | 15 | | W0726 | 3 | 5 | | W0628 | 1 | 15 | Scenario: `return;' statement in const void function Given a target source named "fixture.c" with: """ const void func(void) /* OK */ { return; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 12 | | W1033 | 1 | 12 | | W0628 | 1 | 12 | Scenario: `return;' statement in volatile void function Given a target source named "fixture.c" with: """ volatile void func(void) /* OK */ { return; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W1033 | 1 | 15 | | W0628 | 1 | 15 | Scenario: `return' with value statement in void function Given a target source named "fixture.c" with: """ void func(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0628 | 1 | 6 | Scenario: `return' statement in void function Given a target source named "fixture.c" with: """ void func(void) /* OK */ { return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0780.feature0000644000004100000410000000373712224440633021020 0ustar www-datawww-dataFeature: W0780 W0780 detects that a left shift-expression of unsigned constant value discards upper non-zero bits. Scenario: discarding 3 of zero bits and 1 of non-zero bit in `unsigned int' constant Given a target source named "fixture.c" with: """ unsigned int foo(void) { return 0x08000000U << 5; /* W0780 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0115 | 3 | 24 | | W0780 | 3 | 24 | | W0628 | 1 | 14 | Scenario: discarding 4 of zero bits in `unsigned int' constant Given a target source named "fixture.c" with: """ unsigned int foo(void) { return 0x08000000U << 4; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0628 | 1 | 14 | Scenario: discarding 3 of zero bits and 1 of non-zero bit in `unsigned long' constant Given a target source named "fixture.c" with: """ unsigned long foo(void) { return 0x08000000UL << 5; /* W0780 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0115 | 3 | 25 | | W0780 | 3 | 25 | | W0628 | 1 | 15 | Scenario: discarding 4 of zero bits in `unsigned int' constant Given a target source named "fixture.c" with: """ unsigned long foo(void) { return 0x08000000UL << 4; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0758.feature0000644000004100000410000001001712224440633021012 0ustar www-datawww-dataFeature: W0758 W0758 detects that `unsigned long' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned int b = a; /* W0758 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0758 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned int b; b = a; /* W0758 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0758 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(unsigned long a) { bar(a); /* W0758 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0758 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(unsigned long a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(unsigned long a) { return a; /* W0758 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0758 | 3 | 12 | | W0392 | 3 | 5 | | W0104 | 1 | 32 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(unsigned long a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0104 | 1 | 32 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0226.feature0000644000004100000410000000753112224440633021007 0ustar www-datawww-dataFeature: W0226 W0226 detects that `double' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { int b = a; /* W0226 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0226 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { int b; b = a; /* W0226 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0226 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 9 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(double a) { bar(a); /* W0226 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0226 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(double a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(double a) { return a; /* W0226 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0226 | 3 | 12 | | W0362 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(double a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0703.feature0000644000004100000410000000374612224440633021013 0ustar www-datawww-dataFeature: W0703 W0703 detects that a tag name is hiding other tag names. Scenario: tag hiding declaration in function-definition Given a target source named "fixture.c" with: """ struct Foo { int i; }; int main(void) { union Foo { /* W0703 */ int i; int j; } foo = { 0 }; return foo.i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0703 | 7 | 11 | | C0001 | 1 | 8 | | W0785 | 7 | 11 | | W0552 | 10 | 7 | | W0100 | 10 | 7 | | W0551 | 7 | 11 | Scenario: tag hiding declaration in the global scope Given a target source named "fixture.c" with: """ struct Foo { int i; }; static union Foo { /* W0703 */ int i; int j; } foo = { 0 }; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0703 | 5 | 14 | | C0001 | 1 | 8 | | W0785 | 5 | 14 | | W0552 | 8 | 3 | | W0551 | 5 | 14 | Scenario: enum declaration in global and function scope Given a target source named "fixture.c" with: """ enum E { FOO, BAR }; int main(void) { enum E { BAR, BAZ } e = FOO; /* W0703 */ return e; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0703 | 5 | 10 | | C0001 | 1 | 6 | | W0704 | 5 | 14 | | C0001 | 1 | 15 | | W0785 | 5 | 10 | | W0789 | 5 | 14 | | C0001 | 1 | 15 | | W9003 | 6 | 12 | | W1060 | 6 | 12 | | W0100 | 5 | 25 | adlint-3.2.0/features/code_check/W0715.feature0000644000004100000410000000702712224440633021012 0ustar www-datawww-dataFeature: W0715 W0715 detects that operands of both sides of inclusive-or-expression is `effectively boolean'. Scenario: relational expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a > b) | (c > d); /* W0715 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 20 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0715 | 3 | 20 | | W0716 | 3 | 20 | | W0628 | 1 | 12 | Scenario: equality expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a == b) | (c != d); /* W0715 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 21 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0715 | 3 | 21 | | W0716 | 3 | 21 | | W0628 | 1 | 12 | Scenario: logical expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a && b) | (c || d); /* W0715 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0572 | 3 | 21 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0715 | 3 | 21 | | W0716 | 3 | 21 | | W0628 | 1 | 12 | Scenario: shift expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a << b) | (c ^ d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0570 | 3 | 15 | | C1000 | | | | C1006 | 1 | 20 | | W0572 | 3 | 15 | | W0794 | 3 | 15 | | W0572 | 3 | 26 | | W0572 | 3 | 21 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: arithmetic expressions Given a target source named "fixture.c" with: """ static int foo(int a, int b, int c, int d) { return (a + b) | (c - d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 15 | | W0723 | 3 | 25 | | W0572 | 3 | 20 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W0104 | 1 | 41 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0735.feature0000644000004100000410000002353012224440633021011 0ustar www-datawww-dataFeature: W0735 W0735 detects that right side of logical expression is bitwise expression or arithmetic expression. Scenario: right side of `&&' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = a && (b + c); /* W0735 */ r = a && (b - c); /* W0735 */ r = a && (b * c); /* W0735 */ r = a && (b / c); /* W0735 */ r = a && (b % c); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 17 | | W0723 | 6 | 17 | | W0723 | 7 | 17 | | W0093 | 8 | 17 | | C1000 | | | | C1006 | 1 | 36 | | W0093 | 9 | 17 | | C1000 | | | | C1006 | 1 | 36 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0735 | 5 | 14 | | W0735 | 6 | 14 | | W0735 | 7 | 14 | | W0735 | 8 | 14 | | W0735 | 9 | 14 | | W0628 | 1 | 13 | Scenario: right side of `&&' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a == b) && (c + d); /* W0735 */ r = (a = b) && (c - d); /* W0735 */ r = (a && b) && (c * d); /* W0735 */ r = (a < b) && (c / d); /* W0735 */ r = (a != b) && (c % d); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 24 | | W0723 | 6 | 23 | | W0723 | 7 | 24 | | W0093 | 8 | 23 | | C1000 | | | | C1006 | 1 | 43 | | W0093 | 9 | 24 | | C1000 | | | | C1006 | 1 | 43 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0735 | 5 | 21 | | W0735 | 6 | 20 | | W0735 | 7 | 21 | | W0735 | 8 | 20 | | W0735 | 9 | 21 | | W0108 | 6 | 12 | | W0628 | 1 | 13 | Scenario: right side of `||' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = a || (b + c); /* W0735 */ r = a || (b - c); /* W0735 */ r = a || (b * c); /* W0735 */ r = a || (b / c); /* W0735 */ r = a || (b % c); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 17 | | W0723 | 6 | 17 | | W0723 | 7 | 17 | | W0093 | 8 | 17 | | C1000 | | | | C1006 | 1 | 36 | | W0093 | 9 | 17 | | C1000 | | | | C1006 | 1 | 36 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0735 | 5 | 14 | | W0735 | 6 | 14 | | W0735 | 7 | 14 | | W0735 | 8 | 14 | | W0735 | 9 | 14 | | W0628 | 1 | 13 | Scenario: right side of `||' operator is an arithmetic expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a == b) || (c + d); /* W0735 */ r = (a = b) || (c - d); /* W0735 */ r = (a || b) || (c * d); /* W0735 */ r = (a < b) || (c / d); /* W0735 */ r = (a != b) || (c % d); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 24 | | W0723 | 6 | 23 | | W0723 | 7 | 24 | | W0093 | 8 | 23 | | C1000 | | | | C1006 | 1 | 43 | | W0093 | 9 | 24 | | C1000 | | | | C1006 | 1 | 43 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0735 | 5 | 21 | | W0735 | 6 | 20 | | W0735 | 7 | 21 | | W0735 | 8 | 20 | | W0735 | 9 | 21 | | W0108 | 6 | 12 | | W0628 | 1 | 13 | Scenario: right side of `&&' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = a && (b << c); /* W0735 */ r = a && (b >> c); /* W0735 */ r = a && (b & c); /* W0735 */ r = a && (b ^ c); /* W0735 */ r = a && (b | c); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 17 | | C1000 | | | | C1006 | 1 | 29 | | W0572 | 5 | 17 | | W0794 | 5 | 17 | | W0571 | 6 | 17 | | W0572 | 6 | 17 | | W0572 | 7 | 17 | | W0572 | 8 | 17 | | W0572 | 9 | 17 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0735 | 5 | 14 | | W0735 | 6 | 14 | | W0735 | 7 | 14 | | W0735 | 8 | 14 | | W0735 | 9 | 14 | | W0628 | 1 | 13 | Scenario: right side of `||' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c) { int r; r = a || (b << c); /* W0735 */ r = a || (b >> c); /* W0735 */ r = a || (b & c); /* W0735 */ r = a || (b ^ c); /* W0735 */ r = a || (b | c); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 17 | | C1000 | | | | C1006 | 1 | 29 | | W0572 | 5 | 17 | | W0794 | 5 | 17 | | W0571 | 6 | 17 | | W0572 | 6 | 17 | | W0572 | 7 | 17 | | W0572 | 8 | 17 | | W0572 | 9 | 17 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0629 | 1 | 13 | | W0735 | 5 | 14 | | W0735 | 6 | 14 | | W0735 | 7 | 14 | | W0735 | 8 | 14 | | W0735 | 9 | 14 | | W0628 | 1 | 13 | Scenario: right side of `&&' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a == b) && (c << d); /* W0735 */ r = (a = b) && (c >> d); /* W0735 */ r = (a && b) && (c & d); /* W0735 */ r = (a < b) && (c ^ d); /* W0735 */ r = (a != b) && (c | d); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 24 | | C1000 | | | | C1006 | 1 | 36 | | W0572 | 5 | 24 | | W0794 | 5 | 24 | | W0571 | 6 | 23 | | W0572 | 6 | 23 | | W0572 | 7 | 24 | | W0572 | 8 | 23 | | W0572 | 9 | 24 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0735 | 5 | 21 | | W0735 | 6 | 20 | | W0735 | 7 | 21 | | W0735 | 8 | 20 | | W0735 | 9 | 21 | | W0108 | 6 | 12 | | W0628 | 1 | 13 | Scenario: right side of `||' operator is a bitwise expression Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a == b) || (c << d); /* W0735 */ r = (a = b) || (c >> d); /* W0735 */ r = (a && b) || (c & d); /* W0735 */ r = (a < b) || (c ^ d); /* W0735 */ r = (a != b) || (c | d); /* W0735 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 24 | | C1000 | | | | C1006 | 1 | 36 | | W0572 | 5 | 24 | | W0794 | 5 | 24 | | W0571 | 6 | 23 | | W0572 | 6 | 23 | | W0572 | 7 | 24 | | W0572 | 8 | 23 | | W0572 | 9 | 24 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0735 | 5 | 21 | | W0735 | 6 | 20 | | W0735 | 7 | 21 | | W0735 | 8 | 20 | | W0735 | 9 | 21 | | W0108 | 6 | 12 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0205.feature0000644000004100000410000001000212224440633020767 0ustar www-datawww-dataFeature: W0205 W0205 detects that `unsigned long' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long double b = a; /* W0205 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0205 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long double b; b = a; /* W0205 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0205 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned long a) { bar(a); /* W0205 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0205 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned long a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned long a) { return a; /* W0205 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0205 | 3 | 12 | | W0341 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned long a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0806.feature0000644000004100000410000000126712224440633021013 0ustar www-datawww-dataFeature: W0806 W0806 detects that the macro named `defined' is defined. Scenario: a macro named `defined' is defined Given a target source named "fixture.c" with: """ #define defined !defined /* W0806 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0806 | 1 | 9 | Scenario: a macro named `define' is defined Given a target source named "fixture.c" with: """ #define define !define /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | adlint-3.2.0/features/code_check/W0219.feature0000644000004100000410000000753512224440633021015 0ustar www-datawww-dataFeature: W0219 W0219 detects that `float' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { long b = a; /* W0219 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0219 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { long b; b = a; /* W0219 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0219 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(float a) { bar(a); /* W0219 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0219 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(float a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(float a) { return a; /* W0219 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0219 | 3 | 12 | | W0355 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(float a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0130.feature0000644000004100000410000001042512224440633020775 0ustar www-datawww-dataFeature: W0130 W0130 detects that `char' value is converted into `long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { long long b = a; /* W0130 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0130 | 3 | 19 | | W0100 | 3 | 15 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(char a) { long long b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 15 | | W0834 | 3 | 20 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { long long b; b = a; /* W0130 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0130 | 4 | 9 | | W0100 | 3 | 15 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(char a) { long long b; b = (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 15 | | W0104 | 1 | 15 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(char a) { bar(a); /* W0130 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0130 | 5 | 9 | | W0104 | 3 | 15 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long long); void foo(char a) { bar((long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(char a) { return a; /* W0130 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0130 | 3 | 12 | | W0266 | 3 | 5 | | W0104 | 1 | 20 | | W0834 | 1 | 1 | | W0628 | 1 | 11 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long long foo(char a) { return (long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0104 | 1 | 20 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 11 | adlint-3.2.0/features/code_check/W0182.feature0000644000004100000410000000766212224440633021015 0ustar www-datawww-dataFeature: W0182 W0182 detects that `unsigned char' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { float b = a; /* W0182 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0182 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { float b; b = a; /* W0182 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0182 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned char a) { bar(a); /* W0182 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0182 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(unsigned char a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned char a) { return a; /* W0182 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0182 | 3 | 12 | | W0318 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(unsigned char a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 25 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0196.feature0000644000004100000410000000764612224440633021024 0ustar www-datawww-dataFeature: W0196 W0196 detects that `int' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { long double b = a; /* W0196 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0196 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { long double b; b = a; /* W0196 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0196 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(int a) { bar(a); /* W0196 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0196 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(int a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(int a) { return a; /* W0196 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0196 | 3 | 12 | | W0332 | 3 | 5 | | W0104 | 1 | 21 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(int a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 21 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0172.feature0000644000004100000410000001051112224440633020777 0ustar www-datawww-dataFeature: W0172 W0172 detects that `long' value is converted into `unsigned long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long b = a; /* W0172 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0172 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 23 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long b; b = a; /* W0172 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0172 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { unsigned long b; b = (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 15 | | W0100 | 3 | 19 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(long a) { bar(a); /* W0172 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0172 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long); void foo(long a) { bar((unsigned long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 15 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(long a) { return a; /* W0172 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0172 | 3 | 12 | | W0308 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long foo(long a) { return (unsigned long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 24 | | W0104 | 1 | 24 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0200.feature0000644000004100000410000000754112224440633021000 0ustar www-datawww-dataFeature: W0200 W0200 detects that `long' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { float b = a; /* W0200 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0200 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { float b; b = a; /* W0200 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0200 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 15 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(long a) { bar(a); /* W0200 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0200 | 5 | 9 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(long a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 15 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(long a) { return a; /* W0200 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0200 | 3 | 12 | | W0336 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(long a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 16 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0492.feature0000644000004100000410000000424712224440633021015 0ustar www-datawww-dataFeature: W0492 W0492 detects that the same name appears in different namespaces. Scenario: hard to parse Given a target source named "fixture.c" with: """ typedef int foo; foo bar(foo baz) { goto foo; foo: return baz; } struct foo { foo foo, (*bar)(foo); }; /* W0492 */ union bar { foo foo, (*bar)(foo (*baz)(foo)); }; /* W0492 */ enum baz { baz }; struct { foo :1; foo foo:1; /* W0492 */ foo :1; foo bar:1; /* W0492 */ foo :1; } qux; struct qux { foo; union bar bar; /* W0492 */ }; int const long volatile unsigned cv_ulong; const foo volatile cv_foo; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0625 | 1 | 13 | | W0491 | 6 | 1 | | C0001 | 1 | 13 | | W0104 | 3 | 13 | | W0491 | 10 | 8 | | C0001 | 1 | 13 | | W0492 | 10 | 18 | | C0001 | 1 | 13 | | C0001 | 10 | 8 | | W0492 | 11 | 7 | | C0001 | 10 | 25 | | W0492 | 11 | 17 | | C0001 | 1 | 13 | | C0001 | 10 | 8 | | W0492 | 11 | 24 | | C0001 | 11 | 7 | | W0492 | 16 | 9 | | C0001 | 1 | 13 | | C0001 | 10 | 8 | | W0492 | 18 | 9 | | C0001 | 11 | 7 | | W0117 | 20 | 3 | | W0491 | 22 | 8 | | C0001 | 20 | 3 | | W0492 | 24 | 15 | | C0001 | 11 | 7 | | W0080 | 27 | 34 | | W0117 | 27 | 34 | | W0080 | 28 | 20 | | W0117 | 28 | 20 | | W1072 | 5 | 5 | | W0551 | 11 | 7 | | W0525 | 16 | 9 | | W0525 | 18 | 9 | | W0040 | 14 | 1 | | W0425 | 10 | 25 | | W0425 | 11 | 24 | | W0431 | 6 | 1 | | W0432 | 6 | 1 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0211.feature0000644000004100000410000001045712224440633021002 0ustar www-datawww-dataFeature: W0211 W0211 detects that `unsigned long long' value is converted into `long double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long double b = a; /* W0211 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0211 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long double b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long double b; b = a; /* W0211 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0211 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { long double b; b = (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 17 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned long long a) { bar(a); /* W0211 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0211 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long double); void foo(unsigned long long a) { bar((long double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned long long a) { return a; /* W0211 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0211 | 3 | 12 | | W0347 | 3 | 5 | | W0104 | 1 | 36 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long double foo(unsigned long long a) { return (long double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0104 | 1 | 36 | | W0834 | 1 | 17 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0016.feature0000644000004100000410000001325512224440633021004 0ustar www-datawww-dataFeature: W0016 W0016 detects that field-width of the conversion-specifier in `*printf' function call is greater than 509. Scenario: field-width of `%d' conversion-specifier in `printf' function call is greater than 509 Given a target source named "fixture.c" with: """ #include int foo(int i) { return printf("%512d", i); /* W0016 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0016 | 5 | 19 | | W0104 | 3 | 13 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `printf' function call is equal to 510 Given a target source named "fixture.c" with: """ #include int foo(int i) { return printf("%510d", i); /* W0016 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0016 | 5 | 19 | | W0104 | 3 | 13 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `printf' function call is equal to 509 Given a target source named "fixture.c" with: """ #include int foo(int i) { return printf("%509d", i); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 13 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `printf' function call is less than 509 Given a target source named "fixture.c" with: """ #include int foo(int i) { return printf("%500d", i); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 13 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: no field-width of `%d' conversion-specifier in `printf' function call Given a target source named "fixture.c" with: """ #include int foo(int i) { return printf("%d", i); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 13 | | W0947 | 5 | 19 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fprintf' function call is greater than 509 Given a target source named "fixture.c" with: """ #include int foo(int i) { return fprintf(stdout, "%512d", i); /* W0016 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0016 | 5 | 28 | | W0104 | 3 | 13 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fprintf' function call is equal to 510 Given a target source named "fixture.c" with: """ #include int foo(int i) { return fprintf(stdout, "%510d", i); /* W0016 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0016 | 5 | 28 | | W0104 | 3 | 13 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fprintf' function call is equal to 509 Given a target source named "fixture.c" with: """ #include int foo(int i) { return fprintf(stdout, "%509d", i); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 13 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: field-width of `%d' conversion-specifier in `fprintf' function call is less than 509 Given a target source named "fixture.c" with: """ #include int foo(int i) { return fprintf(stdout, "%500d", i); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 13 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | Scenario: no field-width of `%d' conversion-specifier in `fprintf' function call Given a target source named "fixture.c" with: """ #include int foo(int i) { return fprintf(stdout, "%d", i); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 3 | 5 | | W0104 | 3 | 13 | | W0947 | 5 | 28 | | W0628 | 3 | 5 | adlint-3.2.0/features/code_check/W0147.feature0000644000004100000410000001041712224440633021006 0ustar www-datawww-dataFeature: W0147 W0147 detects that `unsigned int' value is converted into `int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { int b = a; /* W0147 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0147 | 3 | 13 | | W0100 | 3 | 9 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned int a) { int b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 13 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 9 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { int b; b = a; /* W0147 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0147 | 4 | 9 | | W0100 | 3 | 9 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned int a) { int b; b = (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 23 | | W0100 | 3 | 9 | | W0104 | 1 | 23 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned int a) { bar(a); /* W0147 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0147 | 5 | 9 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(int); void foo(unsigned int a) { bar((int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 23 | | W0104 | 3 | 23 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned int a) { return a; /* W0147 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0147 | 3 | 12 | | W0283 | 3 | 5 | | W0104 | 1 | 22 | | W0628 | 1 | 5 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ int foo(unsigned int a) { return (int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0104 | 1 | 22 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0491.feature0000644000004100000410000000320012224440633021000 0ustar www-datawww-dataFeature: W0491 W0491 detects that the same name appears in different namespaces. Scenario: hard to parse Given a target source named "fixture.c" with: """ typedef struct named_ref { int id; } named_ref; /* W0491 */ typedef struct code_props { named_ref *named_ref; /* W0492 */ } code_props; /* W0491 */ void func(named_ref *named_ref); void bar(int, named_ref *, named_ref *); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0491 | 3 | 3 | | C0001 | 1 | 16 | | W0492 | 6 | 16 | | C0001 | 3 | 3 | | C0001 | 1 | 16 | | W0491 | 7 | 3 | | C0001 | 5 | 16 | | W0118 | 9 | 6 | | W0118 | 10 | 6 | Scenario: hard to parse Given a target source named "fixture.c" with: """ #define RETSIGTYPE void typedef int sighandler_t; typedef RETSIGTYPE (*sighandler_t)(int); struct sighandler_t { RETSIGTYPE (*ptr)(int); }; typedef struct sighandler_t *(*sighandler_t)(struct sighandler_t *); """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0491 | 6 | 8 | | C0001 | 3 | 13 | | C0001 | 4 | 22 | | W0491 | 10 | 32 | | C0001 | 6 | 8 | | W0482 | 1 | 1 | | W0586 | 3 | 13 | | W0586 | 4 | 22 | | W0586 | 10 | 32 | adlint-3.2.0/features/code_check/W0151.feature0000644000004100000410000001044512224440633021002 0ustar www-datawww-dataFeature: W0151 W0151 detects that `unsigned long' value is converted into `long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long b = a; /* W0151 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0151 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 14 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long b; b = a; /* W0151 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0151 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long a) { long b; b = (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 10 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned long a) { bar(a); /* W0151 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0151 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(long); void foo(unsigned long a) { bar((long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 24 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned long a) { return a; /* W0151 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0151 | 3 | 12 | | W0287 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ long foo(unsigned long a) { return (long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 24 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0142.feature0000644000004100000410000001060212224440633020775 0ustar www-datawww-dataFeature: W0142 W0142 detects that `unsigned char' value is converted into `signed char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { signed char b = a; /* W0142 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0142 | 3 | 21 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned char a) { signed char b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 3 | 21 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { signed char b; b = a; /* W0142 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0142 | 4 | 9 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned char a) { signed char b; b = (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W1049 | 4 | 9 | | C1000 | | | | C1006 | 1 | 24 | | W0100 | 3 | 17 | | W0104 | 1 | 24 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned char a) { bar(a); /* W0142 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0142 | 5 | 9 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(signed char); void foo(unsigned char a) { bar((signed char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W1049 | 5 | 9 | | C1000 | | | | C1006 | 3 | 24 | | W0104 | 3 | 24 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned char a) { return a; /* W0142 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W0142 | 3 | 12 | | W0278 | 3 | 5 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ signed char foo(unsigned char a) { return (signed char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 13 | | W1049 | 3 | 12 | | C1000 | | | | C1006 | 1 | 31 | | W0104 | 1 | 31 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0480.feature0000644000004100000410000000733612224440633021014 0ustar www-datawww-dataFeature: W0480 W0480 detects that the macro defines operator, punctuation character or control statements. Scenario: defines the operator Given a target source named "fixture.c" with: """ #define OP_1 + /* W0480 */ #define OP_2 * /* W0480 */ #define OP_3 ~ /* W0480 */ #define OP_4 -- /* W0480 */ #define OP_5 / /* W0480 */ #define OP_6 << /* W0480 */ #define OP_7 && /* W0480 */ #define OP_8 /= /* W0480 */ #define OP_9 ^= /* W0480 */ #define OP_0 : /* W0480 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0480 | 1 | 1 | | W0480 | 2 | 1 | | W0480 | 3 | 1 | | W0480 | 4 | 1 | | W0480 | 5 | 1 | | W0480 | 6 | 1 | | W0480 | 7 | 1 | | W0480 | 8 | 1 | | W0480 | 9 | 1 | | W0480 | 10 | 1 | Scenario: defines a punctuation character Given a target source named "fixture.c" with: """ #define PC_1 [ /* W0480 */ #define PC_2 ( /* W0480 */ #define PC_3 { /* W0480 */ #define PC_4 * /* W0480 */ #define PC_5 , /* W0480 */ #define PC_6 : /* W0480 */ #define PC_7 = /* W0480 */ #define PC_8 ; /* W0480 */ #define PC_9 ... /* W0480 */ #define PC_0 # /* W0480 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0477 | 1 | 1 | | W0477 | 2 | 1 | | W0477 | 3 | 1 | | W0480 | 1 | 1 | | W0480 | 2 | 1 | | W0480 | 3 | 1 | | W0480 | 4 | 1 | | W0480 | 5 | 1 | | W0480 | 6 | 1 | | W0480 | 7 | 1 | | W0480 | 8 | 1 | | W0480 | 9 | 1 | | W0480 | 10 | 1 | Scenario: defines a control statement Given a target source named "fixture.c" with: """ #define CS_01 if /* W0480 */ #define CS_02 else /* W0480 */ #define CS_03 switch /* W0480 */ #define CS_04 case /* W0480 */ #define CS_05 default /* W0480 */ #define CS_06 break /* W0480 */ #define CS_07 continue /* W0480 */ #define CS_08 while /* W0480 */ #define CS_09 do /* W0480 */ #define CS_10 for /* W0480 */ #define CS_11 goto /* W0480 */ #define CS_12 return /* W0480 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0480 | 1 | 1 | | W0480 | 2 | 1 | | W0480 | 3 | 1 | | W0480 | 4 | 1 | | W0480 | 5 | 1 | | W0480 | 6 | 1 | | W0480 | 7 | 1 | | W0480 | 8 | 1 | | W0480 | 9 | 1 | | W0480 | 10 | 1 | | W0480 | 11 | 1 | | W0480 | 12 | 1 | Scenario: defines the pair of punctuation character Given a target source named "fixture.c" with: """ #define PC_1 [] /* OK */ #define PC_2 () /* OK */ #define PC_3 {} /* OK */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | Scenario: defines operator and control statements Given a target source named "fixture.c" with: """ #define IF(x) if((x)==0)return 1; """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0442 | 1 | 1 | | W0478 | 1 | 1 | adlint-3.2.0/features/code_check/W0765.feature0000644000004100000410000001047412224440633021017 0ustar www-datawww-dataFeature: W0765 W0765 detects that `unsigned long long' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned int b = a; /* W0765 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0765 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned int b; b = a; /* W0765 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0765 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(unsigned long long a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 18 | | W0104 | 1 | 29 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(unsigned long long a) { bar(a); /* W0765 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0765 | 5 | 9 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(unsigned long long a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 29 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(unsigned long long a) { return a; /* W0765 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0765 | 3 | 12 | | W0399 | 3 | 5 | | W0104 | 1 | 37 | | W0834 | 1 | 18 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(unsigned long long a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0104 | 1 | 37 | | W0834 | 1 | 18 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0163.feature0000644000004100000410000001050512224440633021002 0ustar www-datawww-dataFeature: W0163 W0163 detects that `short' value is converted into `unsigned int' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned int b = a; /* W0163 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0163 | 3 | 22 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned int b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 22 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned int b; b = a; /* W0163 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0163 | 4 | 9 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned int b; b = (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 18 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(short a) { bar(a); /* W0163 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0163 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned int); void foo(short a) { bar((unsigned int) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 16 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(short a) { return a; /* W0163 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0163 | 3 | 12 | | W0299 | 3 | 5 | | W0104 | 1 | 24 | | W0628 | 1 | 14 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned int foo(short a) { return (unsigned int) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 14 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 24 | | W0104 | 1 | 24 | | W0628 | 1 | 14 | adlint-3.2.0/features/code_check/W0174.feature0000644000004100000410000001142512224440633021006 0ustar www-datawww-dataFeature: W0174 W0174 detects that `short' value is converted into `unsigned long long' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long long b = a; /* W0174 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0174 | 3 | 28 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long long b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 28 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 29 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long long b; b = a; /* W0174 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0174 | 4 | 9 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { unsigned long long b; b = (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 16 | | W0100 | 3 | 24 | | W0104 | 1 | 16 | | W0834 | 3 | 5 | | W0834 | 4 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(short a) { bar(a); /* W0174 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0174 | 5 | 9 | | W0104 | 3 | 16 | | W0834 | 1 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned long long); void foo(short a) { bar((unsigned long long) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 16 | | W0104 | 3 | 16 | | W0834 | 1 | 17 | | W0834 | 5 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(short a) { return a; /* W0174 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0174 | 3 | 12 | | W0310 | 3 | 5 | | W0104 | 1 | 30 | | W0834 | 1 | 1 | | W0628 | 1 | 20 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned long long foo(short a) { return (unsigned long long) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 20 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 30 | | W0104 | 1 | 30 | | W0834 | 1 | 1 | | W0834 | 3 | 13 | | W0628 | 1 | 20 | adlint-3.2.0/features/code_check/W0497.feature0000644000004100000410000000456312224440633021023 0ustar www-datawww-dataFeature: W0497 W0497 detects that multiple shift-expressions or relational-expressions or equality-expressions appear in an expression without appropriate grouping. Scenario: without grouping Given a target source named "fixture.c" with: """ static int foo(unsigned int a, unsigned int b) { return a << 1 < b << 2; /* W0497 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0116 | 3 | 14 | | C1000 | | | | C1006 | 1 | 29 | | W0116 | 3 | 23 | | C1000 | | | | C1006 | 1 | 45 | | W0104 | 1 | 29 | | W0104 | 1 | 45 | | W0629 | 1 | 12 | | W0497 | 3 | 12 | | W0502 | 3 | 12 | | W0628 | 1 | 12 | Scenario: with appropriate grouping Given a target source named "fixture.c" with: """ static int foo(unsigned int a, unsigned int b) { return (a << 1) < (b << 2); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0116 | 3 | 15 | | C1000 | | | | C1006 | 1 | 29 | | W0116 | 3 | 26 | | C1000 | | | | C1006 | 1 | 45 | | W0104 | 1 | 29 | | W0104 | 1 | 45 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: entirely grouped Given a target source named "fixture.c" with: """ static int foo(unsigned int a, unsigned int b) { return (a << 1 < b << 2); /* W0497 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0116 | 3 | 15 | | C1000 | | | | C1006 | 1 | 29 | | W0116 | 3 | 24 | | C1000 | | | | C1006 | 1 | 45 | | W0104 | 1 | 29 | | W0104 | 1 | 45 | | W0629 | 1 | 12 | | W0497 | 3 | 12 | | W0502 | 3 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0140.feature0000644000004100000410000001100112224440633020765 0ustar www-datawww-dataFeature: W0140 W0140 detects that `long long' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { char b = a; /* W0140 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0140 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(long long a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 14 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { char b; b = a; /* W0140 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0140 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(long long a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 4 | 9 | | C1000 | | | | C1006 | 1 | 20 | | W0100 | 3 | 10 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(long long a) { bar(a); /* W0140 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0140 | 5 | 9 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(long long a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0608 | 5 | 9 | | C1000 | | | | C1006 | 3 | 20 | | W0104 | 3 | 20 | | W0834 | 3 | 10 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(long long a) { return a; /* W0140 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0140 | 3 | 12 | | W0276 | 3 | 5 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(long long a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0608 | 3 | 12 | | C1000 | | | | C1006 | 1 | 20 | | W0104 | 1 | 20 | | W0834 | 1 | 10 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W0188.feature0000644000004100000410000000755212224440633021021 0ustar www-datawww-dataFeature: W0188 W0188 detects that `short' value is converted into `float' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { float b = a; /* W0188 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0188 | 3 | 15 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(short a) { float b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { float b; b = a; /* W0188 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0188 | 4 | 9 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(short a) { float b; b = (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 11 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(short a) { bar(a); /* W0188 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0188 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(float); void foo(short a) { bar((float) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ float foo(short a) { return a; /* W0188 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0188 | 3 | 12 | | W0324 | 3 | 5 | | W0104 | 1 | 17 | | W0628 | 1 | 7 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ float foo(short a) { return (float) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 7 | | W0104 | 1 | 17 | | W0628 | 1 | 7 | adlint-3.2.0/features/code_check/W0104.feature0000644000004100000410000000657412224440633021010 0ustar www-datawww-dataFeature: W0104 W0104 detects that a non-const parameter is never changed in the function. Scenario: unchanged non-const parameter Given a target source named "fixture.c" with: """ static int func(int i) /* W0104 */ { return i + 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0104 | 1 | 21 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: unchanged prefixed const parameter Given a target source named "fixture.c" with: """ static int func(const int i) /* OK */ { return i + 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: unchanged postfixed const parameter Given a target source named "fixture.c" with: """ static int func(int const i) /* OK */ { return i + 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: unchanged prefixed const volatile parameter Given a target source named "fixture.c" with: """ static int func(const volatile int i) /* OK */ { return i + 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: unchanged prefixed volatile const parameter Given a target source named "fixture.c" with: """ static int func(volatile const int i) /* OK */ { return i + 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: unchanged mixfixed const volatile parameter Given a target source named "fixture.c" with: """ static int func(const int volatile i) /* OK */ { return i + 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: unchanged mixfixed volatile const parameter Given a target source named "fixture.c" with: """ static int func(volatile int const i) /* OK */ { return i + 1; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0723 | 3 | 14 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W0705.feature0000644000004100000410000002655412224440633021017 0ustar www-datawww-dataFeature: W0705 W0705 detects that an array subscript may cause out of bound access of the array object. Scenario: array-subscript-expression with non-constant subscript may cause OOB access in an initializer Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { if (i >= 0 && i < 5) { int j = a[i + 1]; /* W0705 */ return j; } return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0705 | 6 | 21 | | W0100 | 6 | 13 | | W0104 | 3 | 13 | | W1071 | 3 | 5 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with non-constant subscript may cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { int j = 0; if (i >= 0 && i < 4) { j = a[i - 1]; /* W0705 */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0705 | 7 | 17 | | W0104 | 3 | 13 | | W0490 | 6 | 9 | | W0499 | 6 | 9 | | W0502 | 6 | 9 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with non-constant subscript may cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { if (i >= 0 && i < 3) { a[i + 3] = 0; /* W0705 */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W0705 | 6 | 13 | | W0104 | 3 | 14 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0628 | 3 | 6 | Scenario: indirection-expression with non-constant subscript may cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { int j = 0; if (i >= 0 && i < 5) { j = *(a + i - 1); /* W0705 */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W9003 | 7 | 19 | | W0023 | 7 | 17 | | W9003 | 7 | 23 | | W0024 | 7 | 21 | | W0705 | 7 | 14 | | W0104 | 3 | 13 | | W0490 | 6 | 9 | | W0499 | 6 | 9 | | W0502 | 6 | 9 | | W0498 | 7 | 14 | | W0628 | 3 | 5 | Scenario: indirection-expression with non-constant subscript may cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { if (i >= 0 && i < 5) { *(2 + a + i - 1) = 0; /* W0705 */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W9003 | 6 | 11 | | W0023 | 6 | 13 | | W9003 | 6 | 19 | | W0023 | 6 | 17 | | W9003 | 6 | 23 | | W0024 | 6 | 21 | | W0705 | 6 | 10 | | W0104 | 3 | 14 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0498 | 6 | 10 | | W0628 | 3 | 6 | Scenario: array-subscript-expression with non-constant subscript must not cuase OOB access in initializer Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { if (i > 0 && i <= 5) { int j = a[i - 1]; /* OK */ return j; } return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0100 | 6 | 13 | | W0104 | 3 | 13 | | W1071 | 3 | 5 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with non-constant subscript must not cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { int j = 0; if (i >= 0 && i < 4) { j = a[i + 1]; /* OK */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W0104 | 3 | 13 | | W0490 | 6 | 9 | | W0499 | 6 | 9 | | W0502 | 6 | 9 | | W0628 | 3 | 5 | Scenario: array-subscript-expression with non-constant subscript must not cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { if (i >= 0 && i < 3) { a[i + 2] = 0; /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W0104 | 3 | 14 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0628 | 3 | 6 | Scenario: indirection-expression with non-constant subscript must not cause OOB access in rhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { int j = 0; if (i > 0 && i < 6) { j = *(a + i - 1); /* OK */ } return j; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W9003 | 7 | 19 | | W0023 | 7 | 17 | | W9003 | 7 | 23 | | W0024 | 7 | 21 | | W0104 | 3 | 13 | | W0490 | 6 | 9 | | W0499 | 6 | 9 | | W0502 | 6 | 9 | | W0498 | 7 | 14 | | W0628 | 3 | 5 | Scenario: indirection-expression with non-constant subscript must not cause OOB access in lhs operand of an assignment-expression Given a target source named "fixture.c" with: """ extern int a[5]; void foo(int i) { if (i >= 0 && i < 5) { *(2 + a + i - 2) = 0; /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 6 | | W9003 | 6 | 11 | | W0023 | 6 | 13 | | W9003 | 6 | 19 | | W0023 | 6 | 17 | | W9003 | 6 | 23 | | W0023 | 6 | 21 | | W0104 | 3 | 14 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0498 | 6 | 10 | | W0628 | 3 | 6 | Scenario: indirection-expression with non-constant subscript should not cause OOB access in an initializer Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { if (i >= 0 && i < 5) { int j = *(a + i++); /* OK */ int k = *(a + i - 1); /* OK */ return j; } return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W9003 | 6 | 24 | | W0023 | 6 | 21 | | W9003 | 7 | 23 | | W0023 | 7 | 21 | | W9003 | 7 | 27 | | W0024 | 7 | 25 | | W0100 | 6 | 13 | | W0100 | 7 | 13 | | W1071 | 3 | 5 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0498 | 7 | 18 | | W0628 | 3 | 5 | Scenario: indirection-expression with non-constant subscript may and should not cause OOB access in an initializer Given a target source named "fixture.c" with: """ extern int a[5]; int foo(int i) { if (i >= 0 && i < 5) { int j = *(a + ++i); /* W0705 */ int k = *(a + i - 1); /* OK */ return j; } return i; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W0117 | 3 | 5 | | W9003 | 6 | 23 | | W0023 | 6 | 21 | | W0705 | 6 | 18 | | W9003 | 7 | 23 | | W0023 | 7 | 21 | | W9003 | 7 | 27 | | W0024 | 7 | 25 | | W0100 | 6 | 13 | | W0100 | 7 | 13 | | W1071 | 3 | 5 | | W0490 | 5 | 9 | | W0499 | 5 | 9 | | W0502 | 5 | 9 | | W0498 | 7 | 18 | | W0628 | 3 | 5 | Scenario: size of array is specified by the global constant variable Given a target source named "fixture.c" with: """ const int size = 2; void foo(void) { int i; char a[size]; for (i = 0; i < size; i++) { a[i] = (char) 0; /* OK */ } } void bar(void) { int i; char a[size]; for (i = 0; i < size; i++) { a[i] = (char) 0; /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 11 | | W0117 | 3 | 6 | | W0117 | 12 | 6 | | W0628 | 3 | 6 | | W0628 | 12 | 6 | | W0593 | 1 | 11 | adlint-3.2.0/features/code_check/W0733.feature0000644000004100000410000001222412224440633021005 0ustar www-datawww-dataFeature: W0733 W0733 detects that both sides of `||' operator are bitwise expression or arithmetic expression. Scenario: both sides of `||' operator are arithmetic expressions Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a + b) || (c + d); /* W0733 */ r = (a - b) || (c - d); /* W0733 */ r = (a * b) || (c * d); /* W0733 */ r = (a / b) || (c / d); /* W0733 */ r = (a % b) || (c % d); /* W0733 */ r = (a += b) || (c -= d); /* W0733 */ r = (a *= b) || (c /= d); /* W0733 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0723 | 5 | 12 | | W0723 | 5 | 23 | | W0723 | 6 | 12 | | W0723 | 6 | 23 | | W0723 | 7 | 12 | | W0723 | 7 | 23 | | W0093 | 8 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 8 | 23 | | C1000 | | | | C1006 | 1 | 43 | | W0093 | 9 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 9 | 23 | | C1000 | | | | C1006 | 1 | 43 | | W0093 | 12 | 12 | | C1000 | | | | C1006 | 1 | 29 | | W0093 | 12 | 24 | | C1000 | | | | C1006 | 1 | 43 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0733 | 5 | 17 | | W0733 | 6 | 17 | | W0733 | 7 | 17 | | W0733 | 8 | 17 | | W0733 | 9 | 17 | | W0508 | 11 | 18 | | W0733 | 11 | 18 | | W0508 | 12 | 18 | | W0733 | 12 | 18 | | W0108 | 11 | 12 | | W0108 | 11 | 24 | | W0108 | 12 | 12 | | W0108 | 12 | 24 | | W0628 | 1 | 13 | Scenario: both sides of `&&' operator are bitwise expressions Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; r = (a << b) || (c << d); /* W0733 */ r = (a >> b) || (c >> d); /* W0733 */ r = (a & b) || (c & d); /* W0733 */ r = (a ^ b) || (c ^ d); /* W0733 */ r = (a | b) || (c | d); /* W0733 */ r = (a &= b) || (c ^= d); /* W0733 */ r = (a <<= b) || (c >>= d); /* W0733 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0570 | 5 | 12 | | C1000 | | | | C1006 | 1 | 22 | | W0572 | 5 | 12 | | W0794 | 5 | 12 | | W0570 | 5 | 24 | | C1000 | | | | C1006 | 1 | 36 | | W0572 | 5 | 24 | | W0794 | 5 | 24 | | W0571 | 6 | 12 | | W0572 | 6 | 12 | | W0571 | 6 | 24 | | W0572 | 6 | 24 | | W0572 | 7 | 12 | | W0572 | 7 | 23 | | W0572 | 8 | 12 | | W0572 | 8 | 23 | | W0572 | 9 | 12 | | W0572 | 9 | 23 | | W0572 | 11 | 12 | | W0572 | 11 | 24 | | W0570 | 12 | 12 | | C1000 | | | | C1006 | 11 | 12 | | W0572 | 12 | 12 | | W0794 | 12 | 12 | | W0571 | 12 | 25 | | W0572 | 12 | 25 | | W0104 | 1 | 29 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0733 | 5 | 18 | | W0733 | 6 | 18 | | W0733 | 7 | 17 | | W0733 | 8 | 17 | | W0733 | 9 | 17 | | W0508 | 11 | 18 | | W0733 | 11 | 18 | | W0508 | 12 | 19 | | W0733 | 12 | 19 | | W0108 | 11 | 12 | | W0108 | 11 | 24 | | W0108 | 12 | 12 | | W0108 | 12 | 25 | | W0628 | 1 | 13 | Scenario: both sides of `||' operator are neither arithmetic nor bitwise Given a target source named "fixture.c" with: """ static void func(int a, int b, int c, int d) { int r; /* equality expression */ r = (a == b) || (c != d); /* OK */ /* relational expression */ r = (a < b) || (c > d); /* OK */ r = (a <= b) || (c >= d); /* OK */ /* logical expression */ r = (a && b) || (c && d); /* OK */ r = (a || b) || (c || d); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0104 | 1 | 22 | | W0104 | 1 | 29 | | W0104 | 1 | 36 | | W0104 | 1 | 43 | | W0629 | 1 | 13 | | W0628 | 1 | 13 | adlint-3.2.0/features/code_check/W0698.feature0000644000004100000410000000102412224440633021013 0ustar www-datawww-dataFeature: W0698 W0698 detects that a `return' statement without expression is found in a non-void function. Scenario: returning nothing from `int' function Given a target source named "fixture.c" with: """ int func(void) { return; /* W0698 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 5 | | W0698 | 3 | 5 | | W0628 | 1 | 5 | adlint-3.2.0/features/code_check/W0221.feature0000644000004100000410000000754612224440633021010 0ustar www-datawww-dataFeature: W0221 W0221 detects that `double' value is converted into `char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { char b = a; /* W0221 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0221 | 3 | 14 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(double a) { char b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { char b; b = a; /* W0221 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0221 | 4 | 9 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(double a) { char b; b = (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 10 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(double a) { bar(a); /* W0221 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0221 | 5 | 9 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(char); void foo(double a) { bar((char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 17 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ char foo(double a) { return a; /* W0221 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0221 | 3 | 12 | | W0357 | 3 | 5 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ char foo(double a) { return (char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0104 | 1 | 17 | | W0628 | 1 | 6 | adlint-3.2.0/features/code_check/W1063.feature0000644000004100000410000000670012224440633021004 0ustar www-datawww-dataFeature: W1063 W1063 detects that a function of enum return type is returning a value of the inconsistently typed non-constant expression. Scenario: returning a value of the non-constant `int' typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static enum Color foo(const enum Color c) { int i = 0; if (c == RED) { i = 2; } return i + 1; /* W1063 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 19 | | W9003 | 11 | 14 | | W1055 | 11 | 14 | | W1063 | 11 | 14 | | W0629 | 3 | 19 | | W0628 | 3 | 19 | Scenario: returning a value of the non-constant `double' typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static enum Color foo(const enum Color c) { double d = .0; if (c == RED) { d = .2; } return d + 1.0; /* W1063 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 19 | | W9003 | 11 | 14 | | W1055 | 11 | 14 | | W1063 | 11 | 14 | | W0629 | 3 | 19 | | W0628 | 3 | 19 | Scenario: returning a value of the non-constant same enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; extern enum Color foo(void); static enum Color bar(void) { return foo() + 1; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 3 | 19 | | W1076 | 5 | 19 | | W9003 | 7 | 20 | | W0723 | 7 | 18 | | W0629 | 5 | 19 | | W0628 | 5 | 19 | Scenario: returning a value of the non-constant inconsistent enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE, GRAPE }; extern enum Fruit foo(void); static enum Color bar(void) { return foo() + 1; /* W1063 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 4 | 19 | | W1076 | 6 | 19 | | W9003 | 8 | 20 | | W0723 | 8 | 18 | | W0727 | 8 | 18 | | W9003 | 8 | 18 | | W1058 | 8 | 18 | | W1063 | 8 | 18 | | W0629 | 6 | 19 | | W0628 | 6 | 19 | Scenario: returning a value of the constant same enum typed expression Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static enum Color foo(void) { return BLUE; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 19 | | W0629 | 3 | 19 | | W0628 | 3 | 19 | adlint-3.2.0/features/code_check/W0599.feature0000644000004100000410000001243612224440633021024 0ustar www-datawww-dataFeature: W0599 W0599 detects that value of the variable is referred and updated between sequence-points. Scenario: return-expression in a for-statement Given a target source named "fixture.c" with: """ extern void bar(int, int, int); static void foo(int a, int b, int *c) { b = (a + 1) + a++; /* W0599 */ b = c[a] + c[++a]; /* W0599 */ bar(a, a++, c[a]); /* W0599 */ bar(a, a, c[a++]); /* W0599 */ a = a + b; c[a] = a++ + b; /* W0599 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W1076 | 3 | 13 | | W0723 | 5 | 12 | | W0723 | 5 | 17 | | W0599 | 5 | 7 | | W0422 | 6 | 10 | | C1000 | | | | C1005 | 3 | 36 | | W0422 | 6 | 17 | | C1000 | | | | C1005 | 3 | 36 | | W0723 | 6 | 14 | | W0599 | 6 | 7 | | W0422 | 7 | 18 | | C1000 | | | | C1005 | 3 | 36 | | W0599 | 7 | 8 | | W0422 | 8 | 16 | | C1000 | | | | C1005 | 3 | 36 | | W0723 | 9 | 11 | | W0422 | 10 | 6 | | C1000 | | | | C1005 | 3 | 36 | | W0723 | 10 | 16 | | W0599 | 10 | 10 | | W0104 | 3 | 36 | | W0629 | 3 | 13 | | W0512 | 5 | 20 | | W0512 | 6 | 18 | | W0512 | 7 | 13 | | W0512 | 8 | 18 | | W0512 | 10 | 13 | | W0628 | 3 | 13 | Scenario: return-expression in a for-statement Given a target source named "fixture.c" with: """ static int foo(int x, int y, int z) { for (int i = 0; i < z; i++) { /* OK */ if (x < y) { return i; } } return 0; } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0104 | 1 | 20 | | W0104 | 1 | 27 | | W0104 | 1 | 34 | | W1071 | 1 | 12 | | W0629 | 1 | 12 | | W0628 | 1 | 12 | Scenario: object-specifier as a controlling expression and updating same variable in the branch Given a target source named "fixture.c" with: """ static void foo(int i) { if (i) { i++; /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 13 | | W0629 | 1 | 13 | | W0114 | 3 | 5 | | W0628 | 1 | 13 | Scenario: assignment-expression as a controlling expression and updating same variable in the branch Given a target source named "fixture.c" with: """ extern int bar(void); static void foo(int i) { while (i = bar()) { i++; /* OK */ } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 3 | 13 | | W0629 | 3 | 13 | | W0108 | 5 | 14 | | W0114 | 5 | 5 | | W0628 | 3 | 13 | Scenario: assignment-expression as a controlling expression and updating same variable in the branch Given a target source named "fixture.c" with: """ extern int bar(int); static void foo(void) { int i; for (i = 0; i = bar(i); ) { i++; /* OK */ } i++; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 12 | | W1076 | 3 | 13 | | W0708 | 7 | 10 | | W0629 | 3 | 13 | | W0108 | 6 | 19 | | W0114 | 6 | 5 | | W0628 | 3 | 13 | Scenario: updating variable in the 1st expression of conditional-expression Given a target source named "fixture.c" with: """ static int foo(int i) { return i++ ? i : 0; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0114 | 3 | 13 | | W0628 | 1 | 12 | Scenario: updating variable in the 1st expression of conditional-expression Given a target source named "fixture.c" with: """ static int foo(int i) { return i++ > 0 ? i : 0; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 1 | 12 | | W0629 | 1 | 12 | | W0501 | 3 | 20 | | W0628 | 1 | 12 | adlint-3.2.0/features/code_check/W1040.feature0000644000004100000410000000433012224440633020774 0ustar www-datawww-dataFeature: W1040 W1040 detects that extra tokens after the preprocessing directive. Scenario: extra tokens after #endif directive Given a target source named "fixture.c" with: """ #define TEST #ifdef TEST #if defined(CASE_1) int i = 1; #elif defined(CASE_2) int i = 2; #endif CASE /* W1040 */ #else int i = 0; #endif TEST /* W1040 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1040 | 8 | 8 | | W1040 | 11 | 8 | Scenario: extra tokens after #endif directive in an invisible branch Given a target source named "fixture.c" with: """ #ifdef TEST #if defined(CASE_1) int i = 1; #elif defined(CASE_2) int i = 2; #endif CASE /* OK */ #else int i = 0; #endif TEST /* W1040 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1040 | 9 | 8 | | W0117 | 8 | 5 | Scenario: extra tokens after #else directive Given a target source named "fixture.c" with: """ #define TEST #ifdef TEST #if defined(CASE_1) int i = 1; #elif defined(CASE_2) int i = 2; #else CASE_X /* W1040 */ int i = 9; #endif #else int i = 0; #endif TEST /* W1040 */ """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1040 | 8 | 7 | | W1040 | 13 | 8 | | W0117 | 9 | 5 | Scenario: extra tokens after #else directive in an invisible branch Given a target source named "fixture.c" with: """ #ifdef TEST #if defined(CASE_1) int i = 1; #elif defined(CASE_2) int i = 2; #else CASE_X /* OK */ int i = 9; #endif #else int i = 0; #endif """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 10 | 5 | adlint-3.2.0/features/code_check/W1064.feature0000644000004100000410000000430112224440633021000 0ustar www-datawww-dataFeature: W1064 W1064 detects that an integer constant is specified to the case-label in the switch-statement with an enum typed controlling variable. Scenario: an integer constant Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int foo(const enum Color c) { switch (c) { case 0: /* W1064 */ return 1; case 1: /* W1064 */ return 2; default: return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W1064 | 6 | 10 | | W1064 | 8 | 10 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: enumerator of the same enum type Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int foo(const enum Color c) { switch (c) { case RED: /* OK */ return 1; case BLUE: /* OK */ return 2; default: return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | Scenario: enum typed variable of the same enum type Given a target source named "fixture.c" with: """ enum Color { RED, BLUE, GREEN }; static int foo(const enum Color c) { const enum Color col = RED; switch (c) { case col: /* OK */ return 1; case BLUE: /* OK */ return 2; default: return 0; } } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W1076 | 3 | 12 | | W1071 | 3 | 12 | | W0629 | 3 | 12 | | W0628 | 3 | 12 | adlint-3.2.0/features/code_check/W0214.feature0000644000004100000410000000772212224440633021006 0ustar www-datawww-dataFeature: W0214 W0214 detects that `float' value is converted into `unsigned char' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned char b = a; /* W0214 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0214 | 3 | 23 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(float a) { unsigned char b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned char b; b = a; /* W0214 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0214 | 4 | 9 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(float a) { unsigned char b; b = (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 19 | | W0104 | 1 | 16 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(float a) { bar(a); /* W0214 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0214 | 5 | 9 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(unsigned char); void foo(float a) { bar((unsigned char) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 16 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(float a) { return a; /* W0214 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0214 | 3 | 12 | | W0350 | 3 | 5 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ unsigned char foo(float a) { return (unsigned char) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 15 | | W0104 | 1 | 25 | | W0628 | 1 | 15 | adlint-3.2.0/features/code_check/W0195.feature0000644000004100000410000000754512224440633021021 0ustar www-datawww-dataFeature: W0195 W0195 detects that `int' value is converted into `double' value. Scenario: implicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { double b = a; /* W0195 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0195 | 3 | 16 | | W0100 | 3 | 12 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in initialization Given a target source named "fixture.c" with: """ void foo(int a) { double b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { double b; b = a; /* W0195 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0195 | 4 | 9 | | W0100 | 3 | 12 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: explicit conversion in assignment Given a target source named "fixture.c" with: """ void foo(int a) { double b; b = (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 6 | | W0100 | 3 | 12 | | W0104 | 1 | 14 | | W0628 | 1 | 6 | Scenario: implicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(int a) { bar(a); /* W0195 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0195 | 5 | 9 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: explicit conversion in function call Given a target source named "fixture.c" with: """ extern void bar(double); void foo(int a) { bar((double) a); /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0118 | 1 | 13 | | W0117 | 3 | 6 | | W0104 | 3 | 14 | | W0628 | 3 | 6 | Scenario: implicit conversion in function return Given a target source named "fixture.c" with: """ double foo(int a) { return a; /* W0195 */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0195 | 3 | 12 | | W0331 | 3 | 5 | | W0104 | 1 | 16 | | W0628 | 1 | 8 | Scenario: explicit conversion in function return Given a target source named "fixture.c" with: """ double foo(int a) { return (double) a; /* OK */ } """ When I successfully run `adlint fixture.c` on noarch Then the output should exactly match with: | mesg | line | column | | W0117 | 1 | 8 | | W0104 | 1 | 16 | | W0628 | 1 | 8 | adlint-3.2.0/features/code_extraction/0000755000004100000410000000000012224440633020007 5ustar www-datawww-dataadlint-3.2.0/features/code_extraction/TODO0000644000004100000410000000011012224440633020467 0ustar www-datawww-dataMust write functional specifications about the code extraction feature. adlint-3.2.0/features/support/0000755000004100000410000000000012224440633016351 5ustar www-datawww-dataadlint-3.2.0/features/support/env.rb0000644000004100000410000000760012224440633017471 0ustar www-datawww-dataNOARCH_TRAITS = < # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "spec_helper" module AdLint module Cc1 describe ValueDomain do include ArithmeticAccessor before(:all) { @adlint = AdLint.new($default_traits) } describe EqualToValueDomain do context "(== -2147483648)" do subject { value_domain_equal_to(-2147483648) } it "should contain (== -2147483648)" do subject.contain?(value_domain_equal_to(-2147483648)).should be_true end it "should not contain (== 2147483647)" do subject.contain?(value_domain_equal_to(2147483647)).should be_false end end context "(== 2147483647)" do subject { value_domain_equal_to(2147483647) } it "should not contain (== -2147483648)" do subject.contain?(value_domain_equal_to(-2147483648)).should be_false end end context "(== 2)" do subject { value_domain_equal_to(2) } it "* (== 3) should be (== 6)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(== 6)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (== -6)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(== -6)" end it "* (< 3) should be (< 6)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(< 6)" end it "* (< 0) should be (< 0)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(< 0)" end it "* (< -3) should be (< -6)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(< -6)" end it "* (> 3) should be (> 6)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(> 6)" end it "* (> 0) should be (> 0)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(> 0)" end it "* (> -3) should be (> -6)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(> -6)" end end context "(== 0)" do subject { value_domain_equal_to(0) } it "* (== 3) should be (== 0)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(== 0)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (== 0)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(== 0)" end it "* (< 3) should be (== 0)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(== 0)" end it "* (< 0) should be (== 0)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(== 0)" end it "* (< -3) should be (== 0)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(== 0)" end it "* (> 3) should be (== 0)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(== 0)" end it "* (> 0) should be (== 0)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(== 0)" end it "* (> -3) should be (== 0)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(== 0)" end end context "(== -2)" do subject { value_domain_equal_to(-2) } it "* (== 3) should be (== -6)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(== -6)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (== 6)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(== 6)" end it "* (< 3) should be (> -6)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(> -6)" end it "* (< 0) should be (> 0)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(> 0)" end it "* (< -3) should be (> 6)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(> 6)" end it "* (> 3) should be (< -6)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(< -6)" end it "* (> 0) should be (< 0)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(< 0)" end it "* (> -3) should be (< 6)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(< 6)" end end end describe LessThanValueDomain do context "(< 128)" do subject { value_domain_less_than(128) } it "< (== 127) should be (== Unlimited)" do rhs = value_domain_equal_to(127) (subject < rhs).to_s.should == "(== Unlimited)" end end context "(< 2)" do subject { value_domain_less_than(2) } it "* (== 3) should be (< 6)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(< 6)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (> -6)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(> -6)" end it "* (< 3) should be (== Unlimited)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< 0) should be (== Unlimited)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< -3) should be (== Unlimited)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (> 3) should be (== Unlimited)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (> 0) should be (== Unlimited)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (> -3) should be (== Unlimited)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end end context "(< 0)" do subject { value_domain_less_than(0) } it "* (== 3) should be (< 0)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(< 0)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (> 0)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(> 0)" end it "* (< 3) should be (== Unlimited)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< 0) should be (> 0)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(> 0)" end it "* (< -3) should be (> 0)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(> 0)" end it "* (> 3) should be (< 0)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(< 0)" end it "* (> 0) should be (< 0)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(< 0)" end it "* (> -3) should be (== Unlimited)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end end context "(< -2)" do subject { value_domain_less_than(-2) } it "* (== 3) should be (< -6)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(< -6)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (> 6)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(> 6)" end it "* (< 3) should be (== Unlimited)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< 0) should be (> 0)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(> 0)" end it "* (< -3) should be (> 6)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(> 6)" end it "* (> 3) should be (< -6)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(< -6)" end it "* (> 0) should be (< 0)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(< 0)" end it "* (> -3) should be (== Unlimited)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end end end describe GreaterThanValueDomain do context "(> -129)" do subject { value_domain_greater_than(-129) } it "< (== 127) should be (== Unlimited)" do rhs = value_domain_equal_to(127) (subject < rhs).to_s.should == "(== Unlimited)" end end context "(> 2)" do subject { value_domain_greater_than(2) } it "* (== 3) should be (> 6)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(> 6)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (< -6)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(< -6)" end it "* (< 3) should be (== Unlimited)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< 0) should be (< 0)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(< 0)" end it "* (< -3) should be (< -6)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(< -6)" end it "* (> 3) should be (> 6)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(> 6)" end it "* (> 0) should be (> 0)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(> 0)" end it "* (> -3) should be (== Unlimited)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end end context "(> 0)" do subject { value_domain_greater_than(0) } it "* (== 3) should be (> 0)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(> 0)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (< 0)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(< 0)" end it "* (< 3) should be (== Unlimited)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< 0) should be (< 0)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(< 0)" end it "* (< -3) should be (< 0)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(< 0)" end it "* (> 3) should be (> 0)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(> 0)" end it "* (> 0) should be (> 0)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(> 0)" end it "* (> -3) should be (== Unlimited)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end end context "(> -2)" do subject { value_domain_greater_than(-2) } it "* (== 3) should be (> -6)" do rhs = value_domain_equal_to(3) (subject * rhs).to_s.should == "(> -6)" end it "* (== 0) should be (== 0)" do rhs = value_domain_equal_to(0) (subject * rhs).to_s.should == "(== 0)" end it "* (== -3) should be (< 6)" do rhs = value_domain_equal_to(-3) (subject * rhs).to_s.should == "(< 6)" end it "* (< 3) should be (== Unlimited)" do rhs = value_domain_less_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< 0) should be (== Unlimited)" do rhs = value_domain_less_than(0) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (< -3) should be (== Unlimited)" do rhs = value_domain_less_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (> 3) should be (== Unlimited)" do rhs = value_domain_greater_than(3) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (> 0) should be (== Unlimited)" do rhs = value_domain_greater_than(0) (subject * rhs).to_s.should == "(== Unlimited)" end it "* (> -3) should be (== Unlimited)" do rhs = value_domain_greater_than(-3) (subject * rhs).to_s.should == "(== Unlimited)" end end end describe CompositeValueDomain do context "(== (((< 10) || (== 10)) && ((== -10) || (> -10))))" do subject do tmp = value_domain_greater_than_or_equal_to(-10) tmp.intersection(value_domain_less_than_or_equal_to(10)) end it "should contain ((== -5) || (== 5))" do rhs = value_domain_equal_to(-5).union(value_domain_equal_to(5)) subject.contain?(rhs).should be_true end end context "((== -5) || (== 5))" do subject { value_domain_equal_to(-5).union(value_domain_equal_to(5)) } it "should not contain " + "(((< 10) || (== 10)) && ((== -10) || (> -10)))" do rhs = value_domain_greater_than_or_equal_to(-10) rhs = rhs.intersection(value_domain_less_than_or_equal_to(10)) subject.contain?(rhs).should be_false end it "should be contained by " + "(((< 10) || (== 10)) && ((== -10) || (> -10)))" do lhs = value_domain_greater_than_or_equal_to(-10) lhs = lhs.intersection(value_domain_less_than_or_equal_to(10)) lhs.contain?(subject).should be_true end it "intersection with (< 0) should be equal to (== -5)" do rhs = value_domain_less_than(0) subject.intersection(rhs).to_s.should == "(== -5)" end it "intersection with (> 0) should be equal to (== 5)" do rhs = value_domain_greater_than(0) subject.intersection(rhs).to_s.should == "(== 5)" end it "intersection with ((== -10) || (> -10)) " + "should be equal to the subject domain" do rhs = value_domain_greater_than_or_equal_to(-10) subject.intersection(rhs).should == subject end it "intersection with ((== 10) || (< 10)) " + "should be equal to the subject domain" do rhs = value_domain_less_than_or_equal_to(10) subject.intersection(rhs).should == subject end it "should not contain (((< 0) && (> -10)) || (== -10))" do rhs = value_domain_greater_than_or_equal_to(-10) rhs = rhs.intersection(value_domain_less_than_or_equal_to(10)) rhs = rhs.intersection(value_domain_less_than(0)) subject.contain?(rhs).should be_false end end context "(((< 0) && (> -10)) || (== -10))" do subject do tmp = value_domain_greater_than_or_equal_to(-10) tmp = tmp.intersection(value_domain_less_than_or_equal_to(10)) tmp.intersection(value_domain_less_than(0)) end it "should not contain ((== -5) || (== 5))" do rhs = value_domain_equal_to(-5).union(value_domain_equal_to(5)) subject.contain?(rhs).should be_false end end context "(((< 0) && (> -2147483647)) || (== 0))" do subject do tmp = value_domain_less_than_or_equal_to(0) tmp.intersection(value_domain_greater_than_or_equal_to(-2147483647)) end it "union with ((== -2147483647) || (== 0)) should be " + "((((< 0) && (> -2147483647)) || (== -2147483647)) || (== 0))" do rhs = value_domain_equal_to(-2147483647) rhs = rhs.union(value_domain_equal_to(0)) subject.union(rhs).to_s.should == "((((< 0) && (> -2147483647)) || (== -2147483647)) || (== 0))" end end context "((== -2147483647) || (== 0))" do subject do value_domain_equal_to(-2147483647).union(value_domain_equal_to(0)) end it "should contain ((== -2147483647) || (== 0))" do rhs = value_domain_equal_to(-2147483647) rhs = rhs.union(value_domain_equal_to(0)) subject.contain?(rhs).should be_true end it "should contain (== -2147483647)" do subject.contain?(value_domain_equal_to(-2147483647)).should be_true end it "should contain (== 0)" do subject.contain?(value_domain_equal_to(0)).should be_true end end context "(((< 2147483647) && (> -2147483648)) || (== 2147483647))" do subject do tmp = value_domain_greater_than(-2147483648) tmp = tmp.intersection(value_domain_less_than(2147483647)) tmp.union(value_domain_equal_to(2147483647)) end it "cloned should be " + "(((< 2147483647) && (> -2147483648)) || (== 2147483647))" do subject.dup.to_s.should == "(((< 2147483647) && (> -2147483648)) || (== 2147483647))" end it "intersection with its cloned should be " + "(((< 2147483647) && (> -2147483648)) || (== 2147483647))" do subject.intersection(subject.dup).to_s.should == "(((< 2147483647) && (> -2147483648)) || (== 2147483647))" end it "union with its cloned should be " + "(((< 2147483647) && (> -2147483648)) || (== 2147483647))" do subject.union(subject.dup).to_s.should == "(((< 2147483647) && (> -2147483648)) || (== 2147483647))" end end context "(((< 2147483647) && (> 1)) || (== 1))" do subject do tmp = value_domain_greater_than(1) tmp = tmp.intersection(value_domain_less_than(2147483647)) tmp.union(value_domain_equal_to(1)) end it "union with ((== 1) || (== 2147483647)) should be " + "(((< 2147483647) && (> 1)) || ((== 1) || (== 2147483647)))" do rhs = value_domain_equal_to(1) rhs = rhs.union(value_domain_equal_to(2147483647)) subject.union(rhs).to_s.should == "(((< 2147483647) && (> 1)) || ((== 1) || (== 2147483647)))" end end context "(((< 429) && (> 0)) || (== 429))" do subject do tmp = value_domain_greater_than(0) tmp = tmp.intersection(value_domain_less_than(429)) tmp.union(value_domain_equal_to(429)) end it "intersection with (== 0) should be (== Nil)" do subject.intersection(value_domain_equal_to(0)).to_s.should == "(== Nil)" end end context "(((< 10) || (== 10)) && ((== 0) || (> 0)))" do subject do ValueDomain.of_intersection( value_domain_greater_than_or_equal_to(0), value_domain_less_than_or_equal_to(10) ) end it "+ (((< 10) || (== 10)) && ((== 0) || (> 0))) " + "should be ((((< 20) && (> 0)) || (== 0)) || (== 20))" do (subject + subject.dup).to_s.should == "((((< 20) && (> 0)) || (== 0)) || (== 20))" end end context "((((< 10) && (> -10)) || (== 10)) || (== -10))" do subject do tmp = value_domain_greater_than_or_equal_to(-10) tmp.intersection(value_domain_less_than_or_equal_to(10)) end it "should intersect with (== 0)" do subject.intersect?(value_domain_equal_to(0)).should be_true end it "< (== 0) should be (== Unlimited)" do (subject < value_domain_equal_to(0)).to_s.should == "(== Unlimited)" end it "> (== 0) should be (== Unlimited)" do (subject > value_domain_equal_to(0)).to_s.should == "(== Unlimited)" end it "== (== 0) should be (== Unlimited)" do (subject == value_domain_equal_to(0)).to_s.should == "(== Unlimited)" end it "!= (== 0) should be (== Unlimited)" do (subject != value_domain_equal_to(0)).to_s.should == "(== Unlimited)" end it "< (== 20) should be ((< 0) || (> 0))" do (subject < value_domain_equal_to(20)).to_s.should == "((< 0) || (> 0))" end it "> (== 20) should be (== 0)" do (subject > value_domain_equal_to(20)).to_s.should == "(== 0)" end end context "(((< 11) && (> 1)) || (== 11))" do subject do tmp = value_domain_greater_than(1) tmp = tmp.intersection(value_domain_less_than(11)) tmp.union(value_domain_equal_to(11)) end it "narrowed by == ((((< 10) && (> 0)) || (== 10)) || (== 0)) " + "should be (((< 10) && (> 1)) || (== 10))" do rhs = value_domain_greater_than(0) rhs = rhs.intersection(value_domain_less_than(10)) rhs = rhs.union(value_domain_equal_to(0)) rhs = rhs.union(value_domain_equal_to(10)) subject.narrow(Operator::EQ, rhs).to_s.should == "(((< 10) && (> 1)) || (== 10))" end end context "((< 128) && (> -129))" do subject do tmp = value_domain_greater_than(-129) tmp.intersection(value_domain_less_than(128)) end it "should intersect with (== -128)" do subject.intersect?(value_domain_equal_to(-128)).should be_true end it "should intersect with (== 127)" do subject.intersect?(value_domain_equal_to(127)).should be_true end end context "((((< 2147483647) && (> -2147483648)) || " + "(== 2147483647)) || (== -2147483648))" do subject do tmp = value_domain_greater_than_or_equal_to(-2147483648) tmp.intersection(value_domain_less_than_or_equal_to(2147483647)) end it "narrowed by != (== 1) should be " + "(((((< 1) && (> -2147483648)) || ((< 2147483647) && (> 1))) || " + "(== 2147483647)) || (== -2147483648))" do subject.narrow(Operator::NE, value_domain_equal_to(1)).to_s.should == "(((((< 1) && (> -2147483648)) || ((< 2147483647) && (> 1))) || " + "(== 2147483647)) || (== -2147483648))" end end context "(((< 10) && (> 0)) || (== 0))" do subject do tmp = value_domain_greater_than_or_equal_to(0) tmp.intersection(value_domain_less_than(10)) end it "narrowed by != its cloned should be (== Nil)" do subject.narrow(Operator::NE, subject.dup).to_s.should == "(== Nil)" end end context "((< 10) && (> 0))" do subject do tmp = value_domain_greater_than(0) tmp.intersection(value_domain_less_than(10)) end it "+ ((< 10) && (> 0)) should be ((< 10) && (> 0))" do rhs = value_domain_greater_than(0) rhs = rhs.intersection(value_domain_less_than(10)) (subject + rhs).to_s.should == "((< 20) && (> 0))" end it "* (== 2) should be ((< 20) && (> 0))" do rhs = value_domain_equal_to(2) (subject * rhs).to_s.should == "((< 20) && (> 0))" end it "* ((< 10) && (> 0)) should be ((< 100) && (> 0))" do rhs = value_domain_greater_than(0) rhs = rhs.intersection(value_domain_less_than(10)) (subject * rhs).to_s.should == "((< 100) && (> 0))" end it "/ (== 2) should be ((< 5) && (> 0))" do rhs = value_domain_equal_to(2) (subject / rhs).to_s.should == "((< 5) && (> 0))" end # TODO: Fix bad value-domain division before 1.14.0 GA release. #it "/ ((< 10) && (> 0)) should be ((< 10) && (> 0))" do # rhs = value_domain_greater_than(0) # rhs = rhs.intersection(value_domain_less_than(10)) # File.open("dump", "w") { |io| PP.pp(subject / rhs, io) } # (subject / rhs).to_s.should == "((< 10) && (> 0))" #end end context "(== 0)" do subject { value_domain_equal_to(0) } it "narrowed by == ((== 3) || (== 4)) should be (== Nil)" do rhs = value_domain_equal_to(3).union(value_domain_equal_to(4)) subject.narrow(Operator::EQ, rhs).to_s.should == "(== Nil)" end end end private def value_domain_equal_to(val) ValueDomain.equal_to(val, logical_right_shift?) end def value_domain_less_than(val) ValueDomain.less_than(val, logical_right_shift?) end def value_domain_greater_than(val) ValueDomain.greater_than(val, logical_right_shift?) end def value_domain_less_than_or_equal_to(val) ValueDomain.less_than_or_equal_to(val, logical_right_shift?) end def value_domain_greater_than_or_equal_to(val) ValueDomain.greater_than_or_equal_to(val, logical_right_shift?) end def traits @adlint.traits end end end end adlint-3.2.0/spec/adlint/cc1/syntax_spec.rb0000644000004100000410000004744512224440633020575 0ustar www-datawww-data# Unit specification of AST of C language. # # Author:: Rie Shima # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Rie Shima #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "spec_helper" module AdLint module Cc1 describe Expression do let(:symbol_table) { SymbolTable.new } context "`*'" do subject { error_expression(operator("*")) } it { should_not be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`foo'" do subject { object_specifier("foo") } it { should_not be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`0x11'" do subject { constant_specifier("0x11") } it { should_not be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context %(`"aiueo"') do subject { string_literal_specifier('"aiueo"') } it { should_not be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`NULL'" do subject { null_constant_specifier } it { should_not be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end # NOTE: GroupedExpression encloses an arithmetic expression. context "`(1 + 2)'" do subject do grouped_expression( additive_expression( "+", constant_specifier(1), constant_specifier(2))) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end # NOTE: GroupedExpression encloses a bitwise expression. context "`(1 << 2)'" do subject do grouped_expression( shift_expression("<<", constant_specifier(1), constant_specifier(2))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end # NOTE: GroupedExpression encloses an expression which is neither # arithmetic nor bitwise. context "`(1 && 2)'" do subject do grouped_expression( logical_and_expression(constant_specifier(1), constant_specifier(2))) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`i++'" do subject { postfix_increment_expression(object_specifier("i")) } it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`i--'" do subject { postfix_decrement_expression(object_specifier("i")) } it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`++i'" do subject { prefix_increment_expression(object_specifier("i")) } it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`--i'" do subject { prefix_decrement_expression(object_specifier("i")) } it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`(char) i'" do subject { cast_expression(char_t_name, object_specifier("i")) } it { should_not be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`(char) (i + 1)'" do subject do cast_expression( char_t_name, grouped_expression( additive_expression( "+", object_specifier("i"), constant_specifier(1)))) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`(char) (i == 0)'" do subject do cast_expression( char_t_name, grouped_expression( equality_expression( "==", object_specifier("i"), constant_specifier(1)))) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`(char) (i & 1)'" do subject do cast_expression( char_t_name, grouped_expression( and_expression(object_specifier("i"), constant_specifier(1)))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end context "`i * j'" do subject do multiplicative_expression( "*", object_specifier("i"), object_specifier("j")) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`i + j'" do subject do additive_expression("+", object_specifier("i"), object_specifier("j")) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`i << 1'" do subject do shift_expression("<<", object_specifier("i"), constant_specifier(1)) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end context "`i < 0'" do subject do relational_expression( "<", object_specifier("i"), constant_specifier(0)) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`i == j'" do subject do equality_expression("==", object_specifier("i"), object_specifier("j")) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`i & 1'" do subject { and_expression(object_specifier("i"), constant_specifier(1)) } it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end context "`i ^ 2'" do subject do exclusive_or_expression(object_specifier("i"), constant_specifier(2)) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end context "`i | 2'" do subject do inclusive_or_expression(object_specifier("i"), constant_specifier(2)) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end context "`i && j'" do subject do logical_and_expression(object_specifier("i"), object_specifier("j")) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`i || j'" do subject do logical_or_expression(object_specifier("i"), object_specifier("j")) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end # NOTE: ConditionalExpression has arithmetics as 2nd and 3rd expression. context "`i > 0 ? i + 2 : j - 4'" do subject do conditional_expression( relational_expression( ">", object_specifier("i"), constant_specifier(0)), additive_expression( "+", object_specifier("i"), constant_specifier(2)), additive_expression( "-", object_specifier("j"), constant_specifier(4))) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end # NOTE: ConditionalExpression has an arithmetic as 2nd expression and a # logical as 3rd expression. context "`i > 0 ? i + 2 : j || k'" do subject do conditional_expression( relational_expression( ">", object_specifier("i"), constant_specifier(0)), additive_expression( "+", object_specifier("i"), constant_specifier(2)), logical_or_expression( object_specifier("j"), object_specifier("k"))) end it { should be_logical } it { should be_arithmetic } it { should_not be_bitwise } end # NOTE: ConditionalExpression has an arithmetic as 2nd expression and a # bitwise as 3rd expression. context "`i < 10 ? i + 2 : i << 4'" do subject do conditional_expression( relational_expression( "<", object_specifier("i"), constant_specifier(10)), additive_expression( "+", object_specifier("i"), constant_specifier(2)), shift_expression( "<<", object_specifier("i"), constant_specifier(4))) end it { should_not be_logical } it { should be_arithmetic } it { should be_bitwise } end # NOTE: ConditionalExpression has bitwises as 2nd and 3rd expression. context "`i < 10 ? i ^ 2 : i << 4'" do subject do conditional_expression( relational_expression( "<", object_specifier("i"), constant_specifier(10)), exclusive_or_expression( object_specifier("i"), constant_specifier(2)), shift_expression( "<<", object_specifier("i"), constant_specifier(4))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end # NOTE: ConditionalExpression has a logical as 2nd expression and a bitwise # as 3rd expression. context "`i < 10 ? i && j : i << 4'" do subject do conditional_expression( relational_expression( "<", object_specifier("i"), constant_specifier(10)), logical_and_expression( object_specifier("i"), object_specifier("j")), shift_expression( "<<", object_specifier("i"), constant_specifier(4))) end it { should be_logical } it { should_not be_arithmetic } it { should be_bitwise } end # NOTE: ConditionalExpression has logicals as 2nd and 3rd expression. context "`i < 10 ? i && j : i || j'" do subject do conditional_expression( relational_expression( "<", object_specifier("i"), constant_specifier(10)), logical_and_expression( object_specifier("i"), object_specifier("j")), logical_or_expression( object_specifier("i"), object_specifier("j"))) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`i = 0'" do subject do simple_assignment_expression( object_specifier("i"), constant_specifier(0)) end it { should_not be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`i = j = k + 1'" do subject do simple_assignment_expression( object_specifier("i"), simple_assignment_expression( object_specifier("j"), additive_expression( "+", object_specifier("k"), constant_specifier(1)))) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`i = j = k << 1'" do subject do simple_assignment_expression( object_specifier("i"), simple_assignment_expression( object_specifier("j"), shift_expression( "<<", object_specifier("k"), constant_specifier(1)))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end context "`i = j = (k > 5 && k < 10)'" do subject do simple_assignment_expression( object_specifier("i"), simple_assignment_expression( object_specifier("j"), grouped_expression( logical_and_expression( relational_expression( ">", object_specifier("k"), constant_specifier(5)), relational_expression( "<", object_specifier("k"), constant_specifier(10)))))) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end context "`i += 2'" do subject do compound_assignment_expression( "+=", object_specifier("i"), constant_specifier(2)) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end context "`i &= 2'" do subject do compound_assignment_expression( "&=", object_specifier("i"), constant_specifier(2)) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end context "`i ^= j && k'" do subject do compound_assignment_expression( "^=", object_specifier("i"), logical_and_expression( object_specifier("j"), object_specifier("k"))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end # NOTE: CommaSeparatedExpression has two arithmetic expressions. context "`i + 1, j + 2'" do subject do comma_separated_expression( additive_expression( "+", object_specifier("i"), constant_specifier(1)), additive_expression( "+", object_specifier("j"), constant_specifier(2))) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end # NOTE: CommaSeparatedExpression has a logical expression followed by an # arithmetic expression. context "`i < 1, j + 2'" do subject do comma_separated_expression( relational_expression( "<", object_specifier("i"), constant_specifier(1)), additive_expression( "+", object_specifier("j"), constant_specifier(2))) end it { should_not be_logical } it { should be_arithmetic } it { should_not be_bitwise } end # NOTE: CommaSeparatedExpression has an arithmetic expression followed by a # bitwise expression. context "`i + 1, j << 2'" do subject do comma_separated_expression( additive_expression( "+", object_specifier("i"), constant_specifier(1)), shift_expression( "<<", object_specifier("j"), constant_specifier(2))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end # NOTE: CommaSeparatedExpression has two bitwise expressions. context "`i << 1, j << 2'" do subject do comma_separated_expression( shift_expression( "<<", object_specifier("i"), constant_specifier(1)), shift_expression( "<<", object_specifier("j"), constant_specifier(2))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end # NOTE: CommaSeparatedExpression has a logical expression followed by a # bitwise expression. context "`i > 0, i << 1'" do subject do comma_separated_expression( relational_expression( ">", object_specifier("i"), constant_specifier(0)), shift_expression( "<<", object_specifier("i"), constant_specifier(1))) end it { should_not be_logical } it { should_not be_arithmetic } it { should be_bitwise } end # NOTE: CommaSeparatedExpression has two logical expressions. context "`i < 0, j > 0'" do subject do comma_separated_expression( relational_expression( "<", object_specifier("i"), constant_specifier(0)), relational_expression( ">", object_specifier("j"), constant_specifier(0))) end it { should be_logical } it { should_not be_arithmetic } it { should_not be_bitwise } end private def comma_separated_expression(*exprs) CommaSeparatedExpression.new(exprs.first).tap do |obj| exprs[1..-1].each { |expr| obj.push(expr) } end end def compound_assignment_expression(op_str, lhs, rhs) CompoundAssignmentExpression.new(operator(op_str), lhs, rhs) end def simple_assignment_expression(lhs, rhs) SimpleAssignmentExpression.new(operator("="), lhs, rhs) end def conditional_expression(first, second, third) ConditionalExpression.new(first, second, third, operator("?")) end def inclusive_or_expression(lhs, rhs) InclusiveOrExpression.new(operator("|"), lhs, rhs) end def exclusive_or_expression(lhs, rhs) ExclusiveOrExpression.new(operator("^"), lhs, rhs) end def relational_expression(op_str, lhs, rhs) RelationalExpression.new(operator(op_str), lhs, rhs) end def multiplicative_expression(op_str, lhs, rhs) MultiplicativeExpression.new(operator(op_str), lhs, rhs) end def and_expression(lhs, rhs) AndExpression.new(operator("&"), lhs, rhs) end def equality_expression(op_str, lhs, rhs) EqualityExpression.new(operator(op_str), lhs, rhs) end def cast_expression(type_name, operand) CastExpression.new(type_name, operand) end def char_t_name sq_list = SpecifierQualifierList.new.tap { |obj| obj.type_qualifiers.push(char_t_specifier) } TypeName.new(sq_list, nil, symbol_table) end def char_t_specifier StandardTypeSpecifier.new(Token.new(:CHAR, "char", location)) end def prefix_decrement_expression(operand) PrefixDecrementExpression.new(operator("--"), operand) end def prefix_increment_expression(operand) PrefixIncrementExpression.new(operator("++"), operand) end def postfix_decrement_expression(operand) PostfixDecrementExpression.new(operator("--"), operand) end def postfix_increment_expression(operand) PostfixIncrementExpression.new(operator("++"), operand) end def logical_or_expression(lhs, rhs) LogicalOrExpression.new(operator("||"), lhs, rhs) end def logical_and_expression(lhs, rhs) LogicalAndExpression.new(operator("&&"), lhs, rhs) end def shift_expression(op_str, lhs, rhs) ShiftExpression.new(operator(op_str), lhs, rhs) end def additive_expression(op_str, lhs, rhs) AdditiveExpression.new(operator(op_str), lhs, rhs) end def grouped_expression(expr) GroupedExpression.new(expr) end def error_expression(token) ErrorExpression.new(token) end def object_specifier(str) ObjectSpecifier.new(Token.new(:IDENTIFIER, str, location)) end def null_constant_specifier NullConstantSpecifier.new(Token.new(:NULL, "NULL", location)) end def constant_specifier(str) ConstantSpecifier.new(Token.new(:CONSTANT, str, location)) end def string_literal_specifier(str) StringLiteralSpecifier.new(Token.new(:STRING_LITERAL, str, location)) end def operator(str) Token.new(str, str, location) end def location Location.new end end end end adlint-3.2.0/spec/adlint/cc1/operator_spec.rb0000644000004100000410000002662512224440633021077 0ustar www-datawww-data# Unit specification of operator of controlling expressions. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "spec_helper" module AdLint module Cc1 describe Operator do context "Operator" do subject { Operator } it "=== Operator::EQ should be true" do (subject === Operator::EQ).should be_true end it "=== Operator::NE should be true" do (subject === Operator::NE).should be_true end it "=== Operator::LT should be true" do (subject === Operator::LT).should be_true end it "=== Operator::GT should be true" do (subject === Operator::GT).should be_true end it "=== Operator::LE should be true" do (subject === Operator::LE).should be_true end it "=== Operator::GE should be true" do (subject === Operator::GE).should be_true end end context "Operator::EQ" do subject { Operator::EQ } it "=== `==' should be true" do (subject === ComparisonOperator.new(:==)).should be_true end it "=== `!=' should not be true" do (subject === ComparisonOperator.new(:!=)).should_not be_true end it "=== `<' should not be true" do (subject === ComparisonOperator.new(:<)).should_not be_true end it "=== `>' should not be true" do (subject === ComparisonOperator.new(:>)).should_not be_true end it "=== `<=' should not be true" do (subject === ComparisonOperator.new(:<=)).should_not be_true end it "=== `>=' should not be true" do (subject === ComparisonOperator.new(:>=)).should_not be_true end end context "Operator::NE" do subject { Operator::NE } it "=== `==' should not be true" do (subject === ComparisonOperator.new(:==)).should_not be_true end it "=== `!=' should be true" do (subject === ComparisonOperator.new(:!=)).should be_true end it "=== `<' should not be true" do (subject === ComparisonOperator.new(:<)).should_not be_true end it "=== `>' should not be true" do (subject === ComparisonOperator.new(:>)).should_not be_true end it "=== `<=' should not be true" do (subject === ComparisonOperator.new(:<=)).should_not be_true end it "=== `>=' should not be true" do (subject === ComparisonOperator.new(:>=)).should_not be_true end end context "Operator::LT" do subject { Operator::LT } it "=== `==' should not be true" do (subject === ComparisonOperator.new(:==)).should_not be_true end it "=== `!=' should not be true" do (subject === ComparisonOperator.new(:!=)).should_not be_true end it "=== `<' should be true" do (subject === ComparisonOperator.new(:<)).should be_true end it "=== `>' should not be true" do (subject === ComparisonOperator.new(:>)).should_not be_true end it "=== `<=' should not be true" do (subject === ComparisonOperator.new(:<=)).should_not be_true end it "=== `>=' should not be true" do (subject === ComparisonOperator.new(:>=)).should_not be_true end end context "Operator::GT" do subject { Operator::GT } it "=== `==' should not be true" do (subject === ComparisonOperator.new(:==)).should_not be_true end it "=== `!=' should not be true" do (subject === ComparisonOperator.new(:!=)).should_not be_true end it "=== `<' should not be true" do (subject === ComparisonOperator.new(:<)).should_not be_true end it "=== `>' should be true" do (subject === ComparisonOperator.new(:>)).should be_true end it "=== `<=' should not be true" do (subject === ComparisonOperator.new(:<=)).should_not be_true end it "=== `>=' should not be true" do (subject === ComparisonOperator.new(:>=)).should_not be_true end end context "Operator::LE" do subject { Operator::LE } it "=== `==' should not be true" do (subject === ComparisonOperator.new(:==)).should_not be_true end it "=== `!=' should not be true" do (subject === ComparisonOperator.new(:!=)).should_not be_true end it "=== `<' should not be true" do (subject === ComparisonOperator.new(:<)).should_not be_true end it "=== `>' should not be true" do (subject === ComparisonOperator.new(:>)).should_not be_true end it "=== `<=' should be true" do (subject === ComparisonOperator.new(:<=)).should be_true end it "=== `>=' should not be true" do (subject === ComparisonOperator.new(:>=)).should_not be_true end end context "Operator::GE" do subject { Operator::GE } it "=== `==' should not be true" do (subject === ComparisonOperator.new(:==)).should_not be_true end it "=== `!=' should not be true" do (subject === ComparisonOperator.new(:!=)).should_not be_true end it "=== `<' should not be true" do (subject === ComparisonOperator.new(:<)).should_not be_true end it "=== `>' should not be true" do (subject === ComparisonOperator.new(:>)).should_not be_true end it "=== `<=' should not be true" do (subject === ComparisonOperator.new(:<=)).should_not be_true end it "=== `>=' should be true" do (subject === ComparisonOperator.new(:>=)).should be_true end end describe ComparisonOperator do context "`=='" do subject { ComparisonOperator.new(:==) } it "=== Operator::EQ should be true" do (subject === Operator::EQ).should be_true end it "=== Operator::NE should not be true" do (subject === Operator::NE).should_not be_true end it "=== Operator::LT should not be true" do (subject === Operator::LT).should_not be_true end it "=== Operator::GT should not be true" do (subject === Operator::GT).should_not be_true end it "=== Operator::LE should not be true" do (subject === Operator::LE).should_not be_true end it "=== Operator::GE should not be true" do (subject === Operator::GE).should_not be_true end end context "`!='" do subject { ComparisonOperator.new(:!=) } it "=== Operator::EQ should not be true" do (subject === Operator::EQ).should_not be_true end it "=== Operator::NE should be true" do (subject === Operator::NE).should be_true end it "=== Operator::LT should not be true" do (subject === Operator::LT).should_not be_true end it "=== Operator::GT should not be true" do (subject === Operator::GT).should_not be_true end it "=== Operator::LE should not be true" do (subject === Operator::LE).should_not be_true end it "=== Operator::GE should not be true" do (subject === Operator::GE).should_not be_true end end context "`<'" do subject { ComparisonOperator.new(:<) } it "=== Operator::EQ should not be true" do (subject === Operator::EQ).should_not be_true end it "=== Operator::NE should not be true" do (subject === Operator::NE).should_not be_true end it "=== Operator::LT should be true" do (subject === Operator::LT).should be_true end it "=== Operator::GT should not be true" do (subject === Operator::GT).should_not be_true end it "=== Operator::LE should not be true" do (subject === Operator::LE).should_not be_true end it "=== Operator::GE should not be true" do (subject === Operator::GE).should_not be_true end end context "`>'" do subject { ComparisonOperator.new(:>) } it "=== Operator::EQ should not be true" do (subject === Operator::EQ).should_not be_true end it "=== Operator::NE should not be true" do (subject === Operator::NE).should_not be_true end it "=== Operator::LT should not be true" do (subject === Operator::LT).should_not be_true end it "=== Operator::GT should be true" do (subject === Operator::GT).should be_true end it "=== Operator::LE should not be true" do (subject === Operator::LE).should_not be_true end it "=== Operator::GE should not be true" do (subject === Operator::GE).should_not be_true end end context "`<='" do subject { ComparisonOperator.new(:<=) } it "=== Operator::EQ should not be true" do (subject === Operator::EQ).should_not be_true end it "=== Operator::NE should not be true" do (subject === Operator::NE).should_not be_true end it "=== Operator::LT should not be true" do (subject === Operator::LT).should_not be_true end it "=== Operator::GT should not be true" do (subject === Operator::GT).should_not be_true end it "=== Operator::LE should be true" do (subject === Operator::LE).should be_true end it "=== Operator::GE should not be true" do (subject === Operator::GE).should_not be_true end end context "`>='" do subject { ComparisonOperator.new(:>=) } it "=== Operator::EQ should not be true" do (subject === Operator::EQ).should_not be_true end it "=== Operator::NE should not be true" do (subject === Operator::NE).should_not be_true end it "=== Operator::LT should not be true" do (subject === Operator::LT).should_not be_true end it "=== Operator::GT should not be true" do (subject === Operator::GT).should_not be_true end it "=== Operator::LE should not be true" do (subject === Operator::LE).should_not be_true end it "=== Operator::GE should be true" do (subject === Operator::GE).should be_true end end end end end end adlint-3.2.0/spec/adlint/cc1/ctrlexpr_spec.rb0000644000004100000410000001320612224440633021076 0ustar www-datawww-data# Unit specification of controlling expression of selection-statements and # iteration-statements. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "spec_helper" module AdLint module Cc1 describe ControllingExpression do include InterpreterMediator before(:all) { @adlint = AdLint.new($default_traits) } before(:each) do @monitor = ProgressMonitor.new(nil, nil, false) @logger = Logger.new(File.open(File::NULL, "w")) @symbol_table = SymbolTable.new @type_table = TypeTable.new(@adlint.traits, @monitor, @logger) @interpreter = Interpreter.new(@type_table) @int_i = @interpreter.define_variable(int_i_def, nil) @int_j = @interpreter.define_variable(int_j_def, nil) end context "`int i = ((> 0) && (< 10)) || (== 0)' and " + "`int j = ((> 0) && (< 10)) || (== 0)'" do before do @int_i.narrow_value_domain!(Operator::GE, scalar_value_of(0)) @int_i.narrow_value_domain!(Operator::LT, scalar_value_of(10)) @int_j.narrow_value_domain!(Operator::GE, scalar_value_of(0)) @int_j.narrow_value_domain!(Operator::LT, scalar_value_of(10)) end it "(i == j) makes that `i' should contain 0 and 9, " + "and should not contain 10" do expr = EqualityExpression.new(eq_op, i_spec, j_spec) branched_eval(expr, NARROWING, FINAL) do @int_i.value.test_may_be_equal_to( scalar_value_of(0)).result.should be_true @int_i.value.test_may_be_equal_to( scalar_value_of(9)).result.should be_true @int_i.value.test_may_be_equal_to( scalar_value_of(10)).result.should be_false end end it "(i != j) makes that `i' should contain 0 and 9, " + "and should not contain 10" do expr = EqualityExpression.new(ne_op, i_spec, j_spec) branched_eval(expr, NARROWING, FINAL) do @int_i.value.test_may_be_equal_to( scalar_value_of(0)).result.should be_true @int_i.value.test_may_be_equal_to( scalar_value_of(9)).result.should be_true @int_i.value.test_may_be_equal_to( scalar_value_of(10)).result.should be_false end end end context "`int i = ((> 0) && (< 10)) || (== 0)' and " + "`int j = ((> 3) && (< 5)) || (== 3)'" do before do @int_i.narrow_value_domain!(Operator::GE, scalar_value_of(0)) @int_i.narrow_value_domain!(Operator::LT, scalar_value_of(10)) @int_j.narrow_value_domain!(Operator::GE, scalar_value_of(3)) @int_j.narrow_value_domain!(Operator::LT, scalar_value_of(5)) end it "(i == j) makes that `i' should contain 3 and 4, " + "and should not contain 0" do expr = EqualityExpression.new(eq_op, i_spec, j_spec) branched_eval(expr, NARROWING, FINAL) do @int_i.value.test_may_be_equal_to( scalar_value_of(3)).result.should be_true @int_i.value.test_may_be_equal_to( scalar_value_of(4)).result.should be_true @int_i.value.test_may_be_equal_to( scalar_value_of(0)).result.should be_false end end end private def eq_op Token.new("==", "==", nil_loc) end def ne_op Token.new("!=", "!=", nil_loc) end def i_spec obj_spec_of("i") end def j_spec obj_spec_of("j") end def obj_spec_of(name) ObjectSpecifier.new(id_of(name)) end def int_i_def uninitialized_int_vardef("i", @type_table.int_t) end def int_j_def uninitialized_int_vardef("j", @type_table.int_t) end def uninitialized_int_vardef(name, type) dcl_specs = DeclarationSpecifiers.new.tap { |ds| ds.type_specifiers.push(int_t_spec) } decl = Declaration.new(dcl_specs, [uninitialized_int_dcl(name)], @symbol_table) decl.items.each { |item| item.type = type } decl.items.find { |item| item.kind_of?(VariableDefinition) } end def uninitialized_int_dcl(name) InitDeclarator.new(IdentifierDeclarator.new(id_of(name)), nil) end def int_t_spec StandardTypeSpecifier.new(Token.new(:INT, "int", Location.new)) end def id_of(name) Token.new(:IDENTIFIER, name, nil_loc) end def nil_loc Location.new end def resolve_type(node) StaticTypeResolver.new.resolve(node) end def interpreter @interpreter end end include BranchOptions end end adlint-3.2.0/spec/adlint/cc1/type_spec.rb0000644000004100000410000001335312224440633020217 0ustar www-datawww-data# Unit specification of C type models. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "spec_helper" module AdLint module Cc1 describe Type do before(:all) { @adlint = AdLint.new($default_traits) } before(:each) do @monitor = ProgressMonitor.new(nil, nil, false) @logger = Logger.new(File.open(File::NULL, "w")) end let(:type_table) { TypeTable.new(@adlint.traits, @monitor, @logger) } let(:int_ptr_t) { pointer_type(int_t) } let(:const_int_ptr_t) { pointer_type(qualified_type(int_t, :const)) } let(:const_int_t) { qualified_type(int_t, :const) } let(:volatile_int_t) { qualified_type(int_t, :volatile) } let(:const_volatile_int_t) { qualified_type(int_t, :const, :volatile) } let(:const_char_t) { qualified_type(char_t, :const) } let(:const_unsigned_char_t) { qualified_type(unsigned_char_t, :const) } let(:char_ptr_t) { pointer_type(char_t) } let(:const_char_ptr_t) { pointer_type(qualified_type(char_t, :const)) } let(:const_unsigned_char_ptr_t) { pointer_type(qualified_type(unsigned_char_t, :const)) } describe ArrayType do context "`int[3]'" do subject { array_type(int_t, 3) } it "should be convertible to `const int *'" do should be_convertible(const_int_ptr_t) end it "should be convertible to `int *'" do should be_convertible(int_ptr_t) end end context "`int[]'" do subject { array_type(int_t) } it "should be convertible to `const int *'" do should be_convertible(const_int_ptr_t) end it "should be convertible to `int *'" do should be_convertible(int_ptr_t) end end end describe PointerType do context "`const int *'" do subject { const_int_ptr_t } it "should not be convertible to `int[]'" do should_not be_convertible(array_type(int_t)) end end context "`int *'" do subject { int_ptr_t } it "should be convertible to `int[]'" do should be_convertible(array_type(int_t)) end end context "`const int'" do subject { const_int_t } it "should be more cv-qualified than `int'" do should be_more_cv_qualified(int_t) end it "should not be more cv-qualified than `const int'" do should_not be_more_cv_qualified(const_int_t) end it "should not be more cv-qualified than `volatile int'" do should_not be_more_cv_qualified(volatile_int_t) end end context "`volatile int'" do subject { volatile_int_t } it "should be more cv-qualified than `int'" do should be_more_cv_qualified(int_t) end end context "`const volatile int'" do subject { const_volatile_int_t } it "should be more cv-qualified than `int'" do should be_more_cv_qualified(int_t) end it "should be more cv-qualified than `const int'" do should be_more_cv_qualified(const_int_t) end it "should be more cv-qualified than `volatile int'" do should be_more_cv_qualified(volatile_int_t) end end end describe QualifiedType do context "`const char'" do subject { const_char_t } it "should be equal to `const unsigned char'" do should == const_unsigned_char_t end it "should be convertible to `char'" do should be_convertible(char_t) end it "should be convertible to `const unsigned char'" do should be_convertible(const_unsigned_char_t) end end context "`char'" do subject { char_t } it "should be convertible to `const char'" do should be_convertible(const_char_t) end end context "`const char *'" do subject { const_char_ptr_t } it "should be convertible to `const unsigned char *'" do should be_convertible(const_unsigned_char_ptr_t) end it "should not be convertible to `char *'" do should_not be_convertible(char_ptr_t) end end end describe CharType do context "`char'" do subject { char_t } it "should be equal to `unsigned char'" do should == unsigned_char_t end it "should not be equal to `signed char'" do should_not == signed_char_t end end end include TypeTableMediator end end end adlint-3.2.0/spec/adlint/location_spec.rb0000644000004100000410000000336212224440633020377 0ustar www-datawww-data# Unit specification of tokens' location identifier. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "spec_helper" module AdLint describe Location do before(:all) { @adlint = AdLint.new($default_traits) } context "initial header" do subject { Location.new(Pathname.new("spec/conf.d/empty_pinit.h"), 1, 1) } it { should_not be_in_analysis_target(@adlint.traits) } end context "source file" do subject { Location.new(Pathname.new("spec/conf.d/project/foo.c"), 1, 1) } it { should be_in_analysis_target(@adlint.traits) } end end end adlint-3.2.0/spec/conf.d/0000755000004100000410000000000012224440633015120 5ustar www-datawww-dataadlint-3.2.0/spec/conf.d/project/0000755000004100000410000000000012224440633016566 5ustar www-datawww-dataadlint-3.2.0/spec/conf.d/project/foo.c0000644000004100000410000000000012224440633017503 0ustar www-datawww-dataadlint-3.2.0/spec/conf.d/default_traits.yml0000644000004100000410000001650112224440633020660 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # Traits file generated by adlintize 1.19.0 at 2012-04-23 21:48:10 +0900. # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "spec" # Project root directory. project_root: "spec/conf.d/project" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "spec/conf.d/project" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "spec/conf.d/empty_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "spec/conf.d/empty_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable translation-unit specific code check selection? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/spec/conf.d/empty_pinit.h0000644000004100000410000000075112224440633017635 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Project specific initial header file generated by adlintize 1.6.0 * at 2012-04-23 21:48:10 +0900. */ /* Put project specific predefined macros and types here. */ adlint-3.2.0/spec/conf.d/empty_cinit.h0000644000004100000410000000075312224440633017622 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * Compiler specific initial header file generated by adlintize 1.6.0 * at 2012-04-23 21:48:10 +0900. */ /* Put compiler specific predefined macros and types here. */ adlint-3.2.0/spec/spec_helper.rb0000644000004100000410000000315112224440633016567 0ustar www-datawww-data# RSpec helper. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ if ENV["ADLINT_COV"] =~ /1|on|true/ require "simplecov" require "simplecov-html" SimpleCov.start end $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require "adlint" confdir = Pathname.new(File.expand_path("conf.d", File.dirname(__FILE__))) $default_traits = Pathname.new("default_traits.yml").expand_path(confdir) RSpec.configure do |c| c.color = true end adlint-3.2.0/TODO0000644000004100000410000000216112224440633013507 0ustar www-datawww-data-- ___ ____ __ ___ _________ / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer / /| | / / / / / / / |/ / / / AdLint - Advanced Lint / __ |/ /_/ / /___/ / /| / / / /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. This file is part of AdLint. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see . ++ * Support C++ analysis * Improve accuracy of code checks * Support many more preset build environments * Implement automatic traits files generator Any contributions are welcome! adlint-3.2.0/bin/0000755000004100000410000000000012224440633013567 5ustar www-datawww-dataadlint-3.2.0/bin/adlintize0000755000004100000410000004211712224440633015505 0ustar www-datawww-data#! /usr/bin/env ruby # # AdLint project generator. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require "adlint" version = "AdLint project generator #{AdLint::VERSION}" usage = < # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require "adlint" $stdout.set_encoding(Encoding.default_external) $stderr.set_encoding(Encoding.default_external) version = "AdLint configuration validator #{AdLint::VERSION}" usage = < ex $stderr.puts ex.message, ex.backtrace $stderr.puts exit 2 end exit 0 adlint-3.2.0/bin/adlint0000755000004100000410000001037312224440633014774 0ustar www-datawww-data#! /usr/bin/env ruby # # All in one analyzer. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require "adlint" $stdout.set_encoding(Encoding.default_external) $stderr.set_encoding(Encoding.default_external) version = "AdLint all in one analyzer #{AdLint::VERSION}" usage = < ex $stderr.puts ex.message, ex.backtrace $stderr.puts exit 2 end exit 0 adlint-3.2.0/bin/adlint_cma0000755000004100000410000000677212224440633015624 0ustar www-datawww-data#! /usr/bin/env ruby # # Cross module analyzer. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require "adlint" $stdout.set_encoding(Encoding.default_external) $stderr.set_encoding(Encoding.default_external) version = "AdLint cross module analyzer #{AdLint::VERSION}" usage = < ex $stderr.puts ex.message, ex.backtrace $stderr.puts exit 2 end exit 0 adlint-3.2.0/bin/adlint_sma0000755000004100000410000000762212224440633015637 0ustar www-datawww-data#! /usr/bin/env ruby # # Single module analyzer. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require "adlint" $stdout.set_encoding(Encoding.default_external) $stderr.set_encoding(Encoding.default_external) version = "AdLint single module analyzer #{AdLint::VERSION}" usage = < ex $stderr.puts ex.message, ex.backtrace $stderr.puts exit 2 end exit 0 adlint-3.2.0/metadata.yml0000644000004100000410000011053312224440633015325 0ustar www-datawww-data--- !ruby/object:Gem::Specification name: adlint version: !ruby/object:Gem::Version version: 3.2.0 prerelease: platform: ruby authors: - Yutaka Yanoh autorequire: bindir: bin cert_chain: [] date: 2013-08-28 00:00:00.000000000 Z dependencies: [] description: ! 'AdLint is a source code static analyzer. It can point out unreliable or nonportable code fragments, and can measure various quality metrics of the source code. It (currently) can analyze source code compliant with ANSI C89 / ISO C90 and partly ISO C99. ' email: yanoh@users.sourceforge.net executables: - adlint - adlint_sma - adlint_cma - adlint_chk - adlintize extensions: [] extra_rdoc_files: - README files: - AUTHORS - COPYING - ChangeLog - INSTALL - MANIFEST - NEWS - README - Rakefile - TODO - bin/adlint - bin/adlint_chk - bin/adlint_cma - bin/adlint_sma - bin/adlintize - etc/conf.d/fallback/cinit.erb - etc/conf.d/fallback/traits.erb - etc/conf.d/i686-cygwin/cinit-gcc_4.3.4.erb - etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb - etc/conf.d/i686-devkit/cinit-gcc_4.5.2.erb - etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb - etc/conf.d/i686-linux/cinit-gcc_4.5.1.erb - etc/conf.d/i686-linux/traits-gcc_4.5.1.erb - etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb - etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb - etc/conf.d/noarch/GNUmakefile.erb - etc/conf.d/noarch/adlint_all_bat.erb - etc/conf.d/noarch/adlint_all_sh.erb - etc/conf.d/noarch/pinit.erb - etc/conf.d/x86_64-ubuntu_12.04/cinit-gcc_4.6.3.erb - etc/conf.d/x86_64-ubuntu_12.04/traits-gcc_4.6.3.erb - etc/mesg.d/c_builtin/en_US/messages.yml - etc/mesg.d/c_builtin/ja_JP/messages.yml - etc/mesg.d/core/en_US/messages.yml - etc/mesg.d/core/ja_JP/messages.yml - features/code_check/E0008.feature - features/code_check/E0013.feature - features/code_check/W0001.feature - features/code_check/W0002.feature - features/code_check/W0003.feature - features/code_check/W0007.feature - features/code_check/W0010.feature - features/code_check/W0013.feature - features/code_check/W0016.feature - features/code_check/W0017.feature - features/code_check/W0018.feature - features/code_check/W0019.feature - features/code_check/W0021.feature - features/code_check/W0023.feature - features/code_check/W0024.feature - features/code_check/W0025.feature - features/code_check/W0026.feature - features/code_check/W0070.feature - features/code_check/W0071.feature - features/code_check/W0088.feature - features/code_check/W0093.feature - features/code_check/W0097.feature - features/code_check/W0100.feature - features/code_check/W0104.feature - features/code_check/W0109.feature - features/code_check/W0119.feature - features/code_check/W0120.feature - features/code_check/W0121.feature - features/code_check/W0122.feature - features/code_check/W0123.feature - features/code_check/W0124.feature - features/code_check/W0125.feature - features/code_check/W0126.feature - features/code_check/W0127.feature - features/code_check/W0128.feature - features/code_check/W0129.feature - features/code_check/W0130.feature - features/code_check/W0131.feature - features/code_check/W0132.feature - features/code_check/W0133.feature - features/code_check/W0134.feature - features/code_check/W0135.feature - features/code_check/W0136.feature - features/code_check/W0137.feature - features/code_check/W0138.feature - features/code_check/W0139.feature - features/code_check/W0140.feature - features/code_check/W0141.feature - features/code_check/W0142.feature - features/code_check/W0143.feature - features/code_check/W0144.feature - features/code_check/W0145.feature - features/code_check/W0146.feature - features/code_check/W0147.feature - features/code_check/W0148.feature - features/code_check/W0149.feature - features/code_check/W0150.feature - features/code_check/W0151.feature - features/code_check/W0152.feature - features/code_check/W0153.feature - features/code_check/W0154.feature - features/code_check/W0155.feature - features/code_check/W0156.feature - features/code_check/W0157.feature - features/code_check/W0158.feature - features/code_check/W0159.feature - features/code_check/W0160.feature - features/code_check/W0161.feature - features/code_check/W0162.feature - features/code_check/W0163.feature - features/code_check/W0164.feature - features/code_check/W0165.feature - features/code_check/W0166.feature - features/code_check/W0167.feature - features/code_check/W0168.feature - features/code_check/W0169.feature - features/code_check/W0170.feature - features/code_check/W0171.feature - features/code_check/W0172.feature - features/code_check/W0173.feature - features/code_check/W0174.feature - features/code_check/W0175.feature - features/code_check/W0176.feature - features/code_check/W0177.feature - features/code_check/W0178.feature - features/code_check/W0179.feature - features/code_check/W0180.feature - features/code_check/W0181.feature - features/code_check/W0182.feature - features/code_check/W0183.feature - features/code_check/W0184.feature - features/code_check/W0185.feature - features/code_check/W0186.feature - features/code_check/W0187.feature - features/code_check/W0188.feature - features/code_check/W0189.feature - features/code_check/W0190.feature - features/code_check/W0191.feature - features/code_check/W0192.feature - features/code_check/W0193.feature - features/code_check/W0194.feature - features/code_check/W0195.feature - features/code_check/W0196.feature - features/code_check/W0197.feature - features/code_check/W0198.feature - features/code_check/W0199.feature - features/code_check/W0200.feature - features/code_check/W0201.feature - features/code_check/W0202.feature - features/code_check/W0203.feature - features/code_check/W0204.feature - features/code_check/W0205.feature - features/code_check/W0206.feature - features/code_check/W0207.feature - features/code_check/W0208.feature - features/code_check/W0209.feature - features/code_check/W0210.feature - features/code_check/W0211.feature - features/code_check/W0212.feature - features/code_check/W0213.feature - features/code_check/W0214.feature - features/code_check/W0215.feature - features/code_check/W0216.feature - features/code_check/W0217.feature - features/code_check/W0218.feature - features/code_check/W0219.feature - features/code_check/W0220.feature - features/code_check/W0221.feature - features/code_check/W0222.feature - features/code_check/W0223.feature - features/code_check/W0224.feature - features/code_check/W0225.feature - features/code_check/W0226.feature - features/code_check/W0227.feature - features/code_check/W0228.feature - features/code_check/W0229.feature - features/code_check/W0230.feature - features/code_check/W0231.feature - features/code_check/W0232.feature - features/code_check/W0233.feature - features/code_check/W0234.feature - features/code_check/W0235.feature - features/code_check/W0236.feature - features/code_check/W0237.feature - features/code_check/W0238.feature - features/code_check/W0239.feature - features/code_check/W0240.feature - features/code_check/W0241.feature - features/code_check/W0242.feature - features/code_check/W0243.feature - features/code_check/W0244.feature - features/code_check/W0245.feature - features/code_check/W0246.feature - features/code_check/W0247.feature - features/code_check/W0248.feature - features/code_check/W0249.feature - features/code_check/W0250.feature - features/code_check/W0251.feature - features/code_check/W0252.feature - features/code_check/W0253.feature - features/code_check/W0254.feature - features/code_check/W0422.feature - features/code_check/W0425.feature - features/code_check/W0431.feature - features/code_check/W0432.feature - features/code_check/W0459.feature - features/code_check/W0460.feature - features/code_check/W0461.feature - features/code_check/W0477.feature - features/code_check/W0478.feature - features/code_check/W0479.feature - features/code_check/W0480.feature - features/code_check/W0481.feature - features/code_check/W0482.feature - features/code_check/W0483.feature - features/code_check/W0488.feature - features/code_check/W0489.feature - features/code_check/W0490.feature - features/code_check/W0491.feature - features/code_check/W0492.feature - features/code_check/W0495.feature - features/code_check/W0496.feature - features/code_check/W0497.feature - features/code_check/W0498.feature - features/code_check/W0499.feature - features/code_check/W0500.feature - features/code_check/W0501.feature - features/code_check/W0502.feature - features/code_check/W0534.feature - features/code_check/W0542.feature - features/code_check/W0570.feature - features/code_check/W0573.feature - features/code_check/W0580.feature - features/code_check/W0582.feature - features/code_check/W0583.feature - features/code_check/W0584.feature - features/code_check/W0585.feature - features/code_check/W0599.feature - features/code_check/W0606.feature - features/code_check/W0610.feature - features/code_check/W0611.feature - features/code_check/W0612.feature - features/code_check/W0613.feature - features/code_check/W0635.feature - features/code_check/W0641.feature - features/code_check/W0642.feature - features/code_check/W0643.feature - features/code_check/W0644.feature - features/code_check/W0645.feature - features/code_check/W0646.feature - features/code_check/W0649.feature - features/code_check/W0650.feature - features/code_check/W0655.feature - features/code_check/W0685.feature - features/code_check/W0686.feature - features/code_check/W0687.feature - features/code_check/W0688.feature - features/code_check/W0689.feature - features/code_check/W0690.feature - features/code_check/W0691.feature - features/code_check/W0692.feature - features/code_check/W0694.feature - features/code_check/W0695.feature - features/code_check/W0697.feature - features/code_check/W0698.feature - features/code_check/W0699.feature - features/code_check/W0700.feature - features/code_check/W0703.feature - features/code_check/W0704.feature - features/code_check/W0705.feature - features/code_check/W0707.feature - features/code_check/W0708.feature - features/code_check/W0711.feature - features/code_check/W0712.feature - features/code_check/W0713.feature - features/code_check/W0714.feature - features/code_check/W0715.feature - features/code_check/W0716.feature - features/code_check/W0717.feature - features/code_check/W0718.feature - features/code_check/W0719.feature - features/code_check/W0722.feature - features/code_check/W0723.feature - features/code_check/W0726.feature - features/code_check/W0732.feature - features/code_check/W0733.feature - features/code_check/W0734.feature - features/code_check/W0735.feature - features/code_check/W0745.feature - features/code_check/W0747.feature - features/code_check/W0748.feature - features/code_check/W0749.feature - features/code_check/W0750.feature - features/code_check/W0751.feature - features/code_check/W0752.feature - features/code_check/W0753.feature - features/code_check/W0754.feature - features/code_check/W0755.feature - features/code_check/W0756.feature - features/code_check/W0757.feature - features/code_check/W0758.feature - features/code_check/W0759.feature - features/code_check/W0760.feature - features/code_check/W0761.feature - features/code_check/W0762.feature - features/code_check/W0763.feature - features/code_check/W0764.feature - features/code_check/W0765.feature - features/code_check/W0766.feature - features/code_check/W0767.feature - features/code_check/W0768.feature - features/code_check/W0769.feature - features/code_check/W0780.feature - features/code_check/W0781.feature - features/code_check/W0783.feature - features/code_check/W0786.feature - features/code_check/W0787.feature - features/code_check/W0792.feature - features/code_check/W0793.feature - features/code_check/W0794.feature - features/code_check/W0801.feature - features/code_check/W0805.feature - features/code_check/W0806.feature - features/code_check/W0807.feature - features/code_check/W0808.feature - features/code_check/W0809.feature - features/code_check/W0811.feature - features/code_check/W0830.feature - features/code_check/W0833.feature - features/code_check/W0834.feature - features/code_check/W1026.feature - features/code_check/W1030.feature - features/code_check/W1031.feature - features/code_check/W1039.feature - features/code_check/W1040.feature - features/code_check/W1041.feature - features/code_check/W1046.feature - features/code_check/W1047.feature - features/code_check/W1050.feature - features/code_check/W1052.feature - features/code_check/W1057.feature - features/code_check/W1058.feature - features/code_check/W1059.feature - features/code_check/W1060.feature - features/code_check/W1061.feature - features/code_check/W1062.feature - features/code_check/W1063.feature - features/code_check/W1064.feature - features/code_check/W1065.feature - features/code_check/W1066.feature - features/code_check/W1067.feature - features/code_check/W1068.feature - features/code_check/W1069.feature - features/code_check/W1070.feature - features/code_check/W1071.feature - features/code_check/W1072.feature - features/code_check/W1073.feature - features/code_check/W1074.feature - features/code_check/W1075.feature - features/code_check/W1076.feature - features/code_check/W1077.feature - features/code_check/W9001.feature - features/code_check/W9003.feature - features/code_extraction/TODO - features/metric_measurement/TODO - features/step_definitions/code_check_steps.rb - features/support/env.rb - lib/adlint.rb - lib/adlint/analyzer.rb - lib/adlint/annot.rb - lib/adlint/cc1.rb - lib/adlint/cc1/branch.rb - lib/adlint/cc1/builtin.rb - lib/adlint/cc1/const.rb - lib/adlint/cc1/conv.rb - lib/adlint/cc1/ctrlexpr.rb - lib/adlint/cc1/domain.rb - lib/adlint/cc1/enum.rb - lib/adlint/cc1/environ.rb - lib/adlint/cc1/expr.rb - lib/adlint/cc1/format.rb - lib/adlint/cc1/interp.rb - lib/adlint/cc1/lexer.rb - lib/adlint/cc1/mediator.rb - lib/adlint/cc1/object.rb - lib/adlint/cc1/operator.rb - lib/adlint/cc1/option.rb - lib/adlint/cc1/parser.rb - lib/adlint/cc1/parser.y - lib/adlint/cc1/phase.rb - lib/adlint/cc1/resolver.rb - lib/adlint/cc1/scanner.rb - lib/adlint/cc1/scope.rb - lib/adlint/cc1/seqp.rb - lib/adlint/cc1/syntax.rb - lib/adlint/cc1/trace.rb - lib/adlint/cc1/type.rb - lib/adlint/cc1/util.rb - lib/adlint/cc1/value.rb - lib/adlint/code.rb - lib/adlint/cpp.rb - lib/adlint/cpp/asm.rb - lib/adlint/cpp/constexpr.rb - lib/adlint/cpp/constexpr.y - lib/adlint/cpp/eval.rb - lib/adlint/cpp/lexer.rb - lib/adlint/cpp/macro.rb - lib/adlint/cpp/phase.rb - lib/adlint/cpp/scanner.rb - lib/adlint/cpp/source.rb - lib/adlint/cpp/subst.rb - lib/adlint/cpp/syntax.rb - lib/adlint/cpp/util.rb - lib/adlint/driver.rb - lib/adlint/error.rb - lib/adlint/exam.rb - lib/adlint/exam/c_builtin.rb - lib/adlint/exam/c_builtin/cc1_check.rb - lib/adlint/exam/c_builtin/cc1_check_shima.rb - lib/adlint/exam/c_builtin/cc1_code.rb - lib/adlint/exam/c_builtin/cc1_metric.rb - lib/adlint/exam/c_builtin/cpp_check.rb - lib/adlint/exam/c_builtin/cpp_check_shima.rb - lib/adlint/exam/c_builtin/cpp_code.rb - lib/adlint/exam/c_builtin/ld_check.rb - lib/adlint/exam/c_builtin/ld_metric.rb - lib/adlint/lang.rb - lib/adlint/ld.rb - lib/adlint/ld/object.rb - lib/adlint/ld/phase.rb - lib/adlint/ld/typedef.rb - lib/adlint/ld/util.rb - lib/adlint/lexer.rb - lib/adlint/location.rb - lib/adlint/memo.rb - lib/adlint/message.rb - lib/adlint/metric.rb - lib/adlint/monitor.rb - lib/adlint/phase.rb - lib/adlint/prelude.rb - lib/adlint/report.rb - lib/adlint/source.rb - lib/adlint/supp.rb - lib/adlint/symbol.rb - lib/adlint/token.rb - lib/adlint/traits.rb - lib/adlint/util.rb - lib/adlint/version.rb - share/HEADER - share/demo/Makefile - share/demo/ambig_operator/ambig_operator.c - share/demo/arg_points_unset/arg_points_unset.c - share/demo/array_range/array_range.c - share/demo/bad_bitfields/bad_bitfields.c - share/demo/bad_brace/bad_brace.c - share/demo/bad_comment/bad_comment.c - share/demo/bad_const/bad_const.c - share/demo/bad_conv/bad_conv.c - share/demo/bad_enum/bad_enum.c - share/demo/bad_indent/bad_indent.c - share/demo/bad_init/bad_init.c - share/demo/bad_label/bad_label.c - share/demo/bad_line/bad_line.c - share/demo/bad_macro/bad_macro.c - share/demo/bad_return/bad_return.c - share/demo/bitwise_expr/bitwise_expr.c - share/demo/call_by_value/call_by_value.c - share/demo/cross_ref/cross_ref.c - share/demo/dangling_else/dangling_else.c - share/demo/dead_code/dead_code.c - share/demo/deep_nest/deep_nest.c - share/demo/dense_switch/dense_switch.c - share/demo/direct_recur/direct_recur.c - share/demo/div_by_zero/div_by_zero.c - share/demo/dos_source/dos_source.c - share/demo/funptr_cast/funptr_cast.c - share/demo/goto_stmt/goto_stmt.c - share/demo/id_hiding/id_hiding.c - share/demo/ill_defined/ill_defined.c - share/demo/implicit_conv/implicit_conv.c - share/demo/implicit_int/implicit_int.c - share/demo/incomplete_ifelse/incomplete_ifelse.c - share/demo/incomplete_type/incomplete_type.c - share/demo/indirect_recur/indirect_recur_1.c - share/demo/indirect_recur/indirect_recur_1.h - share/demo/indirect_recur/indirect_recur_2.c - share/demo/indirect_recur/indirect_recur_2.h - share/demo/indirect_recur/indirect_recur_3.c - share/demo/indirect_recur/indirect_recur_3.h - share/demo/indirect_recur/indirect_recur_4.c - share/demo/inline_asm/inline_asm.c - share/demo/integer_promotion/integer_promotion.c - share/demo/intro_demo/intro_demo.c - share/demo/intro_demo/intro_demo.h - share/demo/intro_demo/useless_header.h - share/demo/invalid_call/invalid_call.c - share/demo/kandr_fundef/kandr_fundef.c - share/demo/line_comment/line_comment.c - share/demo/local_decl/local_decl.c - share/demo/logical_expr/logical_expr.c - share/demo/logical_trick/logical_trick.c - share/demo/long_sym/long_sym.c - share/demo/loop_var/loop_var.c - share/demo/malloc_or_die/malloc_or_die.c - share/demo/may_be_null/may_be_null.c - share/demo/may_be_null_arith/may_be_null_arith.c - share/demo/may_be_unset/may_be_unset.c - share/demo/mmapped_io/mmapped_io.c - share/demo/multi_break/multi_break.c - share/demo/multi_decl/multi_decl_1.c - share/demo/multi_decl/multi_decl_1.h - share/demo/multi_decl/multi_decl_2.c - share/demo/multi_decl/multi_decl_2.h - share/demo/multi_decl/multi_decl_3.c - share/demo/multi_def/multi_def_1.c - share/demo/multi_def/multi_def_1.h - share/demo/multi_def/multi_def_2.c - share/demo/multi_def/multi_def_2.h - share/demo/multi_def/multi_def_3.c - share/demo/multi_typedef/multi_typedef.c - share/demo/multi_typedef/multi_typedef_1.h - share/demo/multi_typedef/multi_typedef_2.h - share/demo/must_be_false/must_be_false.c - share/demo/must_be_null/must_be_null.c - share/demo/must_be_null_arith/must_be_null_arith.c - share/demo/must_be_true/must_be_true.c - share/demo/no_eof_nl/no_eof_nl.c - share/demo/no_void_arg/no_void_arg.c - share/demo/null_stmt/null_stmt.c - share/demo/octal_const/octal_const.c - share/demo/output_by_param/output_by_param.c - share/demo/overflow/overflow.c - share/demo/press_release/press_release.c - share/demo/redundant_select/redundant_select.c - share/demo/register_vars/register_vars.c - share/demo/reserved_ident/reserved_ident.c - share/demo/retn_lvar_addr/retn_lvar_addr.c - share/demo/sequence_point/sequence_point.c - share/demo/shift_expr/shift_expr.c - share/demo/should_be_typedef/should_be_typedef.c - share/demo/static_paths/static_paths.c - share/demo/static_vars/static_vars.c - share/demo/tag_hiding/tag_hiding.c - share/demo/tricky_incdec/tricky_incdec.c - share/demo/typedef_each_src/typedef_each_src.c - share/demo/undefined_macro/undefined_macro.c - share/demo/uninit_vars/uninit_vars.c - share/demo/union_type/union_type.c - share/demo/unmatch_decl/unmatch_decl_1.c - share/demo/unmatch_decl/unmatch_decl_1.h - share/demo/unmatch_decl/unmatch_decl_2.c - share/demo/unmatch_decl/unmatch_decl_2.h - share/demo/unmatch_decl/unmatch_decl_3.c - share/demo/unmatch_paren_macro/unmatch_paren_macro.c - share/demo/unnamed_member/unnamed_member.c - share/demo/unreachable/unreachable.c - share/demo/useless_exp_funs/useless_exp_funs_1.c - share/demo/useless_exp_funs/useless_exp_funs_1.h - share/demo/useless_exp_funs/useless_exp_funs_2.c - share/demo/useless_exp_vars/useless_export_1.c - share/demo/useless_exp_vars/useless_export_1.h - share/demo/useless_exp_vars/useless_export_2.c - share/demo/useless_expr/useless_expr.c - share/demo/useless_funs/useless_funs_1.c - share/demo/useless_funs/useless_funs_1.h - share/demo/useless_funs/useless_funs_2.c - share/demo/useless_header/useless_header.c - share/demo/useless_header/useless_header_1.h - share/demo/useless_header/useless_header_2.h - share/demo/useless_header/useless_header_3.h - share/demo/useless_header/useless_header_4.h - share/demo/useless_vars/useless_vars.c - share/demo/va_funcall/va_funcall.c - share/demo/various_fundef/various_fundef.c - share/demo/wchar_wstring/wchar_wstring.c - share/demo/wrap_around/wrap_around.c - share/doc/Makefile - share/doc/adlint_on_adqua.png - share/doc/adlint_on_eclipse_en.png - share/doc/adlint_on_eclipse_ja.png - share/doc/adlint_on_vim_en.png - share/doc/adlint_on_vim_ja.png - share/doc/c99gram.dot - share/doc/c99gram.pdf - share/doc/developers_guide_ja.html - share/doc/developers_guide_ja.texi - share/doc/gen_mesg_sections.rb - share/doc/samples/GNUmakefile - share/doc/samples/adlint_traits.yml - share/doc/texinfo.css - share/doc/users_guide_en.html - share/doc/users_guide_en.texi - share/doc/users_guide_ja.html - share/doc/users_guide_ja.texi - share/logo/adlint-110.png - share/logo/adlint-524.png - share/logo/adlint.svg - share/sample/README - share/sample/bison-2.5/adlint/GNUmakefile - share/sample/bison-2.5/adlint/adlint_traits.yml - share/sample/bison-2.5/adlint/lib/GNUmakefile - share/sample/bison-2.5/adlint/lib/adlint_cinit.h - share/sample/bison-2.5/adlint/lib/adlint_pinit.h - share/sample/bison-2.5/adlint/lib/adlint_traits.yml - share/sample/bison-2.5/adlint/src/GNUmakefile - share/sample/bison-2.5/adlint/src/adlint_cinit.h - share/sample/bison-2.5/adlint/src/adlint_pinit.h - share/sample/bison-2.5/adlint/src/adlint_traits.yml - share/sample/ctags-5.8/adlint/GNUmakefile - share/sample/ctags-5.8/adlint/adlint_cinit.h - share/sample/ctags-5.8/adlint/adlint_pinit.h - share/sample/ctags-5.8/adlint/adlint_traits.yml - share/sample/flex-2.5.35/adlint/GNUmakefile - share/sample/flex-2.5.35/adlint/adlint_cinit.h - share/sample/flex-2.5.35/adlint/adlint_pinit.h - share/sample/flex-2.5.35/adlint/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/core/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/core/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/core/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/enc-trans/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/enc/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/enc/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/enc/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-continuation/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-coverage/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-curses/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-date/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-dbm/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-digest/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-dl/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-etc/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-fiber/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-iconv/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-io-console/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-nkf/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-openssl/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-pathname/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-psych/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-pty/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-readline/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-ripper/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-socket/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-stringio/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-strscan/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-syck/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-syslog/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml - share/sample/ruby-1.9.3-p0/adlint/ext-zlib/GNUmakefile - share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_cinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_pinit.h - share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml - share/sample/screen-4.0.3/adlint/GNUmakefile - share/sample/screen-4.0.3/adlint/adlint_cinit.h - share/sample/screen-4.0.3/adlint/adlint_pinit.h - share/sample/screen-4.0.3/adlint/adlint_traits.yml - share/sample/vim-7.3/adlint/vim/GNUmakefile - share/sample/vim-7.3/adlint/vim/adlint_cinit.h - share/sample/vim-7.3/adlint/vim/adlint_pinit.h - share/sample/vim-7.3/adlint/vim/adlint_traits.yml - share/sample/vim-7.3/adlint/xxd/GNUmakefile - share/sample/vim-7.3/adlint/xxd/adlint_cinit.h - share/sample/vim-7.3/adlint/xxd/adlint_pinit.h - share/sample/vim-7.3/adlint/xxd/adlint_traits.yml - share/sample/zsh-4.3.15/adlint/GNUmakefile - share/sample/zsh-4.3.15/adlint/adlint_traits.yml - share/sample/zsh-4.3.15/adlint/builtins/GNUmakefile - share/sample/zsh-4.3.15/adlint/builtins/adlint_cinit.h - share/sample/zsh-4.3.15/adlint/builtins/adlint_pinit.h - share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml - share/sample/zsh-4.3.15/adlint/core/GNUmakefile - share/sample/zsh-4.3.15/adlint/core/adlint_cinit.h - share/sample/zsh-4.3.15/adlint/core/adlint_pinit.h - share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml - share/sample/zsh-4.3.15/adlint/modules/GNUmakefile - share/sample/zsh-4.3.15/adlint/modules/adlint_cinit.h - share/sample/zsh-4.3.15/adlint/modules/adlint_pinit.h - share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml - share/sample/zsh-4.3.15/adlint/zle/GNUmakefile - share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h - share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h - share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml - spec/adlint/cc1/ctrlexpr_spec.rb - spec/adlint/cc1/domain_spec.rb - spec/adlint/cc1/operator_spec.rb - spec/adlint/cc1/syntax_spec.rb - spec/adlint/cc1/type_spec.rb - spec/adlint/location_spec.rb - spec/conf.d/default_traits.yml - spec/conf.d/empty_cinit.h - spec/conf.d/empty_pinit.h - spec/conf.d/project/foo.c - spec/spec_helper.rb homepage: http://adlint.sourceforge.net/ licenses: - ! 'GPLv3+: GNU General Public License version 3 or later' post_install_message: ! "-------------------------------------------------------------------------------\n \ ___ ____ __ ___ _________\n / | / _ |/ / / / | / /__ __/ \ Source Code Static Analyzer\n / /| | / / / / / / / |/ / / / AdLint - Advanced Lint\n / __ |/ /_/ / /___/ / /| / / /\n /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.\n\n Thanks for installing AdLint!\n Please visit our project homepage at .\n\n-------------------------------------------------------------------------------\n" rdoc_options: - --main - README - --charset - utf-8 require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: 1.9.3 required_rubygems_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 1.8.23 signing_key: specification_version: 3 summary: ! 'AdLint :: Advanced Lint - An open source and free source code static analyzer' test_files: [] adlint-3.2.0/MANIFEST0000644000004100000410000010134312224440633014152 0ustar www-datawww-dataAUTHORS COPYING ChangeLog INSTALL MANIFEST NEWS README Rakefile TODO bin/adlint bin/adlint_chk bin/adlint_cma bin/adlint_sma bin/adlintize etc/conf.d/fallback/cinit.erb etc/conf.d/fallback/traits.erb etc/conf.d/i686-cygwin/cinit-gcc_4.3.4.erb etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb etc/conf.d/i686-devkit/cinit-gcc_4.5.2.erb etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb etc/conf.d/i686-linux/cinit-gcc_4.5.1.erb etc/conf.d/i686-linux/traits-gcc_4.5.1.erb etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb etc/conf.d/noarch/GNUmakefile.erb etc/conf.d/noarch/adlint_all_bat.erb etc/conf.d/noarch/adlint_all_sh.erb etc/conf.d/noarch/pinit.erb etc/conf.d/x86_64-ubuntu_12.04/cinit-gcc_4.6.3.erb etc/conf.d/x86_64-ubuntu_12.04/traits-gcc_4.6.3.erb etc/mesg.d/c_builtin/en_US/messages.yml etc/mesg.d/c_builtin/ja_JP/messages.yml etc/mesg.d/core/en_US/messages.yml etc/mesg.d/core/ja_JP/messages.yml features/code_check/E0008.feature features/code_check/E0013.feature features/code_check/W0001.feature features/code_check/W0002.feature features/code_check/W0003.feature features/code_check/W0007.feature features/code_check/W0010.feature features/code_check/W0013.feature features/code_check/W0016.feature features/code_check/W0017.feature features/code_check/W0018.feature features/code_check/W0019.feature features/code_check/W0021.feature features/code_check/W0023.feature features/code_check/W0024.feature features/code_check/W0025.feature features/code_check/W0026.feature features/code_check/W0070.feature features/code_check/W0071.feature features/code_check/W0088.feature features/code_check/W0093.feature features/code_check/W0097.feature features/code_check/W0100.feature features/code_check/W0104.feature features/code_check/W0109.feature features/code_check/W0119.feature features/code_check/W0120.feature features/code_check/W0121.feature features/code_check/W0122.feature features/code_check/W0123.feature features/code_check/W0124.feature features/code_check/W0125.feature features/code_check/W0126.feature features/code_check/W0127.feature features/code_check/W0128.feature features/code_check/W0129.feature features/code_check/W0130.feature features/code_check/W0131.feature features/code_check/W0132.feature features/code_check/W0133.feature features/code_check/W0134.feature features/code_check/W0135.feature features/code_check/W0136.feature features/code_check/W0137.feature features/code_check/W0138.feature features/code_check/W0139.feature features/code_check/W0140.feature features/code_check/W0141.feature features/code_check/W0142.feature features/code_check/W0143.feature features/code_check/W0144.feature features/code_check/W0145.feature features/code_check/W0146.feature features/code_check/W0147.feature features/code_check/W0148.feature features/code_check/W0149.feature features/code_check/W0150.feature features/code_check/W0151.feature features/code_check/W0152.feature features/code_check/W0153.feature features/code_check/W0154.feature features/code_check/W0155.feature features/code_check/W0156.feature features/code_check/W0157.feature features/code_check/W0158.feature features/code_check/W0159.feature features/code_check/W0160.feature features/code_check/W0161.feature features/code_check/W0162.feature features/code_check/W0163.feature features/code_check/W0164.feature features/code_check/W0165.feature features/code_check/W0166.feature features/code_check/W0167.feature features/code_check/W0168.feature features/code_check/W0169.feature features/code_check/W0170.feature features/code_check/W0171.feature features/code_check/W0172.feature features/code_check/W0173.feature features/code_check/W0174.feature features/code_check/W0175.feature features/code_check/W0176.feature features/code_check/W0177.feature features/code_check/W0178.feature features/code_check/W0179.feature features/code_check/W0180.feature features/code_check/W0181.feature features/code_check/W0182.feature features/code_check/W0183.feature features/code_check/W0184.feature features/code_check/W0185.feature features/code_check/W0186.feature features/code_check/W0187.feature features/code_check/W0188.feature features/code_check/W0189.feature features/code_check/W0190.feature features/code_check/W0191.feature features/code_check/W0192.feature features/code_check/W0193.feature features/code_check/W0194.feature features/code_check/W0195.feature features/code_check/W0196.feature features/code_check/W0197.feature features/code_check/W0198.feature features/code_check/W0199.feature features/code_check/W0200.feature features/code_check/W0201.feature features/code_check/W0202.feature features/code_check/W0203.feature features/code_check/W0204.feature features/code_check/W0205.feature features/code_check/W0206.feature features/code_check/W0207.feature features/code_check/W0208.feature features/code_check/W0209.feature features/code_check/W0210.feature features/code_check/W0211.feature features/code_check/W0212.feature features/code_check/W0213.feature features/code_check/W0214.feature features/code_check/W0215.feature features/code_check/W0216.feature features/code_check/W0217.feature features/code_check/W0218.feature features/code_check/W0219.feature features/code_check/W0220.feature features/code_check/W0221.feature features/code_check/W0222.feature features/code_check/W0223.feature features/code_check/W0224.feature features/code_check/W0225.feature features/code_check/W0226.feature features/code_check/W0227.feature features/code_check/W0228.feature features/code_check/W0229.feature features/code_check/W0230.feature features/code_check/W0231.feature features/code_check/W0232.feature features/code_check/W0233.feature features/code_check/W0234.feature features/code_check/W0235.feature features/code_check/W0236.feature features/code_check/W0237.feature features/code_check/W0238.feature features/code_check/W0239.feature features/code_check/W0240.feature features/code_check/W0241.feature features/code_check/W0242.feature features/code_check/W0243.feature features/code_check/W0244.feature features/code_check/W0245.feature features/code_check/W0246.feature features/code_check/W0247.feature features/code_check/W0248.feature features/code_check/W0249.feature features/code_check/W0250.feature features/code_check/W0251.feature features/code_check/W0252.feature features/code_check/W0253.feature features/code_check/W0254.feature features/code_check/W0422.feature features/code_check/W0425.feature features/code_check/W0431.feature features/code_check/W0432.feature features/code_check/W0459.feature features/code_check/W0460.feature features/code_check/W0461.feature features/code_check/W0477.feature features/code_check/W0478.feature features/code_check/W0479.feature features/code_check/W0480.feature features/code_check/W0481.feature features/code_check/W0482.feature features/code_check/W0483.feature features/code_check/W0488.feature features/code_check/W0489.feature features/code_check/W0490.feature features/code_check/W0491.feature features/code_check/W0492.feature features/code_check/W0495.feature features/code_check/W0496.feature features/code_check/W0497.feature features/code_check/W0498.feature features/code_check/W0499.feature features/code_check/W0500.feature features/code_check/W0501.feature features/code_check/W0502.feature features/code_check/W0534.feature features/code_check/W0542.feature features/code_check/W0570.feature features/code_check/W0573.feature features/code_check/W0580.feature features/code_check/W0582.feature features/code_check/W0583.feature features/code_check/W0584.feature features/code_check/W0585.feature features/code_check/W0599.feature features/code_check/W0606.feature features/code_check/W0610.feature features/code_check/W0611.feature features/code_check/W0612.feature features/code_check/W0613.feature features/code_check/W0635.feature features/code_check/W0641.feature features/code_check/W0642.feature features/code_check/W0643.feature features/code_check/W0644.feature features/code_check/W0645.feature features/code_check/W0646.feature features/code_check/W0649.feature features/code_check/W0650.feature features/code_check/W0655.feature features/code_check/W0685.feature features/code_check/W0686.feature features/code_check/W0687.feature features/code_check/W0688.feature features/code_check/W0689.feature features/code_check/W0690.feature features/code_check/W0691.feature features/code_check/W0692.feature features/code_check/W0694.feature features/code_check/W0695.feature features/code_check/W0697.feature features/code_check/W0698.feature features/code_check/W0699.feature features/code_check/W0700.feature features/code_check/W0703.feature features/code_check/W0704.feature features/code_check/W0705.feature features/code_check/W0707.feature features/code_check/W0708.feature features/code_check/W0711.feature features/code_check/W0712.feature features/code_check/W0713.feature features/code_check/W0714.feature features/code_check/W0715.feature features/code_check/W0716.feature features/code_check/W0717.feature features/code_check/W0718.feature features/code_check/W0719.feature features/code_check/W0722.feature features/code_check/W0723.feature features/code_check/W0726.feature features/code_check/W0732.feature features/code_check/W0733.feature features/code_check/W0734.feature features/code_check/W0735.feature features/code_check/W0745.feature features/code_check/W0747.feature features/code_check/W0748.feature features/code_check/W0749.feature features/code_check/W0750.feature features/code_check/W0751.feature features/code_check/W0752.feature features/code_check/W0753.feature features/code_check/W0754.feature features/code_check/W0755.feature features/code_check/W0756.feature features/code_check/W0757.feature features/code_check/W0758.feature features/code_check/W0759.feature features/code_check/W0760.feature features/code_check/W0761.feature features/code_check/W0762.feature features/code_check/W0763.feature features/code_check/W0764.feature features/code_check/W0765.feature features/code_check/W0766.feature features/code_check/W0767.feature features/code_check/W0768.feature features/code_check/W0769.feature features/code_check/W0780.feature features/code_check/W0781.feature features/code_check/W0783.feature features/code_check/W0786.feature features/code_check/W0787.feature features/code_check/W0792.feature features/code_check/W0793.feature features/code_check/W0794.feature features/code_check/W0801.feature features/code_check/W0805.feature features/code_check/W0806.feature features/code_check/W0807.feature features/code_check/W0808.feature features/code_check/W0809.feature features/code_check/W0811.feature features/code_check/W0830.feature features/code_check/W0833.feature features/code_check/W0834.feature features/code_check/W1026.feature features/code_check/W1030.feature features/code_check/W1031.feature features/code_check/W1039.feature features/code_check/W1040.feature features/code_check/W1041.feature features/code_check/W1046.feature features/code_check/W1047.feature features/code_check/W1050.feature features/code_check/W1052.feature features/code_check/W1057.feature features/code_check/W1058.feature features/code_check/W1059.feature features/code_check/W1060.feature features/code_check/W1061.feature features/code_check/W1062.feature features/code_check/W1063.feature features/code_check/W1064.feature features/code_check/W1065.feature features/code_check/W1066.feature features/code_check/W1067.feature features/code_check/W1068.feature features/code_check/W1069.feature features/code_check/W1070.feature features/code_check/W1071.feature features/code_check/W1072.feature features/code_check/W1073.feature features/code_check/W1074.feature features/code_check/W1075.feature features/code_check/W1076.feature features/code_check/W1077.feature features/code_check/W9001.feature features/code_check/W9003.feature features/code_extraction/TODO features/metric_measurement/TODO features/step_definitions/code_check_steps.rb features/support/env.rb lib/adlint.rb lib/adlint/analyzer.rb lib/adlint/annot.rb lib/adlint/cc1.rb lib/adlint/cc1/branch.rb lib/adlint/cc1/builtin.rb lib/adlint/cc1/const.rb lib/adlint/cc1/conv.rb lib/adlint/cc1/ctrlexpr.rb lib/adlint/cc1/domain.rb lib/adlint/cc1/enum.rb lib/adlint/cc1/environ.rb lib/adlint/cc1/expr.rb lib/adlint/cc1/format.rb lib/adlint/cc1/interp.rb lib/adlint/cc1/lexer.rb lib/adlint/cc1/mediator.rb lib/adlint/cc1/object.rb lib/adlint/cc1/operator.rb lib/adlint/cc1/option.rb lib/adlint/cc1/parser.rb lib/adlint/cc1/parser.y lib/adlint/cc1/phase.rb lib/adlint/cc1/resolver.rb lib/adlint/cc1/scanner.rb lib/adlint/cc1/scope.rb lib/adlint/cc1/seqp.rb lib/adlint/cc1/syntax.rb lib/adlint/cc1/trace.rb lib/adlint/cc1/type.rb lib/adlint/cc1/util.rb lib/adlint/cc1/value.rb lib/adlint/code.rb lib/adlint/cpp.rb lib/adlint/cpp/asm.rb lib/adlint/cpp/constexpr.rb lib/adlint/cpp/constexpr.y lib/adlint/cpp/eval.rb lib/adlint/cpp/lexer.rb lib/adlint/cpp/macro.rb lib/adlint/cpp/phase.rb lib/adlint/cpp/scanner.rb lib/adlint/cpp/source.rb lib/adlint/cpp/subst.rb lib/adlint/cpp/syntax.rb lib/adlint/cpp/util.rb lib/adlint/driver.rb lib/adlint/error.rb lib/adlint/exam.rb lib/adlint/exam/c_builtin.rb lib/adlint/exam/c_builtin/cc1_check.rb lib/adlint/exam/c_builtin/cc1_check_shima.rb lib/adlint/exam/c_builtin/cc1_code.rb lib/adlint/exam/c_builtin/cc1_metric.rb lib/adlint/exam/c_builtin/cpp_check.rb lib/adlint/exam/c_builtin/cpp_check_shima.rb lib/adlint/exam/c_builtin/cpp_code.rb lib/adlint/exam/c_builtin/ld_check.rb lib/adlint/exam/c_builtin/ld_metric.rb lib/adlint/lang.rb lib/adlint/ld.rb lib/adlint/ld/object.rb lib/adlint/ld/phase.rb lib/adlint/ld/typedef.rb lib/adlint/ld/util.rb lib/adlint/lexer.rb lib/adlint/location.rb lib/adlint/memo.rb lib/adlint/message.rb lib/adlint/metric.rb lib/adlint/monitor.rb lib/adlint/phase.rb lib/adlint/prelude.rb lib/adlint/report.rb lib/adlint/source.rb lib/adlint/supp.rb lib/adlint/symbol.rb lib/adlint/token.rb lib/adlint/traits.rb lib/adlint/util.rb lib/adlint/version.rb share/HEADER share/demo/Makefile share/demo/ambig_operator/ambig_operator.c share/demo/arg_points_unset/arg_points_unset.c share/demo/array_range/array_range.c share/demo/bad_bitfields/bad_bitfields.c share/demo/bad_brace/bad_brace.c share/demo/bad_comment/bad_comment.c share/demo/bad_const/bad_const.c share/demo/bad_conv/bad_conv.c share/demo/bad_enum/bad_enum.c share/demo/bad_indent/bad_indent.c share/demo/bad_init/bad_init.c share/demo/bad_label/bad_label.c share/demo/bad_line/bad_line.c share/demo/bad_macro/bad_macro.c share/demo/bad_return/bad_return.c share/demo/bitwise_expr/bitwise_expr.c share/demo/call_by_value/call_by_value.c share/demo/cross_ref/cross_ref.c share/demo/dangling_else/dangling_else.c share/demo/dead_code/dead_code.c share/demo/deep_nest/deep_nest.c share/demo/dense_switch/dense_switch.c share/demo/direct_recur/direct_recur.c share/demo/div_by_zero/div_by_zero.c share/demo/dos_source/dos_source.c share/demo/funptr_cast/funptr_cast.c share/demo/goto_stmt/goto_stmt.c share/demo/id_hiding/id_hiding.c share/demo/ill_defined/ill_defined.c share/demo/implicit_conv/implicit_conv.c share/demo/implicit_int/implicit_int.c share/demo/incomplete_ifelse/incomplete_ifelse.c share/demo/incomplete_type/incomplete_type.c share/demo/indirect_recur/indirect_recur_1.c share/demo/indirect_recur/indirect_recur_1.h share/demo/indirect_recur/indirect_recur_2.c share/demo/indirect_recur/indirect_recur_2.h share/demo/indirect_recur/indirect_recur_3.c share/demo/indirect_recur/indirect_recur_3.h share/demo/indirect_recur/indirect_recur_4.c share/demo/inline_asm/inline_asm.c share/demo/integer_promotion/integer_promotion.c share/demo/intro_demo/intro_demo.c share/demo/intro_demo/intro_demo.h share/demo/intro_demo/useless_header.h share/demo/invalid_call/invalid_call.c share/demo/kandr_fundef/kandr_fundef.c share/demo/line_comment/line_comment.c share/demo/local_decl/local_decl.c share/demo/logical_expr/logical_expr.c share/demo/logical_trick/logical_trick.c share/demo/long_sym/long_sym.c share/demo/loop_var/loop_var.c share/demo/malloc_or_die/malloc_or_die.c share/demo/may_be_null/may_be_null.c share/demo/may_be_null_arith/may_be_null_arith.c share/demo/may_be_unset/may_be_unset.c share/demo/mmapped_io/mmapped_io.c share/demo/multi_break/multi_break.c share/demo/multi_decl/multi_decl_1.c share/demo/multi_decl/multi_decl_1.h share/demo/multi_decl/multi_decl_2.c share/demo/multi_decl/multi_decl_2.h share/demo/multi_decl/multi_decl_3.c share/demo/multi_def/multi_def_1.c share/demo/multi_def/multi_def_1.h share/demo/multi_def/multi_def_2.c share/demo/multi_def/multi_def_2.h share/demo/multi_def/multi_def_3.c share/demo/multi_typedef/multi_typedef.c share/demo/multi_typedef/multi_typedef_1.h share/demo/multi_typedef/multi_typedef_2.h share/demo/must_be_false/must_be_false.c share/demo/must_be_null/must_be_null.c share/demo/must_be_null_arith/must_be_null_arith.c share/demo/must_be_true/must_be_true.c share/demo/no_eof_nl/no_eof_nl.c share/demo/no_void_arg/no_void_arg.c share/demo/null_stmt/null_stmt.c share/demo/octal_const/octal_const.c share/demo/output_by_param/output_by_param.c share/demo/overflow/overflow.c share/demo/press_release/press_release.c share/demo/redundant_select/redundant_select.c share/demo/register_vars/register_vars.c share/demo/reserved_ident/reserved_ident.c share/demo/retn_lvar_addr/retn_lvar_addr.c share/demo/sequence_point/sequence_point.c share/demo/shift_expr/shift_expr.c share/demo/should_be_typedef/should_be_typedef.c share/demo/static_paths/static_paths.c share/demo/static_vars/static_vars.c share/demo/tag_hiding/tag_hiding.c share/demo/tricky_incdec/tricky_incdec.c share/demo/typedef_each_src/typedef_each_src.c share/demo/undefined_macro/undefined_macro.c share/demo/uninit_vars/uninit_vars.c share/demo/union_type/union_type.c share/demo/unmatch_decl/unmatch_decl_1.c share/demo/unmatch_decl/unmatch_decl_1.h share/demo/unmatch_decl/unmatch_decl_2.c share/demo/unmatch_decl/unmatch_decl_2.h share/demo/unmatch_decl/unmatch_decl_3.c share/demo/unmatch_paren_macro/unmatch_paren_macro.c share/demo/unnamed_member/unnamed_member.c share/demo/unreachable/unreachable.c share/demo/useless_exp_funs/useless_exp_funs_1.c share/demo/useless_exp_funs/useless_exp_funs_1.h share/demo/useless_exp_funs/useless_exp_funs_2.c share/demo/useless_exp_vars/useless_export_1.c share/demo/useless_exp_vars/useless_export_1.h share/demo/useless_exp_vars/useless_export_2.c share/demo/useless_expr/useless_expr.c share/demo/useless_funs/useless_funs_1.c share/demo/useless_funs/useless_funs_1.h share/demo/useless_funs/useless_funs_2.c share/demo/useless_header/useless_header.c share/demo/useless_header/useless_header_1.h share/demo/useless_header/useless_header_2.h share/demo/useless_header/useless_header_3.h share/demo/useless_header/useless_header_4.h share/demo/useless_vars/useless_vars.c share/demo/va_funcall/va_funcall.c share/demo/various_fundef/various_fundef.c share/demo/wchar_wstring/wchar_wstring.c share/demo/wrap_around/wrap_around.c share/doc/Makefile share/doc/adlint_on_adqua.png share/doc/adlint_on_eclipse_en.png share/doc/adlint_on_eclipse_ja.png share/doc/adlint_on_vim_en.png share/doc/adlint_on_vim_ja.png share/doc/c99gram.dot share/doc/c99gram.pdf share/doc/developers_guide_ja.html share/doc/developers_guide_ja.texi share/doc/gen_mesg_sections.rb share/doc/samples/GNUmakefile share/doc/samples/adlint_traits.yml share/doc/texinfo.css share/doc/users_guide_en.html share/doc/users_guide_en.texi share/doc/users_guide_ja.html share/doc/users_guide_ja.texi share/logo/adlint-110.png share/logo/adlint-524.png share/logo/adlint.svg share/sample/README share/sample/bison-2.5/adlint/GNUmakefile share/sample/bison-2.5/adlint/adlint_traits.yml share/sample/bison-2.5/adlint/lib/GNUmakefile share/sample/bison-2.5/adlint/lib/adlint_cinit.h share/sample/bison-2.5/adlint/lib/adlint_pinit.h share/sample/bison-2.5/adlint/lib/adlint_traits.yml share/sample/bison-2.5/adlint/src/GNUmakefile share/sample/bison-2.5/adlint/src/adlint_cinit.h share/sample/bison-2.5/adlint/src/adlint_pinit.h share/sample/bison-2.5/adlint/src/adlint_traits.yml share/sample/ctags-5.8/adlint/GNUmakefile share/sample/ctags-5.8/adlint/adlint_cinit.h share/sample/ctags-5.8/adlint/adlint_pinit.h share/sample/ctags-5.8/adlint/adlint_traits.yml share/sample/flex-2.5.35/adlint/GNUmakefile share/sample/flex-2.5.35/adlint/adlint_cinit.h share/sample/flex-2.5.35/adlint/adlint_pinit.h share/sample/flex-2.5.35/adlint/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/core/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/core/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/core/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/enc-trans/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/enc/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/enc/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/enc/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-continuation/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-coverage/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-curses/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-date/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-dbm/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-digest/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-dl/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-etc/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-fiber/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-iconv/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-io-console/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-nkf/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-openssl/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-pathname/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-psych/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-pty/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-readline/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-ripper/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-socket/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-stringio/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-strscan/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-syck/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-syslog/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml share/sample/ruby-1.9.3-p0/adlint/ext-zlib/GNUmakefile share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_cinit.h share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_pinit.h share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml share/sample/screen-4.0.3/adlint/GNUmakefile share/sample/screen-4.0.3/adlint/adlint_cinit.h share/sample/screen-4.0.3/adlint/adlint_pinit.h share/sample/screen-4.0.3/adlint/adlint_traits.yml share/sample/vim-7.3/adlint/vim/GNUmakefile share/sample/vim-7.3/adlint/vim/adlint_cinit.h share/sample/vim-7.3/adlint/vim/adlint_pinit.h share/sample/vim-7.3/adlint/vim/adlint_traits.yml share/sample/vim-7.3/adlint/xxd/GNUmakefile share/sample/vim-7.3/adlint/xxd/adlint_cinit.h share/sample/vim-7.3/adlint/xxd/adlint_pinit.h share/sample/vim-7.3/adlint/xxd/adlint_traits.yml share/sample/zsh-4.3.15/adlint/GNUmakefile share/sample/zsh-4.3.15/adlint/adlint_traits.yml share/sample/zsh-4.3.15/adlint/builtins/GNUmakefile share/sample/zsh-4.3.15/adlint/builtins/adlint_cinit.h share/sample/zsh-4.3.15/adlint/builtins/adlint_pinit.h share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml share/sample/zsh-4.3.15/adlint/core/GNUmakefile share/sample/zsh-4.3.15/adlint/core/adlint_cinit.h share/sample/zsh-4.3.15/adlint/core/adlint_pinit.h share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml share/sample/zsh-4.3.15/adlint/modules/GNUmakefile share/sample/zsh-4.3.15/adlint/modules/adlint_cinit.h share/sample/zsh-4.3.15/adlint/modules/adlint_pinit.h share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml share/sample/zsh-4.3.15/adlint/zle/GNUmakefile share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml spec/adlint/cc1/ctrlexpr_spec.rb spec/adlint/cc1/domain_spec.rb spec/adlint/cc1/operator_spec.rb spec/adlint/cc1/syntax_spec.rb spec/adlint/cc1/type_spec.rb spec/adlint/location_spec.rb spec/conf.d/default_traits.yml spec/conf.d/empty_cinit.h spec/conf.d/empty_pinit.h spec/conf.d/project/foo.c spec/spec_helper.rb adlint-3.2.0/COPYING0000644000004100000410000010451312224440633014056 0ustar www-datawww-data GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . adlint-3.2.0/AUTHORS0000644000004100000410000000204612224440633014071 0ustar www-datawww-data-- ___ ____ __ ___ _________ / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer / /| | / / / / / / / |/ / / / AdLint - Advanced Lint / __ |/ /_/ / /___/ / /| / / / /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. This file is part of AdLint. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see . ++ * Yutaka Yanoh * Rie Shima adlint-3.2.0/share/0000755000004100000410000000000012224440633014121 5ustar www-datawww-dataadlint-3.2.0/share/sample/0000755000004100000410000000000012224440633015402 5ustar www-datawww-dataadlint-3.2.0/share/sample/README0000644000004100000410000000035212224440633016262 0ustar www-datawww-dataHere are samples showing how to make up analysis project of the large "real-world" software (that I love to use). To actually run analyses, you need to... 1) download the target software 2) run "./configure && make" on Fedora 14 adlint-3.2.0/share/sample/ctags-5.8/0000755000004100000410000000000012224440633017013 5ustar www-datawww-dataadlint-3.2.0/share/sample/ctags-5.8/adlint/0000755000004100000410000000000012224440633020266 5ustar www-datawww-dataadlint-3.2.0/share/sample/ctags-5.8/adlint/adlint_cinit.h0000644000004100000410000001773512224440633023115 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_start(a, b) (0) #define __builtin_va_end(a) (0) #define __builtin_va_arg(ar, t) (0) #define __builtin_va_copy(d, s) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ctags-5.8/adlint/adlint_traits.yml0000644000004100000410000002021012224440633023645 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ctags-5.8" # Project root directory. project_root: "../ctags-5.8" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../ctags-5.8" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../ctags-5.8" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ctags-5.8/adlint/GNUmakefile0000644000004100000410000001136012224440633022341 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ctags-5.8 SOURCES = \ ctags-5.8/args.c \ ctags-5.8/ant.c \ ctags-5.8/asm.c \ ctags-5.8/asp.c \ ctags-5.8/awk.c \ ctags-5.8/basic.c \ ctags-5.8/beta.c \ ctags-5.8/c.c \ ctags-5.8/cobol.c \ ctags-5.8/dosbatch.c \ ctags-5.8/eiffel.c \ ctags-5.8/entry.c \ ctags-5.8/erlang.c \ ctags-5.8/flex.c \ ctags-5.8/fortran.c \ ctags-5.8/get.c \ ctags-5.8/html.c \ ctags-5.8/jscript.c \ ctags-5.8/keyword.c \ ctags-5.8/lisp.c \ ctags-5.8/lregex.c \ ctags-5.8/lua.c \ ctags-5.8/main.c \ ctags-5.8/make.c \ ctags-5.8/matlab.c \ ctags-5.8/ocaml.c \ ctags-5.8/options.c \ ctags-5.8/parse.c \ ctags-5.8/pascal.c \ ctags-5.8/perl.c \ ctags-5.8/php.c \ ctags-5.8/python.c \ ctags-5.8/read.c \ ctags-5.8/rexx.c \ ctags-5.8/routines.c \ ctags-5.8/ruby.c \ ctags-5.8/scheme.c \ ctags-5.8/sh.c \ ctags-5.8/slang.c \ ctags-5.8/sml.c \ ctags-5.8/sort.c \ ctags-5.8/sql.c \ ctags-5.8/strlist.c \ ctags-5.8/tcl.c \ ctags-5.8/tex.c \ ctags-5.8/verilog.c \ ctags-5.8/vhdl.c \ ctags-5.8/vim.c \ ctags-5.8/yacc.c \ ctags-5.8/vstring.c \ ctags-5.8/readtags.c VPATH = .. VPATH_COMPONENTS = 1 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ctags-5.8/adlint/adlint_pinit.h0000644000004100000410000000176312224440633023124 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define HAVE_CONFIG_H adlint-3.2.0/share/sample/ruby-1.9.3-p0/0000755000004100000410000000000012224440633017346 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/0000755000004100000410000000000012224440633020621 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/0000755000004100000410000000000012224440633022357 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_cinit.h0000644000004100000410000001756412224440633025206 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml0000644000004100000410000002043412224440633025746 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/zlib" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/GNUmakefile0000644000004100000410000000730612224440633024437 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/zlib/zlib.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_pinit.h0000644000004100000410000000203512224440633025206 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/0000755000004100000410000000000012224440633022770 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_cinit.h0000644000004100000410000001756412224440633025617 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml0000644000004100000410000002043712224440633026362 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/io/wait" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/GNUmakefile0000644000004100000410000000731112224440633025044 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/io/wait/wait.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_pinit.h0000644000004100000410000000203512224440633025617 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/0000755000004100000410000000000012224440633024335 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_cinit.h0000644000004100000410000001756412224440633027164 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml0000644000004100000410000002044612224440633027727 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/mathn/rational" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/GNUmakefile0000644000004100000410000000732412224440633026415 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/mathn/rational/rational.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_pinit.h0000644000004100000410000000203512224440633027164 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/0000755000004100000410000000000012224440633022737 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_cinit.h0000644000004100000410000001756412224440633025566 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml0000644000004100000410000002043612224440633026330 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/syslog" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/GNUmakefile0000644000004100000410000000731212224440633025014 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/syslog/syslog.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_pinit.h0000644000004100000410000000203512224440633025566 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/0000755000004100000410000000000012224440633022330 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_cinit.h0000644000004100000410000001756412224440633025157 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml0000644000004100000410000002043412224440633025717 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/gdbm" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/GNUmakefile0000644000004100000410000000730612224440633024410 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/gdbm/gdbm.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_pinit.h0000644000004100000410000000203512224440633025157 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl/0000755000004100000410000000000012224440633022016 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_cinit.h0000644000004100000410000001756412224440633024645 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml0000644000004100000410000002043212224440633025403 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/dl" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl/GNUmakefile0000644000004100000410000000744512224440633024102 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/dl/dl.c \ ruby-1.9.3-p0/ext/dl/cptr.c \ ruby-1.9.3-p0/ext/dl/cfunc.c \ ruby-1.9.3-p0/ext/dl/handle.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_pinit.h0000644000004100000410000000203512224440633024645 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/0000755000004100000410000000000012224440633024173 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_cinit.h0000644000004100000410000001756412224440633027022 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml0000644000004100000410000002044512224440633027564 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/mathn/complex" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/GNUmakefile0000644000004100000410000000732212224440633026251 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/mathn/complex/complex.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_pinit.h0000644000004100000410000000203512224440633027022 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/0000755000004100000410000000000012224440633023662 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_cinit.h0000644000004100000410000001756412224440633026511 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml0000644000004100000410000002044312224440633027251 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/json/parser" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/GNUmakefile0000644000004100000410000000731712224440633025744 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/json/parser/parser.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_pinit.h0000644000004100000410000000203512224440633026511 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/0000755000004100000410000000000012224440633023550 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_cinit.h0000644000004100000410000001756412224440633026377 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml0000644000004100000410000002050612224440633027137 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/dl/callback" - "../../ruby-1.9.3-p0/ext/dl" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/GNUmakefile0000644000004100000410000001017012224440633025621 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/dl/callback/callback.c \ ruby-1.9.3-p0/ext/dl/callback/callback-0.c \ ruby-1.9.3-p0/ext/dl/callback/callback-1.c \ ruby-1.9.3-p0/ext/dl/callback/callback-2.c \ ruby-1.9.3-p0/ext/dl/callback/callback-3.c \ ruby-1.9.3-p0/ext/dl/callback/callback-4.c \ ruby-1.9.3-p0/ext/dl/callback/callback-5.c \ ruby-1.9.3-p0/ext/dl/callback/callback-6.c \ ruby-1.9.3-p0/ext/dl/callback/callback-7.c \ ruby-1.9.3-p0/ext/dl/callback/callback-8.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_pinit.h0000644000004100000410000000203512224440633026377 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/0000755000004100000410000000000012224440633023477 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_cinit.h0000644000004100000410000001756412224440633026326 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml0000644000004100000410000002044212224440633027065 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/bigdecimal" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/GNUmakefile0000644000004100000410000000732212224440633025555 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/bigdecimal/bigdecimal.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_pinit.h0000644000004100000410000000203512224440633026326 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml0000644000004100000410000001733612224440633024217 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/0000755000004100000410000000000012224440633022506 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_cinit.h0000644000004100000410000001756412224440633025335 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml0000644000004100000410000002043512224440633026076 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/fiber" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/GNUmakefile0000644000004100000410000000731012224440633024561 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/fiber/fiber.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_pinit.h0000644000004100000410000000203512224440633025335 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/0000755000004100000410000000000012224440633023530 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_cinit.h0000644000004100000410000001756412224440633026357 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml0000644000004100000410000002051212224440633027114 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/digest/sha1" - "../../ruby-1.9.3-p0/ext/digest" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/GNUmakefile0000644000004100000410000000737612224440633025617 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/digest/sha1/sha1init.c \ ruby-1.9.3-p0/ext/digest/sha1/sha1ossl.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_pinit.h0000644000004100000410000000203512224440633026357 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syck/0000755000004100000410000000000012224440633022370 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_cinit.h0000644000004100000410000001756412224440633025217 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml0000644000004100000410000002043412224440633025757 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/syck" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syck/GNUmakefile0000644000004100000410000001001712224440633024441 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/syck/gram.c \ ruby-1.9.3-p0/ext/syck/handler.c \ ruby-1.9.3-p0/ext/syck/implicit.c \ ruby-1.9.3-p0/ext/syck/node.c \ ruby-1.9.3-p0/ext/syck/token.c \ ruby-1.9.3-p0/ext/syck/yaml2byte.c \ ruby-1.9.3-p0/ext/syck/emitter.c \ ruby-1.9.3-p0/ext/syck/bytecode.c \ ruby-1.9.3-p0/ext/syck/syck.c \ ruby-1.9.3-p0/ext/syck/rubyext.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_pinit.h0000644000004100000410000000203512224440633025217 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/0000755000004100000410000000000012224440633022161 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_cinit.h0000644000004100000410000001756412224440633025010 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml0000644000004100000410000002043312224440633025547 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/dbm" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/GNUmakefile0000644000004100000410000000730412224440633024237 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/dbm/dbm.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_pinit.h0000644000004100000410000000203512224440633025010 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/0000755000004100000410000000000012224440633023531 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_cinit.h0000644000004100000410000001756412224440633026360 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml0000644000004100000410000002051212224440633027115 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/digest/sha2" - "../../ruby-1.9.3-p0/ext/digest" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/GNUmakefile0000644000004100000410000000737612224440633025620 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/digest/sha2/sha2init.c \ ruby-1.9.3-p0/ext/digest/sha2/sha2ossl.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_pinit.h0000644000004100000410000000203512224440633026360 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc-trans/0000755000004100000410000000000012224440633022513 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_cinit.h0000644000004100000410000001756412224440633025342 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml0000644000004100000410000002036712224440633026107 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc-trans/GNUmakefile0000644000004100000410000001064712224440633024575 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/enc/trans/transdb.c \ ruby-1.9.3-p0/enc/trans/big5.c \ ruby-1.9.3-p0/enc/trans/chinese.c \ ruby-1.9.3-p0/enc/trans/emoji.c \ ruby-1.9.3-p0/enc/trans/emoji_iso2022_kddi.c \ ruby-1.9.3-p0/enc/trans/emoji_sjis_docomo.c \ ruby-1.9.3-p0/enc/trans/emoji_sjis_kddi.c \ ruby-1.9.3-p0/enc/trans/emoji_sjis_softbank.c \ ruby-1.9.3-p0/enc/trans/escape.c \ ruby-1.9.3-p0/enc/trans/gb18030.c \ ruby-1.9.3-p0/enc/trans/gbk.c \ ruby-1.9.3-p0/enc/trans/iso2022.c \ ruby-1.9.3-p0/enc/trans/japanese.c \ ruby-1.9.3-p0/enc/trans/japanese_euc.c \ ruby-1.9.3-p0/enc/trans/japanese_sjis.c \ ruby-1.9.3-p0/enc/trans/korean.c \ ruby-1.9.3-p0/enc/trans/single_byte.c \ ruby-1.9.3-p0/enc/trans/utf8_mac.c \ ruby-1.9.3-p0/enc/trans/utf_16_32.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_pinit.h0000644000004100000410000000204412224440633025342 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define _FILE_OFFSET_BITS 64 #define ONIG_ENC_REGISTER rb_enc_register adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/0000755000004100000410000000000012224440633023602 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_cinit.h0000644000004100000410000001756412224440633026431 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml0000644000004100000410000002044312224440633027171 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/racc/cparse" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/GNUmakefile0000644000004100000410000000731712224440633025664 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/racc/cparse/cparse.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_pinit.h0000644000004100000410000000203512224440633026431 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/core/0000755000004100000410000000000012224440633021551 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/core/adlint_cinit.h0000644000004100000410000001756412224440633024400 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml0000644000004100000410000002037012224440633025137 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0/" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/core/GNUmakefile0000644000004100000410000001322712224440633023630 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/main.c \ ruby-1.9.3-p0/dmydln.c \ ruby-1.9.3-p0/dmyencoding.c \ ruby-1.9.3-p0/version.c \ ruby-1.9.3-p0/dmyversion.c \ ruby-1.9.3-p0/miniprelude.c \ ruby-1.9.3-p0/array.c \ ruby-1.9.3-p0/bignum.c \ ruby-1.9.3-p0/class.c \ ruby-1.9.3-p0/compar.c \ ruby-1.9.3-p0/complex.c \ ruby-1.9.3-p0/dir.c \ ruby-1.9.3-p0/dln_find.c \ ruby-1.9.3-p0/enum.c \ ruby-1.9.3-p0/enumerator.c \ ruby-1.9.3-p0/error.c \ ruby-1.9.3-p0/eval.c \ ruby-1.9.3-p0/load.c \ ruby-1.9.3-p0/proc.c \ ruby-1.9.3-p0/file.c \ ruby-1.9.3-p0/gc.c \ ruby-1.9.3-p0/hash.c \ ruby-1.9.3-p0/inits.c \ ruby-1.9.3-p0/io.c \ ruby-1.9.3-p0/marshal.c \ ruby-1.9.3-p0/math.c \ ruby-1.9.3-p0/node.c \ ruby-1.9.3-p0/numeric.c \ ruby-1.9.3-p0/object.c \ ruby-1.9.3-p0/pack.c \ ruby-1.9.3-p0/parse.c \ ruby-1.9.3-p0/process.c \ ruby-1.9.3-p0/random.c \ ruby-1.9.3-p0/range.c \ ruby-1.9.3-p0/rational.c \ ruby-1.9.3-p0/re.c \ ruby-1.9.3-p0/regcomp.c \ ruby-1.9.3-p0/regenc.c \ ruby-1.9.3-p0/regerror.c \ ruby-1.9.3-p0/regexec.c \ ruby-1.9.3-p0/regparse.c \ ruby-1.9.3-p0/regsyntax.c \ ruby-1.9.3-p0/ruby.c \ ruby-1.9.3-p0/safe.c \ ruby-1.9.3-p0/signal.c \ ruby-1.9.3-p0/sprintf.c \ ruby-1.9.3-p0/st.c \ ruby-1.9.3-p0/strftime.c \ ruby-1.9.3-p0/string.c \ ruby-1.9.3-p0/struct.c \ ruby-1.9.3-p0/time.c \ ruby-1.9.3-p0/transcode.c \ ruby-1.9.3-p0/util.c \ ruby-1.9.3-p0/variable.c \ ruby-1.9.3-p0/compile.c \ ruby-1.9.3-p0/debug.c \ ruby-1.9.3-p0/iseq.c \ ruby-1.9.3-p0/vm.c \ ruby-1.9.3-p0/vm_dump.c \ ruby-1.9.3-p0/thread.c \ ruby-1.9.3-p0/cont.c \ ruby-1.9.3-p0/enc/ascii.c \ ruby-1.9.3-p0/enc/us_ascii.c \ ruby-1.9.3-p0/enc/unicode.c \ ruby-1.9.3-p0/enc/utf_8.c \ ruby-1.9.3-p0/newline.c \ ruby-1.9.3-p0/missing/strlcpy.c \ ruby-1.9.3-p0/missing/strlcat.c \ ruby-1.9.3-p0/missing/setproctitle.c \ ruby-1.9.3-p0/addr2line.c \ ruby-1.9.3-p0/dmyext.c \ ruby-1.9.3-p0/dln.c \ ruby-1.9.3-p0/encoding.c \ ruby-1.9.3-p0/prelude.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/core/adlint_pinit.h0000644000004100000410000000215412224440633024402 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #include #include #define RUBY_EXPORT #define ONIG_ENC_REGISTER rb_enc_register #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/0000755000004100000410000000000012224440633022175 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_cinit.h0000644000004100000410000001756412224440633025024 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml0000644000004100000410000002043312224440633025563 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/nkf" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/GNUmakefile0000644000004100000410000000730412224440633024253 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/nkf/nkf.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_pinit.h0000644000004100000410000000203512224440633025024 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/0000755000004100000410000000000012224440633023705 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_cinit.h0000644000004100000410000001756412224440633026534 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml0000644000004100000410000002051412224440633027273 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/digest/rmd160" - "../../ruby-1.9.3-p0/ext/digest" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/GNUmakefile0000644000004100000410000000740612224440633025766 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/digest/rmd160/rmd160init.c \ ruby-1.9.3-p0/ext/digest/rmd160/rmd160ossl.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_pinit.h0000644000004100000410000000203512224440633026534 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-psych/0000755000004100000410000000000012224440633022545 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_cinit.h0000644000004100000410000001756412224440633025374 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml0000644000004100000410000002043512224440633026135 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/psych" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-psych/GNUmakefile0000644000004100000410000000754112224440633024626 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/psych/psych.c \ ruby-1.9.3-p0/ext/psych/yaml_tree.c \ ruby-1.9.3-p0/ext/psych/parser.c \ ruby-1.9.3-p0/ext/psych/emitter.c \ ruby-1.9.3-p0/ext/psych/to_ruby.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_pinit.h0000644000004100000410000000203512224440633025374 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-socket/0000755000004100000410000000000012224440633022707 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_cinit.h0000644000004100000410000001756412224440633025536 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml0000644000004100000410000002043612224440633026300 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/socket" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-socket/GNUmakefile0000644000004100000410000001033212224440633024760 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/socket/init.c \ ruby-1.9.3-p0/ext/socket/constants.c \ ruby-1.9.3-p0/ext/socket/basicsocket.c \ ruby-1.9.3-p0/ext/socket/socket.c \ ruby-1.9.3-p0/ext/socket/ipsocket.c \ ruby-1.9.3-p0/ext/socket/tcpsocket.c \ ruby-1.9.3-p0/ext/socket/tcpserver.c \ ruby-1.9.3-p0/ext/socket/sockssocket.c \ ruby-1.9.3-p0/ext/socket/udpsocket.c \ ruby-1.9.3-p0/ext/socket/unixsocket.c \ ruby-1.9.3-p0/ext/socket/unixserver.c \ ruby-1.9.3-p0/ext/socket/option.c \ ruby-1.9.3-p0/ext/socket/ancdata.c \ ruby-1.9.3-p0/ext/socket/raddrinfo.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_pinit.h0000644000004100000410000000203512224440633025536 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/0000755000004100000410000000000012224440633024354 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_cinit.h0000644000004100000410000001756412224440633027203 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml0000644000004100000410000002044612224440633027746 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/json/generator" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/GNUmakefile0000644000004100000410000000732512224440633026435 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/json/generator/generator.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_pinit.h0000644000004100000410000000203512224440633027203 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/0000755000004100000410000000000012224440633023466 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_cinit.h0000644000004100000410000001756412224440633026315 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml0000644000004100000410000002044212224440633027054 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/io/console" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/GNUmakefile0000644000004100000410000000731712224440633025550 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/io/console/console.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_pinit.h0000644000004100000410000000203512224440633026315 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/GNUmakefile0000644000004100000410000003604212224440633022700 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to analyze whole project with compiler like messages # % make all # - to analyze whole project with progress report # % make verbose-all # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . SMA_MET_FILES = \ core/ruby-1.9.3-p0/main.c.met.csv \ core/ruby-1.9.3-p0/dmydln.c.met.csv \ core/ruby-1.9.3-p0/dmyencoding.c.met.csv \ core/ruby-1.9.3-p0/version.c.met.csv \ core/ruby-1.9.3-p0/dmyversion.c.met.csv \ core/ruby-1.9.3-p0/miniprelude.c.met.csv \ core/ruby-1.9.3-p0/array.c.met.csv \ core/ruby-1.9.3-p0/bignum.c.met.csv \ core/ruby-1.9.3-p0/class.c.met.csv \ core/ruby-1.9.3-p0/compar.c.met.csv \ core/ruby-1.9.3-p0/complex.c.met.csv \ core/ruby-1.9.3-p0/dir.c.met.csv \ core/ruby-1.9.3-p0/dln_find.c.met.csv \ core/ruby-1.9.3-p0/enum.c.met.csv \ core/ruby-1.9.3-p0/enumerator.c.met.csv \ core/ruby-1.9.3-p0/error.c.met.csv \ core/ruby-1.9.3-p0/eval.c.met.csv \ core/ruby-1.9.3-p0/load.c.met.csv \ core/ruby-1.9.3-p0/proc.c.met.csv \ core/ruby-1.9.3-p0/file.c.met.csv \ core/ruby-1.9.3-p0/gc.c.met.csv \ core/ruby-1.9.3-p0/hash.c.met.csv \ core/ruby-1.9.3-p0/inits.c.met.csv \ core/ruby-1.9.3-p0/io.c.met.csv \ core/ruby-1.9.3-p0/marshal.c.met.csv \ core/ruby-1.9.3-p0/math.c.met.csv \ core/ruby-1.9.3-p0/node.c.met.csv \ core/ruby-1.9.3-p0/numeric.c.met.csv \ core/ruby-1.9.3-p0/object.c.met.csv \ core/ruby-1.9.3-p0/pack.c.met.csv \ core/ruby-1.9.3-p0/parse.c.met.csv \ core/ruby-1.9.3-p0/process.c.met.csv \ core/ruby-1.9.3-p0/random.c.met.csv \ core/ruby-1.9.3-p0/range.c.met.csv \ core/ruby-1.9.3-p0/rational.c.met.csv \ core/ruby-1.9.3-p0/re.c.met.csv \ core/ruby-1.9.3-p0/regcomp.c.met.csv \ core/ruby-1.9.3-p0/regenc.c.met.csv \ core/ruby-1.9.3-p0/regerror.c.met.csv \ core/ruby-1.9.3-p0/regexec.c.met.csv \ core/ruby-1.9.3-p0/regparse.c.met.csv \ core/ruby-1.9.3-p0/regsyntax.c.met.csv \ core/ruby-1.9.3-p0/ruby.c.met.csv \ core/ruby-1.9.3-p0/safe.c.met.csv \ core/ruby-1.9.3-p0/signal.c.met.csv \ core/ruby-1.9.3-p0/sprintf.c.met.csv \ core/ruby-1.9.3-p0/st.c.met.csv \ core/ruby-1.9.3-p0/strftime.c.met.csv \ core/ruby-1.9.3-p0/string.c.met.csv \ core/ruby-1.9.3-p0/struct.c.met.csv \ core/ruby-1.9.3-p0/time.c.met.csv \ core/ruby-1.9.3-p0/transcode.c.met.csv \ core/ruby-1.9.3-p0/util.c.met.csv \ core/ruby-1.9.3-p0/variable.c.met.csv \ core/ruby-1.9.3-p0/compile.c.met.csv \ core/ruby-1.9.3-p0/debug.c.met.csv \ core/ruby-1.9.3-p0/iseq.c.met.csv \ core/ruby-1.9.3-p0/vm.c.met.csv \ core/ruby-1.9.3-p0/vm_dump.c.met.csv \ core/ruby-1.9.3-p0/thread.c.met.csv \ core/ruby-1.9.3-p0/cont.c.met.csv \ core/ruby-1.9.3-p0/enc/ascii.c.met.csv \ core/ruby-1.9.3-p0/enc/us_ascii.c.met.csv \ core/ruby-1.9.3-p0/enc/unicode.c.met.csv \ core/ruby-1.9.3-p0/enc/utf_8.c.met.csv \ core/ruby-1.9.3-p0/newline.c.met.csv \ core/ruby-1.9.3-p0/missing/strlcpy.c.met.csv \ core/ruby-1.9.3-p0/missing/strlcat.c.met.csv \ core/ruby-1.9.3-p0/missing/setproctitle.c.met.csv \ core/ruby-1.9.3-p0/addr2line.c.met.csv \ core/ruby-1.9.3-p0/dmyext.c.met.csv \ core/ruby-1.9.3-p0/dln.c.met.csv \ core/ruby-1.9.3-p0/encoding.c.met.csv \ core/ruby-1.9.3-p0/prelude.c.met.csv \ enc/ruby-1.9.3-p0/enc/encdb.c.met.csv \ enc/ruby-1.9.3-p0/enc/big5.c.met.csv \ enc/ruby-1.9.3-p0/enc/cp949.c.met.csv \ enc/ruby-1.9.3-p0/enc/emacs_mule.c.met.csv \ enc/ruby-1.9.3-p0/enc/euc_jp.c.met.csv \ enc/ruby-1.9.3-p0/enc/euc_kr.c.met.csv \ enc/ruby-1.9.3-p0/enc/euc_tw.c.met.csv \ enc/ruby-1.9.3-p0/enc/gb2312.c.met.csv \ enc/ruby-1.9.3-p0/enc/gb18030.c.met.csv \ enc/ruby-1.9.3-p0/enc/gbk.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_1.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_2.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_3.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_4.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_5.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_6.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_7.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_8.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_9.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_10.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_11.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_13.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_14.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_15.c.met.csv \ enc/ruby-1.9.3-p0/enc/iso_8859_16.c.met.csv \ enc/ruby-1.9.3-p0/enc/koi8_r.c.met.csv \ enc/ruby-1.9.3-p0/enc/koi8_u.c.met.csv \ enc/ruby-1.9.3-p0/enc/shift_jis.c.met.csv \ enc/ruby-1.9.3-p0/enc/utf_16be.c.met.csv \ enc/ruby-1.9.3-p0/enc/utf_16le.c.met.csv \ enc/ruby-1.9.3-p0/enc/utf_32be.c.met.csv \ enc/ruby-1.9.3-p0/enc/utf_32le.c.met.csv \ enc/ruby-1.9.3-p0/enc/windows_1251.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/transdb.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/big5.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/chinese.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/emoji.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/emoji_iso2022_kddi.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/emoji_sjis_docomo.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/emoji_sjis_kddi.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/emoji_sjis_softbank.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/escape.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/gb18030.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/gbk.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/iso2022.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/japanese.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/japanese_euc.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/japanese_sjis.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/korean.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/single_byte.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/utf8_mac.c.met.csv \ enc-trans/ruby-1.9.3-p0/enc/trans/utf_16_32.c.met.csv \ ext-bigdecimal/ruby-1.9.3-p0/ext/bigdecimal/bigdecimal.c.met.csv \ ext-continuation/ruby-1.9.3-p0/ext/continuation/continuation.c.met.csv \ ext-coverage/ruby-1.9.3-p0/ext/coverage/coverage.c.met.csv \ ext-curses/ruby-1.9.3-p0/ext/curses/curses.c.met.csv \ ext-date/ruby-1.9.3-p0/ext/date/date_strptime.c.met.csv \ ext-date/ruby-1.9.3-p0/ext/date/date_strftime.c.met.csv \ ext-date/ruby-1.9.3-p0/ext/date/date_core.c.met.csv \ ext-date/ruby-1.9.3-p0/ext/date/date_parse.c.met.csv \ ext-dbm/ruby-1.9.3-p0/ext/dbm/dbm.c.met.csv \ ext-digest/ruby-1.9.3-p0/ext/digest/digest.c.met.csv \ ext-digest-bubblebabble/ruby-1.9.3-p0/ext/digest/bubblebabble/bubblebabble.c.met.csv \ ext-digest-md5/ruby-1.9.3-p0/ext/digest/md5/md5init.c.met.csv \ ext-digest-md5/ruby-1.9.3-p0/ext/digest/md5/md5ossl.c.met.csv \ ext-digest-rmd160/ruby-1.9.3-p0/ext/digest/rmd160/rmd160init.c.met.csv \ ext-digest-rmd160/ruby-1.9.3-p0/ext/digest/rmd160/rmd160ossl.c.met.csv \ ext-digest-sha1/ruby-1.9.3-p0/ext/digest/sha1/sha1init.c.met.csv \ ext-digest-sha1/ruby-1.9.3-p0/ext/digest/sha1/sha1ossl.c.met.csv \ ext-digest-sha2/ruby-1.9.3-p0/ext/digest/sha2/sha2init.c.met.csv \ ext-digest-sha2/ruby-1.9.3-p0/ext/digest/sha2/sha2ossl.c.met.csv \ ext-dl/ruby-1.9.3-p0/ext/dl/dl.c.met.csv \ ext-dl/ruby-1.9.3-p0/ext/dl/cptr.c.met.csv \ ext-dl/ruby-1.9.3-p0/ext/dl/cfunc.c.met.csv \ ext-dl/ruby-1.9.3-p0/ext/dl/handle.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-0.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-1.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-2.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-3.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-4.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-5.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-6.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-7.c.met.csv \ ext-dl-callback/ruby-1.9.3-p0/ext/dl/callback/callback-8.c.met.csv \ ext-etc/ruby-1.9.3-p0/ext/etc/etc.c.met.csv \ ext-fcntl/ruby-1.9.3-p0/ext/fcntl/fcntl.c.met.csv \ ext-fiber/ruby-1.9.3-p0/ext/fiber/fiber.c.met.csv \ ext-fiddle/ruby-1.9.3-p0/ext/fiddle/closure.c.met.csv \ ext-fiddle/ruby-1.9.3-p0/ext/fiddle/function.c.met.csv \ ext-fiddle/ruby-1.9.3-p0/ext/fiddle/conversions.c.met.csv \ ext-fiddle/ruby-1.9.3-p0/ext/fiddle/fiddle.c.met.csv \ ext-gdbm/ruby-1.9.3-p0/ext/gdbm/gdbm.c.met.csv \ ext-iconv/ruby-1.9.3-p0/ext/iconv/iconv.c.met.csv \ ext-io-console/ruby-1.9.3-p0/ext/io/console/console.c.met.csv \ ext-io-nonblock/ruby-1.9.3-p0/ext/io/nonblock/nonblock.c.met.csv \ ext-io-wait/ruby-1.9.3-p0/ext/io/wait/wait.c.met.csv \ ext-json-generator/ruby-1.9.3-p0/ext/json/generator/generator.c.met.csv \ ext-json-parser/ruby-1.9.3-p0/ext/json/parser/parser.c.met.csv \ ext-mathn-complex/ruby-1.9.3-p0/ext/mathn/complex/complex.c.met.csv \ ext-mathn-rational/ruby-1.9.3-p0/ext/mathn/rational/rational.c.met.csv \ ext-nkf/ruby-1.9.3-p0/ext/nkf/nkf.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_rand.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_ocsp.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkey_dh.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509revoked.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/openssl_missing.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkcs12.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkey_ec.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509name.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_ns_spki.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_ssl_session.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkey_rsa.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkcs7.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_ssl.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_hmac.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_bio.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkcs5.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509req.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509store.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509cert.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_cipher.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_digest.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_config.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_bn.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509attr.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509crl.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_x509ext.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_asn1.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_engine.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkey_dsa.c.met.csv \ ext-openssl/ruby-1.9.3-p0/ext/openssl/ossl_pkey.c.met.csv \ ext-pathname/ruby-1.9.3-p0/ext/pathname/pathname.c.met.csv \ ext-psych/ruby-1.9.3-p0/ext/psych/psych.c.met.csv \ ext-psych/ruby-1.9.3-p0/ext/psych/yaml_tree.c.met.csv \ ext-psych/ruby-1.9.3-p0/ext/psych/parser.c.met.csv \ ext-psych/ruby-1.9.3-p0/ext/psych/emitter.c.met.csv \ ext-psych/ruby-1.9.3-p0/ext/psych/to_ruby.c.met.csv \ ext-pty/ruby-1.9.3-p0/ext/pty/pty.c.met.csv \ ext-racc-cparse/ruby-1.9.3-p0/ext/racc/cparse/cparse.c.met.csv \ ext-readline/ruby-1.9.3-p0/ext/readline/readline.c.met.csv \ ext-ripper/ruby-1.9.3-p0/ext/ripper/ripper.c.met.csv \ ext-sdbm/ruby-1.9.3-p0/ext/sdbm/init.c.met.csv \ ext-sdbm/ruby-1.9.3-p0/ext/sdbm/_sdbm.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/init.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/constants.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/basicsocket.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/socket.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/ipsocket.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/tcpsocket.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/tcpserver.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/sockssocket.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/udpsocket.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/unixsocket.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/unixserver.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/option.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/ancdata.c.met.csv \ ext-socket/ruby-1.9.3-p0/ext/socket/raddrinfo.c.met.csv \ ext-stringio/ruby-1.9.3-p0/ext/stringio/stringio.c.met.csv \ ext-strscan/ruby-1.9.3-p0/ext/strscan/strscan.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/gram.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/handler.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/implicit.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/node.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/token.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/yaml2byte.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/emitter.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/bytecode.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/syck.c.met.csv \ ext-syck/ruby-1.9.3-p0/ext/syck/rubyext.c.met.csv \ ext-syslog/ruby-1.9.3-p0/ext/syslog/syslog.c.met.csv \ ext-zlib/ruby-1.9.3-p0/ext/zlib/zlib.c.met.csv %.c.met.csv : @$(MAKE) -C `echo $@ | sed 's/\/.*$$//'` `echo $@ | sed 's/^[^/]\+\///'` CMA_MSG_FILE = ruby-1.9.3-p0.msg.csv CMA_MET_FILE = ruby-1.9.3-p0.met.csv CMA_LOG_FILE = ruby-1.9.3-p0.log .PHONY: all all : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $(SMA_MET_FILES) .PHONY: verbose-all verbose-all : @for f in $(SMA_MET_FILES); do \ dir=`echo $$f | sed 's/\/.*$$//'`; \ if [ "$$last_dir" != "$$dir" ]; then $(MAKE) -C $$dir verbose-sma-only; fi; \ last_dir=$$dir; \ done $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $(SMA_MET_FILES) .PHONY: clean clean : @for f in $(SMA_MET_FILES); do \ dir=`echo $$f | sed 's/\/.*$$//'`; \ if [ "$$last_dir" != "$$dir" ]; then $(MAKE) -C $$dir clean; fi; \ last_dir=$$dir; \ done @$(RM) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/0000755000004100000410000000000012224440633022646 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_cinit.h0000644000004100000410000001756412224440633025475 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml0000644000004100000410000002050412224440633026233 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/fiddle" - "/usr/lib/libffi-3.0.9/include" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/GNUmakefile0000644000004100000410000000750412224440633024726 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/fiddle/closure.c \ ruby-1.9.3-p0/ext/fiddle/function.c \ ruby-1.9.3-p0/ext/fiddle/conversions.c \ ruby-1.9.3-p0/ext/fiddle/fiddle.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_pinit.h0000644000004100000410000000203512224440633025475 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/0000755000004100000410000000000012224440633022525 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_cinit.h0000644000004100000410000001756412224440633025354 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml0000644000004100000410000002043512224440633026115 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/fcntl" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/GNUmakefile0000644000004100000410000000731012224440633024600 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/fcntl/fcntl.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_pinit.h0000644000004100000410000000203512224440633025354 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/0000755000004100000410000000000012224440633023255 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_cinit.h0000644000004100000410000001756412224440633026104 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml0000644000004100000410000002044012224440633026641 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/stringio" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/GNUmakefile0000644000004100000410000000731612224440633025336 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/stringio/stringio.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_pinit.h0000644000004100000410000000203512224440633026104 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/0000755000004100000410000000000012224440633023361 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_cinit.h0000644000004100000410000001756412224440633026210 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml0000644000004100000410000002051112224440633026744 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/digest/md5" - "../../ruby-1.9.3-p0/ext/digest" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/GNUmakefile0000644000004100000410000000737212224440633025444 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/digest/md5/md5init.c \ ruby-1.9.3-p0/ext/digest/md5/md5ossl.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_pinit.h0000644000004100000410000000203512224440633026210 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-etc/0000755000004100000410000000000012224440633022172 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_cinit.h0000644000004100000410000001756412224440633025021 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml0000644000004100000410000002043312224440633025560 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/etc" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-etc/GNUmakefile0000644000004100000410000000730412224440633024250 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/etc/etc.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_pinit.h0000644000004100000410000000203512224440633025021 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-curses/0000755000004100000410000000000012224440633022723 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_cinit.h0000644000004100000410000001756412224440633025552 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml0000644000004100000410000002043612224440633026314 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/curses" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-curses/GNUmakefile0000644000004100000410000000731212224440633025000 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/curses/curses.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_pinit.h0000644000004100000410000000203512224440633025552 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest/0000755000004100000410000000000012224440633022676 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_cinit.h0000644000004100000410000001756412224440633025525 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml0000644000004100000410000002043612224440633026267 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/digest" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest/GNUmakefile0000644000004100000410000000731212224440633024753 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/digest/digest.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_pinit.h0000644000004100000410000000203512224440633025525 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/0000755000004100000410000000000012224440633022344 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_cinit.h0000644000004100000410000001756412224440633025173 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml0000644000004100000410000002043412224440633025733 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/sdbm" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/GNUmakefile0000644000004100000410000000735112224440633024424 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/sdbm/init.c \ ruby-1.9.3-p0/ext/sdbm/_sdbm.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_pinit.h0000644000004100000410000000203512224440633025173 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/0000755000004100000410000000000012224440633023214 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_cinit.h0000644000004100000410000001756412224440633026043 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml0000644000004100000410000002044012224440633026600 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/pathname" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/GNUmakefile0000644000004100000410000000731612224440633025275 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/pathname/pathname.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_pinit.h0000644000004100000410000000203512224440633026043 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/0000755000004100000410000000000012224440633023074 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_cinit.h0000644000004100000410000001756412224440633025723 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml0000644000004100000410000002043712224440633026466 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/strscan" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/GNUmakefile0000644000004100000410000000731412224440633025153 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/strscan/strscan.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_pinit.h0000644000004100000410000000203512224440633025723 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc/0000755000004100000410000000000012224440633021366 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_cinit.h0000644000004100000410000001756412224440633024215 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml0000644000004100000410000002036712224440633024762 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc/GNUmakefile0000644000004100000410000001136412224440633023445 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/enc/encdb.c \ ruby-1.9.3-p0/enc/big5.c \ ruby-1.9.3-p0/enc/cp949.c \ ruby-1.9.3-p0/enc/emacs_mule.c \ ruby-1.9.3-p0/enc/euc_jp.c \ ruby-1.9.3-p0/enc/euc_kr.c \ ruby-1.9.3-p0/enc/euc_tw.c \ ruby-1.9.3-p0/enc/gb2312.c \ ruby-1.9.3-p0/enc/gb18030.c \ ruby-1.9.3-p0/enc/gbk.c \ ruby-1.9.3-p0/enc/iso_8859_1.c \ ruby-1.9.3-p0/enc/iso_8859_2.c \ ruby-1.9.3-p0/enc/iso_8859_3.c \ ruby-1.9.3-p0/enc/iso_8859_4.c \ ruby-1.9.3-p0/enc/iso_8859_5.c \ ruby-1.9.3-p0/enc/iso_8859_6.c \ ruby-1.9.3-p0/enc/iso_8859_7.c \ ruby-1.9.3-p0/enc/iso_8859_8.c \ ruby-1.9.3-p0/enc/iso_8859_9.c \ ruby-1.9.3-p0/enc/iso_8859_10.c \ ruby-1.9.3-p0/enc/iso_8859_11.c \ ruby-1.9.3-p0/enc/iso_8859_13.c \ ruby-1.9.3-p0/enc/iso_8859_14.c \ ruby-1.9.3-p0/enc/iso_8859_15.c \ ruby-1.9.3-p0/enc/iso_8859_16.c \ ruby-1.9.3-p0/enc/koi8_r.c \ ruby-1.9.3-p0/enc/koi8_u.c \ ruby-1.9.3-p0/enc/shift_jis.c \ ruby-1.9.3-p0/enc/utf_16be.c \ ruby-1.9.3-p0/enc/utf_16le.c \ ruby-1.9.3-p0/enc/utf_32be.c \ ruby-1.9.3-p0/enc/utf_32le.c \ ruby-1.9.3-p0/enc/windows_1251.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_pinit.h0000644000004100000410000000204412224440633024215 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define _FILE_OFFSET_BITS 64 #define ONIG_ENC_REGISTER rb_enc_register adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/0000755000004100000410000000000012224440633022720 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_cinit.h0000644000004100000410000001756412224440633025547 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml0000644000004100000410000002043612224440633026311 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/ripper" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/GNUmakefile0000644000004100000410000000731212224440633024775 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/ripper/ripper.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_pinit.h0000644000004100000410000000203512224440633025547 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-date/0000755000004100000410000000000012224440633022334 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_cinit.h0000644000004100000410000001756412224440633025163 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml0000644000004100000410000002043412224440633025723 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/date" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-date/GNUmakefile0000644000004100000410000000751112224440633024412 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/date/date_strptime.c \ ruby-1.9.3-p0/ext/date/date_strftime.c \ ruby-1.9.3-p0/ext/date/date_core.c \ ruby-1.9.3-p0/ext/date/date_parse.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_pinit.h0000644000004100000410000000203512224440633025163 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-readline/0000755000004100000410000000000012224440633023202 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_cinit.h0000644000004100000410000001756412224440633026031 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml0000644000004100000410000002044012224440633026566 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/readline" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-readline/GNUmakefile0000644000004100000410000000731612224440633025263 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/readline/readline.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_pinit.h0000644000004100000410000000203512224440633026031 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/0000755000004100000410000000000012224440633023102 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_cinit.h0000644000004100000410000001756412224440633025731 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml0000644000004100000410000002043712224440633026474 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/openssl" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/GNUmakefile0000644000004100000410000001204612224440633025157 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/openssl/ossl_rand.c \ ruby-1.9.3-p0/ext/openssl/ossl_ocsp.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkey_dh.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509revoked.c \ ruby-1.9.3-p0/ext/openssl/openssl_missing.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkcs12.c \ ruby-1.9.3-p0/ext/openssl/ossl.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkey_ec.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509name.c \ ruby-1.9.3-p0/ext/openssl/ossl_ns_spki.c \ ruby-1.9.3-p0/ext/openssl/ossl_ssl_session.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkey_rsa.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkcs7.c \ ruby-1.9.3-p0/ext/openssl/ossl_ssl.c \ ruby-1.9.3-p0/ext/openssl/ossl_hmac.c \ ruby-1.9.3-p0/ext/openssl/ossl_bio.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkcs5.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509req.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509store.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509cert.c \ ruby-1.9.3-p0/ext/openssl/ossl_cipher.c \ ruby-1.9.3-p0/ext/openssl/ossl_digest.c \ ruby-1.9.3-p0/ext/openssl/ossl_config.c \ ruby-1.9.3-p0/ext/openssl/ossl_bn.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509attr.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509crl.c \ ruby-1.9.3-p0/ext/openssl/ossl_x509ext.c \ ruby-1.9.3-p0/ext/openssl/ossl_asn1.c \ ruby-1.9.3-p0/ext/openssl/ossl_engine.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkey_dsa.c \ ruby-1.9.3-p0/ext/openssl/ossl_pkey.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_pinit.h0000644000004100000410000000203512224440633025731 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/0000755000004100000410000000000012224440633025257 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_cinit.h0000644000004100000410000001756412224440633030106 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml0000644000004100000410000002052212224440633030644 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/digest/bubblebabble" - "../../ruby-1.9.3-p0/ext/digest" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/GNUmakefile0000644000004100000410000000733512224440633027341 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/digest/bubblebabble/bubblebabble.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_pinit.h0000644000004100000410000000203512224440633030106 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/0000755000004100000410000000000012224440633023631 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_cinit.h0000644000004100000410000001756412224440633026460 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml0000644000004100000410000002044312224440633027220 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/io/nonblock" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/GNUmakefile0000644000004100000410000000732112224440633025706 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/io/nonblock/nonblock.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_pinit.h0000644000004100000410000000203512224440633026460 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/0000755000004100000410000000000012224440633024131 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_cinit.h0000644000004100000410000001756412224440633026760 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml0000644000004100000410000002044412224440633027521 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/continuation" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/GNUmakefile0000644000004100000410000000732612224440633026213 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/continuation/continuation.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_pinit.h0000644000004100000410000000203512224440633026760 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/0000755000004100000410000000000012224440633022535 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_cinit.h0000644000004100000410000001756412224440633025364 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml0000644000004100000410000002043512224440633026125 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/iconv" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/GNUmakefile0000644000004100000410000000731012224440633024610 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/iconv/iconv.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_pinit.h0000644000004100000410000000203512224440633025364 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pty/0000755000004100000410000000000012224440633022233 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_cinit.h0000644000004100000410000001756412224440633025062 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml0000644000004100000410000002043312224440633025621 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/pty" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pty/GNUmakefile0000644000004100000410000000730412224440633024311 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/pty/pty.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_pinit.h0000644000004100000410000000203512224440633025062 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/0000755000004100000410000000000012224440633023212 5ustar www-datawww-dataadlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_cinit.h0000644000004100000410000001756412224440633026041 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml0000644000004100000410000002044012224440633026576 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "ruby-1.9.3-p0" # Project root directory. project_root: "../../ruby-1.9.3-p0" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../ruby-1.9.3-p0" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../ruby-1.9.3-p0" - "../../ruby-1.9.3-p0/.ext/include/i686-linux" - "../../ruby-1.9.3-p0/include" - "../../ruby-1.9.3-p0/ext/coverage" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/GNUmakefile0000644000004100000410000000731612224440633025273 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = ruby-1.9.3-p0 SOURCES = \ ruby-1.9.3-p0/ext/coverage/coverage.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_pinit.h0000644000004100000410000000203512224440633026041 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define RUBY_EXTCONF_H "extconf.h" #define _FILE_OFFSET_BITS 64 adlint-3.2.0/share/sample/bison-2.5/0000755000004100000410000000000012224440633017016 5ustar www-datawww-dataadlint-3.2.0/share/sample/bison-2.5/adlint/0000755000004100000410000000000012224440633020271 5ustar www-datawww-dataadlint-3.2.0/share/sample/bison-2.5/adlint/adlint_traits.yml0000644000004100000410000001732412224440633023664 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "bison-2.5" # Project root directory. project_root: "../bison-2.5" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../bison-2.5" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "GNU" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 2 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/bison-2.5/adlint/src/0000755000004100000410000000000012224440633021060 5ustar www-datawww-dataadlint-3.2.0/share/sample/bison-2.5/adlint/src/adlint_cinit.h0000644000004100000410000001755312224440633023705 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/bison-2.5/adlint/src/adlint_traits.yml0000644000004100000410000002025312224440633024446 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "bison-2.5" # Project root directory. project_root: "../../bison-2.5" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../bison-2.5" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../bison-2.5" - "../../bison-2.5/lib" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "GNU" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 2 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/bison-2.5/adlint/src/GNUmakefile0000644000004100000410000001124212224440633023132 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = bison-2.5 SOURCES = \ bison-2.5/src/AnnotationList.c \ bison-2.5/src/InadequacyList.c \ bison-2.5/src/LR0.c \ bison-2.5/src/Sbitset.c \ bison-2.5/src/assoc.c \ bison-2.5/src/closure.c \ bison-2.5/src/complain.c \ bison-2.5/src/conflicts.c \ bison-2.5/src/derives.c \ bison-2.5/src/files.c \ bison-2.5/src/getargs.c \ bison-2.5/src/gram.c \ bison-2.5/src/lalr.c \ bison-2.5/src/ielr.c \ bison-2.5/src/location.c \ bison-2.5/src/main.c \ bison-2.5/src/muscle-tab.c \ bison-2.5/src/named-ref.c \ bison-2.5/src/nullable.c \ bison-2.5/src/output.c \ bison-2.5/src/parse-gram.c \ bison-2.5/src/print.c \ bison-2.5/src/print_graph.c \ bison-2.5/src/print-xml.c \ bison-2.5/src/reader.c \ bison-2.5/src/reduce.c \ bison-2.5/src/relation.c \ bison-2.5/src/scan-code-c.c \ bison-2.5/src/scan-gram-c.c \ bison-2.5/src/scan-skel-c.c \ bison-2.5/src/state.c \ bison-2.5/src/symlist.c \ bison-2.5/src/symtab.c \ bison-2.5/src/tables.c \ bison-2.5/src/uniqstr.c \ bison-2.5/src/graphviz.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/bison-2.5/adlint/src/adlint_pinit.h0000644000004100000410000000173412224440633023714 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ adlint-3.2.0/share/sample/bison-2.5/adlint/GNUmakefile0000644000004100000410000001501312224440633022343 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to analyze whole project with compiler like messages # % make all # - to analyze whole project with progress report # % make verbose-all # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . SMA_MET_FILES = \ lib/bison-2.5/lib/abitset.c.met.csv \ lib/bison-2.5/lib/argmatch.c.met.csv \ lib/bison-2.5/lib/asnprintf.c.met.csv \ lib/bison-2.5/lib/basename-lgpl.c.met.csv \ lib/bison-2.5/lib/basename.c.met.csv \ lib/bison-2.5/lib/bitset.c.met.csv \ lib/bison-2.5/lib/bitset_stats.c.met.csv \ lib/bison-2.5/lib/bitsetv-print.c.met.csv \ lib/bison-2.5/lib/bitsetv.c.met.csv \ lib/bison-2.5/lib/c-ctype.c.met.csv \ lib/bison-2.5/lib/c-strcasecmp.c.met.csv \ lib/bison-2.5/lib/c-strncasecmp.c.met.csv \ lib/bison-2.5/lib/cloexec.c.met.csv \ lib/bison-2.5/lib/close-hook.c.met.csv \ lib/bison-2.5/lib/dirname-lgpl.c.met.csv \ lib/bison-2.5/lib/dirname.c.met.csv \ lib/bison-2.5/lib/dup-safer-flag.c.met.csv \ lib/bison-2.5/lib/dup-safer.c.met.csv \ lib/bison-2.5/lib/ebitset.c.met.csv \ lib/bison-2.5/lib/exitfail.c.met.csv \ lib/bison-2.5/lib/fatal-signal.c.met.csv \ lib/bison-2.5/lib/fcntl.c.met.csv \ lib/bison-2.5/lib/fd-safer-flag.c.met.csv \ lib/bison-2.5/lib/fd-safer.c.met.csv \ lib/bison-2.5/lib/fopen-safer.c.met.csv \ lib/bison-2.5/lib/fprintf.c.met.csv \ lib/bison-2.5/lib/fseterr.c.met.csv \ lib/bison-2.5/lib/get-errno.c.met.csv \ lib/bison-2.5/lib/hash.c.met.csv \ lib/bison-2.5/lib/ioctl.c.met.csv \ lib/bison-2.5/lib/isnand.c.met.csv \ lib/bison-2.5/lib/isnanf.c.met.csv \ lib/bison-2.5/lib/isnanl.c.met.csv \ lib/bison-2.5/lib/lbitset.c.met.csv \ lib/bison-2.5/lib/localcharset.c.met.csv \ lib/bison-2.5/lib/main.c.met.csv \ lib/bison-2.5/lib/mbchar.c.met.csv \ lib/bison-2.5/lib/mbschr.c.met.csv \ lib/bison-2.5/lib/mbsrchr.c.met.csv \ lib/bison-2.5/lib/mbswidth.c.met.csv \ lib/bison-2.5/lib/nonblocking.c.met.csv \ lib/bison-2.5/lib/pipe-safer.c.met.csv \ lib/bison-2.5/lib/pipe2-safer.c.met.csv \ lib/bison-2.5/lib/pipe2.c.met.csv \ lib/bison-2.5/lib/printf-args.c.met.csv \ lib/bison-2.5/lib/printf-frexp.c.met.csv \ lib/bison-2.5/lib/printf-frexpl.c.met.csv \ lib/bison-2.5/lib/printf-parse.c.met.csv \ lib/bison-2.5/lib/printf.c.met.csv \ lib/bison-2.5/lib/quote.c.met.csv \ lib/bison-2.5/lib/quotearg.c.met.csv \ lib/bison-2.5/lib/snprintf.c.met.csv \ lib/bison-2.5/lib/spawn-pipe.c.met.csv \ lib/bison-2.5/lib/sprintf.c.met.csv \ lib/bison-2.5/lib/stripslash.c.met.csv \ lib/bison-2.5/lib/strnlen1.c.met.csv \ lib/bison-2.5/lib/timevar.c.met.csv \ lib/bison-2.5/lib/uniwidth/width.c.met.csv \ lib/bison-2.5/lib/vasnprintf.c.met.csv \ lib/bison-2.5/lib/vbitset.c.met.csv \ lib/bison-2.5/lib/vfprintf.c.met.csv \ lib/bison-2.5/lib/vsnprintf.c.met.csv \ lib/bison-2.5/lib/vsprintf.c.met.csv \ lib/bison-2.5/lib/wait-process.c.met.csv \ lib/bison-2.5/lib/xalloc-die.c.met.csv \ lib/bison-2.5/lib/xmalloc.c.met.csv \ lib/bison-2.5/lib/xstrndup.c.met.csv \ lib/bison-2.5/lib/yyerror.c.met.csv \ src/bison-2.5/src/AnnotationList.c.met.csv \ src/bison-2.5/src/InadequacyList.c.met.csv \ src/bison-2.5/src/LR0.c.met.csv \ src/bison-2.5/src/Sbitset.c.met.csv \ src/bison-2.5/src/assoc.c.met.csv \ src/bison-2.5/src/closure.c.met.csv \ src/bison-2.5/src/complain.c.met.csv \ src/bison-2.5/src/conflicts.c.met.csv \ src/bison-2.5/src/derives.c.met.csv \ src/bison-2.5/src/files.c.met.csv \ src/bison-2.5/src/getargs.c.met.csv \ src/bison-2.5/src/gram.c.met.csv \ src/bison-2.5/src/graphviz.c.met.csv \ src/bison-2.5/src/ielr.c.met.csv \ src/bison-2.5/src/lalr.c.met.csv \ src/bison-2.5/src/location.c.met.csv \ src/bison-2.5/src/main.c.met.csv \ src/bison-2.5/src/muscle-tab.c.met.csv \ src/bison-2.5/src/named-ref.c.met.csv \ src/bison-2.5/src/nullable.c.met.csv \ src/bison-2.5/src/output.c.met.csv \ src/bison-2.5/src/parse-gram.c.met.csv \ src/bison-2.5/src/print-xml.c.met.csv \ src/bison-2.5/src/print.c.met.csv \ src/bison-2.5/src/print_graph.c.met.csv \ src/bison-2.5/src/reader.c.met.csv \ src/bison-2.5/src/reduce.c.met.csv \ src/bison-2.5/src/relation.c.met.csv \ src/bison-2.5/src/scan-code-c.c.met.csv \ src/bison-2.5/src/scan-gram-c.c.met.csv \ src/bison-2.5/src/scan-skel-c.c.met.csv \ src/bison-2.5/src/state.c.met.csv \ src/bison-2.5/src/symlist.c.met.csv \ src/bison-2.5/src/symtab.c.met.csv \ src/bison-2.5/src/tables.c.met.csv \ src/bison-2.5/src/uniqstr.c.met.csv %.c.met.csv : @$(MAKE) -C `echo $@ | sed 's/\/.*$$//'` `echo $@ | sed 's/^[^/]\+\///'` CMA_MSG_FILE = bison-2.5.msg.csv CMA_MET_FILE = bison-2.5.met.csv CMA_LOG_FILE = bison-2.5.log .PHONY: all all : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $(SMA_MET_FILES) .PHONY: verbose-all verbose-all : @for f in $(SMA_MET_FILES); do \ dir=`echo $$f | sed 's/\/.*$$//'`; \ if [ "$$last_dir" != "$$dir" ]; then $(MAKE) -C $$dir verbose-sma-only; fi; \ last_dir=$$dir; \ done $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $(SMA_MET_FILES) .PHONY: verbose-cma-only verbose-cma-only : $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $(SMA_MET_FILES) .PHONY: clean clean : @for f in $(SMA_MET_FILES); do \ dir=`echo $$f | sed 's/\/.*$$//'`; \ if [ "$$last_dir" != "$$dir" ]; then $(MAKE) -C $$dir clean; fi; \ last_dir=$$dir; \ done @$(RM) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) adlint-3.2.0/share/sample/bison-2.5/adlint/lib/0000755000004100000410000000000012224440633021037 5ustar www-datawww-dataadlint-3.2.0/share/sample/bison-2.5/adlint/lib/adlint_cinit.h0000644000004100000410000001755312224440633023664 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/bison-2.5/adlint/lib/adlint_traits.yml0000644000004100000410000002022512224440633024424 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "bison-2.5" # Project root directory. project_root: "../../bison-2.5" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../bison-2.5" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../bison-2.5/lib" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "GNU" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 2 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/bison-2.5/adlint/lib/GNUmakefile0000644000004100000410000001320412224440633023111 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = bison-2.5 SOURCES = \ bison-2.5/lib/main.c \ bison-2.5/lib/yyerror.c \ bison-2.5/lib/c-ctype.c \ bison-2.5/lib/c-strcasecmp.c \ bison-2.5/lib/c-strncasecmp.c \ bison-2.5/lib/close-hook.c \ bison-2.5/lib/exitfail.c \ bison-2.5/lib/fatal-signal.c \ bison-2.5/lib/fd-safer-flag.c \ bison-2.5/lib/dup-safer-flag.c \ bison-2.5/lib/fseterr.c \ bison-2.5/lib/localcharset.c \ bison-2.5/lib/mbchar.c \ bison-2.5/lib/mbschr.c \ bison-2.5/lib/mbsrchr.c \ bison-2.5/lib/mbswidth.c \ bison-2.5/lib/nonblocking.c \ bison-2.5/lib/pipe2.c \ bison-2.5/lib/pipe2-safer.c \ bison-2.5/lib/printf-frexp.c \ bison-2.5/lib/printf-frexpl.c \ bison-2.5/lib/spawn-pipe.c \ bison-2.5/lib/strnlen1.c \ bison-2.5/lib/uniwidth/width.c \ bison-2.5/lib/wait-process.c \ bison-2.5/lib/xalloc-die.c \ bison-2.5/lib/xstrndup.c \ bison-2.5/lib/get-errno.c \ bison-2.5/lib/abitset.c \ bison-2.5/lib/bitset.c \ bison-2.5/lib/bitset_stats.c \ bison-2.5/lib/bitsetv.c \ bison-2.5/lib/ebitset.c \ bison-2.5/lib/lbitset.c \ bison-2.5/lib/vbitset.c \ bison-2.5/lib/bitsetv-print.c \ bison-2.5/lib/timevar.c \ bison-2.5/lib/argmatch.c \ bison-2.5/lib/asnprintf.c \ bison-2.5/lib/basename.c \ bison-2.5/lib/basename-lgpl.c \ bison-2.5/lib/cloexec.c \ bison-2.5/lib/dirname.c \ bison-2.5/lib/dirname-lgpl.c \ bison-2.5/lib/dup-safer.c \ bison-2.5/lib/fcntl.c \ bison-2.5/lib/fd-safer.c \ bison-2.5/lib/fopen-safer.c \ bison-2.5/lib/fprintf.c \ bison-2.5/lib/hash.c \ bison-2.5/lib/ioctl.c \ bison-2.5/lib/isnand.c \ bison-2.5/lib/isnanf.c \ bison-2.5/lib/isnanl.c \ bison-2.5/lib/pipe-safer.c \ bison-2.5/lib/printf.c \ bison-2.5/lib/printf-args.c \ bison-2.5/lib/printf-parse.c \ bison-2.5/lib/quote.c \ bison-2.5/lib/quotearg.c \ bison-2.5/lib/snprintf.c \ bison-2.5/lib/sprintf.c \ bison-2.5/lib/stripslash.c \ bison-2.5/lib/vasnprintf.c \ bison-2.5/lib/vfprintf.c \ bison-2.5/lib/vsnprintf.c \ bison-2.5/lib/vsprintf.c \ bison-2.5/lib/xmalloc.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/bison-2.5/adlint/lib/adlint_pinit.h0000644000004100000410000000173412224440633023673 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ adlint-3.2.0/share/sample/screen-4.0.3/0000755000004100000410000000000012224440633017321 5ustar www-datawww-dataadlint-3.2.0/share/sample/screen-4.0.3/adlint/0000755000004100000410000000000012224440633020574 5ustar www-datawww-dataadlint-3.2.0/share/sample/screen-4.0.3/adlint/adlint_cinit.h0000644000004100000410000001756412224440633023423 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/screen-4.0.3/adlint/adlint_traits.yml0000644000004100000410000002022212224440633024156 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "screen-4.0.3" # Project root directory. project_root: "../screen-4.0.3" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../screen-4.0.3" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../screen-4.0.3" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "GNU" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 2 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/screen-4.0.3/adlint/GNUmakefile0000644000004100000410000001072512224440633022653 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = screen-4.0.3 SOURCES = \ screen-4.0.3/screen.c \ screen-4.0.3/ansi.c \ screen-4.0.3/fileio.c \ screen-4.0.3/mark.c \ screen-4.0.3/misc.c \ screen-4.0.3/resize.c \ screen-4.0.3/socket.c \ screen-4.0.3/search.c \ screen-4.0.3/tty.c \ screen-4.0.3/term.c \ screen-4.0.3/window.c \ screen-4.0.3/utmp.c \ screen-4.0.3/loadav.c \ screen-4.0.3/putenv.c \ screen-4.0.3/help.c \ screen-4.0.3/termcap.c \ screen-4.0.3/input.c \ screen-4.0.3/attacher.c \ screen-4.0.3/pty.c \ screen-4.0.3/process.c \ screen-4.0.3/display.c \ screen-4.0.3/comm.c \ screen-4.0.3/kmapdef.c \ screen-4.0.3/acls.c \ screen-4.0.3/braille.c \ screen-4.0.3/braille_tsi.c \ screen-4.0.3/logfile.c \ screen-4.0.3/layer.c \ screen-4.0.3/sched.c \ screen-4.0.3/teln.c \ screen-4.0.3/nethack.c \ screen-4.0.3/encoding.c VPATH = .. VPATH_COMPONENTS = 1 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/screen-4.0.3/adlint/adlint_pinit.h0000644000004100000410000000173412224440633023430 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ adlint-3.2.0/share/sample/flex-2.5.35/0000755000004100000410000000000012224440633017070 5ustar www-datawww-dataadlint-3.2.0/share/sample/flex-2.5.35/adlint/0000755000004100000410000000000012224440633020343 5ustar www-datawww-dataadlint-3.2.0/share/sample/flex-2.5.35/adlint/adlint_cinit.h0000644000004100000410000001773512224440633023172 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_start(a, b) (0) #define __builtin_va_end(a) (0) #define __builtin_va_arg(ar, t) (0) #define __builtin_va_copy(d, s) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/flex-2.5.35/adlint/adlint_traits.yml0000644000004100000410000002022012224440633023723 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "flex-2.5.35" # Project root directory. project_root: "../flex-2.5.35" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../flex-2.5.35" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../flex-2.5.35" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/flex-2.5.35/adlint/GNUmakefile0000644000004100000410000001027012224440633022415 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = flex-2.5.35 SOURCES = \ flex-2.5.35/libmain.c \ flex-2.5.35/libyywrap.c \ flex-2.5.35/dfa.c \ flex-2.5.35/ecs.c \ flex-2.5.35/scanflags.c \ flex-2.5.35/gen.c \ flex-2.5.35/main.c \ flex-2.5.35/misc.c \ flex-2.5.35/nfa.c \ flex-2.5.35/parse.c \ flex-2.5.35/scan.c \ flex-2.5.35/skel.c \ flex-2.5.35/sym.c \ flex-2.5.35/tblcmp.c \ flex-2.5.35/yylex.c \ flex-2.5.35/options.c \ flex-2.5.35/scanopt.c \ flex-2.5.35/buf.c \ flex-2.5.35/tables.c \ flex-2.5.35/tables_shared.c \ flex-2.5.35/filter.c \ flex-2.5.35/regex.c VPATH = .. VPATH_COMPONENTS = 1 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/flex-2.5.35/adlint/adlint_pinit.h0000644000004100000410000000203712224440633023174 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define HAVE_CONFIG_H #define LOCALEDIR "/usr/local/share/locale" adlint-3.2.0/share/sample/zsh-4.3.15/0000755000004100000410000000000012224440633016734 5ustar www-datawww-dataadlint-3.2.0/share/sample/zsh-4.3.15/adlint/0000755000004100000410000000000012224440633020207 5ustar www-datawww-dataadlint-3.2.0/share/sample/zsh-4.3.15/adlint/adlint_traits.yml0000644000004100000410000001732512224440633023603 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "zsh-4.3.15" # Project root directory. project_root: "../zsh-4.3.15" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../zsh-4.3.15" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/zsh-4.3.15/adlint/core/0000755000004100000410000000000012224440633021137 5ustar www-datawww-dataadlint-3.2.0/share/sample/zsh-4.3.15/adlint/core/adlint_cinit.h0000644000004100000410000001756412224440633023766 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml0000644000004100000410000002027012224440633024524 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "zsh-4.3.15" # Project root directory. project_root: "../../zsh-4.3.15" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../zsh-4.3.15" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../zsh-4.3.15/Src" - "../../zsh-4.3.15/Src/Zle" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/zsh-4.3.15/adlint/core/GNUmakefile0000644000004100000410000001025512224440633023214 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to analyze whole project with compiler like messages # % make all # - to analyze whole project with progress report # % make verbose-all # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = zsh-4.3.15 SOURCES = \ zsh-4.3.15/Src/builtin.c \ zsh-4.3.15/Src/compat.c \ zsh-4.3.15/Src/cond.c \ zsh-4.3.15/Src/exec.c \ zsh-4.3.15/Src/glob.c \ zsh-4.3.15/Src/hashtable.c \ zsh-4.3.15/Src/hashnameddir.c \ zsh-4.3.15/Src/hist.c \ zsh-4.3.15/Src/init.c \ zsh-4.3.15/Src/input.c \ zsh-4.3.15/Src/jobs.c \ zsh-4.3.15/Src/lex.c \ zsh-4.3.15/Src/linklist.c \ zsh-4.3.15/Src/loop.c \ zsh-4.3.15/Src/math.c \ zsh-4.3.15/Src/mem.c \ zsh-4.3.15/Src/module.c \ zsh-4.3.15/Src/options.c \ zsh-4.3.15/Src/params.c \ zsh-4.3.15/Src/parse.c \ zsh-4.3.15/Src/pattern.c \ zsh-4.3.15/Src/prompt.c \ zsh-4.3.15/Src/signals.c \ zsh-4.3.15/Src/signames.c \ zsh-4.3.15/Src/sort.c \ zsh-4.3.15/Src/string.c \ zsh-4.3.15/Src/subst.c \ zsh-4.3.15/Src/text.c \ zsh-4.3.15/Src/utils.c \ zsh-4.3.15/Src/watch.c \ zsh-4.3.15/Src/main.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/zsh-4.3.15/adlint/core/adlint_pinit.h0000644000004100000410000000176312224440633023775 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define HAVE_CONFIG_H adlint-3.2.0/share/sample/zsh-4.3.15/adlint/zle/0000755000004100000410000000000012224440633021001 5ustar www-datawww-dataadlint-3.2.0/share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h0000644000004100000410000001756412224440633023630 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml0000644000004100000410000002027012224440633024366 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "zsh-4.3.15" # Project root directory. project_root: "../../zsh-4.3.15" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../zsh-4.3.15" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../zsh-4.3.15/Src/Zle" - "../../zsh-4.3.15/Src" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/zsh-4.3.15/adlint/zle/GNUmakefile0000644000004100000410000001013212224440633023050 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to analyze whole project with compiler like messages # % make all # - to analyze whole project with progress report # % make verbose-all # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = zsh-4.3.15 SOURCES = \ zsh-4.3.15/Src/Zle/compctl.c \ zsh-4.3.15/Src/Zle/complete.c \ zsh-4.3.15/Src/Zle/compcore.c \ zsh-4.3.15/Src/Zle/compmatch.c \ zsh-4.3.15/Src/Zle/compresult.c \ zsh-4.3.15/Src/Zle/complist.c \ zsh-4.3.15/Src/Zle/computil.c \ zsh-4.3.15/Src/Zle/deltochar.c \ zsh-4.3.15/Src/Zle/zle_bindings.c \ zsh-4.3.15/Src/Zle/zle_hist.c \ zsh-4.3.15/Src/Zle/zle_keymap.c \ zsh-4.3.15/Src/Zle/zle_main.c \ zsh-4.3.15/Src/Zle/zle_misc.c \ zsh-4.3.15/Src/Zle/zle_move.c \ zsh-4.3.15/Src/Zle/zle_params.c \ zsh-4.3.15/Src/Zle/zle_refresh.c \ zsh-4.3.15/Src/Zle/zle_thingy.c \ zsh-4.3.15/Src/Zle/zle_tricky.c \ zsh-4.3.15/Src/Zle/zle_utils.c \ zsh-4.3.15/Src/Zle/zle_vi.c \ zsh-4.3.15/Src/Zle/zle_word.c \ zsh-4.3.15/Src/Zle/zleparameter.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h0000644000004100000410000000200212224440633023622 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define HAVE_CONFIG_H #define MODULE adlint-3.2.0/share/sample/zsh-4.3.15/adlint/GNUmakefile0000644000004100000410000001352212224440633022264 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to analyze whole project with compiler like messages # % make all # - to analyze whole project with progress report # % make verbose-all # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . SMA_MET_FILES = \ builtins/zsh-4.3.15/Src/Builtins/rlimits.c.met.csv \ builtins/zsh-4.3.15/Src/Builtins/sched.c.met.csv \ core/zsh-4.3.15/Src/builtin.c.met.csv \ core/zsh-4.3.15/Src/compat.c.met.csv \ core/zsh-4.3.15/Src/cond.c.met.csv \ core/zsh-4.3.15/Src/exec.c.met.csv \ core/zsh-4.3.15/Src/glob.c.met.csv \ core/zsh-4.3.15/Src/hashnameddir.c.met.csv \ core/zsh-4.3.15/Src/hashtable.c.met.csv \ core/zsh-4.3.15/Src/hist.c.met.csv \ core/zsh-4.3.15/Src/init.c.met.csv \ core/zsh-4.3.15/Src/input.c.met.csv \ core/zsh-4.3.15/Src/jobs.c.met.csv \ core/zsh-4.3.15/Src/lex.c.met.csv \ core/zsh-4.3.15/Src/linklist.c.met.csv \ core/zsh-4.3.15/Src/loop.c.met.csv \ core/zsh-4.3.15/Src/main.c.met.csv \ core/zsh-4.3.15/Src/math.c.met.csv \ core/zsh-4.3.15/Src/mem.c.met.csv \ core/zsh-4.3.15/Src/module.c.met.csv \ core/zsh-4.3.15/Src/options.c.met.csv \ core/zsh-4.3.15/Src/params.c.met.csv \ core/zsh-4.3.15/Src/parse.c.met.csv \ core/zsh-4.3.15/Src/pattern.c.met.csv \ core/zsh-4.3.15/Src/prompt.c.met.csv \ core/zsh-4.3.15/Src/signals.c.met.csv \ core/zsh-4.3.15/Src/signames.c.met.csv \ core/zsh-4.3.15/Src/sort.c.met.csv \ core/zsh-4.3.15/Src/string.c.met.csv \ core/zsh-4.3.15/Src/subst.c.met.csv \ core/zsh-4.3.15/Src/text.c.met.csv \ core/zsh-4.3.15/Src/utils.c.met.csv \ core/zsh-4.3.15/Src/watch.c.met.csv \ modules/zsh-4.3.15/Src/Modules/attr.c.met.csv \ modules/zsh-4.3.15/Src/Modules/cap.c.met.csv \ modules/zsh-4.3.15/Src/Modules/clone.c.met.csv \ modules/zsh-4.3.15/Src/Modules/curses.c.met.csv \ modules/zsh-4.3.15/Src/Modules/datetime.c.met.csv \ modules/zsh-4.3.15/Src/Modules/db_gdbm.c.met.csv \ modules/zsh-4.3.15/Src/Modules/example.c.met.csv \ modules/zsh-4.3.15/Src/Modules/files.c.met.csv \ modules/zsh-4.3.15/Src/Modules/langinfo.c.met.csv \ modules/zsh-4.3.15/Src/Modules/mapfile.c.met.csv \ modules/zsh-4.3.15/Src/Modules/mathfunc.c.met.csv \ modules/zsh-4.3.15/Src/Modules/newuser.c.met.csv \ modules/zsh-4.3.15/Src/Modules/parameter.c.met.csv \ modules/zsh-4.3.15/Src/Modules/regex.c.met.csv \ modules/zsh-4.3.15/Src/Modules/socket.c.met.csv \ modules/zsh-4.3.15/Src/Modules/stat.c.met.csv \ modules/zsh-4.3.15/Src/Modules/system.c.met.csv \ modules/zsh-4.3.15/Src/Modules/tcp.c.met.csv \ modules/zsh-4.3.15/Src/Modules/termcap.c.met.csv \ modules/zsh-4.3.15/Src/Modules/terminfo.c.met.csv \ modules/zsh-4.3.15/Src/Modules/zftp.c.met.csv \ modules/zsh-4.3.15/Src/Modules/zprof.c.met.csv \ modules/zsh-4.3.15/Src/Modules/zpty.c.met.csv \ modules/zsh-4.3.15/Src/Modules/zselect.c.met.csv \ modules/zsh-4.3.15/Src/Modules/zutil.c.met.csv \ zle/zsh-4.3.15/Src/Zle/compcore.c.met.csv \ zle/zsh-4.3.15/Src/Zle/compctl.c.met.csv \ zle/zsh-4.3.15/Src/Zle/complete.c.met.csv \ zle/zsh-4.3.15/Src/Zle/complist.c.met.csv \ zle/zsh-4.3.15/Src/Zle/compmatch.c.met.csv \ zle/zsh-4.3.15/Src/Zle/compresult.c.met.csv \ zle/zsh-4.3.15/Src/Zle/computil.c.met.csv \ zle/zsh-4.3.15/Src/Zle/deltochar.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_bindings.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_hist.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_keymap.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_main.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_misc.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_move.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_params.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_refresh.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_thingy.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_tricky.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_utils.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_vi.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zle_word.c.met.csv \ zle/zsh-4.3.15/Src/Zle/zleparameter.c.met.csv %.c.met.csv : @$(MAKE) -C `echo $@ | sed 's/\/.*$$//'` `echo $@ | sed 's/^[^/]\+\///'` CMA_MSG_FILE = zsh-4.3.15.msg.csv CMA_MET_FILE = zsh-4.3.15.met.csv CMA_LOG_FILE = zsh-4.3.15.log .PHONY: all all : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $(SMA_MET_FILES) .PHONY: verbose-all verbose-all : @for f in $(SMA_MET_FILES); do \ dir=`echo $$f | sed 's/\/.*$$//'`; \ if [ "$$last_dir" != "$$dir" ]; then $(MAKE) -C $$dir verbose-sma-only; fi; \ last_dir=$$dir; \ done $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $(SMA_MET_FILES) .PHONY: clean clean : @for f in $(SMA_MET_FILES); do \ dir=`echo $$f | sed 's/\/.*$$//'`; \ if [ "$$last_dir" != "$$dir" ]; then $(MAKE) -C $$dir clean; fi; \ last_dir=$$dir; \ done @$(RM) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) adlint-3.2.0/share/sample/zsh-4.3.15/adlint/builtins/0000755000004100000410000000000012224440633022040 5ustar www-datawww-dataadlint-3.2.0/share/sample/zsh-4.3.15/adlint/builtins/adlint_cinit.h0000644000004100000410000001756412224440633024667 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml0000644000004100000410000002033512224440633025427 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "zsh-4.3.15" # Project root directory. project_root: "../../zsh-4.3.15" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../zsh-4.3.15" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../zsh-4.3.15/Src/Modules" - "../../zsh-4.3.15/Src" - "../../zsh-4.3.15/Src/Zle" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/zsh-4.3.15/adlint/builtins/GNUmakefile0000644000004100000410000000735312224440633024122 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = zsh-4.3.15 SOURCES = \ zsh-4.3.15/Src/Builtins/rlimits.c \ zsh-4.3.15/Src/Builtins/sched.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/zsh-4.3.15/adlint/builtins/adlint_pinit.h0000644000004100000410000000200212224440633024661 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define HAVE_CONFIG_H #define MODULE adlint-3.2.0/share/sample/zsh-4.3.15/adlint/modules/0000755000004100000410000000000012224440633021657 5ustar www-datawww-dataadlint-3.2.0/share/sample/zsh-4.3.15/adlint/modules/adlint_cinit.h0000644000004100000410000001756412224440633024506 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml0000644000004100000410000002033512224440633025246 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "zsh-4.3.15" # Project root directory. project_root: "../../zsh-4.3.15" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../zsh-4.3.15" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../zsh-4.3.15/Src/Modules" - "../../zsh-4.3.15/Src" - "../../zsh-4.3.15/Src/Zle" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/zsh-4.3.15/adlint/modules/GNUmakefile0000644000004100000410000001033312224440633023731 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to analyze whole project with compiler like messages # % make all # - to analyze whole project with progress report # % make verbose-all # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = zsh-4.3.15 SOURCES = \ zsh-4.3.15/Src/Modules/attr.c \ zsh-4.3.15/Src/Modules/cap.c \ zsh-4.3.15/Src/Modules/clone.c \ zsh-4.3.15/Src/Modules/curses.c \ zsh-4.3.15/Src/Modules/datetime.c \ zsh-4.3.15/Src/Modules/db_gdbm.c \ zsh-4.3.15/Src/Modules/example.c \ zsh-4.3.15/Src/Modules/files.c \ zsh-4.3.15/Src/Modules/langinfo.c \ zsh-4.3.15/Src/Modules/mapfile.c \ zsh-4.3.15/Src/Modules/mathfunc.c \ zsh-4.3.15/Src/Modules/newuser.c \ zsh-4.3.15/Src/Modules/parameter.c \ zsh-4.3.15/Src/Modules/regex.c \ zsh-4.3.15/Src/Modules/socket.c \ zsh-4.3.15/Src/Modules/stat.c \ zsh-4.3.15/Src/Modules/system.c \ zsh-4.3.15/Src/Modules/tcp.c \ zsh-4.3.15/Src/Modules/termcap.c \ zsh-4.3.15/Src/Modules/terminfo.c \ zsh-4.3.15/Src/Modules/zftp.c \ zsh-4.3.15/Src/Modules/zprof.c \ zsh-4.3.15/Src/Modules/zpty.c \ zsh-4.3.15/Src/Modules/zselect.c \ zsh-4.3.15/Src/Modules/zutil.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/zsh-4.3.15/adlint/modules/adlint_pinit.h0000644000004100000410000000200212224440633024500 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define HAVE_CONFIG_H #define MODULE adlint-3.2.0/share/sample/vim-7.3/0000755000004100000410000000000012224440633016502 5ustar www-datawww-dataadlint-3.2.0/share/sample/vim-7.3/adlint/0000755000004100000410000000000012224440633017755 5ustar www-datawww-dataadlint-3.2.0/share/sample/vim-7.3/adlint/vim/0000755000004100000410000000000012224440633020550 5ustar www-datawww-dataadlint-3.2.0/share/sample/vim-7.3/adlint/vim/adlint_cinit.h0000644000004100000410000001756412224440633023377 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/vim-7.3/adlint/vim/adlint_traits.yml0000644000004100000410000002076712224440633024150 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "vim-7.3" # Project root directory. project_root: "../../vim73" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../vim73" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../../vim73/src" - "../../vim73/src/proto" - "/usr/include/gtk-2.0" - "/usr/lib/gtk-2.0/include" - "/usr/include/atk-1.0" - "/usr/include/cairo" - "/usr/include/gdk-pixbuf-2.0" - "/usr/include/pango-1.0" - "/usr/include/glib-2.0" - "/usr/lib/glib-2.0/include" - "/usr/include/pixman-1" - "/usr/include/freetype2" - "/usr/include/libpng12" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/vim-7.3/adlint/vim/GNUmakefile0000644000004100000410000001163312224440633022626 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = vim-7.3 SOURCES = \ vim73/src/buffer.c \ vim73/src/blowfish.c \ vim73/src/charset.c \ vim73/src/diff.c \ vim73/src/digraph.c \ vim73/src/edit.c \ vim73/src/eval.c \ vim73/src/ex_cmds.c \ vim73/src/ex_cmds2.c \ vim73/src/ex_docmd.c \ vim73/src/ex_eval.c \ vim73/src/ex_getln.c \ vim73/src/fileio.c \ vim73/src/fold.c \ vim73/src/getchar.c \ vim73/src/hardcopy.c \ vim73/src/hashtab.c \ vim73/src/if_cscope.c \ vim73/src/if_xcmdsrv.c \ vim73/src/main.c \ vim73/src/mark.c \ vim73/src/memfile.c \ vim73/src/memline.c \ vim73/src/menu.c \ vim73/src/message.c \ vim73/src/misc1.c \ vim73/src/misc2.c \ vim73/src/move.c \ vim73/src/mbyte.c \ vim73/src/normal.c \ vim73/src/ops.c \ vim73/src/option.c \ vim73/src/os_unix.c \ vim73/src/auto/pathdef.c \ vim73/src/popupmnu.c \ vim73/src/quickfix.c \ vim73/src/regexp.c \ vim73/src/screen.c \ vim73/src/search.c \ vim73/src/sha256.c \ vim73/src/spell.c \ vim73/src/syntax.c \ vim73/src/tag.c \ vim73/src/term.c \ vim73/src/ui.c \ vim73/src/undo.c \ vim73/src/window.c \ vim73/src/gui.c \ vim73/src/gui_gtk.c \ vim73/src/gui_gtk_x11.c \ vim73/src/pty.c \ vim73/src/gui_gtk_f.c \ vim73/src/gui_beval.c \ vim73/src/netbeans.c \ vim73/src/version.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/vim-7.3/adlint/vim/adlint_pinit.h0000644000004100000410000000204212224440633023375 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define HAVE_CONFIG_H #define FEAT_GUI_GTK #define _FORTIFY_SOURCE 1 adlint-3.2.0/share/sample/vim-7.3/adlint/xxd/0000755000004100000410000000000012224440633020560 5ustar www-datawww-dataadlint-3.2.0/share/sample/vim-7.3/adlint/xxd/adlint_cinit.h0000644000004100000410000001756412224440633023407 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define __DBL_MIN_EXP__ (-1021) #define __pentiumpro__ 1 #define __UINT_LEAST16_MAX__ 65535 #define __FLT_MIN__ 1.17549435082228750797e-38F #define __UINT_LEAST8_TYPE__ unsigned char #define __INTMAX_C(c) c ## LL #define __CHAR_BIT__ 8 #define __UINT8_MAX__ 255 #define __WINT_MAX__ 4294967295U #define __SIZE_MAX__ 4294967295U #define __WCHAR_MAX__ 2147483647L #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 #define __FLT_EVAL_METHOD__ 2 #define __unix__ 1 #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __SIG_ATOMIC_TYPE__ int #define __DBL_MIN_10_EXP__ (-307) #define __FINITE_MATH_ONLY__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __UINT_FAST8_MAX__ 255 #define __DEC64_MAX_EXP__ 385 #define __INT8_C(c) c #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __SHRT_MAX__ 32767 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __UINT_LEAST8_MAX__ 255 #define __UINTMAX_TYPE__ long long unsigned int #define __linux 1 #define __DEC32_EPSILON__ 1E-6DF #define __unix 1 #define __UINT32_MAX__ 4294967295U #define __LDBL_MAX_EXP__ 16384 #define __WINT_MIN__ 0U #define __linux__ 1 #define __SCHAR_MAX__ 127 #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) #define __INT64_C(c) c ## LL #define __DBL_DIG__ 15 #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __USER_LABEL_PREFIX__ #define __STDC_HOSTED__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __FLT_EPSILON__ 1.19209289550781250000e-7F #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __DEC32_MAX__ 9.999999E96DF #define __INT32_MAX__ 2147483647 #define __SIZEOF_LONG__ 4 #define __UINT16_C(c) c #define __DECIMAL_DIG__ 21 #define __gnu_linux__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __GNUC__ 4 #define __FLT_HAS_DENORM__ 1 #define __SIZEOF_LONG_DOUBLE__ 12 #define __BIGGEST_ALIGNMENT__ 16 #define __i686 1 #define __DBL_MAX__ ((double)1.79769313486231570815e+308L) #define __INT_FAST32_MAX__ 2147483647 #define __DBL_HAS_INFINITY__ 1 #define __DEC32_MIN_EXP__ (-94) #define __INT_FAST16_TYPE__ int #define __LDBL_HAS_DENORM__ 1 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __INT_LEAST32_MAX__ 2147483647 #define __DEC32_MIN__ 1E-95DF #define __DBL_MAX_EXP__ 1024 #define __DEC128_EPSILON__ 1E-33DL #define __PTRDIFF_MAX__ 2147483647 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __GXX_ABI_VERSION 1002 #define __FLT_MIN_EXP__ (-125) #define __i686__ 1 #define __INT_FAST64_TYPE__ long long int #define __DBL_MIN__ ((double)2.22507385850720138309e-308L) #define __DECIMAL_BID_FORMAT__ 1 #define __DEC128_MIN__ 1E-6143DL #define __REGISTER_PREFIX__ #define __UINT16_MAX__ 65535 #define __DBL_HAS_DENORM__ 1 #define __UINT8_TYPE__ unsigned char #define __NO_INLINE__ 1 #define __i386 1 #define __FLT_MANT_DIG__ 24 #define __VERSION__ "4.5.1 20100924 (Red Hat 4.5.1-4)" #define __UINT64_C(c) c ## ULL #define __INT32_C(c) c #define __DEC64_EPSILON__ 1E-15DD #define __DEC128_MIN_EXP__ (-6142) #define __INT_FAST32_TYPE__ int #define __UINT_LEAST16_TYPE__ short unsigned int #define unix 1 #define __INT16_MAX__ 32767 #define __i386__ 1 #define __SIZE_TYPE__ unsigned int #define __UINT64_MAX__ 18446744073709551615ULL #define __INT8_TYPE__ signed char #define __ELF__ 1 #define __FLT_RADIX__ 2 #define __INT_LEAST16_TYPE__ short int #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __UINTMAX_C(c) c ## ULL #define __GNUC_RH_RELEASE__ 4 #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIZEOF_PTRDIFF_T__ 4 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __pentiumpro 1 #define __INT_FAST16_MAX__ 2147483647 #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_LEAST64_TYPE__ long long unsigned int #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MAX_10_EXP__ 38 #define __LONG_MAX__ 2147483647L #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __FLT_HAS_INFINITY__ 1 #define __UINT_FAST16_TYPE__ unsigned int #define __DEC64_MAX__ 9.999999999999999E384DD #define __CHAR16_TYPE__ short unsigned int #define __PRAGMA_REDEFINE_EXTNAME 1 #define __INT_LEAST16_MAX__ 32767 #define __DEC64_MANT_DIG__ 16 #define __INT64_MAX__ 9223372036854775807LL #define __UINT_LEAST32_MAX__ 4294967295U #define __INT_LEAST64_TYPE__ long long int #define __INT16_TYPE__ short int #define __INT_LEAST8_TYPE__ signed char #define __DEC32_MAX_EXP__ 97 #define __INT_FAST8_MAX__ 127 #define __INTPTR_MAX__ 2147483647 #define linux 1 #define __LDBL_MANT_DIG__ 64 #define __DBL_HAS_QUIET_NAN__ 1 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INTPTR_TYPE__ int #define __UINT16_TYPE__ short unsigned int #define __WCHAR_TYPE__ long int #define __SIZEOF_FLOAT__ 4 #define __UINTPTR_MAX__ 4294967295U #define __DEC64_MIN_EXP__ (-382) #define __INT_FAST64_MAX__ 9223372036854775807LL #define __FLT_DIG__ 6 #define __UINT_FAST64_TYPE__ long long unsigned int #define __INT_MAX__ 2147483647 #define __INT64_TYPE__ long long int #define __FLT_MAX_EXP__ 128 #define __DBL_MANT_DIG__ 53 #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __DEC64_MIN__ 1E-383DD #define __WINT_TYPE__ unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __SIZEOF_SHORT__ 2 #define __LDBL_MIN_EXP__ (-16381) #define __INT_LEAST8_MAX__ 127 #define __LDBL_MAX_10_EXP__ 4932 #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) #define __UINT8_C(c) c #define __INT_LEAST32_TYPE__ int #define __SIZEOF_WCHAR_T__ 4 #define __UINT64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __DEC_EVAL_METHOD__ 2 #define __UINT32_C(c) c ## U #define __INTMAX_MAX__ 9223372036854775807LL #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F #define __INT8_MAX__ 127 #define __UINT_FAST32_TYPE__ unsigned int #define __CHAR32_TYPE__ unsigned int #define __FLT_MAX__ 3.40282346638528859812e+38F #define __INT32_TYPE__ int #define __SIZEOF_DOUBLE__ 8 #define __FLT_MIN_10_EXP__ (-37) #define __INTMAX_TYPE__ long long int #define i386 1 #define __DEC128_MAX_EXP__ 6145 #define __GNUC_MINOR__ 5 #define __UINTMAX_MAX__ 18446744073709551615ULL #define __DEC32_MANT_DIG__ 7 #define __DBL_MAX_10_EXP__ 308 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __INT16_C(c) c #define __STDC__ 1 #define __PTRDIFF_TYPE__ int #define __UINT32_TYPE__ unsigned int #define __UINTPTR_TYPE__ unsigned int #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __LDBL_MIN_10_EXP__ (-4931) #define __SIZEOF_LONG_LONG__ 8 #define __LDBL_DIG__ 18 #define __UINT_FAST16_MAX__ 4294967295U #define __GNUC_GNU_INLINE__ 1 #define __UINT_FAST8_TYPE__ unsigned char #define __const const #define __restrict restrict #define __inline inline #define __builtin_va_list void * #define __builtin_va_arg(ar, t) (0) #define __builtin_offsetof(type, member) (0) #define __alignof__(type) (0) adlint-3.2.0/share/sample/vim-7.3/adlint/xxd/adlint_traits.yml0000644000004100000410000002015512224440633024147 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "xxd-7.3" # Project root directory. project_root: "../../vim73" # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - "../../vim73" exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "K&R" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 4 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/sample/vim-7.3/adlint/xxd/GNUmakefile0000644000004100000410000000726612224440633022645 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = vim-7.3 SOURCES = \ vim73/src/xxd/xxd.c VPATH = ../.. VPATH_COMPONENTS = 2 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/sample/vim-7.3/adlint/xxd/adlint_pinit.h0000644000004100000410000000200412224440633023403 0ustar www-datawww-data/* ___ ____ __ ___ _________ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint * / __ |/ /_/ / /___/ / /| / / / * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. * * This file is part of AdLint. * * AdLint is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * AdLint is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * AdLint. If not, see . */ #define _FORTIFY_SOURCE 1 #define UNIX adlint-3.2.0/share/demo/0000755000004100000410000000000012224440633015045 5ustar www-datawww-dataadlint-3.2.0/share/demo/useless_vars/0000755000004100000410000000000012224440633017563 5ustar www-datawww-dataadlint-3.2.0/share/demo/useless_vars/useless_vars.c0000644000004100000410000000025312224440633022445 0ustar www-datawww-dataint foo(int i) { return 0; } int main(void) { int i = foo(0); int ii; int iii = 0; if (i == 0) { ii = foo(ii); } return foo(iii); } adlint-3.2.0/share/demo/tag_hiding/0000755000004100000410000000000012224440633017142 5ustar www-datawww-dataadlint-3.2.0/share/demo/tag_hiding/tag_hiding.c0000644000004100000410000000035512224440633021406 0ustar www-datawww-datastruct struct_tag { int i; int j; }; union union_tag { int i; int j; }; enum enum_tag { ONE = 1, TWO, THREE }; static void foo(void) { struct struct_tag {}; union union_tag {}; enum enum_tag { A, B, C }; } adlint-3.2.0/share/demo/call_by_value/0000755000004100000410000000000012224440633017646 5ustar www-datawww-dataadlint-3.2.0/share/demo/call_by_value/call_by_value.c0000644000004100000410000000055112224440633022614 0ustar www-datawww-datastruct Point { int x; int y; }; typedef struct { int r; int g; int b; } Color; extern void foo(struct Point); extern void bar(int, struct Point); extern void baz(int, Color, int); int main(void) { struct Point point = { 1, 2 }; Color color = { 0, 1, 2 }; foo(point); bar(0, point); baz(0, color, 1); return 0; } adlint-3.2.0/share/demo/bad_conv/0000755000004100000410000000000012224440633016620 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_conv/bad_conv.c0000644000004100000410000000250612224440633020542 0ustar www-datawww-dataextern int printf(const char *, ...); extern int scanf(const char *, ...); int main(void) { int i = 0; int ii = 1; printf(); printf("%509d\n", i); printf("%510d\n", i); printf("%3d %5t\n", i, ii); printf("%3ld %xd\n", i); printf("%3to %fo\n", i, ii, 0); printf("%3tu %fu\n"); printf("%3tx %fx\n", i, ii); printf("%3tX %fX\n", i, ii); printf("%3lf %Lf\n", i, ii); printf("%3le %Le\n", i, ii); printf("%3lE %LE\n", i, ii); printf("%3lg %Lg\n", i, ii); printf("%3lG %LG\n", i, ii); printf("%lc %Lc\n", i, ii); printf("%%lc % %Z\n", i, ii); printf("%ls %Ls\n", i, ii); printf("%ln %Ln\n", i, ii); printf("%p %lp\n", i, ii); printf("%#x %#\n", i, ii); scanf("%3d %5t\n", &i, &ii); scanf("%3ld %xd\n", &i, &ii); scanf("%3to %fo\n", i, &ii); scanf("%3tu %fu\n", &i, ii); scanf("%3tx %fx\n", &i, &ii); scanf("%3tf %lf\n", &i, &ii); scanf("%3lls %fs\n", &i, &ii); scanf("%3p %lp\n", &i, &ii); scanf("%%lc % %Z\n", &i, &ii); scanf("%l[a-z] %ll[a-z]\n", &i, &ii); scanf("%3llc %fc\n", &i, &ii); scanf("%3llz %c\n", &i, &ii); scanf("%[z-a]\n", &i); scanf("%[abcd]\n", &i); scanf("%[abca]\n", &i); return 0; } static void foo(void) { char buf[256]; printf("%s", buf); scanf("%s", buf); } adlint-3.2.0/share/demo/may_be_unset/0000755000004100000410000000000012224440633017517 5ustar www-datawww-dataadlint-3.2.0/share/demo/may_be_unset/may_be_unset.c0000644000004100000410000000066612224440633022345 0ustar www-datawww-datastatic int j; int func(int *p) { int i; int k; if (p != NULL && *p < 0) { i = *p; } if (NULL != p && *p > 5) { i = *p; } if (p == NULL && *p == 0) { i = 0; } if (p && *p == rand()) { i = *p; } { struct Foo { int val; } *p = may_return_null(); if (p && p->val == 0) { p->val = 1; } } k = j; return i * k; } adlint-3.2.0/share/demo/register_vars/0000755000004100000410000000000012224440633017724 5ustar www-datawww-dataadlint-3.2.0/share/demo/register_vars/register_vars.c0000644000004100000410000000021112224440633022741 0ustar www-datawww-dataextern int puts(const char *); void foo(void) { register char a[3]; char *p = a; p = &a[0]; p = &a[1]; puts(a); } adlint-3.2.0/share/demo/loop_var/0000755000004100000410000000000012224440633016666 5ustar www-datawww-dataadlint-3.2.0/share/demo/loop_var/loop_var.c0000644000004100000410000000223412224440633020654 0ustar www-datawww-dataint foo(void) { int i; int ii; for (i = 0; i < 10; i++) ; for (ii = 0; i < 10; i++) ; for (i = 0, ii = 0; ii < 10; ii++) ; return i; } void bar(void) { int i; int j; int k = 0; for (i = 0; i < 10; k = k + 1) { i++; } for (i = 0; i < 10; i++) { i++; } for (j = 0; j < 10; j++) { if (j == 5) { j++; } if (j == 15) { j++; } if (j == -15) { j++; } } for (j = 0; ; j++) { if (j < 0) { j++; } if (j == 3) { j++; } if (j == 5) { LABEL: break; } } } void baz(void) { int i; int j = 0; for (i = 0; i < 5; ) { ++i; } for (i = 0; i < 5; j++) { i++; } for (i = 0; i < 5; ++j) { i++; } for (i = 0; i < 5; j--) { i++; } for (i = 0; i < 5; --j) { i++; } for (i = 0; i < 5; j = i + j) { ++i; } for (i = 0; i < 5; j += 2) { i++; } for (i = 0; i < 5; j -= 2) { ++i; } } adlint-3.2.0/share/demo/bad_line/0000755000004100000410000000000012224440633016602 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_line/bad_line.c0000644000004100000410000000044312224440633020504 0ustar www-datawww-data#line #line 35000 "bad_line.c" #line 35 * 100 #line 35 * 100 "bad_line.c" #line 35 L"あいう.c" #line __LINE__ __FILE__ #define THIS_FILE __FILE__ #define LINE 35 #line LINE THIS_FILE #undef LINE #define LINE 35000 #line LINE THIS_FILE #line __FILE__ 35 #line LINE1000 #pragma adlint-3.2.0/share/demo/integer_promotion/0000755000004100000410000000000012224440633020610 5ustar www-datawww-dataadlint-3.2.0/share/demo/integer_promotion/integer_promotion.c0000644000004100000410000000046512224440633024524 0ustar www-datawww-data/* ADLINT:TUNIT:[-W0118,-W0414,-W0425,-W0947,-W0948] */ #define EOF (-1) extern int getchar(void); extern int printf(const char *, ...); int main(void) { unsigned char c; /* ADLINT::[-W0100] */ while ((c = getchar()) != EOF) { if ((int) c != '\n') printf("%d\n", (int) c); } return 0; } adlint-3.2.0/share/demo/typedef_each_src/0000755000004100000410000000000012224440633020334 5ustar www-datawww-dataadlint-3.2.0/share/demo/typedef_each_src/typedef_each_src.c0000644000004100000410000000015212224440633023765 0ustar www-datawww-datatypedef int integer; integer ei1 = 0; static integer si = 0; void foo(void) { extern integer ei2; } adlint-3.2.0/share/demo/div_by_zero/0000755000004100000410000000000012224440633017360 5ustar www-datawww-dataadlint-3.2.0/share/demo/div_by_zero/div_by_zero.c0000644000004100000410000000107112224440633022036 0ustar www-datawww-dataextern int rand(void); int foo(void) { const int i = rand(); return 3 / i; /* div by 0 when rand() returns 0 */ } int bar(const int n) { int c; int i = 1; for (c = 0; c < n; ++c) { i = c; } i = 3 / i; /* div by zero when 1 is passed as parameter n */ for (c = 0; c < n; ++c) { if (c % 2 == 0) { i = 0; } } i = 3 / i; /* div by zero when 1 is passed as parameter n */ if (i == 0) { return 0; } else { return 3 / i; /* i must not be 0 in this path */ } } adlint-3.2.0/share/demo/goto_stmt/0000755000004100000410000000000012224440633017064 5ustar www-datawww-dataadlint-3.2.0/share/demo/goto_stmt/goto_stmt.c0000644000004100000410000000030712224440633021247 0ustar www-datawww-dataint main(void) { int i = rand(); if (i == 1) { goto Label1; } if (i < 0) { int j = 3 / i; Label1: Label2: return j; } goto Label2; return 0; } adlint-3.2.0/share/demo/no_eof_nl/0000755000004100000410000000000012224440633017003 5ustar www-datawww-dataadlint-3.2.0/share/demo/no_eof_nl/no_eof_nl.c0000644000004100000410000000004112224440633021100 0ustar www-datawww-dataint main(void) { return 0; } adlint-3.2.0/share/demo/useless_funs/0000755000004100000410000000000012224440633017563 5ustar www-datawww-dataadlint-3.2.0/share/demo/useless_funs/useless_funs_2.c0000644000004100000410000000010212224440633022657 0ustar www-datawww-data#include "useless_funs_1.h" int main(void) { return foo(); } adlint-3.2.0/share/demo/useless_funs/useless_funs_1.h0000644000004100000410000000021512224440633022670 0ustar www-datawww-data#if !defined(USELESS_FUNS_1_H) #define USELESS_FUNS_1_H extern int foo(void); extern int bar(const int); extern int baz(const int); #endif adlint-3.2.0/share/demo/useless_funs/useless_funs_1.c0000644000004100000410000000070112224440633022663 0ustar www-datawww-data#include "useless_funs_1.h" int foo(void) { return 0; } int bar(const int i) /* no caller of bar() in this project */ { if (i < 100) { return i + 1; } else { return 0; } } int baz(const int i) /* no caller of baz() in this project */ { if (i < 100) { return i + 2; } else { return 1; } } static int qux(void) /* no caller of qux() in this translation unit */ { return 2; } adlint-3.2.0/share/demo/bad_macro/0000755000004100000410000000000012224440633016754 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_macro/bad_macro.c0000644000004100000410000000421412224440633021030 0ustar www-datawww-data#define FUNC1(x, y) x + y #define FUNC2(x) (x * x) #define FUNC3(x, y) x##y #define FUNC4(x) #x #define MANY_PARAMS1(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee) 1 #define MANY_PARAMS2(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff) 1 int main(void) { const int i = FUNC1(1, 2); const int j = FUNC2(2); const int k = FUNC3(1, 2); const char * const str = FUNC4(foo); const int l = MANY_PARAMS1(1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1); return MANY_PARAMS2(1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1); } static int foo(void) { #define FOO (1) const int i = FOO; #undef FOO return i; } #define MACRO1 { 0, 1, i } #define MACRO2(x) { 0, x, x + 1 } #define MACRO3(a, n) { \ int j; \ for (j = 0; j < n; j++) { \ a[j] = j; \ } \ } #define MACRO4(foo) \ do { \ foo(0); \ } while (0) #define MACRO5 static const #define MACRO6 if (hoge) perror("hoge"); #define MACRO7 { \ for (int i = 0; i < 10; i++) { \ puts("hello world\n"); \ } \ } static void bar(int i) { int a1[] = MACRO1; int a2[] = MACRO2(3); MACRO3; if (i == 0) MACRO4(bar); { MACRO5 int hoge; MACRO6 } MACRO7; } #define ADD + #define SUB - #define MUL * #define DIV / #define MOD % #define WHILE while #define DO do #define FOR for #define IF if #define ELSE else #define SWITCH switch #define CASE case #define DEFAULT default #define GOTO goto #define RETURN return #define BREAK break #define CONTINUE continue #undef assert #define defined !defined #undef defined #undef __STDC__ #define __FILE__ "foo.c" adlint-3.2.0/share/demo/should_be_typedef/0000755000004100000410000000000012224440633020531 5ustar www-datawww-dataadlint-3.2.0/share/demo/should_be_typedef/should_be_typedef.c0000644000004100000410000000134012224440633024357 0ustar www-datawww-data#define OM_1 int #define OM_2 unsigned int #define OM_3 int * #define OM_4 const int * #define OM_5 int ** #define OM_6 volatile int * const #define OM_7 void #define OM_8 static const #define OM_9 static volatile #define OM_10 static const volatile #define OM_11 extern const #define OM_12 volatile extern #define OM_13 const volatile #define FM_1(x) int #define FM_2(x) unsigned int #define FM_3(x) int * #define FM_4(x) const int * #define FM_5(x) int ** #define FM_6(x) volatile int * const #define FM_7(x) void #define FM_8(x) static const #define FM_9(x) static volatile #define FM_10(x) static const volatile #define FM_11(x) extern const #define FM_12(x) volatile extern #define FM_13(x) const volatile adlint-3.2.0/share/demo/incomplete_ifelse/0000755000004100000410000000000012224440633020533 5ustar www-datawww-dataadlint-3.2.0/share/demo/incomplete_ifelse/incomplete_ifelse.c0000644000004100000410000000053612224440633024371 0ustar www-datawww-dataint foo(const int i) { int j; if (i == 0) { j = 0; } if (i == 1) { j = 1; } else if (i == 2) { j = 2; } if (i > 2) { if (i == 5) { j = 5; } else if (i == 6) { j = 6; } } else if (i < 0) { j = -1; } return j; } adlint-3.2.0/share/demo/intro_demo/0000755000004100000410000000000012224440633017204 5ustar www-datawww-dataadlint-3.2.0/share/demo/intro_demo/useless_header.h0000644000004100000410000000007112224440633022346 0ustar www-datawww-dataextern struct { int i; int j; int k; } hoge; adlint-3.2.0/share/demo/intro_demo/intro_demo.c0000644000004100000410000000371512224440633021515 0ustar www-datawww-data#include "intro_demo.h" #include "useless_header.h" static int foo(void) { int i = rand(); if (i < 0) { unsigned * const p = (unsigned *) malloc(sizeof(unsigned)); unsigned int ui; if (p != NULL) { *p = 0U; } /* No malloc() error handling in the else branch */ ui = *p; /* Dereferencing a NULL pointer when malloc() failed */ switch (i) { case -5: i = -1; ui = 0U; break; /* Control never reaches to this "case 10:" clause because "i" is less than 0 at this point */ case 10: ui = 100U; break; default: ui = 0U; break; } /* Control never reaches to this if-body-statement because * usual-arithmetic-conversion makes "i < ui" into * "(unsigned int) i < ui" and then the value of "i" which is less than * 0 will be converted into a new value which is greater than 0 because * of the wrap-around. * So, the expression ("a value greater than 0" < 0) makes always false */ if (i < ui) { /* exit() standard function terminates this execution path */ exit(0); } } else { /* "i" is greater than or equal to 0 at this point */ unsigned j = 10 / i; if (i < 1) { j = 3 / i; /* "i" is equal to 0 at this point */ } if (i <= 0x0FFFFFFF) { i <<= 3; } else { i = i << 1; /* "i" is greater than or equal to 0x10000000 */ } /* abort() standard function terminates this execution path */ abort(); } /* Control never reaches to this if-body-statement because "i" is less than 0 and not equal to -5 at this point */ if (i == -5) { abort(); } return i; } static inline int bar(void) { return 0; } int main(void) { return foo(); } adlint-3.2.0/share/demo/intro_demo/intro_demo.h0000644000004100000410000000032212224440633021511 0ustar www-datawww-data#if !defined(INTRO_DEMO_H) #define INTRO_DEMO_H #define NULL (0) extern int rand(void); extern void exit(int); extern void abort(void); extern void *malloc(int); extern int printf(const char *, ...); #endif adlint-3.2.0/share/demo/ambig_operator/0000755000004100000410000000000012224440633020037 5ustar www-datawww-dataadlint-3.2.0/share/demo/ambig_operator/ambig_operator.c0000644000004100000410000001321512224440633023177 0ustar www-datawww-dataextern int foo(int); void bar1(void) { const int i = 1; const int j = 2; const int k = 3; const int * const p = &i; int r; r = i + j % k; r = i % j % k; r = i % j * k; r = i * j % k; r = foo(i + j % k); r = foo(i + j % foo(i + j % k)); r = i << j >> k; r = i < j > k; r = i == j != k; r = i + j * k; r = i / j - k; r = i ? j : k; r = -i ? j : k; r = i ? -j : k; r = i > j ? j : k; r = i + j ? j : k; r = i ? j + k : k; r = i ? j : j + k; r = i + j >> k; r = i < j + k; r = i & j != k; i && -j; r = i && ~j; r = !i || j; r = *p || j; r = i && (unsigned int) j; r = i && j && k; r = i || j || k; r = i || j && i; r = i > j && k; r = i && j != k; r = i ? j : k ? i : j; r = i ? j ? k : j : i; r = i <= j <= k; r = i == j == k; r = i << j << k; } void bar2(void) { const int i = 1; const int j = 2; const int k = 3; const int * const p = &i; int r; r = i + (j % k); r = (i % j) % k; r = (i % j) * k; r = (i * j) % k; r = foo(i + (j % k)); r = foo(i + (j % foo(i + (j % k)))); r = (i << j) >> k; r = (i < j) > k; r = (i == j) != k; r = i + (j * k); r = (i / j) - k; r = (i > j) ? j : k; r = (i + j) ? j : k; r = i ? (j + k) : k; r = i ? j : (j + k); r = (i + j) >> k; r = i < (j + k); r = i & (j != k); r = i && (~j); r = (!i) || j; r = (*p) || j; r = i && ((unsigned int) j); r = (i || j) && i; r = (i > j) && k; r = i && (j != k); r = i ? j : (k ? i : j); r = i ? (j ? k : j) : i; r = (i <= j) <= k; r = (i == j) == k; r = (i << j) << k; } void baz1(void) { const int i = 1; const int j = 2; const int k = 3; const int * const p = &i; { const int r = i + j % k; } { const int r = i % j % k; } { const int r = i % j * k; } { const int r = i * j % k; } { const int r = foo(i + j % k); } { const int r = foo(i + j % foo(i + j % k)); } { const int r = i << j >> k; } { const int r = i < j > k; } { const int r = i == j != k; } { const int r = i + j * k; } { const int r = i / j - k; } { const int r = i ? j : k; } { const int r = -i ? j : k; } { const int r = i ? -j : k; } { const int r = i > j ? j : k; } { const int r = i + j ? j : k; } { const int r = i ? j + k : k; } { const int r = i ? j : j + k; } { const int r = i + j >> k; } { const int r = i < j + k; } { const int r = i & j != k; } { const int r = i && ~j; } { const int r = !i || j; } { const int r = *p || j; } { const int r = i && (unsigned int) j; } { const int r = i && j && k; } { const int r = i || j || k; } { const int r = i || j && i; } { const int r = i > j && k; } { const int r = i && j != k; } { const int r = i ? j : k ? i : j; } { const int r = i ? j ? k : j : i; } { const int r = i <= j <= k; } { const int r = i == j == k; } { const int r = i << j << k; } } void baz2(void) { const int i = 1; const int j = 2; const int k = 3; const int * const p = &i; { const int r = i + (j % k); } { const int r = (i % j) % k; } { const int r = (i % j) * k; } { const int r = (i * j) % k; } { const int r = foo(i + (j % k)); } { const int r = foo(i + (j % foo(i + (j % k)))); } { const int r = (i << j) >> k; } { const int r = (i < j) > k; } { const int r = (i == j) != k; } { const int r = i + (j * k); } { const int r = (i / j) - k; } { const int r = (i > j) ? j : k; } { const int r = (i + j) ? j : k; } { const int r = i ? (j + k) : k; } { const int r = i ? j : (j + k); } { const int r = (i + j) >> k; } { const int r = i < (j + k); } { const int r = i & (j != k); } { const int r = i && (~j); } { const int r = (!i) || j; } { const int r = (*p) || j; } { const int r = i && ((unsigned int) j); } { const int r = (i || j) && i; } { const int r = (i > j) && k; } { const int r = i && (j != k); } { const int r = i ? j : (k ? i : j); } { const int r = i ? (j ? k : j) : i; } { const int r = (i <= j) <= k; } { const int r = (i == j) == k; } { const int r = (i << j) << k; } } void qux1(void) { const int i = 1; const int j = 2; const int a[5] = {0}; const struct { int m; } s = {0}, * const p = &s; int r; r = a[i] && j; r = foo(i) || j; r = p->m && i; r = s.m || i; } void qux2(void) { const int i = 1; const int j = 2; const int a[5] = {0}; const struct { int m; } s = {0}, * const p = &s; int r; r = (a[i]) && j; r = (foo(i)) || j; r = (p->m) && i; r = (s.m) || i; } void quux1(void) { const int i = 1; const int j = 2; const int a[5] = {0}; const struct { int m; } s = {0}, * const p = &s; { const int r = a[i] && j; } { const int r = foo(i) || j; } { const int r = p->m && i; } { const int r = s.m || i; } } void quux2(void) { const int i = 1; const int j = 2; const int a[5] = {0}; const struct { int m; } s = {0}, * const p = &s; { const int r = (a[i]) && j; } { const int r = (foo(i)) || j; } { const int r = (p->m) && i; } { const int r = (s.m) || i; } } void foobar1(void) { const int i = 1; const int j = 2; const int k = 3; int r; r = i * j / k; r = i / j * k; r = i + j - k; r = i - j + k; } void foobar2(void) { const int i = 1; const int j = 2; const int k = 3; int r; r = (i * j) / k; r = (i / j) * k; r = (i + j) - k; r = (i - j) + k; } adlint-3.2.0/share/demo/uninit_vars/0000755000004100000410000000000012224440633017406 5ustar www-datawww-dataadlint-3.2.0/share/demo/uninit_vars/uninit_vars.c0000644000004100000410000000056612224440633022122 0ustar www-datawww-dataextern int rand(void); int foo(void) { int i; const int r = rand(); if (r == 0) { i = 1; } else if (r == 1) { i = 2; } return 3 / i; /* i is not set when rand() returns !(0 or 1) */ } int bar(int n) { int i; int c; for (c = 0; c < n; c++) { i = c; } return 3 / i; /* i is not set when n < 1 */ } adlint-3.2.0/share/demo/static_vars/0000755000004100000410000000000012224440633017367 5ustar www-datawww-dataadlint-3.2.0/share/demo/static_vars/static_vars.c0000644000004100000410000000072112224440633022055 0ustar www-datawww-datastatic int i = 0; static int ii = 0; static int iii = 0; void foo(void) { i = 1; } int bar(void) { return i; } static void baz(void) { ii = 1; } static int qux(void) { static int ii = 0; return ii; } static int a[]; static int a[3]; static struct Foo s1; static struct Foo s2[]; static struct Foo s3[3]; static union Bar u1; static union Bar u2[]; static union Bar u3[3]; static enum Baz e1; static enum Baz e2[]; static enum Baz e3[3]; adlint-3.2.0/share/demo/must_be_true/0000755000004100000410000000000012224440633017542 5ustar www-datawww-dataadlint-3.2.0/share/demo/must_be_true/must_be_true.c0000644000004100000410000000053012224440633022401 0ustar www-datawww-dataint main(void) { const int i = rand(); const unsigned short us = (unsigned short) rand(); if (i < 0) { if (i < us) { return 0; } } else { for (int j = 0; j < i; j++) { puts("hoge\n"); } while (i != -5) { return 1; } } return 0; } adlint-3.2.0/share/demo/tricky_incdec/0000755000004100000410000000000012224440633017657 5ustar www-datawww-dataadlint-3.2.0/share/demo/tricky_incdec/tricky_incdec.c0000644000004100000410000000015712224440633022640 0ustar www-datawww-dataextern int foo(int); void bar(int n, int *p) { int r; ++n; (*p)--; r = ++n; foo(r++); } adlint-3.2.0/share/demo/logical_expr/0000755000004100000410000000000012224440633017515 5ustar www-datawww-dataadlint-3.2.0/share/demo/logical_expr/logical_expr.c0000644000004100000410000000356512224440633022342 0ustar www-datawww-dataint foo(const int i1, const int i2, const int i3, const int i4) { int r; r = (i1 + i2) < (i3 == i4); r = i1 - i2 > (i3 != i4); r = (i1 * i2) <= (i3 < i4); r = i1 / i2 >= (i3 > i4); r = (i1 % i2) < (i3 <= i4); r = i1 & i2 > (i3 >= i4); r = (i1 | i2) <= !i3; r = i1 ^ i2 >= !(i3 + i4); r = (i1 << i2) > (!i3 < (i4 + i1)); r = (i3 == i4) < (i1 + i2); r = (i3 != i4) > i1 - i2; r = (i3 < i4) <= (i1 * i2); r = (i3 > i4) >= i1 / i2; r = (i3 <= i4) < (i1 % i2); r = (i3 >= i4) > i1 & i2; r = !i3 <= (i1 | i2); r = !(i3 + i4) >= i1 ^ i2; r = (!i3 < (i4 + i1)) > (i1 << i2); r = (!i3 < (i4 + i1)) < (i3 == i4); r = !(i3 + i4) > (i3 != i4); r = !i3 <= (i3 < i4); r = (i3 >= i4) >= (i3 > i4); r = (i3 <= i4) < (i3 <= i4); r = (i3 > i4) > (i3 >= i4); r = (i3 < i4) <= !i3; r = (i3 != i4) >= !(i3 + i4); r = (i3 == i4) > (!i3 < (i4 + i1)); return r; } int bar(const int i1, const int i2, const int i3, const int i4) { int r; r = (i1 + i2) & (i3 == i4); r = i1 - i2 | (i3 != i4); r = (i1 * i2) & (i3 < i4); r = i1 / i2 | (i3 > i4); r = (i1 % i2) & (i3 <= i4); r = i1 & i2 | (i3 >= i4); r = (i1 | i2) & !i3; r = i1 ^ i2 | !(i3 + i4); r = (i1 << i2) & (!i3 < (i4 + i1)); r = (i3 == i4) | (i1 + i2); r = (i3 != i4) & i1 - i2; r = (i3 < i4) | (i1 * i2); r = (i3 > i4) & i1 / i2; r = (i3 <= i4) | (i1 % i2); r = (i3 >= i4) & i1 & i2; r = !i3 | (i1 | i2); r = !(i3 + i4) & i1 ^ i2; r = (!i3 < (i4 + i1)) | (i1 << i2); r = (!i3 < (i4 + i1)) & (i3 == i4); r = !(i3 + i4) | (i3 != i4); r = !i3 & (i3 < i4); r = (i3 >= i4) | (i3 > i4); r = (i3 <= i4) & (i3 <= i4); r = (i3 > i4) | (i3 >= i4); r = (i3 < i4) & !i3; r = (i3 != i4) | !(i3 + i4); r = (i3 == i4) & (!i3 < (i4 + i1)); return r; } adlint-3.2.0/share/demo/long_sym/0000755000004100000410000000000012224440633016674 5ustar www-datawww-dataadlint-3.2.0/share/demo/long_sym/long_sym.c0000644000004100000410000000501312224440633020666 0ustar www-datawww-dataextern int verylonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglongsymbol1_decl; extern int verylonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglongsymbol2_decl; extern int verylonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglongsymbol1_def = 0; extern int verylonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglongsymbol2_def = 0; adlint-3.2.0/share/demo/bad_enum/0000755000004100000410000000000012224440633016617 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_enum/bad_enum.c0000644000004100000410000000234712224440633020543 0ustar www-datawww-dataenum Foo { FOO_A, FOO_B, FOO_C }; enum Bar { BAR_A = 1, BAR_B, BAR_C }; enum Baz { BAZ_A = 2, BAZ_B = 4, BAZ_C = 8 }; extern void func1(enum Foo f); int func3(int i) { const enum Foo foo = FOO_A; foo1(i); foo = i; foo = FOO_A + i; switch (i) { case FOO_A: return foo; case FOO_B: return FOO_B; case FOO_C: return i; default: return (int) BAR_A; } } enum Foo func2(const enum Foo param, const int i) { enum Foo foo = BAR_A; enum Bar bar = BAZ_A; enum Baz baz = FOO_A; foo = FOO_A; bar = BAR_A; baz = BAZ_A; func3(foo); func3(BAR_A); func3((int) BAZ_C); switch (param) { case FOO_A: foo = BAR_A; func1(BAR_A); func1(1); func1(baz); foo = 1; foo = bar; return BAR_B; case BAR_B: case 5: foo = BAZ_C; func1(BAZ_C); func1(0x2); baz = BAZ_C; func1(baz); foo = 0x2; foo = baz; return BAZ_C; case 6: return FOO_A + 10; case 7: return FOO_A + i; case 8: return bar; case 9: baz = BAZ_C; return baz; case 10: return i; } return FOO_C; } adlint-3.2.0/share/demo/shift_expr/0000755000004100000410000000000012224440633017220 5ustar www-datawww-dataadlint-3.2.0/share/demo/shift_expr/shift_expr.c0000644000004100000410000000026612224440633021543 0ustar www-datawww-dataint main(void) { const int i = -1; int j; const unsigned int ui = 1; j = i >> 3; j = (int) (ui >> 3); j = i << 3; j = (int) (ui << 3); return 0; } adlint-3.2.0/share/demo/logical_trick/0000755000004100000410000000000012224440633017653 5ustar www-datawww-dataadlint-3.2.0/share/demo/logical_trick/logical_trick.c0000644000004100000410000000074012224440633022626 0ustar www-datawww-dataextern int foo(void); static inline void bar(const int x, int y) { if ((x == 0) && (y == 0)) { } if ((x > 0) && (y++ < 0)) { } if ((x < 0) && foo()) { } { int i; i = !(x || y); i = !(x | b); i = !(x && b); i = !(x & b); } { int i; i = ~((x > y) && (x > 5)); i = !((x > b) && (x > 5)); } } static int baz(const int x, const int y) { (x && y) || 0; return 0; } adlint-3.2.0/share/demo/wrap_around/0000755000004100000410000000000012224440633017366 5ustar www-datawww-dataadlint-3.2.0/share/demo/wrap_around/wrap_around.c0000644000004100000410000000411712224440633022056 0ustar www-datawww-datastatic void foo(const int i, const unsigned int ui) { { int r; if (i > 2000000000) { r = i * 5; r = i + i; } } { unsigned int r; if (ui > 3000000000U) { r = ui * 5U; r = ui + ui; } else { r = ui - 4000000000U; } } } static void bar(const int i, const unsigned int ui) { { int r; if (i > 1000) { r = i * 5; r = i + i; } } { unsigned int r; if (ui > 1000U) { r = ui * 5U; r = ui + ui; } else { r = ui - 1000U; } } } static void baz(const signed char c, const unsigned char uc) { { signed char r; if (c > 125) { r = c * 5; r = c + c; } } { unsigned char r; if (uc > 128U) { r = uc * 5U; r = uc + uc; } else { r = uc - 128U; } } } static void qux(const unsigned int ui) { { const unsigned int ui1 = 3U - 1U; const unsigned int ui2 = 3U - 3U; const unsigned int ui3 = 3U - 5U; unsigned int ui4; ui4 = 3U - 1U; ui4 = 3U - 3U; ui4 = 3U - 5U; ui4 = ui - 1U; } { const unsigned int ui1 = 4294967294U + 1U; const unsigned int ui2 = 4294967295U + 1U; unsigned int ui3; ui3 = 4294967294U + 1U; ui3 = 4294967295U + 1U; ui3 = ui + 1U; } { const unsigned int ui1 = 2000000000U * 2U; const unsigned int ui2 = 3000000000U * 2U; unsigned int ui3; ui3 = 2000000000U * 2U; ui3 = 3000000000U * 2U; ui3 = ui * 2U; } } static void quux(const int i) { unsigned int ui; if (i < 10) { ui1 = (unsigned int) (i - 5); ui1 = (unsigned int) (i - 9); ui1 = (unsigned int) (i - 10); } if (i >= 0 && i < 10) { ui1 = (unsigned int) (i - 5); ui1 = (unsigned int) (i - 9); ui1 = (unsigned int) (i - 10); } } adlint-3.2.0/share/demo/dead_code/0000755000004100000410000000000012224440633016734 5ustar www-datawww-dataadlint-3.2.0/share/demo/dead_code/dead_code.c0000644000004100000410000000612212224440633020770 0ustar www-datawww-dataextern void exit(int); extern int rand(void); static int foo(const int i, int); static int bar(const int i, int j); static int baz(const int, int); static int baz(const int j, int i); static int foo(const int i, int) { if (i == 0) { return 0; } else if (i == 1) { exit(1); } else { return 2; } return rand(); } static int bar(const int i, int j) { if (i < 0) { unsigned short j = foo(1); if (j < i) { abort(); } if (i == 0) { abort(); } exit(1); } else { if (i == -2) { abort(); } } /* i >= 0 */ if (i < 2) { j = 3 / i; /* i == 0..1 */ } if (i < 1) { j = 3 / i; /* i == 0 */ return j; } return 3 / i; /* i == 1 */ } static int baz(const int i, int j) { if (i < 0) { unsigned short j = foo(1, 2, 3); if (j < i) { abort(); } if (i == 0) { abort(); } exit(1); } else { if (i == -2) { abort(); } } /* i >= 0 */ if (i < -3) { abort(); } if (i != 0) { i = 1; } else { return 0; } /* i == 1 */ if (i < 2) { j = 3 / i; } if (i < 1) { j = 3 / i; return j; } return 3 / i; } static int qux(void) { int i = foo(0); int j; if (i < 0) { unsigned short j = foo(1); if (j < i) { abort(); } if (i == 0) { abort(); } exit(1); } else { if (i == -2) { abort(); } } /* i >= 0 */ if (i == 0) { i = 1; } else if (i == 1) { i = 2; } /* i >= 1 */ if (i < 2) { j = 3 / i; } if (i < 1) { j = 3 / i; return j; } return 3 / i; } static int foobar(void) { int i; if (1) { i = foo(0); } if (0) { return i; } if (1) { i = foo(0); } else { __adlint__eval("puts 'NOTREACHED'"); return 0; } if (0) { __adlint__eval("puts 'NOTREACHED'"); return 0; } else { i = foo(0); } do { i = 0; } while(0); switch (i) { case 0: for (;;) { i = 0; } break; default: i = 1; } return 3 / i; } int (*p)(const int j, int i) = &foo; int main(void) { int i = foo(0); int j; int (*p)(const int x, int y) = bar; p = baz; if (i < 0) { return 0; } if (i != 0) { i = 1; } else { return 0; } /* i == 1 */ if (i < 2) { j = 3 / i; } if (i < 1) { return 3 / i; } i = foo(0); switch (i) { case 0: return 1; case 1: return 2; case 2: case 3: return 3; default: return 4; break; } if (i == 4) { return 5; } else { return 6; } return 0; } adlint-3.2.0/share/demo/dangling_else/0000755000004100000410000000000012224440633017640 5ustar www-datawww-dataadlint-3.2.0/share/demo/dangling_else/dangling_else.c0000644000004100000410000000043012224440633022574 0ustar www-datawww-datastatic void foo(const int i, const int j) { if (i < 0) if (j > 0) { return 0; } else { return 1; } if (i > 0) if (j < 0) { return 2; } else { return 3; } return 4; } adlint-3.2.0/share/demo/bad_label/0000755000004100000410000000000012224440633016732 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_label/bad_label.c0000644000004100000410000000036412224440633020766 0ustar www-datawww-dataint foo(const int i) { if (i == 0) { label: return 0; } if (i < 0) { goto label; } label: return 1; } int bar(const int i) { if (i == 0) { goto label; } i = 0; label: return i; } adlint-3.2.0/share/demo/octal_const/0000755000004100000410000000000012224440633017355 5ustar www-datawww-dataadlint-3.2.0/share/demo/octal_const/octal_const.c0000644000004100000410000000043512224440633022033 0ustar www-datawww-data#define ZERO_1 0 #define ZERO_2 (0) #define OCTAL_1 0160 #define OCTAL_2 (0160) int i1 = 0; int i2 = (0); int i3 = ZERO_1; int i4 = ZERO_2; int i5 = 0160; int i6 = (0160); int i7 = OCTAL_1; int i8 = OCTAL_2; char c1 = 'a'; char c2 = '\012'; char *p1 = "foo"; char *p2 = "fo\012o"; adlint-3.2.0/share/demo/redundant_select/0000755000004100000410000000000012224440633020370 5ustar www-datawww-dataadlint-3.2.0/share/demo/redundant_select/redundant_select.c0000644000004100000410000000056212224440633024062 0ustar www-datawww-dataint foo(const int i) { if (i > 5) { switch (i) { case 0: return 1; case 5: return 2; default: return 3; } } switch (i) { case 0: return 4; default: switch (i) { case 10: return 5; default: return 6; } } } adlint-3.2.0/share/demo/malloc_or_die/0000755000004100000410000000000012224440633017635 5ustar www-datawww-dataadlint-3.2.0/share/demo/malloc_or_die/malloc_or_die.c0000644000004100000410000000112412224440633022567 0ustar www-datawww-dataextern void *malloc(int); int main(void) { char *p; p = (char *) malloc(10); if (p == NULL) { return 2; } *p = (char) 1; p = (char *) malloc(10); if (p == NULL) { return 2; } else { *p = (char) 1; } p = (char *) malloc(10); if (p == NULL) { return 2; } else if (p == NULL) { *p = (char) 0; } else { *p = (char) 1; } *p = (char) 3; p = (char *) malloc(10); switch (p) { case NULL: return 4; default: *p = (char) 5; } return *p; } adlint-3.2.0/share/demo/no_void_arg/0000755000004100000410000000000012224440633017333 5ustar www-datawww-dataadlint-3.2.0/share/demo/no_void_arg/no_void_arg.c0000644000004100000410000000015012224440633021761 0ustar www-datawww-dataint foo() { return 0; } int (*bar())() { return 0; } int baz(int (*p)()) { return p(0); } adlint-3.2.0/share/demo/useless_exp_funs/0000755000004100000410000000000012224440633020437 5ustar www-datawww-dataadlint-3.2.0/share/demo/useless_exp_funs/useless_exp_funs_2.c0000644000004100000410000000010612224440633024413 0ustar www-datawww-data#include "useless_exp_funs_1.h" int main(void) { return foo(); } adlint-3.2.0/share/demo/useless_exp_funs/useless_exp_funs_1.c0000644000004100000410000000017212224440633024415 0ustar www-datawww-dataint bar(int i) { return i + 1; } int baz(int i) { return i * 2; } int foo(void) { return bar(1) + baz(2); } adlint-3.2.0/share/demo/useless_exp_funs/useless_exp_funs_1.h0000644000004100000410000000002612224440633024420 0ustar www-datawww-dataextern int foo(void); adlint-3.2.0/share/demo/reserved_ident/0000755000004100000410000000000012224440633020047 5ustar www-datawww-dataadlint-3.2.0/share/demo/reserved_ident/reserved_ident.c0000644000004100000410000000330412224440633023215 0ustar www-datawww-datavoid __fundecl(void); extern void _FUNDECL(void); static void _fundecl(void); extern int __vardecl; extern int _VARDECL; static int _vardecl; int __vardef = 0; extern int _VARDEF = 0; static int _vardef = 0; int __ansi_fundef(const int __param, const int _PARAM, const int _param) { return __param + _PARAM + _param; } int _ANSI_FUNDEF(const int __param, const int _PARAM, const int _param) { return __param + _PARAM + _param; } static _ansi_fundef(const int __param, const int _PARAM, const int _param) { return __param + _PARAM + _param; } int __kandr_fundef(__param, _PARAM, _param) const int __param; const int _PARAM; const int _param; { return __param + _PARAM + _param; } int _KANDR_FUNDEF(__param, _PARAM, _param) const int __param; const int _PARAM; const int _param; { return __param + _PARAM + _param; } static int _kandr_fundef(__param, _PARAM, _param) const int __param; const int _PARAM; const int _param; { return __param + _PARAM + _param; } typedef int __typedef; typedef int _TYPEDEF; typedef int _typedef; struct __struct_tag { int i; }; struct _STRUCT_TAG { int i; }; struct _struct_tag { int i; }; union __union_tag { int i; }; union _UNION_TAG { int i; }; union _union_tag { int i; }; enum __enum_tag { __enum, _ENUM, _enum }; enum _ENUM_TAG { __enum, _ENUM, _enum }; enum _enum_tag { __enum, _ENUM, _enum }; typedef struct __struct_tag_ { int i; } __struct_tag_t; typedef struct _STRUCT_TAG_ { int i; } _STRUCT_TAG_t; typedef struct _struct_tag_ { int i; } _struct_tag_t; typedef struct { int i; } __unnamed_t; typedef struct { int i; } _UNNAMED_T; typedef struct { int i; } _unnamed_t; adlint-3.2.0/share/demo/kandr_fundef/0000755000004100000410000000000012224440633017473 5ustar www-datawww-dataadlint-3.2.0/share/demo/kandr_fundef/kandr_fundef.c0000644000004100000410000000013712224440633022266 0ustar www-datawww-dataextern int foo(x, y) short x; { return x + y; } int main(void) { return foo(0); } adlint-3.2.0/share/demo/null_stmt/0000755000004100000410000000000012224440633017066 5ustar www-datawww-dataadlint-3.2.0/share/demo/null_stmt/null_stmt.c0000644000004100000410000000030512224440633021251 0ustar www-datawww-datastatic int foo(const int n) { int i; int j = 0; for (i = 0; i < n; i++); { j += n; } return j; } static int bar(const int n) { int i = n; return i++;; } adlint-3.2.0/share/demo/unmatch_paren_macro/0000755000004100000410000000000012224440633021052 5ustar www-datawww-dataadlint-3.2.0/share/demo/unmatch_paren_macro/unmatch_paren_macro.c0000644000004100000410000000037312224440633025226 0ustar www-datawww-data#define OM_1 ((x) + (x) #define OM_2 { int x; foo(&x); bar(x); #define OM_3 (buf[x]1]) #define FM_1(x) ((x) + (x) #define FM_2(x) { int x; foo(&x); bar(x); #define FM_3(x) (buf[x]1]) #define VALID_OM ((x) + (x)) #define VALID_FM(x) ((x) + (x)) adlint-3.2.0/share/demo/inline_asm/0000755000004100000410000000000012224440633017163 5ustar www-datawww-dataadlint-3.2.0/share/demo/inline_asm/inline_asm.c0000644000004100000410000000155612224440633021454 0ustar www-datawww-datavoid foo(int arg1, int *arg2, int arg3) { asm("movl %ecx, %eax"); __asm__("movl %ecx, (%eax)"); asm { xorl eax, eax } __asm__ volatile ( "int $0x80" : "=a" (r) "+b" (arg1), "+c" (arg2), "+d" (arg3) : "a" (128) : "memory", "cc"); } #define ASM1 asm("movl %ecx, %eax"); #define ASM2 __asm__("movl %ecx, (%eax)"); #define ASM3 asm { xorl eax, eax } #define ASM4(arg1, arg2, arg3) \ __asm__ volatile ( \ "int $0x80" \ : "=a" (r) \ "+b" (arg1), \ "+c" (arg2), \ "+d" (arg3) \ : "a" (128) \ : "memory", "cc"); void bar(int arg1, int *arg2, int arg3) { ASM1; ASM2; ASM3; ASM4(arg1, arg2, arg3); } adlint-3.2.0/share/demo/bad_bitfields/0000755000004100000410000000000012224440633017620 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_bitfields/bad_bitfields.c0000644000004100000410000000300012224440633022530 0ustar www-datawww-datastruct foo { signed int b1:1; signed int :1; int b2:1; int :1; }; struct bar { int a:5; unsigned int b:4; signed int c:3; int d:4; struct baz { int a:5; unsigned int b:4; signed int c:3; int d:4; } baz; }; enum color { R = 0, G, B }; struct hoge { signed int a:3; unsigned int b:4; unsigned char c:6; unsigned short d:5; enum color e:2; }; #define NBITS 3 enum { FOUR = 4 }; struct hage { unsigned int a:1; unsigned int b:2; unsigned int c:NBITS; unsigned int d:FOUR; struct hage *p; }; void foo() { struct foo f; f.b1 = 0; f.b1 = -1; f.b1 = 1; } void bar() { const struct foo f; const int i = sizeof(f.b1); } void baz() { const int i = { 0 }; const int a1[] = { { 0, 0, 0 } }; const int a2[][3] = { { 0, 0, 0 } }; const struct bar b1 = { 0, 0, 0, 0, { 0, 0, 0, 0 } }; const struct bar b2 = { { 0, 0, 0, 0, { 0, 0, 0, 0 } } }; const struct bar b3[] = { { 0, 0, 0, 0, { 0, 0, 0, 0 } } }; const int a3[4] = { 0 }; const int a4[4] = { 1, 2, 3, 4 }; const int a5[4] = { 1, 2, 3 }; const int aa1[3][3] = { { 0 }, { 1, 2, 3 }, { 4, 5, 6 } }; const int aa2[3][3] = { { 1 }, { 1, 2, 3 }, { 4, 5, 6 } }; const int aa3[3][3] = { { 0, 1 }, { 1, 2, 3 }, { 4, 5, 6 } }; const int aa4[3][3] = { { 0 + 1, 2 }, { 1, 2, 3 }, { 4, 5, 6 } }; const int aa5[3][3] = { { 1, 2, 3 } }; const int aa6[3][3] = { { { 0 } }, { 1, 2, 3 }, { 4, 5, 6 } }; } adlint-3.2.0/share/demo/overflow/0000755000004100000410000000000012224440633016710 5ustar www-datawww-dataadlint-3.2.0/share/demo/overflow/overflow.c0000644000004100000410000000542212224440633020722 0ustar www-datawww-dataextern int rand(void); static void foo(void) { const int i = rand(); if (i > 127) { const signed char c = (signed char) i; } /* __adlint__inspect(i); // 2 -> 1 */ if (i < -128) { const signed char c = (signed char) i; } /* __adlint__inspect(i); // 4 -> 1 */ if (i > 100) { const signed char c = (signed char) i; } /* __adlint__inspect(i); // 5 -> 1 */ if (i < -100) { const signed char c = (signed char) i; } /* __adlint__inspect(i); // 5 -> 1 */ if (i > -129 && i < 128) { const signed char c = (signed char) i; } } extern void *alloc(void); static void bar(void) { const signed char sc1 = (signed char) 127.5; const signed char sc2 = (signed char) 128.5; const signed char sc3 = (signed char) -128.5; const signed char sc4 = (signed char) -129.5; const unsigned char uc1 = (unsigned char) 255.5; const unsigned char uc2 = (unsigned char) 256.5; const unsigned char uc3 = (unsigned char) 0.5; const unsigned char uc4 = (unsigned char) -1.5; const int si1 = (int) 1.5e9; const int si2 = (int) 1.5e10; const int si3 = (int) -1.5e9; const int si4 = (int) -1.5e10; int *data_ptr = (int *) alloc(); int (*func_ptr)(void) = (int (*)(void)) alloc(); const unsigned char uc5 = (unsigned char) data_ptr; const unsigned char uc6 = (unsigned char) func_ptr; const unsigned short us1 = (unsigned short) data_ptr; const unsigned short us2 = (unsigned short) func_ptr; const unsigned int ui1 = (unsigned int) data_ptr; const unsigned int ui2 = (unsigned int) func_ptr; const unsigned long ul1 = (unsigned long) data_ptr; const unsigned long ul2 = (unsigned long) func_ptr; const unsigned char uc7 = 255; const unsigned char uc8 = 256; const unsigned int ui3 = 4294967295; const unsigned int ui4 = 4294967296; const unsigned char a[] = { 255, 256 }; const signed char sc5 = 127; const signed char sc6 = 128; const int si5 = 2147483647; const int si6 = 2147483648; } extern long baz(void); extern unsigned long qux(void); int main(void) { const long l = baz(); const unsigned long ul = qux(); long r; r = 0x1FFFFFFFL << 1; r = 0x1FFFFFFFL << 2; r = 0x1FFFFFFFL << 3; r = 0x1FFFFFFFL << 4; if (l >= 0x1FFFFFFFL) { r = l << 1; r = l << 2; r = l << 3; r = l << 4; } if (l < 500) { r = l << 1; r = l << 2; } if ((l > 0) && (l < 500)) { r = l << 1; r = l << 2; } r = l << 1; if (ul < 500) { r = ul << 1; r = ul << 2; } if (ul <= 0x1FFFFFFFUL) { r = ul << 1; r = ul << 2; r = ul << 3; r = ul << 4; } return 0; } adlint-3.2.0/share/demo/bad_const/0000755000004100000410000000000012224440633017001 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_const/bad_const.c0000644000004100000410000000060312224440633021100 0ustar www-datawww-data#define MESG "hello world\n" #define CHAR 'C' #define SIZE (10) extern void foo(void) { const unsigned int ui = 0x80000000; const long l = 2147483648; const int i = 50; const char * const str = "hoge"; const char ch = 'A'; const int a1[3]; const int a2[3 + 1]; const int a3[SIZE]; const int a4[SIZE + 1]; puts(MESG); printf("%c\n", CHAR); } adlint-3.2.0/share/demo/bad_brace/0000755000004100000410000000000012224440633016727 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_brace/bad_brace.c0000644000004100000410000000031312224440633020752 0ustar www-datawww-dataint main(int argc, char *argv[]) { if (argc < 2) { return 1; } if (argc > 2) { return 2; } if (argc == 2) { return 3; } return 0; } adlint-3.2.0/share/demo/may_be_null/0000755000004100000410000000000012224440633017333 5ustar www-datawww-dataadlint-3.2.0/share/demo/may_be_null/may_be_null.c0000644000004100000410000000153212224440633021766 0ustar www-datawww-data#define NULL (0) extern int *may_return_null(void); extern int rand(void); int main(void) { int i; int *p = NULL; i = *(int *)(NULL); *p = 1; /* p is obviously NULL */ p = may_return_null(); *p = 2; /* p is NULL when may_return_null() returns NULL */ if (rand() == 1) { p = &i; *p = 3; /* p points to i in this path */ } *p = 4; /* p is NULL when rand() returns != 1 */ switch (rand()) { case 0: p = &i; break; case 1: p = NULL; break; default: return 0; } *p = 5; /* p is NULL when rand() returns 1 */ for (i = 0; i < rand(); ++i) { p = &i; } *p = 6; /* p is NULL when rand() returns 0 */ while (rand() < 1) { p = &i; } *p = 7; /* p is NULL when rand() returns >= 1 */ return *p; } adlint-3.2.0/share/demo/multi_decl/0000755000004100000410000000000012224440633017166 5ustar www-datawww-dataadlint-3.2.0/share/demo/multi_decl/multi_decl_1.h0000644000004100000410000000020112224440633021671 0ustar www-datawww-dataextern int g1; extern struct Point { int x, y; } g2; extern int foo(void); extern struct Point *bar(int); extern int baz(void); adlint-3.2.0/share/demo/multi_decl/multi_decl_2.c0000644000004100000410000000032412224440633021673 0ustar www-datawww-data#include "multi_decl_2.h" extern int g1; extern struct Point { int x, y; } g2; extern int foo(void); extern struct Point *bar(int); extern int baz(void); static int baz(void) { return foo() + bar(0)->x; } adlint-3.2.0/share/demo/multi_decl/multi_decl_1.c0000644000004100000410000000112612224440633021673 0ustar www-datawww-data#include "multi_decl_1.h" int g1; struct Point g2; double g3; int foo(void) { extern int g3; extern int func1(void); typedef long g3; return 0; } enum E1 { A, B, C }; struct Point *bar(int i) { extern long g3; extern int func1(int); enum E2 { A, B, C }; typedef int A; { extern short g3; extern int g3; extern void func1(int); extern int func1(int); } { extern char g3; extern short g3; extern void func1(int, ...); extern void func1(int); } static struct Point p; p.x = i; p.y = i * 2; return &p; } typedef int A; adlint-3.2.0/share/demo/multi_decl/multi_decl_3.c0000644000004100000410000000037212224440633021677 0ustar www-datawww-data#include "multi_decl_1.h" #include "multi_decl_2.h" extern int Hoge; struct Hoge { int i; int HogeHoge; }; typedef struct HogeHoge { int Hoge; int HogeHoge; } HogeHoge; static int Hoge; int main(void) { Hoge: return baz(); } adlint-3.2.0/share/demo/multi_decl/multi_decl_2.h0000644000004100000410000000020112224440633021672 0ustar www-datawww-dataextern int g1; extern struct Point { int x, y; } g2; extern int foo(void); extern struct Point *bar(int); extern int baz(void); adlint-3.2.0/share/demo/bad_comment/0000755000004100000410000000000012224440633017315 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_comment/bad_comment.c0000644000004100000410000000010012224440633021720 0ustar www-datawww-data/* outer comment /* inner comment */ // C++ style line comment adlint-3.2.0/share/demo/ill_defined/0000755000004100000410000000000012224440633017303 5ustar www-datawww-dataadlint-3.2.0/share/demo/ill_defined/ill_defined.c0000644000004100000410000000016112224440633021703 0ustar www-datawww-data#define FOO 1 #if defined(FOO) int i; #endif #if defined FOO int ii; #endif #if defined "FOO" int iii; #endif adlint-3.2.0/share/demo/press_release/0000755000004100000410000000000012224440633017701 5ustar www-datawww-dataadlint-3.2.0/share/demo/press_release/press_release.c0000644000004100000410000000110212224440633022673 0ustar www-datawww-data#include #include static int CalledRecursively(void); static int Function(void) { return CalledRecursively(); } static void OutputByParam(int **param) { int result = Function() + rand(); *param = &result; } static int CalledRecursively(void) { int *result; OutputByParam(&result); return *result; } int main(int argc, char *argv[]) { int i; int *ptr = NULL; if (argc < 2) { return *ptr; } if (rand() == 1) { ptr = &i; *ptr = CalledRecursively(); } *ptr = 2; return 0; } adlint-3.2.0/share/demo/multi_def/0000755000004100000410000000000012224440633017015 5ustar www-datawww-dataadlint-3.2.0/share/demo/multi_def/multi_def_1.h0000644000004100000410000000020112224440633021347 0ustar www-datawww-dataextern int g1; extern struct Point { int x, y; } g2; extern int foo(void); extern struct Point *bar(int); extern int baz(void); adlint-3.2.0/share/demo/multi_def/multi_def_1.c0000644000004100000410000000047312224440633021355 0ustar www-datawww-data#include "multi_def_1.h" int g1; struct Point g2; int foo(void) { return 0; } struct Point *bar(int i) { static struct Point p; p.x = i; p.y = i + 1; return &p; } int baz(void) { return foo(); } int g1 = 0; int foo(void) { return 1; } int foo = 1; int g1(void) { return 0; } adlint-3.2.0/share/demo/multi_def/multi_def_2.c0000644000004100000410000000033712224440633021355 0ustar www-datawww-data#include "multi_def_2.h" int g1; struct Point g2; int foo(void) { return 0; } struct Point *bar(int i) { static struct Point p; p.x = i; p.y = i + 1; return &p; } int baz(void) { return foo(); } adlint-3.2.0/share/demo/multi_def/multi_def_3.c0000644000004100000410000000010412224440633021346 0ustar www-datawww-data#include "multi_def_1.h" int main(void) { return bar(g1)->y; } adlint-3.2.0/share/demo/multi_def/multi_def_2.h0000644000004100000410000000020112224440633021350 0ustar www-datawww-dataextern int g1; extern struct Point { int x, y; } g2; extern int foo(void); extern struct Point *bar(int); extern int baz(void); adlint-3.2.0/share/demo/line_comment/0000755000004100000410000000000012224440633017516 5ustar www-datawww-dataadlint-3.2.0/share/demo/line_comment/line_comment.c0000644000004100000410000000025212224440633022332 0ustar www-datawww-data// line comment /* // block comment */ extern int foo(int, /* hoge */ long); // line comment int main(void) { return foo(0, 1L); // line comment } // end of main adlint-3.2.0/share/demo/invalid_call/0000755000004100000410000000000012224440633017466 5ustar www-datawww-dataadlint-3.2.0/share/demo/invalid_call/invalid_call.c0000644000004100000410000000074112224440633022255 0ustar www-datawww-dataint baz(i, a) const int i; const char a[]; { return i; } int main(void) { const short s = 0; const int i = 0; const char a[3]; foo(s); foo(i); foo(s, i); bar(s); bar(i); bar(s, i); baz(s, a); baz(i, a); baz(s, a, i); qux(); return 0; } extern int foo(int); static int bar(const int i) { char str[] = "hello\n"; printf(str); printf("hello world\n"); return i; } static int qux(void) { } adlint-3.2.0/share/demo/bad_return/0000755000004100000410000000000012224440633017172 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_return/bad_return.c0000644000004100000410000000175312224440633021471 0ustar www-datawww-dataint ansi_int_func_1(const int i) { if (i == 0) { return; } else { return i * 2; } } int kandr_int_func_1(i) const int i; { if (i == 0) { return; } else { return i * 2; } } static void ansi_void_func(const int i) { if (i == 0) { return; } else { return i * 2; } } static void kandr_void_func(i) const int i; { if (i == 0) { return; } else { return i * 2; } } ansi_int_func_2(const i) { if (i == 0) { return; } else { return i * 2; } } kandr_int_func2(i) const i; { if (i == 0) { return; } else { return i * 2; } } const void ansi_qualified_void_func_1(const int i) { if (i == 0) { return; } else { return i * 2; } } volatile void kandr_qualified_void_func_1(i) const int i; { if (i == 0) { return; } else { return i * 2; } } adlint-3.2.0/share/demo/dense_switch/0000755000004100000410000000000012224440633017524 5ustar www-datawww-dataadlint-3.2.0/share/demo/dense_switch/dense_switch.c0000644000004100000410000000201212224440633022342 0ustar www-datawww-dataint main(void) { const int i = rand(); int j; switch (i) { case 0: j = 3 / i; case 1: j = 3 / i; if (i == 0) case 3: j = 3 / i; if (i == 0 || i == 1) { case 2: j = 3 / i; } else { __adlint__inspect(i); j = 3 / i; } switch (i) { default: j = 3 / i; break; case 0: j = 3 / i; case 1: j = 3 / i; } break; default: j = 3 / i; } switch (i) { case 0: if (i < j) { break; } while (i > j) { break; } j += i; break; default: switch (i) { default: j = 3 / i; break; case 1: if (i < j) { break; } if (i < j + 1) { break; } j += i; break; } } return j; } adlint-3.2.0/share/demo/va_funcall/0000755000004100000410000000000012224440633017157 5ustar www-datawww-dataadlint-3.2.0/share/demo/va_funcall/va_funcall.c0000644000004100000410000000062212224440633021435 0ustar www-datawww-datatypedef int FILE; extern FILE *stdout; extern int printf(const char *format, ...); extern int fprintf(FILE* stream, const char *format, ...); extern void foo(int i, long l, double d, ...); int main(void) { printf("%d\n", 10); fprintf(stdout, "%d\n", 10); printf(); fprintf(stdout); foo(); foo(1); foo(1, 2); foo(1, 2, 3.0); foo(1, 2, 3.0, 4); return 0; } adlint-3.2.0/share/demo/direct_recur/0000755000004100000410000000000012224440633017517 5ustar www-datawww-dataadlint-3.2.0/share/demo/direct_recur/direct_recur.c0000644000004100000410000000027012224440633022334 0ustar www-datawww-datastatic int fact(const int n) { return (n == 1) ? 1 : (n * fact(n - 1)); } extern int printf(); int main(void) { const int i = fact(5); printf("%d", i); return 0; } adlint-3.2.0/share/demo/output_by_param/0000755000004100000410000000000012224440633020257 5ustar www-datawww-dataadlint-3.2.0/share/demo/output_by_param/output_by_param.c0000644000004100000410000000030212224440633023630 0ustar www-datawww-datavoid foo(int *p, char *buf) { if (p && buf) { *p = 0; buf[0] = 0; } } int bar(void) { int i = 0; char buf[100] = { 0 }; foo(&i, buf); return buf[i]; } adlint-3.2.0/share/demo/mmapped_io/0000755000004100000410000000000012224440633017157 5ustar www-datawww-dataadlint-3.2.0/share/demo/mmapped_io/mmapped_io.c0000644000004100000410000000073512224440633021442 0ustar www-datawww-dataextern volatile unsigned char *vptr; extern unsigned char *ptr; int main(void) { unsigned short us; unsigned long ul; unsigned char *puc; vptr = (volatile unsigned char *) 0x1111U; ptr = (unsigned char *) 0x1111U; us = (unsigned short) vptr; ul = (unsigned long) vptr; us = (unsigned short) ptr; ul = (unsigned long) ptr; puc = (unsigned char *) 0x1111U; us = (unsigned short) puc; ul = (unsigned long) puc; return 0; } adlint-3.2.0/share/demo/implicit_conv/0000755000004100000410000000000012224440633017704 5ustar www-datawww-dataadlint-3.2.0/share/demo/implicit_conv/implicit_conv.c0000644000004100000410000000207612224440633022714 0ustar www-datawww-datavoid foo(const unsigned int ui1, const unsigned int ui2, const unsigned char uc1, const unsigned char uc2) { unsigned long ul; ul = ~ui1; ul = ui1 * ui2; ul = ui1 / ui2; ul = ui1 % ui2; ul = ui1 + ui2; ul = ui1 - ui2; ul = ui1 & uib; ul = ui1 | uib; ul = ui1 ^ ui2; ul = ui1 << 1; ul = ui1 >> 1; ul = ~uc1; ul = uc1 * uc2; ul = uc1 / uc2; ul = uc1 % uc2; ul = uc1 + uc2; ul = uc1 - uc2; ul = uc1 & ucb; ul = uc1 | ucb; ul = uc1 ^ uc2; ul = uc1 << 1; ul = uc1 >> 1; ul = (unsigned long) (~uc1); ul = (unsigned long) ~uc1; ul = (unsigned long) (uc1 * uc2); ul = (unsigned long) (uc1 / uc2); ul = (unsigned long) (uc1 % uc2); ul = (unsigned long) (uc1 + uc2); ul = (unsigned long) (uc1 - uc2); ul = (unsigned long) (uc1 & uc2); ul = (unsigned long) (uc1 | uc2); ul = (unsigned long) (uc1 ^ uc2); ul = (unsigned long) (uc1 << 1); ul = (unsigned long) (uc1 >> 1); } void bar(void) { unsigned char uc = -1; uc = -2; } adlint-3.2.0/share/demo/id_hiding/0000755000004100000410000000000012224440633016763 5ustar www-datawww-dataadlint-3.2.0/share/demo/id_hiding/id_hiding.c0000644000004100000410000000032112224440633021041 0ustar www-datawww-dataextern int i; static int foo(const int i) { return i; } static int bar(void) { const int i = foo(0); return i; } static int baz(void) { typedef int foo; const foo f = 0; return f; } adlint-3.2.0/share/demo/multi_break/0000755000004100000410000000000012224440633017343 5ustar www-datawww-dataadlint-3.2.0/share/demo/multi_break/multi_break.c0000644000004100000410000000100412224440633022000 0ustar www-datawww-dataint main(void) { for (int i = 0; i < 10; i++) { if (i == 1) { break; } switch (i) { case 5: break; default: break; } if (i == 6) { break; } } while (1) { if (rand() == 1) { break; } do { if (rand() == 2) { break; } } while (1); if (rand() == 3) { break; } } return 0; } adlint-3.2.0/share/demo/Makefile0000644000004100000410000000361712224440633016514 0ustar www-datawww-dataDIRS = \ ambig_operator \ arg_points_unset \ array_range \ bad_bitfields \ bad_brace \ bad_comment \ bad_const \ bad_conv \ bad_enum \ bad_indent \ bad_init \ bad_label \ bad_line \ bad_macro \ bad_return \ bitwise_expr \ call_by_value \ cross_ref \ dangling_else \ dead_code \ deep_nest \ dense_switch \ direct_recur \ div_by_zero \ dos_source \ funptr_cast \ goto_stmt \ id_hiding \ ill_defined \ implicit_conv \ implicit_int \ incomplete_ifelse \ incomplete_type \ indirect_recur \ inline_asm \ integer_promotion \ intro_demo \ invalid_call \ kandr_fundef \ line_comment \ local_decl \ logical_expr \ logical_trick \ long_sym \ loop_var \ malloc_or_die \ may_be_null \ may_be_null_arith \ may_be_unset \ mmapped_io \ multi_break \ multi_decl \ multi_def \ multi_typedef \ must_be_false \ must_be_null \ must_be_null_arith \ must_be_true \ no_eof_nl \ no_void_arg \ null_stmt \ octal_const \ output_by_param \ overflow \ press_release \ redundant_select \ register_vars \ reserved_ident \ retn_lvar_addr \ sequence_point \ shift_expr \ should_be_typedef \ static_paths \ static_vars \ tag_hiding \ typedef_each_src \ tricky_incdec \ undefined_macro \ uninit_vars \ union_type \ unmatch_decl \ unmatch_paren_macro \ unnamed_member \ unreachable \ useless_exp_funs \ useless_exp_vars \ useless_expr \ useless_funs \ useless_header \ useless_vars \ va_funcall \ various_fundef \ wchar_wstring \ wrap_around .PHONY: adlintize adlintize: @for i in $(DIRS); do (\ cd $$i; \ if [ ! -d adlint ]; then \ adlintize -o adlint; \ fi \ ) done .PHONY: all all : adlintize @for i in $(DIRS); do (\ cd $$i/adlint; \ make all 2>/dev/null; \ ) done .PHONY: verbose-all verbose-all : adlintize @for i in $(DIRS); do (\ cd $$i/adlint; \ make verbose-all; \ ) done .PHONY: clean clean : @-for i in $(DIRS); do ( cd $$i/adlint && make clean; ) done @for i in $(DIRS); do ( rm -rf $$i/adlint; ) done adlint-3.2.0/share/demo/useless_header/0000755000004100000410000000000012224440633020040 5ustar www-datawww-dataadlint-3.2.0/share/demo/useless_header/useless_header_3.h0000644000004100000410000000016512224440633023430 0ustar www-datawww-data#if !defined(USELESS_HEADER_3_H) #define USELESS_HEADER_3_H typedef struct { int x; int y; } Point; #endif adlint-3.2.0/share/demo/useless_header/useless_header.c0000644000004100000410000000037212224440633023201 0ustar www-datawww-data#include "useless_header_1.h" #include "useless_header_3.h" #include "useless_header_4.h" /* contents never referred in this file */ int main(void) { const Color color = { 0xFFU, 0x55U, 0xAAU }; return (int) (color.r | color.g | color.b); } adlint-3.2.0/share/demo/useless_header/useless_header_2.h0000644000004100000410000000014412224440633023424 0ustar www-datawww-data#if !defined(USELESS_HEADER_2_H) #define USELESS_HEADER_2_H typedef struct ColorTag Color; #endif adlint-3.2.0/share/demo/useless_header/useless_header_1.h0000644000004100000410000000026512224440633023427 0ustar www-datawww-data#if !defined(USELESS_HEADER_1_H) #define USELESS_HEADER_1_H struct ColorTag { unsigned int r; unsigned int g; unsigned int b; }; #include "useless_header_2.h" #endif adlint-3.2.0/share/demo/useless_header/useless_header_4.h0000644000004100000410000000015712224440633023432 0ustar www-datawww-data#include "useless_header_3.h" /* already included by useless_header.c */ extern const Point *get_point(void); adlint-3.2.0/share/demo/union_type/0000755000004100000410000000000012224440633017236 5ustar www-datawww-dataadlint-3.2.0/share/demo/union_type/union_type.c0000644000004100000410000000063412224440633021576 0ustar www-datawww-datastruct event { int type; union { void *p; int i; } body; }; union foo { int i; unsigned short s; }; union bar { unsigned int a; float b; }; struct baz { union { unsigned long a; double b; } u; unsigned long a; }; int main(void) { struct event e1; const struct event e2 = {0, 0}; union foo u1; e1.body.i = 0; return e2.body.i; } adlint-3.2.0/share/demo/array_range/0000755000004100000410000000000012224440633017337 5ustar www-datawww-dataadlint-3.2.0/share/demo/array_range/array_range.c0000644000004100000410000000162112224440633021775 0ustar www-datawww-datastatic int foo(const int i) { int array[10] = { 0 }; int j; j = array[5]; j = array[10]; if (i < 5) { j = array[i]; } if (i > 5) { j = array[i]; } if (i < 0) { j = array[i]; } if (i > 9) { j = array[i]; } j = array[i]; for (j = 0; j < 10; j++) { array[j] = 0; array[j + 1] = 0; if (j == 10) { break; } if (j < 0) { break; } } for (j = 9; j >= 0; j--) { array[j] = 0; array[j - 1] = 0; if (j < 0) { break; } if (j > 9) { break; } } for (j = 0; j != 10; j++) { array[j] = 0; array[j + 1] = 0; /* ADLINT::[-W0723] */ if (j == 10) { break; } if (j < 0) { break; } } return j; } adlint-3.2.0/share/demo/unreachable/0000755000004100000410000000000012224440633017316 5ustar www-datawww-dataadlint-3.2.0/share/demo/unreachable/unreachable.c0000644000004100000410000000065112224440633021735 0ustar www-datawww-dataint main(void) { int i = rand(); if (i == 0) { if (i > 0) { i = 1; } } if (i < 0) { if (i > 3) { i = 2; } } switch (i) { case 0: if (i < 0) { i = 3; } break; case 1: if (5 < i) { i = 4; } break; } for (int ii = 0; ii < i; ii++) { } return 0; } adlint-3.2.0/share/demo/may_be_null_arith/0000755000004100000410000000000012224440633020522 5ustar www-datawww-dataadlint-3.2.0/share/demo/may_be_null_arith/may_be_null_arith.c0000644000004100000410000000022612224440633024343 0ustar www-datawww-dataint main(void) { int c; int *p = NULL; if (rand() == 1) { p = &c; } *p = 0; p = p + 1; *p = 2; return 0; } adlint-3.2.0/share/demo/bitwise_expr/0000755000004100000410000000000012224440633017551 5ustar www-datawww-dataadlint-3.2.0/share/demo/bitwise_expr/bitwise_expr.c0000644000004100000410000000056412224440633022426 0ustar www-datawww-datastatic void foo(const int i1, const int i2, const unsigned char uc1, const unsigned char uc2) { int i; i = (int) (uc1 & uc2); i = (int) (uc1 | uc2); i = (int) (uc1 ^ uc2); i = (int) ~uc1; i = (int) (uc1 << 1); i = (int) (uc1 >> 1); i = i1 & i2; i = i1 | i2; i = i1 ^ i2; i = ~i1; i = i1 << i2; i = i1 >> i2; } adlint-3.2.0/share/demo/multi_typedef/0000755000004100000410000000000012224440633017717 5ustar www-datawww-dataadlint-3.2.0/share/demo/multi_typedef/multi_typedef_2.h0000644000004100000410000000004712224440633023164 0ustar www-datawww-datatypedef struct { int r, g, b; } Point; adlint-3.2.0/share/demo/multi_typedef/multi_typedef_1.h0000644000004100000410000000004712224440633023163 0ustar www-datawww-datatypedef struct { int x, y, z; } Point; adlint-3.2.0/share/demo/multi_typedef/multi_typedef.c0000644000004100000410000000023412224440633022734 0ustar www-datawww-data#include "multi_typedef_1.h" typedef struct { int x, y; } Point; #include "multi_typedef_2.h" int main(void) { Point p = { 1, 2 }; return p.x; } adlint-3.2.0/share/demo/incomplete_type/0000755000004100000410000000000012224440633020245 5ustar www-datawww-dataadlint-3.2.0/share/demo/incomplete_type/incomplete_type.c0000644000004100000410000000155612224440633023620 0ustar www-datawww-dataextern struct Foo ga1[3]; extern union Bar ga2[3]; extern void ga3[3]; extern int ga4[3][]; extern int ga5[][3]; extern int ga6[3](); extern int ga7[3](int); extern int (*ga8[3])(long); static struct Foo a1[3]; static union Bar a2[3]; static void a3[3]; static int a4[3][]; static int a5[][3]; static int a6[3](); static int a7[3](int); static int (*a8[3])(long); extern enum Baz baz1; void foo(const union Bar *p1, const union Bar * const p2) { *p1 = *p2; p1[0] = p2[0]; p1->i = p2->i; p1 = p2; } void bar(const struct Foo *p1, const struct Foo * const p2) { *p1 = *p2; p1[0] = p2[0]; p1->i = p2->i; p1 = p2; } void baz(void) { int a9[]; const int a10[]; struct Foo f1; const struct Foo f2; union Bar b1; const union Bar b2; void v1; const void v2; int i1; const int i2; const enum Baz baz2; } adlint-3.2.0/share/demo/funptr_cast/0000755000004100000410000000000012224440633017375 5ustar www-datawww-dataadlint-3.2.0/share/demo/funptr_cast/funptr_cast.c0000644000004100000410000000115112224440633022067 0ustar www-datawww-data#pragma once #pragma twice #pragma omp parallel typedef int (*compatible_funptr)(); typedef int (*incompatible_funptr1)(int); typedef void (*incompatible_funptr2)(); typedef long (*incompatible_funptr3)(char *); int main(void) { compatible_funptr p1 = (compatible_funptr) &main; const int i = 0; incompatible_funptr1 p2 = (incompatible_funptr1) &main; incompatible_funptr2 p3 = (incompatible_funptr2) &main; incompatible_funptr3 p4 = (incompatible_funptr3) main; void (*p5)(int) = (void (*)(int)) &main; void (*p6)() = (void (*)()) i; const int j = (int) &main; return 0; } adlint-3.2.0/share/demo/unmatch_decl/0000755000004100000410000000000012224440633017473 5ustar www-datawww-dataadlint-3.2.0/share/demo/unmatch_decl/unmatch_decl_1.c0000644000004100000410000000023412224440633022504 0ustar www-datawww-data#include "unmatch_decl_1.h" int g1; struct Point g2; struct Point *bar(int i) { static struct Point p; p.x = i; p.y = i * 2; return &p; } adlint-3.2.0/share/demo/unmatch_decl/unmatch_decl_1.h0000644000004100000410000000023112224440633022506 0ustar www-datawww-dataextern int g1; extern struct Point { int x, y; } g2; extern int foo(void); extern struct Point *bar(int); extern int baz(void); extern int hoge(void); adlint-3.2.0/share/demo/unmatch_decl/unmatch_decl_3.c0000644000004100000410000000014712224440633022511 0ustar www-datawww-data#include "unmatch_decl_1.h" #include "unmatch_decl_2.h" int main(void) { return foo() + hoge(); } adlint-3.2.0/share/demo/unmatch_decl/unmatch_decl_2.h0000644000004100000410000000024012224440633022507 0ustar www-datawww-dataextern long g1; extern struct Color { int r, g, b; } g2; extern long foo(int); extern struct Color *bar(void); extern void baz(int); extern float hoge(void); adlint-3.2.0/share/demo/unmatch_decl/unmatch_decl_2.c0000644000004100000410000000017612224440633022512 0ustar www-datawww-data#include "unmatch_decl_2.h" long g1; struct Color g2; struct Color *bar(void) { static struct Color c; return &c; } adlint-3.2.0/share/demo/implicit_int/0000755000004100000410000000000012224440633017531 5ustar www-datawww-dataadlint-3.2.0/share/demo/implicit_int/implicit_int.c0000644000004100000410000000020512224440633022356 0ustar www-datawww-dataextern const g_int; extern foo(void); static bar(const *p) { return *p; } extern baz(void) { const i = 0; return i; } adlint-3.2.0/share/demo/various_fundef/0000755000004100000410000000000012224440633020064 5ustar www-datawww-dataadlint-3.2.0/share/demo/various_fundef/various_fundef.c0000644000004100000410000000172412224440633023253 0ustar www-datawww-datastatic int foo(const int i) { return i * 2; } static int bar(i) const int i; { return i * 2; } static int baz (const int i) { return i * 2; } inline static struct hoge { int i; } * qux ( const int i ) { return (struct hoge *) i; } extern const int ansi_qualified_func_1(const int); const int ansi_qualified_func_1(const int i) { return i * 2; } extern const int kandr_qualified_func_1(); const int kandr_qualified_func_1(i) const int i; { return i * 2; } static volatile ansi_qualified_func_2(const int); static volatile ansi_qualified_func_2(const int i) { return i * 2; } static volatile kandr_qualified_func_2(); static volatile kandr_qualified_func_2(i) const int i; { return i * 2; } const int *ansi_func(const int); const int *ansi_func(const int i) { static int j; j = i; return &j; } const int *kandr_func(); const int *kandr_func(i) const int i; { static int j; j = i; return &j; } adlint-3.2.0/share/demo/unnamed_member/0000755000004100000410000000000012224440633020023 5ustar www-datawww-dataadlint-3.2.0/share/demo/unnamed_member/unnamed_member.c0000644000004100000410000000024412224440633023145 0ustar www-datawww-datastruct foo { unsigned int b0:1; unsigned int :1; unsigned int :1; unsigned int b3:1; }; struct bar { int; int :1; long; double; }; adlint-3.2.0/share/demo/wchar_wstring/0000755000004100000410000000000012224440633017726 5ustar www-datawww-dataadlint-3.2.0/share/demo/wchar_wstring/wchar_wstring.c0000644000004100000410000000026212224440633022753 0ustar www-datawww-datatypedef unsigned int wchar_t; /* コメント */ #define MESG L"日本語" /* 注釈 */ const wchar_t *mesg = MESG; /* 説明 */ const wchar_t ch = L'あ'; /* コメント */ adlint-3.2.0/share/demo/deep_nest/0000755000004100000410000000000012224440633017013 5ustar www-datawww-dataadlint-3.2.0/share/demo/deep_nest/deep_nest.c0000644000004100000410000000130312224440633021122 0ustar www-datawww-dataint main(void) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { /*10*/ if (1) { if (1) { if (1) { if (1) { if (1) { /*15*/ }}}}}}}}}}}}}}} if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { if (1) { /*10*/ if (1) { if (1) { if (1) { if (1) { if (1) { /*15*/ if (1) { }}}}}}}}}}}}}}}} if (1) if (1) if (1) if (1) if (1) if (1) if (1) if (1) if (1) if (1) /*10*/ if (1) if (1) if (1) if (1) if (1)/*15*/ if (1) ; return 0; } adlint-3.2.0/share/demo/static_paths/0000755000004100000410000000000012224440633017533 5ustar www-datawww-dataadlint-3.2.0/share/demo/static_paths/static_paths.c0000644000004100000410000000565512224440633022400 0ustar www-datawww-datastatic int foo(int i) { if (i == 0) { /* (1) [1,1] [1,1] [1,0] */ i = 0; } /* (1) [1,1] [1] [1,1] */ else { /* (2) [1,1] [1,1] [1,1] */ i = 1; } /* (2) [1] [2] [1] */ return i; } static int bar(int i) { if (i == 0) { /* (1) [1,1] [1,1] [1,0] */ i = 0; } /* (1) [1,1] [1] [1,1] */ else { /* (2) [1,1] [1,1] [1,1] */ goto end; } /* (2) [1] [2] [1] */ end: return i; } static int hoge(int i) { if (i == 0) { /* (1) [1,1] [1,1] [1,0] */ i = 0; } /* (2) [1] [2] [1] */ if (i == 1) { /* (2) [1,2] [2,2] [1,0] */ i = 1; } /* (4) [1] [4] [1] */ if (i == 2) { /* (4) [1,4] [4,4] [1,0] */ i = 2; } /* (8) [1] [8] [1] */ return i; } static int baz(int i) { switch (i) { case 0: /* (1) [1,1] [1,1] [1,0] */ if (rand()) { /* (1) [1,1,1] [1,1,1] [1,0,0] */ i = 0; } /* (1) [1,1,1] [1,1] [1,0,1] */ else { /* (2) [1,1,1] [1,1,1] [1,0,1] */ i = 0; } /* (2) [1,1] [1,2] [1,0] */ i = 0; break; /* (2) [1,1] [1] [1,2] */ default: /* (3) [1,1] [1,1] [1,2] */ if (rand()) { /* (3) [1,1,1] [1,1,1] [1,2,0] */ i = 1; } /* (3) [1,1,1] [1,1] [1,2,1] */ else { /* (4) [1,1,1] [1,1,1] [1,2,1] */ i = 1; } /* (4) [1,1] [1,2] [1,2] */ i = 1; break; } /* (4) [1] [4] [1] */ return i; } static int baz2(int i) { switch (i) { case 0: /* (1) [1,1] [1,1] [1,0] */ if (rand()) { /* (1) [1,1,1] [1,1,1] [1,0,0] */ goto hoge; } /* (1) [1,1,1] [1,1] [1,0,1] */ else { /* (2) [1,1,1] [1,1,1] [1,0,1] */ break; } /* (2) [1,1] [1,2] [1,0] */ hoge: i = 0; break; /* (2) [1,1] [1] [1,2] */ default: /* (3) [1,1] [1,1] [1,2] */ if (rand()) { /* (3) [1,1,1] [1,1,1] [1,2,0] */ break; } /* (3) [1,1,1] [1,1] [1,2,1] */ else { /* (4) [1,1,1] [1,1,1] [1,2,1] */ goto hogehoge; } /* (4) [1,1] [1,2] [1,2] */ hogehoge: i = 1; break; } /* (4) [1] [4] [1] */ return i; } static int qux(const int i) { while (i < 5) { /* (1) [1,1] [1,1] [1,0] */ if (i == 0) { /* (1) [1,1,1] [1,1,1] [1,0,0] */ return 0; } /* (2) [1,1] [1,1] [1,0] */ if (i == 1) { /* (2) [1,1,1] [1,1,1] [1,0,0] */ return 1; } /* (3) [1,1] [1,1] [1,0] */ } /* (4) [1] [2] [1] */ if (i == 2) { /* (4) [1,2] [2,2] [1,0] */ return 2; } /* (6) [1] [2] [1] */ return 3; } adlint-3.2.0/share/demo/bad_init/0000755000004100000410000000000012224440633016616 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_init/bad_init.c0000644000004100000410000000157012224440633020536 0ustar www-datawww-datastruct Foo { int i; int j; }; union Bar { int i; long j; }; static void foo(void) { const struct Foo foo1 = { 1, 2 }; const struct Foo foo2 = 1; const union Bar bar1 = { 1 }; const union Bar bar2 = 1; } struct Baz { int i; int a[3]; }; struct Qux { int i; union Bar u; }; static void bar(void) { const struct Foo foo1[2] = { { 1, 2 }, { 3, 4 } }; const struct Foo foo2[2] = { 1, 2, 3, 4 }; const union Bar bar1 = { 1 }; const union Bar bar2 = bar1; const union Bar bar3 = foo1[0]; const struct Baz baz1 = { 1, { 2, 3 } }; const struct Baz baz2 = { 1, 2, 3 }; const struct Baz baz3 = baz1; const struct Baz baz4 = foo1[0]; const struct Qux qux1 = { 1, { 2 } }; const struct Qux qux2 = { 1, 2 }; const int a1[2][2] = { { 1, 2 }, { 3, 4 } }; const int a2[2][2] = { 1, 2, 3, 4 }; } adlint-3.2.0/share/demo/useless_expr/0000755000004100000410000000000012224440633017566 5ustar www-datawww-dataadlint-3.2.0/share/demo/useless_expr/useless_expr.c0000644000004100000410000000026212224440633022453 0ustar www-datawww-dataint main(void) { int *p = (int *) malloc(sizeof(int)); if (p) { *p = 0; } else { return 1; } *p; *p++; (*p)++; return 0; } adlint-3.2.0/share/demo/must_be_null/0000755000004100000410000000000012224440633017535 5ustar www-datawww-dataadlint-3.2.0/share/demo/must_be_null/must_be_null.c0000644000004100000410000000020712224440633022370 0ustar www-datawww-dataint main(void) { int *p = may_return_null(); if (p) { *p = 1; } else { *p = 2; } return 0; } adlint-3.2.0/share/demo/cross_ref/0000755000004100000410000000000012224440633017032 5ustar www-datawww-dataadlint-3.2.0/share/demo/cross_ref/cross_ref.c0000644000004100000410000000032312224440633021161 0ustar www-datawww-dataextern int g; void foo(void) { int * const p = &g; *p = 0; } typedef struct { int i; } type; type buf[3]; type *p = &buf[1]; void bar(void) { type t = *p; (*p).i = 1; p->i += p->i; } adlint-3.2.0/share/demo/dos_source/0000755000004100000410000000000012224440633017212 5ustar www-datawww-dataadlint-3.2.0/share/demo/dos_source/dos_source.c0000644000004100000410000000014512224440633021523 0ustar www-datawww-dataextern int puts(const char *); int main(void) { puts("hello world.\n"); return 0; } adlint-3.2.0/share/demo/local_decl/0000755000004100000410000000000012224440633017126 5ustar www-datawww-dataadlint-3.2.0/share/demo/local_decl/local_decl.c0000644000004100000410000000020712224440633021352 0ustar www-datawww-dataint main(void) { extern int i; extern int foo(int); extern int bar(); static int baz(void); return bar(foo(i)); } adlint-3.2.0/share/demo/indirect_recur/0000755000004100000410000000000012224440633020046 5ustar www-datawww-dataadlint-3.2.0/share/demo/indirect_recur/indirect_recur_1.h0000644000004100000410000000016112224440633023436 0ustar www-datawww-data#if !defined(INDIRECT_RECUR_1_H) #define INDIRECT_RECUR_1_H extern int g; extern int func_1(const int); #endif adlint-3.2.0/share/demo/indirect_recur/indirect_recur_3.h0000644000004100000410000000014312224440633023440 0ustar www-datawww-data#if !defined(INDIRECT_RECUR_3_H) #define INDIRECT_RECUR_3_H extern int func_3(const int); #endif adlint-3.2.0/share/demo/indirect_recur/indirect_recur_2.h0000644000004100000410000000014312224440633023437 0ustar www-datawww-data#if !defined(INDIRECT_RECUR_2_H) #define INDIRECT_RECUR_2_H extern int func_2(const int); #endif adlint-3.2.0/share/demo/indirect_recur/indirect_recur_2.c0000644000004100000410000000035512224440633023437 0ustar www-datawww-data#include "indirect_recur_3.h" static int foo(const int i) { extern int func_1(const int); return func_3(i + 1) + func_1(i + 1); /* ADLINT::[-W0723] */ } int func_2(const int i) { return foo(i + 1); /* ADLINT::[-W0723] */ } adlint-3.2.0/share/demo/indirect_recur/indirect_recur_4.c0000644000004100000410000000104312224440633023434 0ustar www-datawww-data#include "indirect_recur_1.h" extern void exit(int); extern void (*signal(int, void (*)(int)))(int); #define SIGINT (1) static void handler(int signo) { exit(1); } /* * main(indirect_recur_4.c) * -> *func_1(indirect_recur_1.c) <-------+-------+ * -> foo(indirect_recur_1.c) | | * -> *func_2(indirect_recur_2.c) | | * -> *foo(indirect_recur_2.c)--+ | * -> *func_3(indirect_recur_3.c)--+ */ int main(void) { signal(SIGINT, handler); return func_1(g); } adlint-3.2.0/share/demo/indirect_recur/indirect_recur_3.c0000644000004100000410000000015412224440633023435 0ustar www-datawww-data#include "indirect_recur_1.h" int func_3(const int i) { return func_1(i + 1); /* ADLINT::[-W0723] */ } adlint-3.2.0/share/demo/indirect_recur/indirect_recur_1.c0000644000004100000410000000030212224440633023426 0ustar www-datawww-data#include "indirect_recur_1.h" #include "indirect_recur_2.h" int g; static int foo(void) { return g; } int func_1(const int i) { return func_2(g + i + foo()); /* ADLINT::[-W0723] */ } adlint-3.2.0/share/demo/arg_points_unset/0000755000004100000410000000000012224440633020430 5ustar www-datawww-dataadlint-3.2.0/share/demo/arg_points_unset/arg_points_unset.c0000644000004100000410000000065312224440633024163 0ustar www-datawww-dataextern int printf(const char *, ...); extern int rand(void); static void foo(const int *p) { } static void bar(char *str, const long *p) { printf(str, *p); } static void baz(void) { int i; for (int j = 0; j < rand(); ++j) { i = 0; } foo(&i); } int main(void) { int i; long l; foo(&i); bar("%l", &l); if (rand() == 0) { i = 1; } foo(&i); return i; } adlint-3.2.0/share/demo/must_be_false/0000755000004100000410000000000012224440633017655 5ustar www-datawww-dataadlint-3.2.0/share/demo/must_be_false/must_be_false.c0000644000004100000410000000143412224440633022633 0ustar www-datawww-dataint main(void) { const int i = rand(); const unsigned short us = (unsigned short) rand(); if (i < 0) { if (i > us) { return 0; } } else { for (int j = -1; j > i; j++) { puts("hoge\n"); } while (i == -5) { return 1; } do { puts("hoge\n"); } while (i == -10); } #define A (1) #define B (1) if (A - B) { puts("hoge\n"); } if (A - B) { puts("hoge\n"); } else { puts("hoge\n"); } while (A - B) { puts("hoge\n"); } { int k; for (k = 0; A - B; k++) { puts("hoge\n"); } } for (int k = 0; A - B; k++) { puts("hoge\n"); } return 0; } adlint-3.2.0/share/demo/undefined_macro/0000755000004100000410000000000012224440633020167 5ustar www-datawww-dataadlint-3.2.0/share/demo/undefined_macro/undefined_macro.c0000644000004100000410000000021212224440633023450 0ustar www-datawww-data#define FOO (3) #if FOO == 3 int i; #endif #if BAR == 1 int ii; #endif #if !defined(BAR) int iii; #endif #ifndef BAR int iiii; #endif adlint-3.2.0/share/demo/retn_lvar_addr/0000755000004100000410000000000012224440633020033 5ustar www-datawww-dataadlint-3.2.0/share/demo/retn_lvar_addr/retn_lvar_addr.c0000644000004100000410000000073212224440633023167 0ustar www-datawww-dataint *foo(int i) { int n = i; return &n; } int *bar(int i) { static int n; return &n; } void baz(int **pp) { int i = 0; *pp = &i; } void qux(void) { int *p; { int i; p = &i; } } int *gpi; char *gpc; void hoge(long ** p) { int i = 0; static const char s[] = "aaa"; static const long l = 1; gpi = &i; gpc = s; gpc = &s[0]; *p = &l; } void hogehoge(int i) { static int *p; p = &i; } adlint-3.2.0/share/demo/useless_exp_vars/0000755000004100000410000000000012224440633020437 5ustar www-datawww-dataadlint-3.2.0/share/demo/useless_exp_vars/useless_export_2.c0000644000004100000410000000013412224440633024106 0ustar www-datawww-data#include "useless_export_1.h" int main(void) { puts(get_error_mesg()); return 0; } adlint-3.2.0/share/demo/useless_exp_vars/useless_export_1.c0000644000004100000410000000020712224440633024106 0ustar www-datawww-dataint error_code; char *mesg_tbl[] = {"error-1", "error-2", "error-3"}; void get_error_mesg(void) { return mesg_tbl[error_code]; } adlint-3.2.0/share/demo/useless_exp_vars/useless_export_1.h0000644000004100000410000000004212224440633024110 0ustar www-datawww-dataextern void get_error_mesg(void); adlint-3.2.0/share/demo/must_be_null_arith/0000755000004100000410000000000012224440633020724 5ustar www-datawww-dataadlint-3.2.0/share/demo/must_be_null_arith/must_be_null_arith.c0000644000004100000410000000023212224440633024744 0ustar www-datawww-dataint main(void) { int *p = may_return_null(); if (p) { *p = 1; } else { p = p + 1; *p = 0; } return 0; } adlint-3.2.0/share/demo/bad_indent/0000755000004100000410000000000012224440633017134 5ustar www-datawww-dataadlint-3.2.0/share/demo/bad_indent/bad_indent.c0000644000004100000410000000143312224440633021370 0ustar www-datawww-datatypedef enum { R = 1, G, B } color_t; color_t c; int main(int argc, char *argv[]) { if (argc < 2) exit(1); for (int i = 0; i < argc; ++i) puts(argv[i]); while (1) puts("hello world\n"); if (c == 3) for (int i = 0; i < argc; ++i) puts(argv[i]); if (argc < 3) exit(1); else do puts("hoge\n"); while (rand()); if (argc < 4) exit(1); else if (rand()) { puts("hogehoge\n"); } else if (rand()) puts("hogehogehoge\n"); switch (c) { case R: puts("kldfaj;\n"); puts("kldfaj;\n"); break; case G: case B: puts("kldfaj;\n"); puts("kldfaj;\n"); default: puts("kldfaj;\n"); } return 0; } adlint-3.2.0/share/demo/sequence_point/0000755000004100000410000000000012224440633020066 5ustar www-datawww-dataadlint-3.2.0/share/demo/sequence_point/sequence_point.c0000644000004100000410000000077412224440633023263 0ustar www-datawww-dataextern int bar(int *p); extern int baz(const int *p); void foo(int a, int b, int *c) { { a = b * a++; a = bar(&a) * a++; b = bar(&a) * (a++ + --a); } { b = bar(&a) * a++; b = bar(&a) + baz(&a); b = baz(&a) - baz(&a); } { b = (a + 1) + a++; b = c[a] + c[++a]; foo(a, a++, c); foo(a++, a, c); a = a + b; c[a] = a++ + b; } { b = bar(&a) * a; b = baz(&a) * a; } } adlint-3.2.0/share/doc/0000755000004100000410000000000012224440633014666 5ustar www-datawww-dataadlint-3.2.0/share/doc/c99gram.dot0000644000004100000410000006120412224440633016654 0ustar www-datawww-datastrict digraph "ISO C99 Grammer" { // // terminal nodes // node [shape=box]; IDENTIFIER; TYPEDEF_NAME; CONSTANT; STRING_LITERAL; SIZEOF; TYPEDEF; EXTERN; STATIC; AUTO; REGISTER; INLINE; RESTRICT; CHAR; SHORT; INT; LONG; SIGNED; UNSIGNED; FLOAT; DOUBLE; CONST; VOLATILE; VOID; BOOL; COMPLEX; IMAGINARY; STRUCT; UNION; ENUM; CASE; DEFAULT; IF; ELSE; SWITCH; WHILE; DO; FOR; GOTO; CONTINUE; BREAK; RETURN; NULL; TYPEOF; ALIGNOF; "!"; "!="; "%"; "%="; "&"; "&&"; "&="; "("; ")"; "*"; "*="; "+"; "++"; "+="; ","; "-"; "--"; "-="; "->"; "."; "..."; "/"; "/="; ":"; ";"; "<"; "<<"; "<<="; "<="; "="; "=="; ">"; ">="; ">>"; ">>="; "?"; "["; "]"; "^"; "^="; "{"; "|"; "|="; "||"; "}"; "~"; // // non-terminal nodes // node [shape=ellipse]; primary_expression; postfix_expression; argument_expression_list; unary_expression; unary_arithmetic_operator; cast_expression; multiplicative_expression; additive_expression; shift_expression; relational_expression; equality_expression; and_expression; exclusive_or_expression; inclusive_or_expression; logical_and_expression; logical_or_expression; conditional_expression; assignment_expression; compound_assignment_operator; expression; constant_expression; declaration; global_declaration; declaration_specifiers; init_declarator_list; init_declarator; storage_class_specifier; type_specifier; struct_or_union_specifier; struct_declaration_list; struct_declaration; specifier_qualifier_list; struct_declarator_list; struct_declarator; enum_specifier; enumerator_list; enumerator; type_qualifier; function_specifier; declarator; direct_declarator; pointer; type_qualifier_list; parameter_type_list; parameter_list; parameter_declaration; identifier_list; type_name; abstract_declarator; direct_abstract_declarator; initializer; initializer_list; designation; designator_list; designator; statement; labeled_statement; compound_statement; block_item_list; block_item; expression_statement; selection_statement; iteration_statement; jump_statement; translation_unit; external_declaration; function_definition; local_function_definition; declaration_list; // // edges // primary_expression -> IDENTIFIER; primary_expression -> CONSTANT; primary_expression -> STRING_LITERAL; primary_expression -> NULL; primary_expression -> "("; primary_expression -> expression; primary_expression -> ")"; primary_expression -> "("; primary_expression -> compound_statement; primary_expression -> ")"; postfix_expression -> primary_expression; postfix_expression -> postfix_expression; postfix_expression -> "["; postfix_expression -> expression; postfix_expression -> "]"; postfix_expression -> postfix_expression; postfix_expression -> "("; postfix_expression -> ")"; postfix_expression -> postfix_expression; postfix_expression -> "("; postfix_expression -> argument_expression_list; postfix_expression -> ")"; postfix_expression -> postfix_expression; postfix_expression -> "."; postfix_expression -> IDENTIFIER; postfix_expression -> postfix_expression; postfix_expression -> "->"; postfix_expression -> IDENTIFIER; postfix_expression -> postfix_expression; postfix_expression -> "."; postfix_expression -> CONSTANT; postfix_expression -> postfix_expression; postfix_expression -> "->"; postfix_expression -> CONSTANT; postfix_expression -> postfix_expression; postfix_expression -> "++"; postfix_expression -> postfix_expression; postfix_expression -> "--"; postfix_expression -> "("; postfix_expression -> type_name; postfix_expression -> ")"; postfix_expression -> "{"; postfix_expression -> initializer_list; postfix_expression -> "}"; postfix_expression -> "("; postfix_expression -> type_name; postfix_expression -> ")"; postfix_expression -> "{"; postfix_expression -> initializer_list; postfix_expression -> ","; postfix_expression -> "}"; argument_expression_list -> assignment_expression; argument_expression_list -> argument_expression_list; argument_expression_list -> ","; argument_expression_list -> assignment_expression; unary_expression -> postfix_expression; unary_expression -> "++"; unary_expression -> unary_expression; unary_expression -> "--"; unary_expression -> unary_expression; unary_expression -> "&"; unary_expression -> cast_expression; unary_expression -> "*"; unary_expression -> cast_expression; unary_expression -> unary_arithmetic_operator; unary_expression -> cast_expression; unary_expression -> SIZEOF; unary_expression -> unary_expression; unary_expression -> SIZEOF; unary_expression -> "("; unary_expression -> type_name; unary_expression -> ")"; unary_expression -> ALIGNOF; unary_expression -> unary_expression; unary_expression -> ALIGNOF; unary_expression -> "("; unary_expression -> type_name; unary_expression -> ")"; unary_expression -> "&&"; unary_expression -> unary_expression; unary_arithmetic_operator -> "+"; unary_arithmetic_operator -> "-"; unary_arithmetic_operator -> "~"; unary_arithmetic_operator -> "!"; cast_expression -> unary_expression; cast_expression -> "("; cast_expression -> type_name; cast_expression -> ")"; cast_expression -> cast_expression; multiplicative_expression -> cast_expression; multiplicative_expression -> multiplicative_expression; multiplicative_expression -> "*"; multiplicative_expression -> cast_expression; multiplicative_expression -> multiplicative_expression; multiplicative_expression -> "/"; multiplicative_expression -> cast_expression; multiplicative_expression -> multiplicative_expression; multiplicative_expression -> "%"; multiplicative_expression -> cast_expression; additive_expression -> multiplicative_expression; additive_expression -> additive_expression; additive_expression -> "+"; additive_expression -> multiplicative_expression; additive_expression -> additive_expression; additive_expression -> "-"; additive_expression -> multiplicative_expression; shift_expression -> additive_expression; shift_expression -> shift_expression; shift_expression -> "<<"; shift_expression -> additive_expression; shift_expression -> shift_expression; shift_expression -> ">>"; shift_expression -> additive_expression; relational_expression -> shift_expression; relational_expression -> relational_expression; relational_expression -> "<"; relational_expression -> shift_expression; relational_expression -> relational_expression; relational_expression -> ">"; relational_expression -> shift_expression; relational_expression -> relational_expression; relational_expression -> "<="; relational_expression -> shift_expression; relational_expression -> relational_expression; relational_expression -> ">="; relational_expression -> shift_expression; equality_expression -> relational_expression; equality_expression -> equality_expression; equality_expression -> "=="; equality_expression -> relational_expression; equality_expression -> equality_expression; equality_expression -> "!="; equality_expression -> relational_expression; and_expression -> equality_expression; and_expression -> and_expression; and_expression -> "&"; and_expression -> equality_expression; exclusive_or_expression -> and_expression; exclusive_or_expression -> exclusive_or_expression; exclusive_or_expression -> "^"; exclusive_or_expression -> and_expression; inclusive_or_expression -> exclusive_or_expression; inclusive_or_expression -> inclusive_or_expression; inclusive_or_expression -> "|"; inclusive_or_expression -> exclusive_or_expression; logical_and_expression -> inclusive_or_expression; logical_and_expression -> logical_and_expression; logical_and_expression -> "&&"; logical_and_expression -> inclusive_or_expression; logical_or_expression -> logical_and_expression; logical_or_expression -> logical_or_expression; logical_or_expression -> "||"; logical_or_expression -> logical_and_expression; conditional_expression -> logical_or_expression; conditional_expression -> logical_or_expression; conditional_expression -> "?"; conditional_expression -> expression; conditional_expression -> ":"; conditional_expression -> conditional_expression; assignment_expression -> conditional_expression; assignment_expression -> cast_expression; assignment_expression -> "="; assignment_expression -> assignment_expression; assignment_expression -> cast_expression; assignment_expression -> compound_assignment_operator; assignment_expression -> assignment_expression; compound_assignment_operator -> "*="; compound_assignment_operator -> "/="; compound_assignment_operator -> "%="; compound_assignment_operator -> "+="; compound_assignment_operator -> "-="; compound_assignment_operator -> "<<="; compound_assignment_operator -> ">>="; compound_assignment_operator -> "&="; compound_assignment_operator -> "^="; compound_assignment_operator -> "|="; expression -> assignment_expression; expression -> expression; expression -> ","; expression -> assignment_expression; constant_expression -> conditional_expression; declaration -> declaration_specifiers; declaration -> ";"; declaration -> declaration_specifiers; declaration -> init_declarator_list; declaration -> ";"; global_declaration -> declaration; global_declaration -> init_declarator_list; global_declaration -> ";"; declaration_specifiers -> storage_class_specifier; declaration_specifiers -> declaration_specifiers; declaration_specifiers -> storage_class_specifier; declaration_specifiers -> type_specifier; declaration_specifiers -> declaration_specifiers; declaration_specifiers -> type_specifier; declaration_specifiers -> type_qualifier; declaration_specifiers -> declaration_specifiers; declaration_specifiers -> type_qualifier; declaration_specifiers -> function_specifier; declaration_specifiers -> declaration_specifiers; declaration_specifiers -> function_specifier; init_declarator_list -> init_declarator; init_declarator_list -> init_declarator_list; init_declarator_list -> ","; init_declarator_list -> init_declarator; init_declarator -> declarator; init_declarator -> declarator; init_declarator -> "="; init_declarator -> initializer; storage_class_specifier -> TYPEDEF; storage_class_specifier -> EXTERN; storage_class_specifier -> STATIC; storage_class_specifier -> AUTO; storage_class_specifier -> REGISTER; type_specifier -> VOID; type_specifier -> CHAR; type_specifier -> SHORT; type_specifier -> INT; type_specifier -> LONG; type_specifier -> FLOAT; type_specifier -> DOUBLE; type_specifier -> SIGNED; type_specifier -> UNSIGNED; type_specifier -> BOOL; type_specifier -> COMPLEX; type_specifier -> IMAGINARY; type_specifier -> TYPEDEF_NAME; type_specifier -> struct_or_union_specifier; type_specifier -> enum_specifier; type_specifier -> TYPEOF; type_specifier -> "("; type_specifier -> constant_expression; type_specifier -> ")"; type_specifier -> TYPEOF; type_specifier -> "("; type_specifier -> type_name; type_specifier -> ")"; struct_or_union_specifier -> STRUCT; struct_or_union_specifier -> IDENTIFIER; struct_or_union_specifier -> "{"; struct_or_union_specifier -> struct_declaration_list; struct_or_union_specifier -> "}"; struct_or_union_specifier -> STRUCT; struct_or_union_specifier -> IDENTIFIER; struct_or_union_specifier -> "{"; struct_or_union_specifier -> "}"; struct_or_union_specifier -> UNION; struct_or_union_specifier -> IDENTIFIER; struct_or_union_specifier -> "{"; struct_or_union_specifier -> struct_declaration_list; struct_or_union_specifier -> "}"; struct_or_union_specifier -> UNION; struct_or_union_specifier -> IDENTIFIER; struct_or_union_specifier -> "{"; struct_or_union_specifier -> "}"; struct_or_union_specifier -> STRUCT; struct_or_union_specifier -> "{"; struct_or_union_specifier -> struct_declaration_list; struct_or_union_specifier -> "}"; struct_or_union_specifier -> STRUCT; struct_or_union_specifier -> "{"; struct_or_union_specifier -> "}"; struct_or_union_specifier -> UNION; struct_or_union_specifier -> "{"; struct_or_union_specifier -> struct_declaration_list; struct_or_union_specifier -> "}"; struct_or_union_specifier -> UNION; struct_or_union_specifier -> "{"; struct_or_union_specifier -> "}"; struct_or_union_specifier -> STRUCT; struct_or_union_specifier -> IDENTIFIER; struct_or_union_specifier -> UNION; struct_or_union_specifier -> IDENTIFIER; struct_declaration_list -> struct_declaration; struct_declaration_list -> struct_declaration_list; struct_declaration_list -> struct_declaration; struct_declaration -> specifier_qualifier_list; struct_declaration -> ";"; struct_declaration -> specifier_qualifier_list; struct_declaration -> struct_declarator_list; struct_declarator_list -> ";"; specifier_qualifier_list -> specifier_qualifier_list; specifier_qualifier_list -> type_specifier; specifier_qualifier_list -> type_specifier; specifier_qualifier_list -> specifier_qualifier_list; specifier_qualifier_list -> type_qualifier; specifier_qualifier_list -> type_qualifier; struct_declarator_list -> struct_declarator; struct_declarator_list -> struct_declarator_list; struct_declarator_list -> ","; struct_declarator_list -> struct_declarator; struct_declarator -> declarator; struct_declarator -> ":"; struct_declarator -> constant_expression; struct_declarator -> declarator; struct_declarator -> ":"; struct_declarator -> constant_expression; enum_specifier -> ENUM; enum_specifier -> "{"; enum_specifier -> enumerator_list; enum_specifier -> "}"; enum_specifier -> ENUM; enum_specifier -> IDENTIFIER; enum_specifier -> "{"; enum_specifier -> enumerator_list; enum_specifier -> "}"; enum_specifier -> ENUM; enum_specifier -> "{"; enum_specifier -> enumerator_list; enum_specifier -> ","; enum_specifier -> "}"; enum_specifier -> ENUM; enum_specifier -> IDENTIFIER; enum_specifier -> "{"; enum_specifier -> enumerator_list; enum_specifier -> ","; enum_specifier -> "}"; enum_specifier -> ENUM; enum_specifier -> IDENTIFIER; enumerator_list -> enumerator; enumerator_list -> enumerator_list; enumerator_list -> ","; enumerator_list -> enumerator; enumerator -> IDENTIFIER; enumerator -> IDENTIFIER; enumerator -> "="; enumerator -> constant_expression; type_qualifier -> CONST; type_qualifier -> VOLATILE; type_qualifier -> RESTRICT; function_specifier -> INLINE; declarator -> pointer; declarator -> direct_declarator; declarator -> direct_declarator; direct_declarator -> IDENTIFIER; direct_declarator -> "("; direct_declarator -> declarator; direct_declarator -> ")"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> type_qualifier_list; direct_declarator -> assignment_expression; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> type_qualifier_list; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> assignment_expression; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> STATIC; direct_declarator -> type_qualifier_list; direct_declarator -> assignment_expression; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> type_qualifier_list; direct_declarator -> STATIC; direct_declarator -> assignment_expression; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> type_qualifier_list; direct_declarator -> "*"; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> "*"; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "["; direct_declarator -> "]"; direct_declarator -> direct_declarator; direct_declarator -> "("; direct_declarator -> parameter_type_list; direct_declarator -> ")"; direct_declarator -> direct_declarator; direct_declarator -> "("; direct_declarator -> identifier_list; direct_declarator -> ")"; direct_declarator -> direct_declarator; direct_declarator -> "("; direct_declarator -> ")"; pointer -> "*"; pointer -> "*"; pointer -> type_qualifier_list; pointer -> "*"; pointer -> pointer; pointer -> "*"; pointer -> type_qualifier_list; pointer -> pointer; type_qualifier_list -> type_qualifier; type_qualifier_list -> type_qualifier_list; type_qualifier_list -> type_qualifier; parameter_type_list -> parameter_list; parameter_type_list -> parameter_list; parameter_type_list -> ","; parameter_type_list -> "..."; parameter_list -> parameter_declaration; parameter_list -> parameter_list; parameter_list -> ","; parameter_list -> parameter_declaration; parameter_declaration -> declaration_specifiers; parameter_declaration -> declarator; parameter_declaration -> declaration_specifiers; parameter_declaration -> abstract_declarator; parameter_declaration -> declaration_specifiers; identifier_list -> IDENTIFIER; identifier_list -> identifier_list; identifier_list -> ","; identifier_list -> IDENTIFIER; type_name -> specifier_qualifier_list; type_name -> specifier_qualifier_list; type_name -> abstract_declarator; abstract_declarator -> pointer; abstract_declarator -> pointer; abstract_declarator -> direct_abstract_declarator; abstract_declarator -> direct_abstract_declarator; direct_abstract_declarator -> "("; direct_abstract_declarator -> abstract_declarator; direct_abstract_declarator -> ")"; direct_abstract_declarator -> "["; direct_abstract_declarator -> "]"; direct_abstract_declarator -> "["; direct_abstract_declarator -> assignment_expression; direct_abstract_declarator -> "]"; direct_abstract_declarator -> direct_abstract_declarator; direct_abstract_declarator -> "["; direct_abstract_declarator -> "]"; direct_abstract_declarator -> direct_abstract_declarator; direct_abstract_declarator -> "["; direct_abstract_declarator -> assignment_expression; direct_abstract_declarator -> "]"; direct_abstract_declarator -> "["; direct_abstract_declarator -> "*"; direct_abstract_declarator -> "]"; direct_abstract_declarator -> direct_abstract_declarator; direct_abstract_declarator -> "["; direct_abstract_declarator -> "*"; direct_abstract_declarator -> "]"; direct_abstract_declarator -> "("; direct_abstract_declarator -> ")"; direct_abstract_declarator -> "("; direct_abstract_declarator -> parameter_type_list; direct_abstract_declarator -> ")"; direct_abstract_declarator -> direct_abstract_declarator; direct_abstract_declarator -> "("; direct_abstract_declarator -> ")"; direct_abstract_declarator -> direct_abstract_declarator; direct_abstract_declarator -> "("; direct_abstract_declarator -> parameter_type_list; direct_abstract_declarator -> ")"; initializer -> assignment_expression; initializer -> "{"; initializer -> "}"; initializer -> "{"; initializer -> initializer_list; initializer -> "}"; initializer -> "{"; initializer -> initializer_list; initializer -> ","; initializer -> "}"; initializer_list -> initializer; initializer_list -> designation; initializer_list -> initializer; initializer_list -> initializer_list; initializer_list -> ","; initializer_list -> initializer; initializer_list -> initializer_list; initializer_list -> ","; initializer_list -> designation; initializer_list -> initializer; designation -> designator_list; designation -> "="; designator_list -> designator; designator_list -> designator_list; designator_list -> designator; designator -> "["; designator -> constant_expression; designator -> "]"; designator -> "."; designator -> IDENTIFIER; statement -> labeled_statement; statement -> compound_statement; statement -> expression_statement; statement -> selection_statement; statement -> iteration_statement; statement -> jump_statement; labeled_statement -> IDENTIFIER; labeled_statement -> ":"; labeled_statement -> statement; labeled_statement -> CASE; labeled_statement -> constant_expression; labeled_statement -> ":"; labeled_statement -> statement; labeled_statement -> DEFAULT; labeled_statement -> ":"; labeled_statement -> statement; compound_statement -> "{"; compound_statement -> "}"; compound_statement -> "{"; compound_statement -> block_item_list; compound_statement -> "}"; block_item_list -> block_item; block_item_list -> block_item_list; block_item_list -> block_item; block_item -> declaration; block_item -> statement; block_item -> local_function_definition; expression_statement -> ";"; expression_statement -> expression; expression_statement -> ";"; selection_statement -> IF; selection_statement -> "("; selection_statement -> expression; selection_statement -> ")"; selection_statement -> statement; selection_statement -> IF; selection_statement -> "("; selection_statement -> expression; selection_statement -> ")"; selection_statement -> statement; selection_statement -> ELSE; selection_statement -> statement; selection_statement -> SWITCH; selection_statement -> "("; selection_statement -> expression; selection_statement -> ")"; selection_statement -> statement; iteration_statement -> WHILE; iteration_statement -> "("; iteration_statement -> expression; iteration_statement -> ")"; iteration_statement -> statement; iteration_statement -> DO; iteration_statement -> statement; iteration_statement -> WHILE; iteration_statement -> "("; iteration_statement -> expression; iteration_statement -> ")"; iteration_statement -> ";"; iteration_statement -> FOR; iteration_statement -> "("; iteration_statement -> expression_statement; iteration_statement -> expression_statement; iteration_statement -> ")"; iteration_statement -> statement; iteration_statement -> FOR; iteration_statement -> "("; iteration_statement -> expression_statement; iteration_statement -> expression_statement; iteration_statement -> expression; iteration_statement -> ")"; iteration_statement -> statement; iteration_statement -> FOR; iteration_statement -> "("; iteration_statement -> declaration; iteration_statement -> expression_statement; iteration_statement -> ")"; iteration_statement -> statement; iteration_statement -> FOR; iteration_statement -> "("; iteration_statement -> declaration; iteration_statement -> expression_statement; iteration_statement -> expression; iteration_statement -> ")"; iteration_statement -> statement; jump_statement -> GOTO; jump_statement -> IDENTIFIER; jump_statement -> ";"; jump_statement -> GOTO; jump_statement -> "*"; jump_statement -> expression; jump_statement -> ";"; jump_statement -> CONTINUE; jump_statement -> ";"; jump_statement -> BREAK; jump_statement -> ";"; jump_statement -> RETURN; jump_statement -> ";"; jump_statement -> RETURN; jump_statement -> expression; jump_statement -> ";"; translation_unit -> translation_unit; translation_unit -> external_declaration; external_declaration -> function_definition; external_declaration -> global_declaration; function_definition -> declaration_specifiers; function_definition -> declarator; function_definition -> declaration_list; function_definition -> compound_statement; function_definition -> declaration_specifiers; function_definition -> declarator; function_definition -> compound_statement; function_definition -> declarator; function_definition -> declaration_list; function_definition -> compound_statement; function_definition -> declarator; function_definition -> compound_statement; local_function_definition -> declaration_specifiers; local_function_definition -> declarator; local_function_definition -> declaration_list; local_function_definition -> compound_statement; local_function_definition -> declaration_specifiers; local_function_definition -> declarator; local_function_definition -> compound_statement; declaration_list -> declaration; declaration_list -> declaration_list; declaration_list -> declaration; } adlint-3.2.0/share/doc/developers_guide_ja.texi0000644000004100000410000001477712224440633021600 0ustar www-datawww-data\input texinfo @setfilename developers_guide_ja.info @documentlanguage ja @documentencoding utf-8 @settitle AdLint 3.2.0 開発者ガイド @copying Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. @end copying @titlepage @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @ifnottex @node Top @top 導入 @end ifnottex @unnumberedsec ライセンス Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see <@uref{http://www.gnu.org/licenses/}>. @unnumberedsec 開発環境 @multitable @columnfractions .1 .1 .3 @headitem 名称 @tab バージョン @tab 用途 @item @uref{http://www.ruby-lang.org/, Ruby} @tab @code{1.9.3-p194} @tab ベースとなる実装言語 @item @uref{http://rubyforge.org/projects/racc/, Racc} @tab @code{1.4.8} @tab 構文解析器の生成 @item @uref{http://rspec.info/, RSpec} @tab @code{2.10.0} @tab 単体仕様の記述と回帰テスト @item @uref{http://cukes.info/, Cucumber} @tab @code{1.2.0} @tab 機能仕様の記述と回帰テスト @end multitable @unnumberedsec 文書化環境 利用者ガイド、開発者ガイドなどの文書化には @uref{http://www.gnu.org/software/texinfo/, GNU Texinfo} を使用する。 @unnumberedsec コーディング規約 Ruby 言語コードの整形は、@uref{http://shugo.net/ruby-codeconv/codeconv.html} に 従う。ただし、@code{return} は原則として使用しない。 Ruby 言語ソースを含む全てのテキストファイルは UTF-8 でエンコードし、改行文字は LF とする。 @unnumberedsec 目次 @menu * アーキテクチャ:Architecture. * 略語一覧:Abbreviation. * 索引:Index. @end menu @node Architecture @chapter アーキテクチャ 追記予定。 @node Abbreviation @chapter 略語一覧 @verbatim object -> obj variable -> var function -> fun value -> val expression -> expr interpreter -> interp array -> ary pointer -> ptr subscript -> subs alignment -> align declaration -> dcl declarator -> dcr definition -> def enumerator -> enum member -> memb element -> elem original -> orig converted -> conved conversion -> conv arithmetic -> arith alternative -> alt manipulator -> manip sequence-point -> seqp operator -> op initializer -> init source -> src destination -> dst translation-unit -> tunit parameter -> param constant -> const specifier -> spec controlling -> ctrl reference -> ref dereference -> deref statement -> stmt controlling-expression -> ctrlexpr option -> opt options -> opts first -> fst second -> snd last -> lst location -> loc composite -> cmp identifier -> id substitute -> sub indirection -> ind category -> cat severity -> sev complement -> comp message -> msg metric -> met package -> pkg representation -> rep assignment -> assign literal -> lit directive -> dire count -> cnt signature -> sig suppress -> supp version -> ver storage-class -> sc command -> cmd file-path -> fpath directory-path -> dpath length -> len content -> cont context -> ctxt exception -> ex template -> tmpl format -> fmt return -> ret current -> cur replacement -> repl index -> idx modifier -> mod environment -> env precision -> prec cyclomatic-complexity -> cycle_compl token -> tok next -> nxt encoding -> enc annotation -> annot pathname -> path user -> usr system -> sys new-line -> nl table -> tbl abstract-syntax-tree -> ast pattern -> ptn condition -> cond collector -> col branch -> br function-call -> funcall program -> prog address -> addr memory -> mem window -> win anonymous -> anon qualifier -> qual symbol -> sym candidate -> cand terminator -> term initiator -> init selection -> sel global-variable -> gvar record -> rec referrer -> ref cross-reference -> xref monitor -> mon iteration -> iter local-variable -> lvar previous -> prv operation -> op extractor -> extr enclosure -> encl relational -> relat equality -> equal logical-and -> land logical-or -> lor relationship -> relat prototype -> proto termination -> term result -> rslt operand -> ope domain -> dom qualified -> qualed error -> err project -> proj temporary -> tmp referrer-function -> ref_fun sample -> smpl representative -> repr descendant -> desc transition -> trans contributor -> contrib positive -> pos negative -> neg evidence -> evid @end verbatim @node Index @unnumbered 索引 @printindex cp @bye @c vim:sw=2:sts=2:et:tw=79:fo+=mM: adlint-3.2.0/share/doc/adlint_on_adqua.png0000644000004100000410000072726612224440633020542 0ustar www-datawww-dataPNG  IHDR0JbKGDԂ pHYsHHFk> vpAg0-IDATxu|׽e^튙crС6ir޾)[HS{I4Lv;ٖd2ϼ,R|>ٳgϜS6y~\y~Hs+x}G^FFFFFFFFFFFFF;$nݺ0褧O>==x+C!>Ā?.I.#############X4 q#8@܂>@eddddEۍ^G^m @$ Hnl6+4|>@ьy= (J0.$T*GĿhh4VEPňD"h4Ab1J% >|3fPPPWb7a΄vw{we.##zO~?z8P\.?<555H(BTjc>ɓDӑ2?C=Nwرc<$''o~nvΝxy'ӟhogٲe?@0lvݮht~?]]]o  YYY1}ڵ FeepzNNJ+xGP(F~9y$k֬{eڵko~sc0|>RRRƍygdd裏 6Oww7Fl^/]]]L6ÁԩStI _[lG _W^ye-|>~i}]233LII?zddddWq@?}Ns :sD>ܲFxQ .DVYFF_IcXV˘kݥ""444pM7o>oٴy3P9s}@4ݍ$In}$''_geÆ \.nFCcROw7x^$QOkk+}}},Yaf(k+d֭Buҥdeg xc[b1n>^ϽC8v(V[b 2ÓOrw\q駟f߾}+ࡇ"++ C4IҥKG? }|pd.Evη1pQn7We*+*=w\.6mL??կR$ vZhmmoHmm- QxuY$]:ǎGaYz5Ĺ J"۶n[V'ۋ/L},cݺuHDVf&N'۶mK,V( b((rA~c? fb1| \ر[o1<4D~^$zn֯_Or+W,շ}|?O|I&Nȏ~#L|YJ%Xf?Çiw^O^hooʕ+ je݄ARR@P0]?_ye~_sUW+IOK̫I鴀bza,^ 466ՉJi(+bdddPR\\zߣ7芑OǟG8t QmAWkL6 }f#0TW#J1DIߋSud񐚚J8fxx %%`X>}:MJKKط>"rrrL8 9z(EP~*%&L= 4 Q֮]ǝwށW_zhTp$BPrt:~|M͛ʕ+Grr j5񒗗GAA>P>[֯\M_??Cn6Fwy;?ikk_ ӧO7xSO=Ekk+L&~`49򗿤+WoT*zꏤr-7T)Sh H4+BUU%$""`ϞL>GB$a:xLEEp4LZl$';^v'm+fiuB!{{g<7L8VsY=uu ghImI^z% V[Qillh4BJJ*BA<^3}4ϟG 觥 ,V 555L&2|?MEe .^ eVN|̬L&N5\J|;js&i&??UU(< yϿ‚B\y%u^{{L[{;HRP8|$QZZJOO?b1L6TZZZ%6_!~((,s3gl29?yGMSSkAOMM-k`P} >(Jx}>|-:;/(bbX0 DQ&M_-§NՑbM/r1tZeeeuZs466‹/}p(Laa!999dddF{[yhӈXx477{Lf3&N"7//B!LBWw7瞣AHٷo?>(]]]D" F_QXX㏯tH0+WӦM_:defa4=虙8QO<墻 o}[,_\mIDQ$55|-_x<~+fPլZfy|>ä}۶{ :@P8[o$I pUWd?s(ꫯr=0idP{edd>H8TWWyt@kjj t:9GDy"V-'*-qa[Ɉ%ǠKqcFnߋZ#K.eܹN 77RIss3@ٳfrJ|I{=zÁᠳv־iӦQ\\̓x>YzuUĉXV2{|ߤa zøO֞GߎAo੧ NWW.{^xg}&^vV;3#NNj(DQI۱Jbԩn:6A$ar7ʕ+9vfW_yP((8N b廠p8L[[NGKK fbL>`0RDPpRRR2fTJ3f@HKK w73iҤkA~m~in6VXR; ۗl޼e˖%Rc"RD$6lʕ+#lXa/`4vmxÍSO=… OIIA?wtRvk֬!33Z hokWRFWoo/7n;٬Y3f`Zp8L$a|L&n7pQ!;;ÇOvv6ӦNcٿot{EՒc{Wb|~x췏qM7QRRJ"c>OQWWGFzy̜9Hmm-f̌Ll6jܹ_8~E !,< غu+wF1uT4 ---L4 DMM : dt:<&/}K㏳}v*++$))~j~߱j*nF~`:^xÓX,zV^Beddn֮HR\~{ߧ,}8]8g$~9+##"QWWǤI[HOOg``vfΜwEF HOO7$P(X,3|@(Jd+w8NAFYYw}1Fɓ" "I@?O:u7Q7a3<ó>B`ƌĮJ_b޷a<#<`Vihh`ӦMqL&$IBѰcDr>{1z{{xZZZ?>$vZ=Jyy9HRRZ_|Kܟ1*$ItttPXX;OOOm}}}Wb0uT $%%MMM yyydffrطoHx믿ŋzQGyR޽{&s'O}ۍl桇bѢE툢ܹsٸq#_H3YYY;vZ-ZҥKٷoz@ JuQXXȣ>Jnn.7orQ^^ĂSff&޽_~N|>^Qw&))5kp8,N ?8e\y}>"7|3---lݺϰzjill+`Æ vŁشiYYYh*y)VWW+¤IoA `֬YDc1[曹uj_*]]]?~bDQp8(P(h$q~֢VIKK&~_R҈F_vo&si锔uVn6$;q\8qyyyBAvN7tN7yeĉc:MGG呝yꫯ[6<E`0HsK ~!N{wl?N7dffrAj5tvv?&55|+{;T*cmiiI䅘6mɉF<Nn^/&L #3Qt:-[F,dR|!}}}P(:uM6QRRBAAoo466RW_O"ߓ\֨z]E/@~-+IqvQ 2/Ymzc_!"1QD}2222 Nz{z5kHOOGňDp5]V Xٳg{qG.F4Sq!&NAB$, $%%AVVgf׮]ꪫ+b_|>M~~>jSNᠡI(((@Tb4;vjX[ZZx<̚5+|6$Q{$v$)3f̙`뮣lt:/СC<"iqtuw_9sp7#y&LXddddZ\\qYW,_Tby)y1H.ҹ.H  )`7vQ>|k_c̙kONNwq:dgglj% rb6 x<JKK0a"^"jb4Y|9ee^j5SN%--oDZZXGy& "Y|cvcZI>}:?0eee?ibX,&N@qq1 9˗)'Q{ j***9MLn@Qg$ZNJE0b6cQ(f~?>].-[ơC9r(@G"IV8q p̛7dgg'_yϤѨ}L ЀbaTTTPXXNnHB.Y”)S $Q$?//K:u*.rnkkg1 0et:łlf{9|7$!^pz>Wr G!55|fΝ|d…x}>*ZfԘRSw::; L:ȧ?QsL&nfj5VQVVFeEn|+L6,vөHۿ[ba40o\J|S&~B&Yfa),,D)\hT*(.)ѣu],^?L$I|dddd^Mq5 (ƟGggEGU*gŕ}L3n^Oyn ݻ[RSӲ޸1 U1e4j2222ۈDl!oZ~2eʔ GuV߿]wg?(qksOiii}:uS^juh \.yh4j</--rb#I$Qdv{F8JFA12EW$, z4y[,/"1GQXq@ H jT[ct&,R)IMMd2EooSNIرTVVa6x=CCôL   D"X6lddd_INN!%%9Q5?@ONN%OǛ]]dddd7xts=,_$$Gy+V\P\/`Fͥ˅Gqi)Lα3O0¾>Xsx-=ž$AuNũa,zR,ܹZ̙3yk&"JjE+ܢTS0%O03_ƎDI$JvqN8Aww7˖-CbDցQ,zal'7vujRhuGZ8;L;4JR\7)O0ӻW.4J% }.&dɲѣGdcʊ}9ʿ蘴uLjߚ!Jv$$kNCGYO@EI:p K2pl9m'ypq%JyIZyf^~!~p LZyXNAĶNNzZeϟ,edddddddddE$q"X jZ=b{C7P,RD YILvLª$nhQQD9"l%IB$bhUqyɁ1VΎ l{-@ww7ZIP("1X+:3E%hTZ8L:]~u! vM۸yjq888H{{{J)KT*e4 ct"ogVNt1Q'>-1Z;'کL)$csܲG;GE B(I#}mP|cv EcLMFQ@AHѩj 9$ "1APNcN&_ThDu!Gӽ)O%t!QsAY\qW_S\7)d 돶Rf4".(.?`Naf]B;L:^9C'l)nM5j˛D R93Ā7čSyb{-߼z*&jR$^H}.8N2p<fRbߍ&9$j`K]`G;FYo\=uGZ(N"ZEPbᚉMa>O|UX^MDӀW`dLd xl9Ս'"ׯ+LbiY&z c:6,vcN2uJD; 32++ǼwVv4*z~R[EIB%(FYO%T&e'x uxxj3R}~S=Wڜ^fLZո $iw/̿ N_53=/o^=m:J&0P }!9F(ZfFCˏEaؗ$xX+FO$׀Y&Ŭ$JE Y4>O8Jˇp,آ }n:.("DL;HK EP00ҁFeRbQ(v*FDV(A/#(ƨʲ3;E -z( $yq#+*I2a֪iTf$lҒdDTU 4sy@#vT QݾPOuQĀ'7}4OU ETۉ+ ipSbETR ,+Ϥ$L(2ewcrTf&]s4ree6oo#awˏYF핃Mu$tX)Oa֩/pex,edddddddddňD6V\3!tV9VP r|i4 .]Ct :}BriΉv^;- t]̼!([{t;ܢ΃V%:e_sYIFJR4pO0BQ^+*yd'/op]>A8X\yϊDzt*%1IByV4xODqe%91&IQWT.^ȑA=Af%$ϋk&^Ml 9<ʳ(H6 GK8'Q-08Hv}-}7^[e}ohEx@#/|zvE'*Ju@[s&9̉ I]=$1k~}!}l=3's sRDaB〛Kx]FFFFFFFFF_]N6v릓bd޹~[ 돵qH<3.On&b[<7LcqT(Lʶ3)N0cO j9%[؍:({;O09 S H5_J*XX,M =:v<̈{Lֳ(onYsYg7k8#T+_\:s,Წpo(?e[C7z~r+.薮S+N2d+(a:}iW-#@a^tn^%x]cҪL"ff0!Ή.'[gn)v $#=%wu8`3hH1I2Pĭ\Q&YX $ L: I&2m Z&g9pSBQKUODEbLVdi<*%Y6#Y6xjA ͢=} <57ao721]sJƌ#fñ6;nHAbvAj~xDDKy}E%ώFEB(fSm(b^Q͉A"&J iw`,eddddddddd8}6 ;<|4K/%z\ۉbro_7Laʣ>oo%kN SǺo`k}7MdB}b&^VrB of<gDDa251|.BUIQ !c7rm@}N3Fŝ38:>Шdf$Q3~A"1d9dXƒ1̼1m[}Vck &g;F/9sc68%goO?Ϲרq)|(rͳǜk=l8Bτ$ƙ=O.qNڇ|a/RyjG8]FFFFFFFFFFf?&f)Ia5c+']R6w.%բ?tIY&+/XbK:"Z5if={W20iT4%wYs)E:(S RH=aԪ%)$j,z68cԪqJE7>YgtĿl7 sf1=[ &SS_ dڌ\s M< nџ7A`aO-('ŤCsE/,B u J)I8+\7H{Q/<}x| K> 22222222222|\Ji.u>ɠ%p6Լq")KQvV=llv J =\T9P0f_P>jL6*Y#ce`~Q%5ȟNx1N/T\ݮרFefKi.լB$IDE@8`$%Zը!j$jnaШQ)ˎ+WDP F~mQ^P9s&SLAP̙C4cW( Fr=aIlbŋCQ0HAKf$*85/###########s.f/1 y'eƏL_,% B(wA_NCY^ %Yv-5걖q 0}ôs#-}T8^F݌N-2222222222222(Ia&Nv Q`eU%Y,1;t@Ъj%ehT=.껜4]ΔTF%xo# tQ^{HpJJ 1I\ kw$b!nf$\~N-dbN1'Z΀' MqS_# tQ>w7@#YVXno=y)Gn \=5dAK&*JD1"bYw$ Qo(YF16&JhʄO$FE%ΌA$Z)#1 О(I"1JaL HLD[:q?dЎɯ%±zHLD%(FchKuznxO(#&J2cNCP(P(DӥJHp4bH Rx\B0vN%ԧY8C)DDRd@$8iDER S_N% hU>cxxc$Fal-w)>>ZDKÄUa8MTw9񅣴 zȴtla|>( > (KlұR`NAFd3 JAA'Ȼ*H4͊$^"#};}(iVAjXVVDQa֪iw_8>ȱAnZIF%R-zrLxT67nVv{"]8*_(RP09ہ;fK]C~UDIMj4Db"zRBR ̄L;} {znR=739Ԝxy3/DӀ;1Ou!I4Q ͘j>FQǼ445sD|T7Qj!͢} ( !ebiT4 FP <jA*3~o?cEE6E)XRI@L x46 Qb!5ܿoV8J)2#s}sIvH=ݼe)\;4k.IQI$"ƈ""U#tjObde%ɤ#7قPs?6ҜN GɰʉrtjP.oMP8A|E~1 h.K1vF$d0\Pa"ZfdWaf*qDwF]ao?XaJE8alwMzr2j_ꦌ̿C^^9Dm0N/;j(Ռ'31κ#-qVž~Z:4iw> OcvA*tS=#1!ڄEСCܹS"8O8*l-Ol%Ť'j{y@#'{9:A:|v =,(IgGC/'t(=ô9|xo(÷P(KON7G+@Uf-6vRnkGb[ݎ$7$I$z'l{a}*AvlFNtqmVA@Va7'susgw0AP@A˦N0 ( ~o(Bc0bú.JӬuju E(ݣJv6"$6a7UW]x?m=1N'6]NޭĤUsuXtjv72 vt*%^>D"Fˀwk:viw3Qh JA?If{C7{u(2 )"/o<~:FȀ7HA.9z G~B##@䲞bHK76bzV Vc\R5 +g*A@IH8jχJ)0rJ>[UUKPɖ^: L+L;[?^l Ah,ʅVX,&#}uv]{b@idqݲʼnMzu-ZO~  H4΃ٴ}_}ꕷߥMW.#ay| 8Iv$a1n"Sy"UO{wve}~[W7|e-ͭ&;̜Tuޅ] e%ܰb)`(7}KufNA*I18jRiV [^ak}7UU} E/`kqjC^JIv ZF- vzBQ'H<$< \\P4JȠ//k䍣--LcyEUIxCQGQ!<{|rLlk_(JS)9CQPJ *^:}q1#()KQDE%Yn`vA*I-{P\3!FŖ.2 ZNt 1uJ>{5vr2z#5p,ƄL;u.$u2 ]uhTJfڇ| O0Nyz.'Iqar|f}uQŢ (T*04c\χRPj5*?́S,GѶ~r-dM2idD$E<*& P* KvZ#!EQdc?vC5C LXu0[ȐwEN5Γ/Fr X:oװ!Ғh5j0]=$Y-]}䤧|5<T{ET3Es9|wl Mi~>7\F=i|wl':+4+UWj}Ts ?23'U;o%յyUX4k:'Or-7j(ڝl?pq,HyRS߈s؅Z(/+gjht(J5MC0a2R5y"gGBU*Rv3yc #":T)#{܋J>{d^!J EO`6??"GjjbLDv좥\Y1 IFEEIaVC4&~PJ Ťck3RI1"{t A[)K򍫦'ɷaJ>@} bK?N/Rl&ĘeGP(ȵhpcW8J_(ʩ^z{0hwREaz^23R1hNfѓl%R:^-S x{;g3%N[Jǐ?.uE2m,)drRqXP4ʩa5#1*3l,.$ ѩO ̬TAڜ^D$w:I1xz R)ƭ_KQ1Atrrғdqĵ=E@'rP*xYӂBAy<?LYN2{[9GU`9yO|ܿ?Qv[ya 9nA'OG8Ov3&T#v8 ަ VÒ93c5d$Y0fx7oaĪ1󑗕A^f۰J|ϯ[c6p$xnݛX&T*%nH4JM}#ZM<">Zd:~Udïz*nb|u"g KE$lVMJs{4wtR]@Þ@^6v5!P]/-]x1}azb\Y4uVl&;@7_1A$[8k};Qyϲb<s/?rOv3)_ Sx>/qN׷ySu}kIOIw,.6NjARr`ϑckᓷL>z$Ov3GjNr}V4wtK(FTVp{x|>zQUwi;ڡf R`դ< Zn:(J/4*QťT'!( "4yb{-5CiwI,/bR$SGU0o<„$>4=oO8*n#x8pt?o0';qLv` yj)JӬ*M:ogF%(D*38O(e̼61 1)ہ^Sb@k?*'὚v|!8:>ݼs>1.\y)Xt=4idY?^CDA˃@AŪאb35ǁA&+HۏBג ӹzB;D@$Yk79 B*-Hc-٘]AZ(`tR,4P)v6f50) y$%pI´3$"QQD @BAKps? (ȰvP87$Nv 3(Tk""X0sll" h8_Pǟ[w0s9w$>ZϙIoo܌$p<+eg2kDkc*.N'&adBPPʁL,/ 9tA eqX51Qdpxh,SuACd4P^Tf#?; ZM=#')OM^V&P| o[_<JKH>Xܰb)7X ENTJ%%yiHI[&WS]7^GEq!ݽحV^|ݶSM-r ̙#0{'=%aD>}eg.^ֿ63;F|ugHuynݛlݻȽod<@XA7bopl W.Ǿ#$356*J(-cރHHuucsյ<FmFDc1v?5Pid̛6U,?H4F.nS:&oSˉD!6V|j%f{OM˼4JRTJ84n*%e\t٢S DCmOC0 X+p}{V߃F%pUUp}R`Bfr DޭngBtmN/?xt:x5r}l")&V;LKaG} }n\0C^JӬ\,a*~ޑx̻Ov(9죡EQ뎴 (Yv3gIdٌ<~af*&q14/psa?=ZЩzT IDb"'{)L);z1 2L3wH".?*A afVxCQR:Z5K˳Щj R:GZѫcJBјζ^mƸ~ˠ7N' S~j%)*3 y n$`b !&%a=L*Hì RBGc1Bx]{idڄJN55IIZX{mյ w]jjF>dO?ڍ9\sef:C03&Vpt͚A[W77cWq3P:"'33Rq@T?Ͼȋĩz̝5TUU ]&1r,5$@(Ⱦqy\uz^ o7h5B0p?2naچ&$$gY`.W.ǞGox:DQkuu:fOHQ^nb\AZ:JY:'>ǯޘU3wdT{ olKAFj2Yif'D(tJOxR*Ǎ嵍(aѬ#s)(YfwNyQw~xINE۾v. R%ֿMvz$,kD0pܨT*6ޏc1Ws$F`+3'M GdiwJ8;Y`E#Qd_p$;֎VoЉ/  B$C#aDQdىKE$<>L,+g{ݟ_`),3+^8/wň  ȩ6uܰ[8}!!v5-hF(KJ 98}!>0SA&͢gVA g4nQ(5*VVeqYl4& 8>J 1CPPl$U@`~q:okeZ^2fh'XYF}(np.?wZK4͆;&Q |lVq"S(I"[E^!jHvzZ!Sr./ϏAbQIZ`R/l3CVn1dk($t l8֖Ț Gѩ.y#sR1$ &g;F$+J;Oq_LjSBҞ?}V丗C$&jɲH깢4ZI}x9<^N0 R?_\0V,V3V` Ti6&f1hT~R`YyʳP 4J|,$У171 rGR#Qb1hT$E CFLIRb ?Ʊ^wd¬\*(I]! $Nv:Iƨ~Da;9R{Ξ>[zS+ dg1J O:.YS}(J:{p{tqÊ>tNBvz흼-(7GZܱN ߾C0X R#ɆRHQTll% J(hУZ:$d q|m71F\/NV,(*DVNq@WTB!JAI5y"[ijHGGb><"(hI$IBAPpcwlGVq}Ca;@u]%kV>fs^~7?JAvLdreC uK̬TF-;zЪ\7)70 s|a(+㿷sdcNJFi[C@< aԪhU 8L &VvzA_BB%(s1jUt N20)1WQb&23EE<_(V4"Ч$3 -1^w<]$܁0>z & IwA1d¦1#&ImGf}GY Q}|{ S ˇh5cf^ 6r%ar~bQ{Ff#1ڇ|Dc"]C>!ڜ^&-T:MiYt\;1Lv$դgjR`dgCvM|qSđ&d&aҩyvo=WU4CM XhuzȴI6 PNY),(/VV;?`A4Ja:zX:o6wPAP""%Ey5t =ֽ)"T k^ET2vWÑ& QIOM+dqN6+'O8?h,F 7/L$RI^vhA\Q^#-%{;DhnD$ғu*I zq1 5epav6eU۲Rv:-("g$#5sXfdc3=]}lݳe r> p<뼿s\u%+m3e2Vv:8bR*INDo$&ƨ,)BA'nZHxeUBAYA>Zزw?Ӫ*m7#+亸GBOA[W7ʳj<^:r33^3'N2q( SBAv( 흔'+ V+fx yonŀs<$)~+EZs/r<* f"BϮ[OgOq ?R;Iذy Oֳ`ƴQV~^߸H4ʅGOVe~>?(̍[%"GjNqKÒ&<:{ټs7هhdRy)W.Ǥ2%?7)&mt2(騔 l?I;ȴd>´x9P4E禩eZ:l:7e8EN[t*A nbyE6|.]MS P uA_l8d>9 j@y탼y5QmjN2IF"1YzndF~2`+JcEE61Q盎q2ΉvN%j$Q7f(:!uEZM-S (JĹ$}n?ɶx=7 H1DN^JJ(!!"*Qh`d~y&I&4#O`PE{9jWU Dc =}.?6HGCR1wdr3/}:Y'갓갓Fc[;ݽ̛6M;viN̝Eu]Vyӧv{ښ,PZYu6\u%.giz45 Zfr1qx IV+N‘ ԔDܲbɄd"agU.M1#xVX,J{wZvgdz9IHR)?xB2RS8tVd#'#(*s>&a\~C_ jgO;w'+FEM4Vǫ07ʊ.v%IV+IV+9̝6en ,fΝs^!#Im]}pDiriFj ]rֿ'Xt1K?΃)K]M䕷pIΜxRW~s8~"..Kvd3}Bey7tr׍ؼs7!>ڏKow1npICEA:zzYh>V{0&$g`yh,jr FQ [ =%&tRMEQ!;)$J%߫KD%7ߡ0?^"mX,ړ;y/|cX&΄ ;W]÷v[oBVcm7{X6+J if۾=r5'ټs7M'_e?/FFn>:LK'&ʼn3CU晼9_j &YF)pՄ/Vq(E¢Ed㽋瞹9ժ1"wW>F >Ԝd~w}fՉ9wgOğnqƈdzTg%m3ޠ|l5d:O/Kèٞi5i5*;r}Ec³_|LʶzZ!aiҲIF-m \@"c"6`0b @ScPJ$ " @D@-|-ɤ*ǁIA!(FY$$(';Xm6r $z a1I_X!(@Y_2u+wT*A׊/ˡwHM- ̙:$ٲG ^ϋeOZp)4wd׿EZR"jz)_n7?؂BϮ@wj/q(JzFCL z h䤱IAIVZjb.EQ2"~qd^ϙI =#6uZ-W̙ya[̜T5D[0g$cӑ$@b y6sMn A6l?ƜY =DId*6C^V&2!>=|$f1S68mGU+v{Il7|3R;^3oOxxneYУ#9~$;W]37(arEٸ5TSVT#X2w6y@r-QFB /+oS):Ϗs؅/t.HMܽw%zDr`(L=?~@AX~fIb`h!T2HMh)XVJ{W<1clwA')5j[wmvyE99mbFV#.\ӰC4ÑdepȅN! I0oT&Ys'/53n& 1kr<[}vz*(%JS͚2z5r14Ƒdv {kg`۾T5jnzŸCü}o~!p.YĐ/|'_~㺥W$%}<^͔r2..ݏF!73EkgC.. .U?̛6oZ~vD^OvzHǫٶ @v~gi ۧg†)eIƭըXVsx]=H oQ9V[ǻvP;Ch0pRFA!`HKv`1. K e>p=}s ̝>eT=GR7]OvAz^zյgg^'GA2eDc^6NFFFFFR(,,/蟘˗7GE$A4Oҥ=\>|xD 5J 8K*"" @@HM2rhvgm7P,{hme0 Ԝdby)e@q~X+ym&Av=)v;W.omvMBS[;u ZN3kD mlW|eT*( ֞BVNvzd{64׏h䁻+9vdx j8E AOT L,+$?6\FP>9%Yp ֫c"X`TQK" $IDu b(`?QFP ! : `~z%".拒jf=5N" b5IKviGm=GuuXMc[;1Π 'UsT=-̙:/} V>qL,l^O8'Z8x^ԪrQq+ ܻ&$`_;N7REP0{D~/Mvvը rӕI;IiKmi;m |kjUSHaYO߱d$$^/CCD?oQ)¡DI8~{p GZJ27X+#Dy}=7m'/!e$bVs[+6$;g,;qϓ}KrVUU}sΓQBHBBq8îׯ]o: !$@Y&pgnΡo]U}5W8_>󙙪ꧪ>/<~s7a_h?obXp]`q 6W]!]P*/&22dUn`feYQvk29dp"JPQw]KIV7qۭtx6N_~-ߕ?/| `&<,/znڸk)[yY=eq9~3?wڱz񗋶ݸa]=܅RU˖ =z>mZmm:y4M&TtԄjY~LUUj ~p\WGcZӎ@ ^win>^ߵ'FNxd2Yv;k/M[*v;]-vu^ys'c4֠( =t?=tyN~>OU0@kSY[ޝJU6]źe<3@oحV'> \sz3[y.?B@*ĒDZYTPB~_%lUWdZ䚪?p:YﶛuڛNwv:io:|#h+/ Y5y=ONsD?EQahlݝܰaׯ[S)[T];ضw+z*nc{=4Pwna0 G zrUW-Zi*-ø׬G!B\ӳٳg{+`:2>Ϸ裥<D}.NC.'~ˎniXQ LLQǚj}.v VM]X{nR˅N0U\P~tX5LOGxk']2/'{Mx9ck~wUQ(pl`E[si%]gϡ#~Og晜T:M﫴:U*a>*_TL*%OPWtv>B>_\X**8ɂ$2cxe Gz4Vg]kгYV.yG{6gv~MCuf#dsyjUܓ4U^D*M**tޔ|?Ts!B\?"e4M"ay_R  ENB6_$-0[9 볕rUtUS,ez6;YQaCUOU9YW + U#/y[kbᦍhkj$һ]G!q6g-Oh׬:*jqU'-;Y=cᶷ7>S0Yq53^a=It-OX,g]7ueBgffx_%, F wd>f!㲕TՇg LLtxFgMyQu ?<8JOh3J5~E]4 ɑQ dpFO]yfl`h0M0~rlů߱LFmrb605Z?mqF(>,gt<Ë&{E3(GǏk8\zIDATZׁMSy8_V ?<4cjj|e9PLEL3|OLng4LSm9P+JV* ljOd,3|\Vg5mm&c0Ia©iλrM-xVMǘNdy(L3f9=%i\SXdnnnQatE߼c;fiڷ[W蟍cܳaК17-&NdQYɮ9ZCMU[(d3#1Ld"!̲)ġ|tDD(]5>6_V$<X#ac|EL߳fUi z ]جK覉nBREU( )V 4iB:Wb0Mw/+B!B e4(ޠw RqjiY:&ȗ R:7gMxr0^'IJ|x}n܅}c7LA9<zN9pt:/޲LP8AA\:%~NEId8x$T' QwgE]lγ4)NC|}G?C7L ӤG<[GPbDB ݢt1W0I"=H=<Bc,&*:k|ѩl/޳B\ӆêQsRsR(<[zYRM4ghXi)l#;[s㼐4Uˎij=t7̕{ OotMQ) RX4Eׁ( %sY3D2_޽o: '9:#98$sEk}|%n zxx];dB9zx>|oaH) p|&d<|F40MHX4#;9{{?>Gw_9BI/6|0yoz*S +||xêuxtc'O7{4EUf 6΋nm5|>66s68:IQ)?J9/tTEi\vz{,#M*>O(B!P 'KXUd.c2rh2ʒZ?.in'h/ru>+EA7ΞA؅n=wI9zUQuI憥n?a@ωES9zN7pX:IKMO>o*[( > rޠ3[(mpX}{IXbs{m%8ϗtRsq}G-^Cl]4pn8G7u8ϘL$//Pta0M<+Ttd]\y_\:jI ح*haհh*΅%1) c^y9b26vqf 'Jܴ>1g9,ǦcdmO=n[ʟrn\tV.s!B!O [I \Y^=1ŧ,ž YiLk"cS1{8mUOs}a%v ͒/XU6wchY~th Uc+YO;W&?>2f)kmrޑHOVd ]u4>p*dzH 3>52G'8<[zK>߱$/2NTEryI~27@t!}jba je]K-A_~;7QvPɁ~/ {z4O+s 81GS{ utMUhr6ُ:4F,/?0OfLDUJ/'x+?`&jv^h/B!KQ:<6 |U5>\6 >r= t*7\s.G7tRwUXU[3j*-A7u>'!OyBӄX6|xe*:x(B2W`<&Q˳'ƀ2;}ꘜɢ*4ܬVVjec[ }1`}k5F/ܼxxx@cjSxlsep(61M9itp.K:NƪR!6zC\6>cX5'wa,ļdT> uqGvu&7ŦfT10d ztE4P*ab.̤4J`~r\j/+̗rY/bB!BqtVZt*k<jnȗ0,4|ɠdK:^u>vYB!Bc"FCG63.~w~gј.B\ҧ5>+W{$m!Btդd要բ؉g4MX裗ȕ8bt8"*  qB!B^(;_ʘ0 qɟ*ܼ]>'/c.΃RnnQ򹈦dB6C yL# (ՐIs!B!uESNn]BS˛'&39)Ȫ:N Sț| Y4 84J:WBQ !B!pٹBjZ'韎2N!B^'U^*(*-!B;IkB!B-^ !*L|iX\]fUXjz.4q' !BR(J抧sp,d'g`8I{2qfP2 ,PS*](IiYhic<|^ކiIح,*| Mns.8&(|0 uX6OY9a$rElZƒa]x)I:X5t@I79uxjhIS\6Bm U#)`Tv U )& ӎ:HE#aQUBUQ:((9B.;afj3,vJe?m_<[/'?\Q'+t+ˤu$Q)˗ J ]P dE҅6 ڊA8WX5.RYjp$|ͥtv۹}FR7w j<|m ~UyX^D[ ]c %V6~ dFsMtƉ8^LA'rp2_|h3|,² -iGƘNdr;Hܖ+\TȁFQ7UiŒ$Ǐgݺu%-wl\j7uד+<}`*ATh7gcYc{Ѓ*G˙O96<,Ukd͚51IL' cj4H$E*Ws7-Gl#:i68US^4]߽z_}%S D}Z/i-WUdB!W*GgeScnCs:1MNӘ'6w,LQ7X4DxZ憮zykQHodmK\dE)i)Ordx^;Yb.%Sqpj|o~lܸm3]v"h1ѣGR&ci:kS;V⶗Cn)x$KlnYd,͉8j(&&D3y\2Ǎ]uvϳ/Tg 'yjU;%d.BlcdZ{ .+WVƤ(t>By0Xc0L< CI$agx_o ^gq`m5uO?`d>E]˚):]f9wDxHCn o*<d 78dsG-_яic2fk ic  !ܱLa4]vtTݣs6v:kZ80mSXTFS1Oo,P8Id{4LǁEKnZF/-pt*ʒ}31~rdh&|a:%S()YJASw Q(6Mr8^86D,G=L2rE XHrѾm5d%l|4g"f[(rϊfnE珎3#sSw=#`wt{L&7m=FA9:T E=Fx:0MM$s?:L2߽z ] %j ~AE ]!Bpgrp"Bׁ͢/ح*iP %0 j/tu4UaMsLQg]kd$i(p'SO\.XUxe Oj,,̞gVK'O2W?:âijy҅"pz7LA7U;粲)޿|IPZFepײ&, u8+C|}g?Ng,턓y,B4'W=Ӏݢa=V֐6w± ƣM7ɯ߹{(F:_dMS6M㺎Zc]xNtwa_.8tL7w-h HTZv aR2 ;DOc1+10G'oe+Bmj"ʉ)vMds^acR"$Ӊ,&&Bta.KT{ܷd<0˜\Y8-!7LilSm2 A*W6t"Cd7'UV<_zrٵUAM77,o?ӄ#SQqrE[5/$಑ΗΏiB2Wd,,.״skO#$-/X5Ư8/dTFizQ{Qf%@B!=*S[.r (ZⴾIQ7 'JH^K:_[=X2XZg,B9؝O0Ms qI/HȺֵ֐꟢9ধGt̅&Prf6Uko;mmp :8Z*-ae}k5L*/'fln1DK}SJo芢NIBh"/2ʱ.fn|Q7ЉOJOw[ $GUniMJ U^l)|~]L5 ЅB!xu瓼zb֐怛oTzj0MblQd;0K%)&S , LDjSM ϧ=:MUցiV6Xa 'yhMKp&4EeM %q}ܹi!MEUm r`jO^K$ghphp|3r:jjV()" &"tD Nje p|d&yo k[ATEac[Mexdڎ JvZ-,sx2 KMH,]tTd d%j֠MU8<eeSMc`.ESv;M43NrSw'f] JhdqN>עow&#6r۩rQ^>>NNw2N.R\Wr20KW(Ef☦x4L2É8>Z v ϒ++2MqkO%`Xݸ_}%ÓQ^>>k;h cVZr?C[4>E)TކME7 R".iUl|憥plZNIvav;+pl:T,C(s,mg\%+j*Sn^'癌7U72=c~+=c< VʱN:$@B!=LcL 0y`uӉ,|%\Y(M]z|}ML2D3y{47 vCcYI}^Z`ecV/Vj|eӀ*%NSy^98MCmZYwڨ8;6?ocC[5#UڳX-*!JkC/ T*/ ~7UPiyj}cg?!ִS?xMͳg4?֐4YV^=ge.n誫} eY}BeUhEUh Nӿ8ACkqLi0MstaTLp&Xytc'7vw[I޿ƭFV 4Kj4 %x)c*׶5tT{/~˞={:|>D!B&^}YRs/U0.=4_җJt,kiW|0ْdhr1+_hq7n/8gzz>WC0TO|j^+;/%bϷ-~d'΅};&4̇W/~H-J,22.B!MUO18.f<-pU*q U_HЭ\qjywwwЀz.ڂ wu%?P8߃KSUUwq%IU JM؟M!B!!Vj~p~?7x"`믿j㢝9@7MJEJ!B!T$+cbm‹+\ t:/dB!Bk@(8]]]W{(B!BEVB!B! B!BqM]wtH4g_ rEn-JG!B!-.͚*hB,jn[pZ_7fJܳ ϧ=|!B!]Q`S{-u=Gӕ}nz EH!S aZ< II>^9Ybx> 0&llaըr;j8#B!ĵtEd |rKK<}`dѱ+|5Uyxc17 rWڅͧ|} ƹ{y3mƢtVxr0|kb6o:Άe 㓌̧-8ګ="<X,瞡K$E DQ6 Vr۩8Kjd *ŅBIP.)?}d>EPtϧv+K@9`7V塨<}`}T\Qw!B!a k<>q]UMon ab7vrۉUy7o}#SH V~}kXVw,,kt]#sW^ S5EֶTomkSeOWB {k|I,Wn\!Bk9z[4/ێ7O7l^Po[I,S98?:4v7 'ȕʭJ\2C~S %rW6^weMtlsֻͯh}Z6U_B!B\sGbޓ; 'OO+Jzdz~xp[}]MS:X5U !B.rd^1 !B!y2&B!B\$@B!B! !B! ЅB!BkB!B!5U}+[Kū=>!B!Bjn"J] @.CB!BwY;LNN^!!B!;J֠ !B!׀Π@,[ [{ˆUSg{ݢQ罸arb.AI7)&Uiհ[4ͱ!@׎EU;WB!Br]7L~xx#ʶH@$S5¦5zh;-:y:B=ʶ/\L aTFbi.ztU{y'"-~'؉Ӧ]*4 bjEQ%I!gYtȚ\t2t"('DNKni*XCd``oWoYZ_ x֋ OTJGtD*_bp/o @ێ*_jxW2M33䦦|yxnrP҂e0r9\(˅ջRB4(XC!\Νdp44fTjS!B֡9LYO t&s]G"_ƎN+>JI2_i?>6{G lu>j4}NN\4xlfSy3TEaucվB\9IQ|Gc#PjftTf;mRʜ}jb Q2b4J]]긐'rag? ;1$~=e&y)tV^#?3C<nS1E4scsd'&Zt^TJ${YT =0O~jj^}I>SOR}.!B:g>Na&ݠCω(ܷb*ep>ʆntGִk4USw`*{GcI=c4C)L)iwvBnaN%3XU*y'ĻI)fWH9j\8~\o'- O}=3@#jo_k?$gY}Z[iGp45Q&-ןM };F=ݾ}$5wމv//$|>U˵2(pXl*[J& ={(% {,{pz$`gq\xn.oϓBs:1 rN'5w㏓+vF]!]+_6c0MཱིAv|+[fIJ$sE&Yv"#99?s]'X̯ܼ{zMx<lhtվB\QIÇ>D`&d)F"b%h߽WWvgK ftZmw8 _GCYtχ;>T"ׇtb;(0svijl ?[na_#uhDw7Bc1ss/4)D'[|>~N R#L|[,ZDχԱc ;F#ܼyQʼQ(PJ0 >G=b~V2CCo##;>"_a"7?O!BqmE6MjjydM+7r׬kVY:4h_i 7trYh \jK!8=Fp](&&}9>r tMns!w/^l"'b y\|^z8|fg)ΖDZ|9HdǩN|#'q0t@fH8Y(TfҥV+u ie'Pm6>1l#,)1o0s8O4btm|y Qd<|kPuMjj.0κ\@!B\.(@ Xxt"ǁ(t9:zxxSiBZVV 8N'K1s6P[(wժJ5X$71<F7/A۹=VƳl٢mdշ܂5,T,Zn.ڰ|aX,6F{l55ˁ>0 zbH0/cKi Uފ.Bľ}R)? dGF(FXTGs3ؿ EΧ0?OvtW{;@p9lՔq&mTG,0y쵵 fDa~=WWL>fmm8$XB!]P~sw-4Yep_o5;3o dhpuZ5ɳG'Nh HKӪwZy[ހU/ԄrdكtVb9o[^J$H[gBk r[UizqMRI lFlxҥ6'iz>O),?xY[ظǃtbz*E7/̲`%75NbS 'pwwDQJz>5^Wt覮r_gS^"hWW˅dFFRU-drM_V]FHlvuNyww7SOy˗c hxa~%33L?aX+lkVScѰ(6[9H6 ]'q EkK$H|/z1g')F"sSΕ'y(nS}ξ+lJln<˖a xOfdW_%w/5w]C=!ofDp˖3KO`Ff#2## !),^/U7Ds|B!?= 7( 6/gbTlVciMUhkآ\.T"?3C~v ra|kPliYbcD^{ġCx-殻pww+?(?SO*-[ό&ى [ݱgK k8CY޽Dx#%:#T.r;Ju»|['3 "6Zݗ>穾>6Gd0E X659mXs^ķSV]bv1,>:m}i֬24}#8} o{:S{/!Bqy\.\%WwHv'gB!x7G!B!\0 !B! 昜\WuN8A.;t]7~7'B!B+3@mL??gbbj]!B!xϸFb#Gw^<+V`ƍl1GahhEQo`0x]!B!f\#Gsڵkٺu+j%%4M&&&x'Zlڴ~{EB!B!ϺΠo۶TzA8&˱w^BK,AUUVX}ظq#@5---Y2 < HaB!B!~֜7@_n'Xʇ&IOB@4ѣT_t颢r>Á(nt]?g9!B!gytAmmm%@w:hi8N>򑏠iR 04m9 RgEQ*B!B!eAw88Lk?bbb_UU%EB!BSs[Q:Sba˖-D"obHOO=oUUU'?B|cp\kB!B! ?O?c'urkL$flsߊ1"wwq_o#t*PǦ7?o57wr4X*_GG&{·scg Vml j%͂a0M<KT^um( p=Ƌys;0I X5;:t$8WiETUzJABj=ku]42:LӤ(EθX*a4TUDB!ҮHf=e[쟈RM<-k@S %1޿/ݵE6)&_9Ě ~G9TB3Ksp޻" t=a+< GtTyr ͧ1MB{ClLmugH-uD3I4S@Sir~)6.0H3}'5 VVcBollZd>4 ;dIg;nLIҼw?K:icjvbT9f B!5L=neK{5O?didp߾sŢVUY!cZށ1M.A,W"b9epmSG׵Q JIW4b. d7Է"?|jR9R96h {{tt$贝v>͂@~a]{Q7xfx)L6?c<nm4A7LV >|nQq7r9M(&+o1]Si0MZUQXX4rX^?y!.brb4b#}tÁb0;?ϗ}fcj_VTRG X*(JLLϢ.^?|&ڛk[Y׻|Ef΅B!W$@MO^^chmh|@gmah ,q B`!xOK|w(|V6LƲJ:4a)xG| U32ܦkƃ -Ӊ,1҅ r %6i TTD*1Pf*R/r(B{K/ã;YٟLYG{F*P0{(xBO{=]^پ'l#"XF*28:Ʒ~q lɶ=%86"8esB!B n[=ʳm8>u4lQ~Ms:sI= Cnj`6kh4IKN;{J>ϯ߼mY%=/̕[҅F?-m0MK*c_Dbhlj^* ΧPM#qkaN'Nd=6'fhp,o h]\&MUYJmUζN>9|~ y4Mz~+u5bBirp:H4=w;oOt]'lVW11=B]xT,}lZ݋*>LdjvL&KKCbY ds94U܅B!T+鶞:Yۺhm7:yEm,7M ὫyX'q][sw/-;ګXG׷j(ak,m 7_xJ<}S|(|B,[Y^eXdi$M+Un%e <}Q^R@$~b$Dɑ$Sr:zn8,aVfUrZ;3ӄmլi U֤;jƢ*y}neY]9peNFeæ8n%䲡䃫\6FEP2N..y%Uf1 h<\$B:Պj}r<cSdsy2_i}unذ1'&h:gGS5>|=|x/pMj.%/yaZZS?uhn⟿$lȏ^~ʥ=X, !Bqo+}MK'xZ+gDQ\MUrV-ݵ(,}3n-yYT6brK5qeI6ҙ,LLXَbшwWw>(91 Mc>ۯ/–kjm}J;BXυBƺC60yW"ʛ;9^;L6n4)KqƞB!BftUQwy.oxer q6V%m9tchX-n7VBXnJgK-ʹ66]_y{m 860HIױY-~0]/<ɆUm6_ÿ%]'B!ĻeBL&sA 0 jKQ|]hM/n'v͈] q)vW JO{|ߝTikjp@_`}ܶeM|^ nn8E"B!ĥzeϞ=mMEվ3 jժ=+"3>>NWW;>tUQqg_u iۺadY6VV B!BiD|+~%~O˚AZX)H$W{:^-څ4T)Vs!B!.|B!B!LdMSuM <JsE\ !B!6'"\Qg,{ѯ;a:+6f8BUf9\|gtV{Җ|JIPBS\6ib?F$S8k>;T#4&.B!B\{.;@qYu]fgS~>.y6Umoo_^.&&˩9o/&ַN;t2{M=pc3 >$^ qlCsܱ~C);:G׵Q4 GNٟf%cQ@z6i/;86Vl/`]Zp0IJ.-@8C|pu ᵭSy6\R(I4STDvy9REBAIJ&1pzJPZ9B!Bw4fQY^WjحCOYYll20I^1&hE.H4V6UzݗvJsmܻRh]R!>ֵa>w}Ur5BUN*s@[lpd7|-X{z?57M{( pG׵@Gh;U d.υB!ZrA_Rq`2Kz[Tċ'fN-[ڪ.CsD@o3]V)7lģۘKf LƳYkxlC; [ӪwS}pZ/Ѓmk-ƪ|t}7vYܿFU#Ze&ȕ6 ~~|l w{YZEQ˰YTc,?lϦR9 ,l`m^"6;妦Uz !{Bqg2yunze0-{Sg)&'ϑ̓Dqqq>AUxB!4M/bl}qj[Ys$ü7Ywط6~,V+cǎptօ~XvRʖ<B!& T؛oOjh`gp^UWӴd)5--p룏Qщ} .7E/CI&9m+/⯩ !.(/~+dq0ᅯ} v j[[9h knTb8\R@&,hoe]]zX!WYt:M"]ׯRTf"6;kzFc`ى#1FXİQő7⭪fusl6*iBϢi&z^d4+zq̍R*Ḣ1 T4iLE_]9:!WYt˅Sĉk?UҼd)Kѿg7кb%.=@ɁkXv XVz6nb`TUjlN`I8\Ay_C4f_%7376$w类\,[=fgl6TF.z4ii] B !ĻYtEQ?!?g^,2z0љilNV׿8ZssBus )gwMB6KφMbQL) dMmzxQ-NMRfjl4 oD*piRFr3q^مnڗ&2ɷ4!)M%LM&ɥR4v/yrlvPЈnGU5\^tN*u,q=x}eBS}N*[UM 8^,6-˗ӼdN˅ng~rڶvz6lb)e !.9@7Mxu`-^[<!B\UXhVNUܷE}gY(.K^]kSfC&:׮#Lم'ڗ&ϼJ:&4,0 FCXl6::ܖ- X~ v %Ke !.(@7徿{/>Nw7Kb>L>⯮yR|IKǾhߔ[; ! U MxYs]lĪ[nGQUe`>/Hd4B:tbw:\_趭<_dͷW;w`}E!}:eD_u)?:2$U%ARyrE\m=uooeȗ z>~xHA)Cw,:fS9ݓ{VYP$]SIJ-Kj^B5wI}GcǎRݟNJ22ϲ׳{B("kn C 1z0knMus a; 3yRg>xoo բ176c˃Nj 4tvs#ؽdd{k렾+W]-EU]SYZ:vE3a}K-<%>+}˸ki=gڳϖjV7Y^;-8g'6k<|kOUa&;;>7c3B$@]lD5[͒b;=ٵlqvl6)NuH,JV %J콁${`0 4$Q}?|ysʝys~k)59rDX\XXc ?y~S<\kٺA N,v55l8 :̢딴tjnzLNy( j5koPjM`Uddddd>.>FVb֩YJ]$S*jrR97 ԉZ`BAC˨})JM#H@BHi]-CME祢U)βa3hEz\>lFfՅiWܟNĬUoOm{Beddd>J%N.&#CZm9+w8Z 3 Q?8JZ%TJ!XP+ EM4.+*r8;p{G _o8}K"B@)\؟HHDEJB$P_b\{'xd7eJ,r~C]cZ|: xxy],z5 3RkTbIAw@t3d GE A ʋ)?}~~*&Ƽ!yo3G{&HA%:]^mF5:7m5+P[[Kff6A{m̧K:FS*Wf'__BݠQUwѪȳ"ϞVL f$6wʜs @D=1`ԨoI^ FOMnO7sqμX1}|\g VEI'| x'] wvPPUvΒ$!"Bqյuxp0FCWL<%( "$)xaqAHc1bG(218=5iy})eddddd>|t"ۻϤkvDZ^>iy&X .㠋b$ ׂwűv/`ȼ$zSS.9 ټ՚614@۩~fSoSS*頇N|%5 ]E#GGA$N|Ԍ,LqߠT**-cͷCdle%"b'UO8*66g$>Fh(\0v,Ƣpcơ)LZ5-%jdAF=JSXEsÛ"X^VKLM]p¶lB^^ 8v f͚D$IL|hf ))Fq]TTkQ(UۻS! WyAtF#L sFYx&&|l b # "a#zKӑC6qYksOqc8 gc<cMKyx9_?k{$;5ɶ嵄|>ZOÞMvY)n%&"17Gܷ o| Q.-Dqˣܶ84ij:lƼAvPac}iFچEsl(L~7|+VW{zzhmmeʕl6ZZZhhh@$B͡C"??+W@ww7K,ӧpzjRR ʼz똇|mIU|QEjfkx,:kRFҠiQk] ۃ!%+Wh$L۩d`Z |=-,ZwGz.$31A$"FQԨ:</Y].[B~~JRЩyBN縇J38OkcA󃓼VǪt@3јȢl{Z Dbܲ(~4 14H+f5%}v򕯠01 IG7j*܊~ÝSmWS3)]A` 8}!^/C7IgjtH(HFQ=\wüHJ?¢P(Ar(j6Gk4j߿v WaMN^wܼYc>P*y|$S*\%m (g0ZR 0Il7 |4Mwi֓e5Rp *j huojВk3V*񋣭b"WqП8JmA:]^egc? 3l:EsNM@NeA66@Gر7xo~hZx 6mڄVjRTT4_|H$BAA"''P(oի?;G*Luɼ?̎6$; leh z WKH睧~kp >rP {fV"]kjbM=ʂUAh(gbyC~?PXU5=B'2Ln)bKJq ' G8ǜj#=Bq5qyP020'3eIд)?et{JI#|yNƔH(D瞢vIvi9%үoQԛtdK=6_kQrU ut`:yN_b<ΩvrlV WSԌLVeŸH,A&j;yγg0ZD| gw-#ɡ!BY͖ufZ E㴎ɰ9;0A^ |3DlĩqrmFlF:G_LgNtǘFuTj&n?xIJLB{1bq( :ƧKʏ d0h4<@~~>ǏGjkkmؐ$[[/ 53YIH R~h$HO7#]HDoc -7Xes o5f<{i9v{Mf< K ) Ǣx]. y;QT8 i,J(]I_K#S#C8AcRԺy {&-~3' τl,yjm_AHŚ椷U(!bUD[\h$V*hqSfAP'B#qgsHiEf>z:5J@H$&/*E$T\Zs||W^y~].g~a<@VVFb4 ꯢLIDATQyꩧt/=ʉ'D"z 9uX,`0|@d]FS W.k_<.߿z|뼟k9~' DBa^7w0]ʻ$1rӬ-a#Knt?ojy p 0pw'OW5{VEUKf=DY ZNGl3MFQ1ִt:dݽnԪYx 3md]I6<g'XQɞq6g%۴ )HjPg'ͬCP\'"ɲXKS]NswpL2FNm +H$sH #BR:B@$!pwc7=JUU}F)..`0P^^N]]PQ022222A 1I,gTJ.?歟UqZ9XӝToڒ|t{+ޱHsg8e SLfKRT]fp 0+pq5jXs{bY0)5 rDg(N Q_4Pfq#ty4MsqSE'q”[N9ز SO͈Av[y|9vSZ?1G^Imm-7ܐ$a ?>9,)I8B}nHAN::h(_D8DѠP*ge_#3)tu"׮"wXht:جUp1` RT]Ê[oOF'9ʋ4Sx nݎh;oT޼ZC<%hd\?B4tGɷȵyD29R*J16r5ߥ("I`0999騫6jkk}2N@Pp뭷/c2ȸ䰌qEݬSԠR*fOn 0ҙn3 A"JMAKA ^C`tIlo҇j*`(^ɤY9,Jh$w ;Q)]+feyƼ!ZGEїd ؿiZt C+j&3BF+/Tk8z;e+V&s/f/~FoyZ-%{xZ 2>=hG"|=έ}-JI=RFPwyoBjfZ-{y 7rMJj b'ZCB@wi!'{VK4B sfY^ 2hTJ'ZGH3[jJ1Pc߮yA(ƬPc'`ШxhE1>6'++5kWWHDuu5[n 855VJYA Q{_DTP`{J2==>ƞd{ wsggBg(]VJ3w@K3gN31kL~" K IR329{l?/49Ο[سr2?!anSk_LG)z{.J'l APPoUդff៞"ru)S+1ԨVí,LH(DtYFP2ygpw]\ ?fumWGۙhq,w-o\߼V!6er{U>.w6I =Jl& (uuu}Z STTDNN _lݺ!^y|Arss7SO=륦u xgw(XիWO?O?͂ җ ####yﳜg OUֿy XS fü|Z_ݾm S0# =6Q95ySJh"Ve}Y*%zwrSġVNw_XS<mĔ;Sc_v=hz_5{M]o3>0_g۟h-W`{jkRA\t96&Mg 0O<ÚX\A$Q"%=:f O/sgp,(SJ$[8˖SQt%˖Rkh?}X4JŪ5ݟ)ʆ ~R8pvm,oM7݄f́N2|LęݻxNZO $Qd )Y1a굤8rT ;Rd H#8s3unLTΞ$EA s|(J0EToڊ95qO`uA^?R|ZC8`jtGz骢iX$$ɉb1Z -ǎ٧oR#Wqk8,>|+֒u\466RYYh Sl:_22@b5ƛgmZf ׬-%-u=mӛLs.\\EނZ(Y:wAg0Gfm,.!|m@"߼v]P|%΂BE|ب.T08iNQX#7X)//'5*EBedddd>rAW),)X1{C!,ʲ4I$QfI]^sxC~z]`QL'fB =Kc Ϟ@0]|ʫ8y/RFKZ߰ GN.'CKQpZ,vyRfd>z w$####qUA 3bV^bƉ/xBQmF⢄N _]9l.'[pCahmtMx0hT,̴lYrv`1QaұIyQ~wv αFC?qye9O?Jz%K_o3dddddd>Q\AEN?(I:ǎIF$6gakxd&֖cЪdx^J) dҪ-)H6ɴWwpqQ"bJksl\D42wMcԨm;=s=rQ7.QE ߟȡ̇C/E~j'Vr,NjxAEÃ(Ч߰zFVqپ}Gү5Sq2pGλ*22222Ε$ťDEqQ"c{Q~Q^BP`ԪF%W/ƬSS[ ܾ8,:Fgp#@B\yD"Ϟ /Մ͠E-G:GroMZPu}Z|^鿼FI%V(W66BrF|(&v5 wo!f䏷,fih\$jf2H"Dt HwN Ӂ$$I@3/ARonaґ04`x:_r8FXI@\}dddf!Is5_MyxQcqf3HI4z'FZSo(6'-/ {?IAo6c0'P>jfޒd@ P:*% &}(*Z- ɑa̩hW[ǑDJ $&#]-)_Wdddddd>\AqyyyW0XI u0 $1o(i1 ]Mx;YJapTe26/t8'{ƉEv2f}ԃ|>" T; ׃{|"q' 󾟚|؏bSD#y dN8"(tC~?}fe 0KvijIh=yކ" S#.FT}Yť^ Qrue>x&&'S6K˓mkz:& τÎo,\k1Ryoǒ[Yq:$i,x}{b-3&8 ut7y'OA>e}iTp_#q1EwHcݣF\KpcԪjqQud֑k2<VGvb&|!~~#_FZki!n22fU۟w_g9WK$oi=rWr,?ث07#IBTmL?cbtk;([{vŒ19<~ɺ@<tԝFkГYTvHw'"a^,4:=*x |41E<C"qcc؜N,4FGƚYP8ps+LILBF"ڇ Dn^l*&fL99?㦅9ߣ6eb3hqy91Ʋ,rf>?e_$F̲4 #Y\8=F8g]IƜ/]]]'\Qg_F(tp͌tATRYYK_GuC v\.=ODUEddd ho=Xg=4Z=ȩu:]O IhDk0&k FJ-'lN?PcL""z8c}=bZ2/GGh8t棇)YƂUy50qE((" $r>STYϥ\Iy֥`BR2 C-|,w0;7US`7S+ yp+#Tgq̔Z(/a3 /CS[&fғb3ݼG0<8X7|~9qCCCs=޽& 8t:.wtt_8FA "r? )ijgMwRb% k^w%5Lxh'.  ~=>Jfq)=,]R=gZNNjEZ:GT:3hmFk0"(DB!Goy mh+/ X{}X9<\~$Vg9eFi=q[j=bMw"E PMJVqp aN״o?{?x`-wTM= (- 8?4ɟpo./FT0}Mqn(͜D;;Suxti1c3%c_#X,E6gF]pt(HP`0O<%Kh47_: 8O<=جRn $#o?{9r ~PFFF' YWu,Ka@vY9V`N3=1g҅őΘ8(Yʞb-DZd97M9Xt\q nEO[b7h$یz&ZGܬ*r&lZUe{\^tGoiVwQ[; Rګ?+0::wy' 'O5AL&Y VD Ν;Y~=jVXOS֯_دg A3)]ɁN:S#2Px G^-.^ <4歹gb~3,iTm4ker wv I6NǢ\w-M_O:ϝ545=#P!ZDXF\=b<P(ffC|xtX2K>_A`߇='ʅV|(c8z]dH5\H-(KEZF䦚8;0AY W?=~Z&}ǒUE4$haFu n7y&t*%1Q~̧2ncMO":vS\]|(,bwE/W#mV:$&'cw7[ʶg;_%gw Da:ϞXf|;5EFa! ξgFT^rU;#"*H҄FGP(M(Uj$ ,PEQ*U57T\z\G(wZ9b}i&MCS6&%9NM416g4$ 2،،8L:D)QR9s ;WGڸ*c~1Jݻv366Ɔ x/~}Xn'O淋!"gNc0.-54@: Nyqa#ql˼Ôbeˣ3<[d `?L,4RgVQk.XB@o6 Qi*$^m'c$ő$I !9 cx,ƹ=hg_#-7-}O/BAE)ƔrJNM]Z0r+f'Zdɖ^N~NY%!x8v 7Tͤ?LU}֘N5(IKaWwV3,A㰛HLsCE EO9;O>_D@4.&[*(1 nps%Z`(Jоgh4կ~5k 9pwy'(~jjjZq}YdCved>E茦dw,aly-vlYw$,'wJbZZŜjgUT6DaNzqn/>ߏb/PTdsVI)YeɇZ68c4jt&cAhgR5݉Mz~>(1۾=;֓p͛W?K378Bd?)v< "1,[A"JŻeFDR'&U⢄7ϱQR QSL!(`{<v؁&33x<^g gvvǏɓ'YjbGPPF(GwL%=++A*)c˿3iNp>̩vLvb(RB`цMhRCǙUTpiYn$r0%KcMOG!JJ R{,^Әdg84Z ]xͷT*1R12hO7{`mEK&KSRڰ V!%-q6^qׁ;ﯜi6`֩ɳ[*sWNRfAVR083EIB_nf E<zW5a_'u4=5|PZZZooP?ѣs=6:'royV~0,]];:]xm &6 `γu Rh157ތ=w|=y,v 㯿^IR\ua{X_/-6FЗ)+ӿ$I wvv$ jWSX]3ҵ +E4aϑ_@aU5Ԭl,AOVI)e+ji=q 1'㙘d]qy&&8£JѨޟ96#y6?9̗V(a.<=>&|!:5& غ0a7S7W,A$g*!EaҡS}4ί~3Mz~y +?sp>$V~'b,ơSxqR-kpFZkW5=;O3E7\p X4k?z%& )yXqmFb(`hwy4 ` >`{~S6?O JA@wiy8[+rhB9^@P_XR!-ʣcl:FX[䍆>.su U}|ՠ6/fI=> 8<ɒ\;&ߛtOxqC|,$ѣG… yַn. (+ȄO ?Bb4:s<2/cPj40>#I젷F$or8 7[p H;h>z1cWNOoA'&KL!س_#ϒ(~UwIs|8癿$I"m_&%hz x=d۫3$J+V991rmjKoc]qǻPDlYz~MM`o:N˹IVݛ𝛫?oe: m:.L숢BX(/^" M6188Ȏ;xl6oBŋYf OW*sq8u,_gU]]]O~^^d| QYYyP P\\|6^mL#5#t]]5p歡FNM>~Պ!%sOaۯN{$lrTYƖFXeOq pQ|4ܞwb W.frx棇_XINy@棇I/HF{)lpOn۹馛+h$cɲ IxUiMt(Rs,X&x&N|EUDBAZERRuE8F۩pCSSi?uo$Uװǁ~BfVlY uz+n݁{tڸH(ȋXUwsΝ!5#KubtԝƘb8$I<_?ɶ~%X9VfQUU;yW%33Crqy-Z:`{z*O$$1zof<3.#)`I`C|\N]V'X/&4z= W3X1XFmffݽ_L֛L,z?2}ۿ0kS-Tm2k-#-~9tL~@s.YF*4:BAՔ\=h⦯άm9e )[|muf{tͨ-_VkFRQ^B>gΐ#7Xnנυ> 3 Q(^$ CQJ/#a7j?6du:䄪jTP4:o؈Ḧ((&TMbDc41?Ẋ#v#6.$]RU0K4Z^CSud\^hbU6bX(x\#F"Dh4J8>x' bx"'t\\ X`0=Ǣ<;D "YZd*fW0 O5b7j޶|oY}t|,tZfm/K/&GAz',ʲ~4.9cGg'ʩNRo:϶,n, ݬmT Q~qHL~ȍ;a؍ä%ՠEax2Izf|xަ\3SSSj)Huvއ' 'qjxm53>>h|R㲦z$.i iёm509}SZF=_ZrKsl^s K_ȱЫ/ORndع?c($47iNOƱHĒlmc2-: ;ȵօzNܱ(S) 08樸|*>۷oHM-.Te>*視\;uuG\^Lm5E98LZDNMi~h\doX["aͱ bbC$q9VFMB GQ|rdI"X:abeJI<*g熦hvswU.VIKEZDyxYr7Rn.r- ȳ"*2222222222222uJUfcX yJ\>W'yyҜTJt${ 7WdRH+p\zM2;)6MIO#xm71-_gw–EQk@oiF$*rw҅JAg4]U`[+͉1~rk(rtNjDCaЙL(Uj W'Y{TNǨ4Z⩱Hp0lFx{p4Tg$xBoH|=222222'W$&a:&|n& ]tLxyi1/tR2-z9ώv% Eyu" ~YP4!7qIoʏ?n]<ekx:̟l\0gݠV! ;:Ld$n\^iay^*ϝndQz_39X  C-v@IBRNMbsf5MMT8+D$E7ljæ61#/@*V~g~b`]?)AxOw;4%IDODP(WuxYJ b`p9vRM!J4O1 0h\d_0R)t$DIeͨ'HmAF:ڇYAyMZɲ4RZ p"dXeqkH,QCBaaI=r=㴵!`Gwkp`O4w?f%R3fȞ7l x,ޠܙYc(AuV$1ކٖ=+{ ?~`Ɉ(rwh\dMQOӽ(Hi'ۜwY]=^,߁Eah: ]t0ɞq9V# 3mJ܁u}xQrlFs] RS/D8066… 1HvJJJI';;ӧmZ-V"ى`0PZZMg/###󁹢qtw0J\(M3sOu.Vcā1j"?_ݼPuӅ.v0hmf\=d FBH2Sx_8F0ӡH?|HѫX{sIiV@VRh<׎xA;I?ˉ7^ET]P1oۀǃ{l{V6= سspddQ/acl8ekYVt#!XyFœy-|Yۺϝ5485KIͿ癘1!l V敷X8w҅CDb-Mx\.vw1횠`ѥţ&<|mhT \?H?`j?m JT oah=zEi{pLSL#s{ypZjŹTf5%K<]K ʱI'? _Q*kdQaJREB!vDӣx=TPU5c~1xh:r5[nšd!6>q"kx ~k /awbZݍB;\|x''$9HKAA@Q]VG͖DaIn`0[IVzǬχB׊Rt m(s]΢5h81n|+L95o?ZQ*ÛgXQ}ί/eEi98Om38{?~d=^9?߷%Qxp+n?v]|qyk3xX]^&-ۗ{ n<Ν;?Sjkk8s {??Iؽ{7bo|c y'lÇW/ٰaJ@4Ց8MMMԞcR(b 퉙4 7-L: pǢw=tXv5݉wjO?/=NN9m8?a+af{)]li=qFC~bJ@o275ՙVp,Xz^^{7$Q?=Re@Vlkzb'h;u457DSRX‘hpbq8pP(gr )ZR!|%Wl-].6.=Yz)z S> fZGgH_klSb"1uQf[7T00/_>ɁavR[γ';9>ªB'exBV|"M|>?JBruFJ~JD~,q $*+L㟞YPD1x_D my-FX}t;lYP4Btr2Jigz| QJDTx\4pYq`3)\Tnc` |'xJi7Z+Ed75IUAsX9k2;9h|QP(,.!B.g~%Klt2= KNuƊl:5"1 ä~ sH5jir3>ftM4$8C Mxy>lhH(3/6bqhrV*{JgپvZgm7,[ykoogdd??F_FZ-eee|+_Ip8Nc۶m,Zyn7N}][W\BiJHχR! >&5*X=eR*|hU nZpP^VMR'~ CנV9XmZknLN4(2_iNJw܉F}-_2Eų@iNcLx`8aC{۩4'a%MGq>ݼ D<Ú~U!1R/ /Wk,Zk2ާ} p$v~$}͍tw!Ia7RaӼBnO|(H8棇i=y ZO#0X(.^hOGZǸ Ê;g‡lix AK^n!16M-mip}`gC?{r|!(k3Ъ8L:&-#HZTJf;BaRZ RL,#KHCCӬXu-J8#]y WST]3ߦlh8h VA+[} 8;#ܟfc뗿Fz^?pW;z%5,XtTj5Qn2Qi+W~HOt'i7cݤ&ϟz/y>3KcMO^,a3ODXdPj-Lap? @496#/s16͘7NuMfVM\2H눛?q1#L9 2l(Ы.\ /F=4 4rE$&hb]ItĂAb]]]I(AXf Ǐgpph`0V`0 V.hnn B~lٲUPfRRRX޿VL+:jUF]}>ߠpĘ[:5f?c1&%|܈uoPW7}kp7~]?)+6?(ť(*fjd2zhm#4P{,|#ީIv0=>FQu Tm {e,.Mnaa\K,!Xϩ7ߠ|JYɶ [ћl}X32ؿZ휐wHJ&'KHOy VFC99(JJ.O GPP^F-UvwPft82i 0f5hαsw9vu"Q'{Yieqv*Rt%(%!񝖑'j]l dN ._LM4./ccc8p{'z=8CmO-3 s۷~sv٧Qґ|IY"%1XfGzj| ׬,gh>vƇD^EeS(سO$Do6ϻORBDE[Z8u߰gA+?cg8kza;eWKTt:TZ-Ɣ$YPwrG8&̶ ΂Bn?"%- aFG.6?XR͚΢6hsq5$ k?KS9+&[*}% 74 _%vZG.iـ9Mͮn[GiL4 O(Ƃ +N+S>ODK8Oՙ4JxW Ĥ?̗Vb>[MSS8ݗJQ]8UWZWvb$sxXf n&++E~3(w!####seoROq%BɿTg|<žg/GNn_ޒBz~!CmGGУ_|æDx `;XyHȹXzI$I3>=od׿F7kp-ҭ(] ) "蝼s'"J јt%$Fzoib͝ FqR3[Hˣ)9䔕_Py, Cqff9kTeۓz,.&qH<ī *%HHQ=Uld)ҷ͹=i;ut|qٹ}'v@Ū(jx1C\1¯"ӊFso]E/qQa~%tdd>O6*Vw @fI)7DCYmbLc|ۭ׮2~4h6=(e s8oCk0RuܟwaS`h"OAPPq :cN喇;_pq+nL<% 3?#;6^dw1ۿ9z˗S*)/禊ZǦmsGu>ܺ( 9vGNZ`l~Vc3rO_zX\dAoPN$14`]ɵX|y*./^zv>/gy (zEhz$Ib#?agIr)?=ik&5N.xYϝa5,zs"XfeN=r( V~'Eŗb[" HXo/g&Cg`c_t z=ɾ&x?ezb SodI?N7ob̶T@E2Y%%ffx!(.?٢R(oi!??B'GFi#bz֗dp7!¦V)Py,<?=³:i}b'yx,XX^Ӣkׯ")tT5(cz-:;;룪/~ ֭{//pynx7`jj˿DѰj* w( V^ͲeP* (J֮]K~~>22222JzE"'* !X(柟x(ըC1# f 9g.z`$Ijd~Rw 300@qq%x^~yr =K3QaE&-'kV;i;yJzn>:if-SR0l(Uj%^FG;1W]*|T Wmj!%A\ wWnOC pӻv2JU018@T.z A.+'oa^svS Eٰac 5*DQ"͈DID"ZImBQQB% Lp,N$G!* (% RVDfH,Q=+n_qEE۷o禛nP%777s%ˀ zER3yX4Jda|*F9س)]b(-Px{]սx|n7JZ8oi۾pI'>'"57nŞ`[ -ǏR{سsAoH(o޸۾B$2Ձ5݉fC̎y~b0KʜH({lԌLTj5g˟q_t A`+sJSE⢄N$&"FX\$*ժdZ0jDh\DV!Ih<EЩD"؅"1Ę~: $z0Cbf/Ӿ+֒9#DD"V*h4D"Y * VC]]K,!==H$B4E4 *UpOVJBvBl {_s $1zof<3e@y]LM{=^RB''É}6:ȯ^z?|!^w),ݖbECcW-W=S{ \:;/'BJOj[`Yij4j5SnK+B^"<"ů w279BAWhjkۥχl _hkݎeQjUw5k[VIi2Gl{.kR!$- V]CmF|tj%(s.b><͏%P*/`0[0gMj7mHQլ+S,t|f|.XHm77k[q2k%__@$lJRlfktKlYϨB*vE^fƢJH 0XT*woLUj4Y_r҆y Z-8K)y&s u+(###YOOYA ?;P8b!#-mV04:ƢYEQ"#^C㥽#ǁ2:.yrЯIsr <>ϿEe%wMxzXYTP.Jsg= E1S ...$Y~#z&"lkWb\+f<踬tعc1c^~1o>Bk_;"yn.ରb ۬d98cwAI^.mLy<ڈDDcq zU?|2oddddddGNmFm^o3ddddddK8{o6nhͷDo>tW/g`ugؼz%i𫆶v?̺5Zj&-&sM{8Ʋ j.a^j;j\;/$#N,gbr\^/HVf4ut7Y|ŽUɧyLZl4(###I@F5U-Hf+'EЊr+x䴇n>t!]ţwݎ-rE.ߞ}7Ykőjkߝt&&tq[Y{;} '7XFm"G27!vNzؼvݢb2&˙5@(h9}4+g8 vΓ?ǯxβd3D`lW_f|G"L zMf|>*C]oSf155jmfz'X(;vMfG( ޑKWRQ\|=>98V< vLS F <>?U ʮ9:ısٲze wl@Þ [ [6e+752 ר.a^Oؾ}Gү".#s)ޫi*dUqvJbWEf͕tZREMeiDcq?&b8N]{pll]** Ͳk`d]r,_6 s/J%9dsUt !P\X.ɢ 'k~4][7ayZ""8 qg_{<-JhXzVnN"J"K+gcM\ȩ+:h'xi;U女B/FRi*#"(}OPLsGU3|㧿Deʊ wPwyy~V~z$9Y~>;7c%o•O}H,hZ@q)}m-($Ih Ph1M{w1N,"80@)a-3^sI4 0قhYQ\JJ0֊AxO;-+ǝq OQX]a|y0tÛ6#az:)`W'$hEAeHANMt=$+dS={. z3Pw%uSx3)~߃p"Arݣ(tàe0L0!GF38>@EM>^m(P4I}ibp}ʀH,ES%Y.Oe8"H[T'{F:;%>'r> ôGVd6(.",oF$aN'EEEXV àh4Jii)ֱTvTUp4)l-O%diLPnΧwѺf_#so\;!Z&þ^t괷I$YF[ޕ`+_O`j/-.]NNiDu ?^<Ğ矡zμK膁loqb1L &:8l@pnFtdde{D,كokEQMVtM#8Їf%NƝwp3}! |xm4T`jh uy^x}A~7 Do6ϋì2Ipox}h2͉iFY9c8 @FyY\ a $NG^^L'ORXXO$Ax[ӌSE._efd-^ؗeuL%/Z_vWVP_YqY•"+*jB/! \*$<8N38=Hz(A|y9e@ld͏=pO7f|ҩ.({Yv2BhNz(<9]k=Np^o箩ä EK9䧟\F0nɗY S|땣."03/ɿ>|u[і<0 0xHNuᲚ&3Z̪"mCal&DZ+˧Phٲe O>$wk֬0 l޽{q/^̢Eo;صk6x<μyXt)G矧~Nټy3/|s}Câk㏥SImx%BQ'f.6wŗys޳h v$<4ȔkŝEoK3C]\sv1tYs8e/G]7`wI'|e$Yf7/y;hpem> ;;ux4Bf/$JqtFo<6n>g&H;(xd,FhonMp| v8ճ߬zh=vL:M_k ې$f3+=ݿ K](^t/\s|-|E9E gNfgWN}Ƕ`V9Ow/BtpcD< V矟?jFU$zB1f,& 3ݍ26c~oٳo~|K_bVAw T0:=iZ&j2UX'8?vNdxt2A% uu2GI},slX'.* TΘI݂Exrs4,^JNI)Y|~z)aJ\fy D_8NA`sa@Nݡ~'#QNp>"āuQ%X:CAMg|i@$G۹^jsl>CKgWౙ`njr<(xNN%%%}722Ž;3g*gʔ)#a`;wxb.\ȶmطoӧO' 2sLv1w T*5)j֜ j>tL*żL9L48rɺ{I'd(Ϧ vus좢K$ dض-t=ܵ7| eeEaʢk(}ɤh;~Q0!Hr% 8x6rK˰a$Y5Xvf,[m[-O4NF$P?;-A2ϹO]tPw[V>ioی/7";T6Ά]dhڻL*Eâ%T̜%<4G~'FejcގM¾~Vഘ81D$&lAo(kp{h,~0h 3cۀGi}dwDYwoܳ,'t-{ xk02wMzBKK _q\>|xmgg'/2UUU, kq(ʤM݄5EU)-#F3o4lt{z-GN$0-nrJKi;qE5JddwV6貐;S>z[[2(J9~fM'z0 uviȄ'CmH9.zGpX _+n !N`5)yFi Fe9);yh쀮,QBUdʳ\8Ƕ=xBuµ}/ȲLAAPXXÇ  aOU/((`Ϟ= 3|zzz&)m2Xt)7ny^7`Ǻ'ɯ{9؏ZTu5s GYye?853} .UfS3w>YFeEz\</yu歽?“I@+VN0۬NO(D~#/yeTϙKF,cV!l*y74ޖf(ޜT@+*1Yh4_y+TΜ=|Rbok?K97T,)>33=-`}TxXRۋG"i UGMp4GݬKe.b*IמSU0He2?N_o$IWOoCh~D$ʢ[x@FâkXzϽӘm.&zJ߾ ۃ7'$6c ]ݺe}H_*໬觬xTC[ZFo9jkm9GdxcG)~4,ŷEddÛ^eۓ GGGʝ^,z[[5zIK,̥/$}2^;VUeNV7:aNYaCCL+"ye9 0_$'D4*U!i*7L)"I*ɞ0> àD"]w݅,?999twwcۙ7oAC"+ 1Z1lƧX;;q:D䖗|@q)56 D(a!Ξao#PZkmI“ V1͹ & ct@Ӟ]䔖|YyWˌrc4Ʉj2dqJ,.wv~W}"YYYL eL&xkwO~AQMkgH'lx]p\"͜;|/:bZ=gl4)߉h۷$ˬgXO3oٴC_PPO7gg ϱ?eï%w} O$ ~W{IST[dL/X%BVdLzƝj2k:!+ Wk.,CE+)-%tO>Nٔinf470ǏcݓXSYʔK&ܐu ]ˌnA0Џ<{9  |ofQe.k,>%8=L8乪n4zF2$ְ 6YqZL E/~$B}}}az{{)**bԩfB & z}gϝbZ=ia .Nʋ' pqu=asV!<{M̩gylYV̯>A$ vT]4@7 ={OrIN8#G[Yr%/"ׯpp 7r̵^ˬYXb?<7ofzjN'_H d-[׿uzzzF9s;3 oO"eoocͷR3{V0X~q4>zFYdLY}x8ݔO7=}\ zNى$k?v?%S< ]o: Lbw8u wVM{w`W' nMl|W,xsrHƢ#a**7%I"$ = ]~.dEq&S\{A2T""C$cQnsWb %QمHʛ&EYriU䲫8&Y|cl͍bVd+o"i%jlaGs/83kZ Aisה±vvditTKLWTTo0k~L))) |=Ov̡@Ӎi``Q4 ش/EFFfƦmJ~UdxF[O2dqgc krV 2Y,XrfjCX$ǷmAVJ2=ZaCIDAT?E*g±m[X|]]@xh_% InWɤ؜kZE%,A%%8ћ1 >*gΦc[7;7B<|Zc>vʲ\VVU7^oݳEeIUO}y59n^؈fF%~B 6֓尒4*]MLe>?:,Ex`^5 Ռ~SL`1UU|SYYI*jv$Zdytscc#eee$I, EQx&Ww8\.L8}__'oBQ\\I)-/> #RR[O2%{+P:u7-ԍMo0dP7›3_+0[m6V뛾7|yT̘rTGrXz}d~8'wmgL^y%-ݲM IM>!ID^E%yFń,SPUMdaw{.:=_e++9--cs/aW^2SprVsXXZfEaym! snVʢ\ *rQj8߽dZnQ:猿&lb9dtń>;6VvnnBx&E^"AȻ Џ ',#/ۛNQQ+Kyx_+/",|yI5  mg8F%d<1O׳:l:ņ^nh(x7"U {&ʞbYec/slY|9u,2ݢ*FG)&keu1WƢ*Xg}դ^<ȾX6gIyIK^lhII [b)r)ˢ*Ϻ]7'o&~EڣL\߲bvK> Ry)gP>}ƛ\N99L[l⺆}͓sq~*gՒ$]t˳+Wu_,,8{l++/9i1X\i3/*;xBFI븠H/|ZTk rXɚM*.J$vAp fj^HYo7#,1KrRzm-{w-WO]xm&5|ٜL_l_~ T$>w=A/ӦMCUEя˙bۙth4EBC&t0oxD2Atx Y66r$~'9.&]#d;,(M>m?;!Zf\7M}&+852}% E䖕[V>x8 AGuctm*iєYQ0%gS"H6:>nUei"wGVAAAӬr.!\lTΖIچbDMUe("F_8IۊY7ڮ=w"IR4L3ONvS> ]0'N\t:,lٲe2A* 3{aq&\&l߾}rBmmm$BKA;% r]6vJ]${,?CQ]P"+kxxVU7/EXU̦3z s Nv3#"C!0}ne{ꩧ7op2q{n һƨ 8#Q J4g;skk12;YPW#IO/!H󹅕L/_X"I ǓtcR   ‡׻J[s0})΢*EUkyEeJcfS Y;nl(Ɔ N<  \ia IaǑ$ +LI.Ť $YA :(?ZAUnVdY_?sm&Tw- 񷫧MHD' !Ҵ{v~"cbXt۝(G" uuN%I'k&:rᖡyULYt &]9Uzϝ#t29jz\Y_"&gpx(B~e5۞|7fAA.zۀ0H91M,$|tW 6=+CCd:O7Ұl|?$HPPU̙poPȤݼ_dwv8 9\FKGpgHF(f3ssG3 @ŸY$c1"#ø|~Z9a=K?k9+^veR)<(gidRIV~TϞbcw/kJ0;aJ#Q4ݠ"L5i1 h:%~gCXTP"MH 'zXǶ Sbd;d9\[ `xx`0(dggcǟD"B!d2twwO86++ 7P(at:|R):;;(BII `ǝN'999: |hd_! tAhx8(ݺ/w]me(D_8_>`,ͯ?urO|#?x` .ݍ=~tY߱a~|EL/t-adIrX/v֭[1{lnTU%Lկ~] ~7;|0g[K?'( 200??0uTdYr[-[PTT$IL2n U_-A>觨L5 ]]]A> `WVz>s &;w -!:2шBSI J$dfIW^дg7;~v\t4i˖+pFd]t2-ݺrD#ܹS  2Sh>ts&G(0В0q0mǏQ>2^/s'蠸&ac3me58,&wJ 8_)ಚ89B<63'G$GX9&c{q6J4Ve0<Чc5|mi)Y4lق峟,CCC>y$"M[]]p)sΝP w.fĉ8NfΜ׾-3 dnk׊QsA) oa(.!J1CAeޜ\:OBe(EU٧ټt2AiTTI0AXlvϜaYVd5 Ghjb᭷!~ EU)-0 t-d,77d"HW߈f0 /`/~JOY\~? Dj>IX}()a k/.ZxwXx2,6OQXS㽗f8>H<,I pp7}fqz DXTS#v3aL/ FM-Xţ{N84i` 9<ԧfqmz$a``UUwje͚5L&8Xr%Νp\<g466^0bQUp8$x9s Jq 70uT$[ne߾}|>֮]Kee |؈]AYi\y=GΡR>m:#=WT1فj2+`}n! 1PWtNVyH'W+d4|'^5tnܰEQ ^%@^y%#=ܽ Ղ;; bQ$ R`4#}oK3]O0[GGMV D} R vG6md[(0qk9iiaNip~چ"e|N$`6afq6QR4XPD2/_[FPbbXmZ[޲-i>tOv0Uf3s ڰYQ  ]1Ʀ|"eVlڀ(,N%gfg ưTw }-cz{{;da4.04551{l2 ===̘1c|$nOiMgw z)bu]v·7bNI{Z %S+fEM.,sswMeXX)b/tAaHqIBQU'SG%c۶ + NNAY8=^ "hGQT|Y{_a uwF_{+s:$cw9w N u+mOE߉; >*<˶'c/\LNqɻJv~v=3dEȊ5w'~ÎuO]\';@"%UP0>b?Lm3xto3v6/ZY` f,t?"n<~l ݂` /`_~(gN;Ѯ!; E99ͺDƼFf,Y3<÷-RSL26Kg}뮻Eww7HXMa֬YC]]^~(0wy'۷oghFEE3f`Ϟ=[^zT*̙3)**Pۇyh9VV4_ǻ8;3 *8⧻2KZޖ,(&cwiQXQ$ x8D"eմ=`W'uda:KB&nt]#NQ-,cBd[% Sǘө$mǎӭi;~XORT[GgSǷo!JG5{): ƒTR`1\٘7(~ׯɓ͒;\>}Lvk+ YXY #ieAE.uy^L<fa1)}:\t yaaE-++b G SN_8ɶ~:o25;EVE%h:N},Jc]A{Ma<PI)2@-6;}¹.\PMT|e980^;g2#0x"dx< $ᴨdOϯ+'Ag_\')b޼yL w5J?aLftMchpd" W+>hF__d7Ci6MA q~O9ϘɮjeP'Q{{ȤdR)ZԙSVN͜y, ]'JM(kX(ވȖ&3皱=(&ܲrv=+q֤a?Fhy lD8%:O7 p4iAդ芢#?\OOd7A {99efޖ$uR=g ?DOs3&T2AnY9vcG):@?~*7bvdSO0k=Bh``m.9%e~{O*CQUf,*," P1c&L:E2j%3 L*aj})Ӵw=XN,v;t~z5F50[bgF8k`V> Si`# xYł鼠/A3:pAx#_A"!8Џa}Yv<V,z[ZH"a|yT͜|GFZt vمEh4age')ǟOâ%+dE!  B tgeK +/L:ٴ}/= Eu`g^zt2[ םN&G8<:Y$bQ+@>oyxhg д ~]܆oc=au8íc;'r}C$NGh+4X0?.aQO7p}S$ N:>9JJJ΁((( //dʮ]gdY8y$a0w\d2wk׮7AC"I  a0Cvq1~r**($AQM$bQlNgsO 9u3}-8=^<v n;;;׋p0ѭ,V2$]vU%P\B5)HcrPf tSX]@d8e}m-,vn hM ]gN3Ӄ˟`G;x H2&elϹ Y8uO2юbR2\YȊ(U݄>IFffs}`ƕb!JgşW}{IYH`g'f w34,WVꓟf}`ޜ\Yt4"@?!z(*F$oYUy3Z:';0>q=wn,>}bc4xQGKNV3I6aZUIe4S=},˿ݬb,|rI '0wYע*999K0ٳgcX7o3gdѢE>YE~G8&RFFF7 Ii:E&mfR%D$ b) "bUG$:6Bӊ$ֺ |el@<sg]Xľ^`}Ղl8EW0KG% SpgȊBqȊ2aTZQU$Id"2Llin<9;|0~2rygԥ*( f0{TϚ5k3qċ?)}Sxsruol"^x3q??/V 2ޜ\Jpbv^_xzՊj% bok"=8UUIet vQe's ӬjchA$B%6N|k$ϯf:R/"Sh?yǏw^fz=^^_n̙3ill4Xp۶m?~k"2vinn?) ‡ŤdOtuDM?mӋ|r^tl/vJ$a͔]K'yx_ J%i,{[Os?,IӋX]?)UA.,I\3'(_PHٴؾ*E%dR)'DVR_~ł%N&i?yu,mzb ooN.svy(:7ʱm[͎WT1tL:Ey̿ IDAu 8~ v=eӦcP0{_x@q ӦOh$IA"!<&YU?9ϗvV` ٥|4OjaAy2,Y Ik:xr@*qZL|aI=^纮~z?We߾}Z 0梨T*E$=p//$IoPUUɓ'a$ ޽Omm-äR)?џ ‡ͤf_YZCiE <1IŤH:xP;}ʐ%XJcMCun$R|LcTFG7&jA,I›*(a5X$4, + NnnDq]=N݁'H}mF1 AN;1G3X ͩ;qz}t='ܡ4,^B{+yykoƝM*#[Vε $Q>m:ƽ0lw ]X7NN%o 'P1}S\//Bd,J"ŗ;aͬ*:'WM`e;gV'93<?z} 6fF ^:3=g;8b?aw?q]]!>;?ĭ3JZo:z{{y)--v5N׳ct]'??*Ξ=+ÇI0c v͛B!)..Pb HಚVam^MGmg$iwS,Aۊ,I: EL+g~i6K*sWǢsA  3tib-4ykobw¡ ooC4 i>K_k BeL,v ]$;zx$BAes*$N׭"'h>tEE鴟<Ω;I% 4J^48$T̘sKHh4u䔔]X<DO @Y**d\P48O)LʖT1( ::}vi\%E>'&Ef^Yٞ <;fU&maQWj&K㶳:,'fEFe~y^B>+ Gg.xd9-|kB㲮r|D"1X  ?? IӃd"Nc2'>AGGRZZfԩ\.e2˗/H$no ' \3:c]8!yYmN~]P|U^ xOaٱ:Gn#Mˠ[XOq}+$lc{WϞCAu L5sS0ͤ(d}"IXR:ZfÁ([@ٴߋh9rʙq|$2΅މdc#^rdkތZ7defuⳄpy}>%IEFp^f~eEx|>>eA"ZXMDS<'WLxo7-Mm&" "K7Isx&Vi*.WAw 7Lv3ƹYLv3ArUD59n>`C}Ao)]o=і|{NvS.{_t]7]A>IrQwϦaKsAAAI3ItFiQ$xZ#鸭&F),B"VUnVXM,fR H2C2NIDnY XJ#0M=0 p"CZӑe YŢ~`c   3G;|\3ģ[6ķͧ~ D(?+ '?wϥ+G0Mb1)1 <{jGu$Ibu]>_0^;]e1u8C4A$Tļ I*AAAC쪎:eI FbiM4Eu QǦ4|lV)[8e(w⯯ʵUj/`e]E7n=D( +YUɾ!e3?!   |]:/Ƭlf,B4c XVӢ*Y~NHg VbVdecRd:6EJF7XPMo8AP(O]A@=!   WU1Uդ:q^2dFC׍uVդpTAMI$35 *#KuDZGG迴B}DAAAg&E&5̀֡>>ia1q7HF7h f<A7 ڇcDSzB Ʃ^v/UX.   \qyJxl$$m@qYiJo+DoEeU]>Kr-`0KQc(绚yh9f(59n6j,ΰ6`=Aatl&dw   !6:@}2e$c0DB9T6mQجRJ&f㱙ov.̓xYZCŸ,gqs=,E$ecp7*Ki E*^8EH .#i.AAA>䮊iQYUn,ìrןs7M-\]x>Ēl&3a#I))9"}HAAA+7ŞfV6†ӽ/Z2,{ΑPNdHfAAAAx_\)Ζ>TYKjXX] n SR)d;ϧ29#   +:h4ݑ6 LJYcQy8_B߁q   G % LVGPd 0t"Keh[ Hi:$Mv   Nq M!چ$3:Nlnԑ2Ο_Ѯ ڇэ>̈tAAA#㊎U9ocQe iEC)9Tg93L ʲ'AAAኻYK|vH㳛sۈ43r.e(c37Ng8Pl&   |D\]$ m2ig͌fk   )W<@+a&U0D>AAA>ܮ=JMv3AAA]e|>d7Cn   5 hd ]t}$* $Mx<Aq~^k!IШiHz(rsvD.-EU "#qa;Fo*]7C4J $֮n ]k4T:٤"ƈbd}h/v  GURS_N /Dۆjz[u5(9N+y 8a~w]cpgl6ӻle W̞CGشk/ $ M]|[)˝p\[W7sLx( Lx, fْ $ 04$J!N,L_c!ˇ4 ł$DV_ ǃ׼q އb6Qtyo19( ̙K?8><C#|ywOnvN|$qY?aFJsc7݀ 7)U"HAA0`>^:?Nln2ooH,ڪ\.kn<]PIUݍ:ftz'?}`! yZ,8tg`hlfN2YDCttK˯qo_ ( #0?'Ϟsf;nр/jm:&U,S4GN-ink,%sgfŵ,8}SE";r@6,Ng`yZÿA }w}Y}im]duAyXm'{!O GIh}aV, ^uuO$9~,[Z t:ϾIe4TU!sAAIߌ"K558-O3eYOM&kni%G(/M׉'ȒD 5Md9 ݠx"i `Z(nhށA:zzhbo>dG14dPSmm-f:{㧿ybV]_? 7^{ &Ͽ7"ʶ,H(o`UUY,(LJN(o 708^żiX-V$ J ݗ#0GNS_Yg*+輙 O%w,Z['[-حζK&ZSNJ Pp$ʑSMTyZ] IE&e)ȲAA>=Hm95BuUQ_jr" 0:kj+:/'Nyd_ O9-_<ʗJ,s{i^fNzB >%9 R@N7O-iŨ]l2f͟ˣ~L,IRiGغ*+af blݻCO>Myq9Y~TU0'^\Ͽ~njB@ui ns<)/SwF[W7NSP]V$7pf#9Y>xhl.#eeqy:&1+ GGv}-nd0w(6MGqSgP:k76$묪ˣ"Io(A8F'>2G ;vS^\DqA7X(tm߁iݸGۻ{Ѝ3CGyk7L|;1L$YO1⋟93/nhҶ#d ѩظsL,Pqtv9'A#8{1ĥ{"&#QNX30@"$Lbj+ʰY-Ɍ.Vǯ= q™3Xp>B~ TU 'b0 L;NAAjAvͬ;ANg4`6)29n~M}!fm eCmZvAo,mi^<ŚB>3}sfz9|iqeYbt]j*/d_Y~t1. PYRɳ3xuN2ƧG~SDǶ]s/O$erzU6܆-\#Mٺw?wx=v.l[;raZHRbq4]K˪k7>]/~͗uIsgLw>ZVwް} C! g_̒x[PՉ?VsfbXu7JQ,?,slc)Wy>76MӹqRyufL]tzY2w63̙>^:{Pƒ!AgO/-dёcϒHN/+*U+tT:6`@0>5Wٴ{ŅAA>:iQ>]|sI:B߁jbv(~J|n^Afa >,eu]J?8l?2_UUj~/>l-!CeIc5Q赣>h'Pprg);3KUS3.SpOwiSñgPϝ7"7;UK?q8q]7q"=Nm_GO۪2o_r%XLf|^ʋ )ϛЖ 1wT>KGw/Tق |͹o>a60U{),Sfä,9㿐4j$Cuz(U+0T rs\,7p4kg`hUU%?'@qA d-/#7OIA>w |L&ʒ"fo1zv u변 rs(/. eo|@AAp{7Au-%%U6Npki^>zZ Wvzt_8A$AAA>&}{-H5V}$x?_@g0fRd~,JYQ;ٗ/|Hd2N>=AEQ& do7g+;,yʒx*l&!(w8On0 4-@V?tт"a##')pU:s?./ |@]-gxX)M橅\_O,H[02+k&O`yM.Z29,t0F*~_\\cڨ 8:p,"?N+"&`i-~?~Z;`c=AfW;AďYR;9"E(}-C$S=:z chp"n^̫{89<]/ aQ]a\WvyG#pDZc~J429Ntm1Y>4P;[X\eQY^KE{[ϐt|63.<`< ,ɥ:o7㰘$Ⱦw nVȜR?iMaQ$qME"⶚ѿ; `7Xͤ%5|W97A`iUni|v a Kd 9a0C2do(PTӄ-UXLva GZ&PO7&ſ(&.瑾>NabTV;ک_iк1ۋ*8^$$8xspz I&%|](%Lb>oFah p3MWTxHcȊD$$#}\.vaFz))l!2X$‡iH,j¤Opn0B"㳙% YpYMtcd4Eq[FcߍN.IS4RGd4-gyd76BZi]ށHY_P"}%@׍ћ⻝ 0 1C#Jke|yGdS0e<@.,"xB#X(M8Y]X̊>Ap6:NIDxs8igQTONI&x$?d)ӐdhpSwQR@vQ197E'N5Vwv6=3Okd_h#7 Ӵg7UM;C4,EUh~_^$Zl:E=4,\,n 7,K8-& iMGUdN02d c v"w4:INuxD||n$7m3OHd42<, ,۞|t2A⥼1H tL:u:4nB"@ !Dǩ-STSPW'Gl$H$Q,vG6m O B,d2(ё{{H'BAz[2FOb޷̹a-wlU HtYXY@ ߿qhB玚U氨O6swa1)2+gxQdLUoPdL.⥣M5(D͌ͬLn3fjRp[MUS?UKšl2V)=x;6sL/XB_IaV[Rޮg4cfy.'n,Ȓff. | g0 v<y(B3H= tQE#G&Dӵt6ԣ8SSIk]+ <6͛-+rs~B~?4\4b00 +],02BJ[J &'^wF&h^Hz- q~t-םb{s?t-zǂRmfsxE%r.*\?cj0ǛʟBv߂)Κ k&jAO?j2#![VχPTS䖕Z<Κ<I=K^/W¡Moy^ &*Ȳ;#DiE7Џ=Ņb!=/`? f՗,,GOOY}g1[-VENEצH e`u8d&:vG0@{;#}=3ȫ"œHo7'oE5[/ EUBɜ6<Ɖ[j8<1Ý:e,dcL̡n:&YGfKA@A<Ov4g\JI~Al2Toh~rK0[# q~#oxEKO~jv:•cSy*0 Қy t㭨~^(cs2ю357~)z{u~?Ȳ+#E7LfA!hdr;u{vIGdb^zO/qgethpasPx mq~1i*.bQ'1x,=}{8{(,H~edW|Чy Ac[6s@Gxd*A$ 댞?I.B$ |$ 5kd"+ sVƖ齻ɯAeh~Arr(103fPl)),X=- Ji<:Oͣf:<<~?pY1͔̝nj2M44^x)볥o*3)Ý" EUQ5QfK9s;3G#2:O's*,&DL jw`u:G"ΝGX'bebâ :l|"dY[^@iͼ)V-T4k%b"JG%$$T=jrK9 ÕEVP2l0o: $ ]GQy߭Z]7 \m B2(^ڟAYQCz"1>"'_dB1.iYO߇dYdlwX&o. =| W)  [z^>yc3-iA6"Ai*IvBh>+%WPP|> {b9A}"tA0%B!F[&; ! 0HQQ$ e֬YIaddP(D^^^Rhii!;;ݞ89Q~iI~(.Ic:\h˓[EQHn"AڴHc΁A6tW氪iSO=ի0 ۹馛@}}=^:q ,]ܤ1Ikk+OoL9x`ҏömzTUU%5pMiӦDZw^l6KjIݾ ټBNv-;YX?vaϟSf7up ytw#9.+P?ӈa>~ndWRZ93J\7N`Vgҩ~,ne2Ǜʲl^=˧:3   +MфƮ丬="c`g峦"n4`ZRaOƎ>>=4eXTggwA1 P$I|jNוebQe\Vo71zъ fф[c 71;'YXPaGrIw<+KK$ cw$x4j6v_P=7  p! X MK`sLOQsU?BpxyՂuM>0 b,OVEִ` ý=3ȯ 02(XNb0ZB>ŌbEzW5nz)=T8B}>x0 bّ@H$qb1~OtΉ7%kt|X,H$`Jr}s2EnwRAIk Q\VV%E F5YB%fHKcgs?r4?ʱaፓ럗O#I ]@vub ~?6FpYͤXb"k lr <]H uw74:Uk˟qe ][8}+ 6ވ;3v;;?UA7 "q qeek(,+E%O`SU nc8a*2= *PeVi>t]?4Dhl6<3Dƨ߿ޖf[PW'GSZF[I > 9eENI)i9ӄ~`<3 `-_A_K _5̾v%3&[u]~ gpNA'$q]YAQ\Ve1+w5rOwbR$Up}u.,Pq2"3EXS:8NJdIB%dysVt3< 32;Gw71/-)[#iayq&6*8@0Ÿ=w3?#˳Er.\qNLs,Hp_ `~ANiH80-蚆@K$=Mt5jREΘj6S2oj8xh8DSƌÑR2{.|~0i8=M4;&au8'Xv gLym_[+m[\SuCqdY.*a5ؾO: #*QjdI;& wR"%d??Ǐǐex,F<#1T,ZBzs9m i,K[[g@UUNgB׹g~!{I2VW@>J3<(&h(hX>Dz^1V+U3Hc t-`3UbPء(8RSncڹE74r-1:Na(9x&n2X8L<vOg9m3Z[基|))՝"#׮@5h>v3P`! 5=/?9s`-'ԈGF)>F..wݜ?d$˔ΙDZ-i=I,2a".2###ƍ燐֯_?%$;;ĸ\9|fll y䑤ϱnX,F89OŦ9yVHOOeee&,Nvv6_җX`xСC\餺 booe̚53gO~/' طo{rmFOO $77@(>_Rׄb녖_eʚ$A]$ghfxYUuQh1o.o oD,FǙznK7$Ȋ2%a[+x.A$IPG8ƉۈB>Dž J(1H0@_[+>l)ߺX4甔SRʥ2lp=$!+*!SxrS uu􍒒3-O:yy8NgCxw" `ՆB4 hv^UI.Zl6ssQB999J"s㏳{n&Ǖ;NɼypM<(--I$VY=77ꜜ',`IO׬^d<iiidee!I2k,f3fRSSP(͛imm{l-ѣG iڴaR]]M; t&v;K,Iz#p9D~Ei:.E!9Uс WF&\\ p-8Ql3 Ow56%lݧg,2$I"PO[+[^$^hl& p)tvqqge3c5'I0L~kOrr tbK9UV_?ywziI\M/Xșg%VrKi=uo`篟b"ǣ lxM6QUUŒ%Kx'"??|_%%%P( 8  %??ӧOSSSٳgٶm_җF/|^Âpihh ++/_Λod⦛n!^/mmm(رc={oi[l%KSOAZQA.UD"Ao[&coo_=ęaÏ2F!YxnZN6蟌#z^+pO7_y-#LV~>Q-MBUM-J6r"19|P0cP'o,|v`K --czrvy`u8Q({Ǚb%%58M%c2 s7(;sh8td"-;p nfKSh { 2 /Xp!_=n˗77$ JKK뮻<{t''G?"tR,YdСC|k_CUUVZEMMGr _*0/~0hll$ܜ0xͪd48'M7Yr%-"==~W_}<@aa!O<vnarȡC$L~ax'|̟?o}u]޵{7v+L /$; :jeEXtUUOv4ݝl- ݛ>m==/Z]䖕$p,2i?]G[)dEz2䔔q4s׬hlf] oyoL4'*,&rLn]cZ0c&LҲsHx~ģQ ]cQ`!Z"T/YF'+n=*ˮa!k-'cXɫx_IXp! .;;/r߳g{oDHɆ$wMqDl%,E"$j5L]kNyo}[,NK__җ.y6RRؐoäZ,xwbo>鹌kR!F ;3ǘ,)-Sx) +  O>>]~gh=EŗhCy_FdEf$s32/ik4$͓d}~r%d#? jax½$ޖ՞b5?/cwAjjjRcػw/]<1>ԩSN H{$`cY?ԄfIDAT"+7 59soQzӮ W UBΓ^˾JGVҲs֥&В$!sEPTou:;ɯS7^ifee%=MpNqׄfKzrL1A"ANՒe'53'   tADH@O$" &ehaI.JO:1S{ѢEIc۶m̙31Ή#300폎Fw/L=ao q]皒Lzx =:mM;v1:;j:Ei6Tj32d[c/á^Oe5>d{c?]cafVgQz_vJy)^.aI+z/nHz#G`044D H҆^/N3qLsӧn]s`>d EQd0Hp 2#+E~5Ty|4Iut]0 IE4-Ȫz} ݛ; bhRc0$y'q+L]es2tSq]g,'~i:Oq#m |kI |<$=Ak:=0 չĴ'Ǣ9Pd>? |z2 蚎4k<e-SZ3oqG#xe" of4ۗ/?Lqے~'q!ߗܚ>Pr?qO8]$K&4zK\C55z6S pJ7LI"qnݣ! @5iA,q~.!עee2+#c,p==sFG'Ǣ|AA׆aGQ̙Cvv6Gur fΜyAOAA%/Ev4L=0~1f_f3a`87v4`70#"q2H,nw,/8gYq70Iv'FAh]nf]g뙽bvԛS@.,[QI, rK˘b`WQEjx>xwyݎvЙb2a1[&Y٤pƚ<ȬV2M8vx~<9T-YFłExl~짓r,wޜr8] ].xx4J# IbXvJ&ڹCיj5Ƕn&F5y#aCS 2Zv"]̺v%hDtފJ+ܱ֓]KuMclh^UERd[맹λ)_O=8EŴ~DYtzdy˅j6GxQTO,ͣSEWC=ဟx,FZ/Ϳf=O/3EjV3YÝ*d-昏™!S'9F7z!2P2{.,y X_|/NtWTEK9M:))"-%%\N:Ejj*dgg3:1瞣B~RRh?>SnfdYX,FIIIr';Vd Bi:wkkkcllGtuu1ouwCá rw ZGݵړX ǧ?a wwOQP5N>MGpQD ɻ~4Mjה0::_"]]]<裔PVvC8?9pŋcXXv-r^u^{5^/YYYI{Ws٦5xWGEAl"CO0o@KXz|U,Iw%zNc蚎j|uJ<rk R3ɊPW'=M 8y>(_yH0@k5x4JnY9X'ץcҘ3pgf!I%sj/8a]Ӑdgv?kDd"cs: gDlkĕd;w0gvTVV"2eeeO1;uSNuV,X^+ WT222E$rxp:x^L#? ̙@UU***clllZ% %GvYPÝz1"n;*&DrMV[Z?j26<YnjUTL4=<;=*ҽyT-Y=%o =9 + z{uy-KD<';;Ç BI"P(_f\wuX&V$ '; yy̜93axbRSS6lHv(..&pY|>gϞa233줧0bCdY&3::ʳ>ˉ'={4(wYfM鲟,p:,_Fz'R1 ֳ}Mv;m[^AӑC ڊhe IP ?;e\" Хfec2[0 ^z4(g>JJJ7I[[###ֲ~zضmuuu?ì]6ٗ$ (+/͛+%eմ.qaBL2x_чrJX,Ƃ ;w.@.o( r "TҽyR<{ z5i9yH0ČאCeGi|ۈ;35R̾nIœK^EctДK,FenW)3Z[G>D 3e0IgC=έ!swr׉8ܩ9<2 iSU7q {俿^t7toLBjDH@ptIkᄤǡDM܀wIǢsnZb[o[oGG>Ϝ9os͚5Y=n1?=nOyĕkc×fޯ`0,خAdxCȑ#Ey4T*S| DQ:;;*z7O~ 7~~';E'ID_P| ªD[+wYxM,&gnZ"$I-^'dq40C(j2O<.#,cxnU10 Ii=u~l#T/pV6 헿੧nHjj0xG?P__Ooo/WNj/K.%7ɉäVN>͍7~rm%8l۶ KUU2LkbddM6q&5{N"q?ϹWF3 A~6k_>%].ZL A$QlYE3h>F%Ibw\:ϯx.2n6HM1}[cAA Ib5%;LA f$; AAcd%/`_ tK {t5 H:,!遄!]HWL0tP(∉Dp8tc`N0LZ 0>W<OzDH$89I$I#G<Ąp8<-I,CQq~TA>n a{&qq5([AB׿Nv  \>`ș WU5=85^X$>h8Ǝ~zR,*K2(Iw܉v>F밗c7+lkm584;m]vzd!  G( wib4'lk87/cZx*S F12hYE$~g >ۧEAAAXBg_iv3_^U9=/<ފ2[gQqpcvP%pD/!?΀?Cd    NIONX+n À9n #A^ݠM   %Iz"uh?]U3r95߿qUXM nx6͑EU.=AAAAHA7+2EiN }v@4AB)Iw&81LXn%(8HyhBϣ=AAAA$IoA7)2זfrsp\ێ?0%YmM"w6Om3oNOWWġ^< @M^*,j   W'NƹqTYaQ'tRfnp EqYMUS@(o[@$Pb~XBCel&]AAAjL]$]AAA   ´.ח0iNӴd   pE%=AWd!Ls===AAAJz ˢI2OAA7   40t2O5tuij{|KAAAic@pmCh~dG%   WԴ(á,OS5hALB,=fRG⨊L@0J4[pZ#AAAHgG京cS~zd:-|mLF1~nH(ƉQnh8FC4uuuAAAwKztvM5YDՂgw7ͥ}$đadIB3 g7Pfp0CCDblAAA= (8vYqZTeLY暒L\V^?v vY"e0AD݌a4$   '$!rK#S,;?~$T7\7sI]{9gIq^{E32.>E]Y9DQR0ރ8?697?M`X@e‘uM͔p, rssOA4fWIMU׉\AA"D.P<oH;_#8Q͘M&EfNu%ϼDzظΞw~V-]D͌jlV f1?ϽEQƗ~`8ıznXy-?q3Jٴc7q]\a;l6sQ~=΂Y3ycN]!5C{w'4q5ɾ<AA'蚦1880iN>YUȘBں CdgfxlY0_>9342(nUKj2RZςY30TTEv>s͔8vY﹓`(7+Y9Lzj*YEۍ#8=+Yl #xR'cx<1hl [eY307;1r etn@H,ƑS/vo1(."/'QN9KCAAKz.IҔ/˂p1:DžaqܮV kjf|jndѵgdzҰ[|[Qm{HOMb6?C4b2a59x$o4,f hل?a]t)N1 ,3f^xs Cq;+,bhdAͨ${8^WϾ'00bA,f3ϝekHu?͛;Lf,ѱ1Bp/ AAc. Z,wַ|[Sr:Y{Rfϼsf:6"TUg`GR݇͡$%pl,;d-3Hh-op~Ri`hd'^|چ&V,^H" i`AO$tvq;(?<fO\AAʛv :cGS?) efp[C1<}݂pʒ964񓧞% SVX0u!àh֮ߡ!FGQ$V^nc˨*-!%(+,@UT 9u3.xʬdE{f֬YCF줬w/10.b8`ZBX-)_Xe}-  | ?c}LM?ŷ̶ .+́nVUQh젟\ Bp߿ݣ@3# --%o2b5UVz} iqwd[,f,E/ϻqcN$b,   BҳXBe(@I{}Aeui2T;u}d    L]7 LKwn3 bYU&ƺm]hY^FvʹN iv3ylbgs?ݵ(ٻ,   *"0M"d8" bΑ!rRl&.JҝhY E%a߿k _D^ox̔9eչlΝZ7^ &{AAAaҴH/Eӌ۪g$,+Nq'C '?&SC@ǑU&b ӛHU'U@Oh&JW,'tGDuUr_uǃQ݈1 ÑBцMoBVkC.OEK CdtG(Z.١μ\C] ,x_pNv   W'  ytMCKktO+Ax7}p5!a?`\wbu5H0H\r|H(H,ЎvU  | ] N؆=%IpEHZPf7͗IAi>vL̙4b2Q>!ř>{B]OcQ6![$[GǙz<Đc["0j^6g g~.Vszv>Lj֎p:Bt$F cȗV8) d:zp(*KXMS>N k4Dvr^ 0_0z$ p\o6r՜*AAִDcGx+hEd\D!z\5#Üܾ];'95,vl))=AHNt56haS{ oY978@Cܾ ] 0ͩoSS2wa^{z@K$PG$?k0tfx"`+/2POcC4;B[I KoN"ηcc1ǧi.kA=4=Lgci B>fc[Be7II I`w"pUtq7|c br=5nC-$T?N{wIh:wdg|ݜ๣#sD/x7_>+]A=%dkaFz{al`D 0 064D,KT,\LՒ̘j${#364HoK  3݅ax4$Kxo|ecq8**[QpOPٳqgeHM 4棫XYy}Λ$# XfF$z?}ݻh:z?M$d/~%[ZFݞم􍒖`}P8c ^l2w:B1|t5a7{Yzm̮A1-+lv'i9~c!%yM6Gl{t75,gba݅O0B 3rK`00&YQɊ,TET(;YQp(ʎ~*3]LξAdb3+:+fxp+G;GXVAN4K;,4{S:;%EZm7)8)Iw:,_NᏞ98e" 3Rk+M)Mw& U#Ûn>h>vD,FJz:,qOb:$aZ9MNlߊ%PTɄ"z Y9,fnpOH؜NrK%k:)?t77%$b1" &EOIf,ʚ<瞙X8B_[&Y]CccH-%3ˮ!3xӵXv-V,v;U,&G[+L.xx 0< `w)G0%H @Os3H|\Vdl0إ*AwYTS&0 ~kfmbBe;Y)VdYB% mE:KyC--JG_i38 C(ǻFxh,gMEUpZTFC1Ӣb!2^Y>}gF>l\׆ 唖Fi8׮ɩۙv%sj8 vdYqyɫ$-7-LҚ۲C,>9.YȲL{Il'#}}' rĔ):;ݵ)A4ddzO1grJJlXrrTWL&x<,$ ,O&Z"j2 ý=LXN`!vH0ȩ]۩^v mFAny9spedL-mZq$a1ɲ$^6¥HB'6;א$$D;N$>FaL3DnDVULx-ݬrEJhIy,Mh`3ӅFc33כwoͤ'_/ ̤hdYa2 бdO$ -gibx*h<||\4OVQ1V#ٻ$-`$q).2 9-2 u _164b|L0McZ[3f%4tmp,Iܶ(D5Óϩf3@4F<t\yE͚ÕAӑC I "2&ɜ?40te: ȊL`d{ ww`0E'vᱛ)y,,Axˋ3'4l{$UfjXWC(`[CrR6H$1+7}(,Imd(n[&>f~ř40ۛJ$qv(nu崒vH\M^kgWs?+˳yduc/y^xAA.p\l}"f_ IHc:IjV6sWtgNYP?<̂ sjvƆE.|T f<^<3i?]GVQfH0H4fz |hF5&3Uݾ+=;M3#I2aO"+ vwF&ųSR;33ernrwf5k!2Z"-FWQ9}fHpϿ0( LVQ1wjOpjt"3/?=-|3丬|u _^v-KeNn*,#aPޟD$8'ʯ*72 nŤȤ;,XM ..ZS5,O S&~D nvnVϝ?llM5^Ϧffŧ ǹNMD(?DiVq[XM 3r| ~\GY?]]-sAArKJϿ+}b-1o` ,F$ƫW/]FioZȲB9ˈH.J7qȲcZd%ƻw+*f 0/Ļ/i9|O[ oEԴ)//+ 5ksr6zWP6yUXvEAVeM&}ǓpdUb;`[Zgw8ȯNEQ/ͪL49 KnU ˻;ȑ#Eyb0tww3k֬dFtvvRVV~~n1 I+Z*_]{.ZPAx"#?BѪuEL1[%ų0bO=,,"A g^~"Osz `xh_׾&~&BWM   »]nn?IvSd \[   1 Za r$; ! 1|e08Z<3١>F<kaNIrU$蚦s+ZTlJ׋1DoJu(bUIvp';)vڅa̙墺8v7|sCyO>(_җ{zgظq#<̟??١\ ;v;L}>:w_{^{sJӧdŊ"< =PCyO?GHEo<ݝ>rhAI4q[6wb1^ `2eyZdÏC|0??iA~`.I4"\⺍ }AAUт. \H4jwdWF&ё )OnYﻟ{\.QCSϯ&DA%t ,PA>TȊJ<esxeu5hN';P\LIj*MfzicPkڴ/v^/:;v^#zW,oxbN8˿GGS iq|t$dHd81))i I&:Az8HqXtZD.m-.Ϛ-"x#oH!X8L{ `ss9+א͞rR:[9{sV!%Cfa1&cuG< D*YEA<AV0е fo %㡠zdKq,v~?k? -oSZÝ:ZM#WYL6E/Ig٭sൗ߿nؖM߶<\^/p8̮]9z(/_7@ _$--qb73gΔΩS%;;;IWhmmMvթd[556.EWH?KH +?yټy3X`0-3Lvmvm?~_~yrAy^ow}6@xO?{Ɲwիe˒\zwl6ɥ^%o]..M6ْlq/r/rQ](S@:?@A$Ex>|||{f1|MdE" ꢪ*R\ż1V1>MY˒ Ǚp*EiL|6AF5< ߖ4E> V$Cߓ$I2r9Lcxn+4$EΩdjx̢bF!W~k ?mD:=UM.y/D&#E"L z+DRQP$%# RsʊZEk4aEP`Jϸr.}}=`G]gNb!)AE |DnY%0c{&F\v;{wᘜbB~N'-Tk\քJ9eeٶ(m\@[+@ wvYx<JKKQՔD]]]r]w2.߿}͚5ktw^M"c98o 7ԩSx-& viooTWWc4lݺMyq:رNG0wߥx&@KK [scddЭ 9zh@O0x?v#[rKX )jU6$Ib_o BQ}c\;/_^:}QWv$I?ΝFG㜎3֊cbޖfSSn''pڦbl34{?9ee|/)+9OşrFG1ZbiBd z (a w?w."dfr+D-p(T*Xt] Z Z=5H$ΜPg;^{6¡*Q&GVxVTv` @[[nVzU8f,Xreeej*FFFx7qݼTTTP]]d$󞉉 v;fzvAWW F8vrN>f>$I捁.cYaK -TfI7YQ,z.G{'Yo֗g (LelPEEqA{"?{N$ISO}RINieKHEԭYLvSr٥e,KH/@zmMT-_(YXGgמ`-uzjVaQp8B!)Z&IAL 3֊y i=rV_**!wæ'Bӓ_Uv!" XQ&C&v\,N&EgP|/ ?ɺ=upx4R DDȔ QDoN%o~jlB(8s jpVC׿ζmhlldLNNp-[vp̟999}qS[My衇01'K,aaCCe|bJ%]˗SUUӧ?^Gzjr9>|JBӉNρ-[osRUUŪU-cN4 _-#5̛wBf&$]aR+PH qCTf(PD" s׫+bcUe5Ή~+)xZ$I|*2 r! E,/<3ۋ!5 q>/Tې${}>\v;: FK%^\FNY9eXG9WUSp>Q"$I" I@o"L(W(==>DQ _$Al6Fiv#I:AI\#"\xIYY>ODLv[?/DQU?/j$_OLL$io4i⨃UL捧!I$iVxpttÜ8imS"JT.JxS{==)^W0՘2 P ]!2 sz0Zh=rKa]=GgKRMyk9B*65Dm3ۃ ξN"Bl{znrʩXD)+;^~!kɫdמ}:Kryi|nV˛XrW~ha'L;ZK }ÃHD%(5Z(j4[+I===>|t&&&Xf gOOu+š5kˣgϒ8l޼9ܹs0==M[/!ِȜ?_E܄yU$NPCA `dee199I~~>yyy@4eEPTTD8yH˱X,e\֭[IMMi~*} ֢Ȯ`0ӧz1o tAUQ//L@)& '_!HѨՕe`_ No.ؒd~>{E1TzRl9LAӶmK32$EڎFD7.-!т(9C L7Hf Y ^Q֬#phq.!fPAuk֓9~2ԬlVܷŌ!>sj1<'ں; c%-?6:ʙ]DaN'UW`H0v%RN}ۅJCDpNMRlE.`jdٌgS7'1gB?yro6ƴt2 љL(Q-0mDg2T)oA`7B1p h6sf9eB4$U!<>%%ZA %gh~r:SEr+*(,4nAPig2y,ZJP>3U\%U7PX[wݱ*'Ω)z/-ho,t:.\xQEkjj*MMMsm6ohDDg~UlKk('0bbŊY222شiuzNL kEsAP|ƿc_9pkș} e x:@__+=^+ #. %7cse6+o$M⡃Lrfׇ6g?11j5yUլ{qZ,UՄCA.:Bf:9Mr+0 wuֿ?mʦ wuu9^"plQP][ɰ OVt>7~Yd͜劅gplHmv_:<At(~s>z[8erC8mS.@P~#.7a(]93p0&pA($>JҘ7Xk0Tk9{{ "2j܊J 7\r8xfQIlJsaV+1AbHcM\8t?1-w5W{WaNj)-c>CD۩y- ɗm>NGTZm|^.GnEu~Z11NZ~e4q'|~ŝN0J$KJvKB@k+^z5T:- Z:OrRt9mB!p8V5&hmi9+g>FGͪ5(TjJ}4d$I`hhO>ʕ+-cNΜ9CUU'Eߏ($D/^$'''aov)))> gϞeҥ*z$r`:.o>?Q>OQi4,z/UWrp0 Ȕ 4n>\6LmtP08Zgrȼ$I9Hw_WI^PQTޜBϙ4݅9=:Y7+Z.a^ˉ}lp84iyHJ9RJEjAP W)+RSѧ0s24csOqLs"r*,,"  \_ɜw`ȜY3 +t2{~?OX!FGG-evB8~N'N9;2dllg&l- [yno 7%ۗzxx˸)2g =I$QHK=@bM_yV+JF R*(n0gRRi$'}lǒK$=wJ{{:fU4Dfo={ذ!q;v SFӃL&K};w|Roj4t&lQ0رc^:R\W@ZG89`E.&@I 8G(o@k4aERP0r:T 2e6:Bjv {jυђFݪ5L`ByaZ ȫ$RA@VHC폈è4s*uY<2 ,i[ds ű{K=} u3 _S',.A3Ŏx6:OUWku,*6xUUX9{v sH'9 )"Ч3.r'@?M}S6."ES!seOvbСx˸!) Ǐ[ʜ:;-cNl\8}O݄[xPʋ +x˘DZ-}aط/'/L_(+i'_) ?"v]dku.)Z$"I]OQ6V$i/? R _;wL<<@__?я|;j\heEr9j5]fsB[l4rjzxhJ< zzz[sQ"K&N!Et%}{҉R.Rfܰi/jL#Nũz#]Nzܨ"Y':B@*VO\ZɁ)ǧYZhpC+h&'$<Ĝc )]M#Vܿs{>S^΅CH+`jxK=2Eu >B3A pVcbv@i9L6% Ou$ubHM%5'8Dk'xӄCTz^>$\NNiL\@DHp(B3'/1qDQv:*6Rk(^PςXڄ0>Ї"ZCvI . Q& Jpy;66pLQO}#W iSCTPtKa19' ;KSv'ƙNRl9U˖SVX_/(R6\ӃU&ZܫT*DQDP jL65DB!N?V352G\v^yGԭYmt}J*1OTbJKGV398d”t/@0GDZƴ4);ZaFz=-TZݬ4P @E 24:=A' t:HOeQr9J P*z[c3=䓢P(Xh/WbڵqF}Yz-~?۷oUK$tdggsiǩtrf޽^=_V+'NΝpS8펷9$pMDflli$I"--_|Ʉh$//O~~'ODR[[L&;vpI\.wu׼ )N9pI&-cN@@qxKIr@2j3kQDQiP# :rQ@aPA =d4T \x!ͥ0UG}N ~K aV(H$I$dfO`g\ϭ@@SXXȝw|;v-[P[[inn:_Q(T*Z-}(J6oތRdrrVX1/ t˨o7fD`hh̼bZߵd2, 7nD&ƹs{YlZ@ 3gx"֭ulذ\ٳ444fZZZ8w74Dccc$o7!%$_𫐋* \1&\bᐁOPl$MF*刂@^[!ሄQϫK$I/rQ.GRv8pLu45 ^ ` a˅"11Џ)=֋X:ԬXŒy9 Xy 5֠h)[E $Dd&<=cZ:T pk%'H(DEHpRs0Z,XU "FqN9 ұ cgRTFF{<?J3xq;lȕJr `66%;FRSrlQQTTT OPSSCnn.XVq:A<.\t"I@AG.ڮHJ7BT1MVgoE`IKuHDz=z(((  xD"d2#IP`0Rzc2D"FvV+eeeRQQgbbVd~$HIILDZ-FExHr ~PD:N[s(S E$$"!T2ũzDM<=rs@85Y&&~&]lB-O'I$ru9xg>|惟R$1-DZR\N폰у%Kq`KURr˵~lt: Jg)Q.j L;" D*Ƕ'ƙ'%KW^>6Ƃ+/RP]CFaQ,$>?~DnY%k},)m\7^esONpfTZߐ6Mvv6===QVV ˣ-[ O`j222X/H܃<'p;wvd2A ?OeeeQ]] /@JJ l߾=Jee%.9y$@5k֠P(DR FL^^'NՌHMMMxj}\fH\QQiiEnoIa~(d"+8o/w'ˠF PϜ-#jgEq-A>j 䚵</k&(Hѱ(mg?I$I>ocϲmQb%³,ٲ N$SAP\[U5RA=KH^꡿"5 ))]ha\NEfes><DӉ9T@@k03g!IDATɫ (," ?ISՓ_]˹=aHEf)4mwW[J.BaŐJ~U5reEӡh߰ Kn. @ny%T 6$5;2A9[_LT*֯_υ brJ 1 \p@ @mm-z1 FoqݬX:j5> ǎvuV$( }QΝ;' z=cccdffef3BXJIaa!&1jlٲ .xϧzTpO$I|7rMTb+H[H!xVӕ;5R4JR4JZ]>Tr4w \XSAmyVyaR|Ы䔥lPͨӋ\3kI%nhM$IW%'BA٢%de㦤Q&wfQ1P*7~ cZ:BњhMfz[γh6>կi!&d/h B\~FADwM!%\N7OVS W/_]g2Sz-:=UM+fmܯ~݆t|Vf3Vn{vv6߇5k\_dff^^gӦMEL_De]\x˘V#y睳t::''YҮUO$8r \(Pẻg}*捁n(1i^j2j, RxTr9W Su^!Ș;'DSuLShI$Ixh,,+dE_+ꨗ&SRЙsz[EK?76=kp 6^PNFP]U\o^rˁ3XYyTTU[ Bs3[ʜ<(2W_=PV?{r<|(xx+UVz(2$șO4:ۙZʕ>@$a,U7z$I$|ICQd][Y|ח'ix˸e D~NN().Nh}yytTcvz:2,aQbB_D99L 1#%uLF~~~e$$I$I$±X,X,[s$>׮]{|TTT[B[$ҥK-[MQ*6ML@O$ANY۷+2_/ AG(tbbbRI[[[$I~ٱcG\? 222Od>`O.'@Ì[F8"ͣ"3 HfâxH.'5 %po$Wpb8Y`9Nd2QVVo)7dllV֯_o)s/}-2cժU g\NMMMܐ)N<H:"}aDƒ%K-|>v<o)sȖL&#///2đxK‘XV/Q.Ge2#OМ$ h o)tƄuߏZNX}r<)J, f9Rn`HkϠRDR%IhHIIIXzQ( _3N$I/$}ס@ۍ`@6?IoV/Ikj =sP*>bA6G$Dt[sd2%t\.42\C@O$IyJ$ҹ3XG1' s'8/J BC G^A&z==WмgUM+eXIn\6Hp(H's8Q,ܴ9$yñj |iHMM%5552nƍ-,_<nJr?I9pxK) 2 5k[Fk+Oܷ ,qP%I$& Ѽo(*Jr*q?  vqv뻄Z %+wލ9#p(ĩ'-/HD;pfׇdiGϞ;@D"j5Nsϙ=<E LXϜR]eeѣ2'v=o[ƜIF]xK!WU4df~Q\<ossෛʼnxK!k 7y:?2eݓ. OQD,"I =v']NH$I wuU\}lU۟I rpW' КLP Glk#ԮZC(J_y\)Z@V3{?7\)v?K &sh=r/9 P 5;Nf6*PTT\>>}{{=H;C2 Yq*mmXrsXKc!$1wcoHw>@.?7_95EvI+t8ƃnw``;vߏZ`ɒ%=Ν?lݺ5Z$:;;y'77{j⟹H]]], yl-s[ʜ'?}'2$gx~"xK!~`cի-cǎ//N~Z_cǎ!yꩧXh }WŚ5kq\2D:{n7GI2@N䙴h#\u hUYt2ݓ.|0Ztz~<ڍ/?I$I߿Q.-:H$‡~#V q>s#E4H'WyaG$6~~jZFDa,/JGtS2<_i*Š+JisK$IOmt潻@Pt3v= I/(DB"v9 f?NQոv^/2 A{(5nڌΜ#)_2$1߇gAam*܊ N}}JU,*"y}Z؂cb`i) zUT'cF`rpº:jV&s~1]&SkcH0Ձ}lRɲm)$IBc0R֋v )E*RR!" J!syHKK;V&\.'55q\.Hvˣf,z=%pRIpCSo'냫(,[ʧ"h"f3h$++Yz$ܹs|>iii>|BUğLN31Tr5m =8?bG!Z2grA%Ũ2-\Bi{Rf=y_i*ŢSaѩH̜$I$8:O@{tw3mD"D""Rp0t`Z x:D @#ғ_UXo#=,޼Rd ]gNq7 Ô/^R!Vcl+J.\k??aYx1QT>|Qm[+ ̙3\FCyy9nP(ěoc ]52fں6WZIEh@/(( ;ҥKXV֭[D[Q5hp:f||sαdZZZxNzzzxD%:>jjj8ܜzfVii k+ -[oIa^rQ>[-S.I|bH5Y&jTo0LD0ݭ<6O"$I$''-/=ʞ瞦nez0ÝHhnz4#2RR29wVlيffr`U˖Fӆ:)[}bzTZ-x bN$5'}J P4Ua~K=d2S##8mD=NuNsSJ۱#LQ5g[+j -Wՠ1(]pQRKD"ضkQiud110@E-Ƙd" l'%߇6 tww5kԩS]o|j4 &GbȾ~__?Yl2l6#|>}K =ID$s" "B{}n 9qZ.^?IhlldӦMtvv+0<<˒$I?慁.ϞX)>jk?;?>LDcug[B ^$I$m~!!DlCtwarᜲ)](vZcSᕿ<]z-~{v!W*(_K v(+WQ5"vQX< \v*>%)ArV0932D<5cn\aR-GGqL7ML[cߋђF͊UcoÇ𺜔-Z-}\j>˂cߎ_I? ,l;F{{;fAeX|>3/^g?(++Cv;X,Axwx82nʏxK)/2?yA ЀJB, cccB!lݺ`0$IB!Ν;fxxZR$%%p8$Idy5G!{m*yڊ5_F$ya#-#v噬+^8F}cn2S sD$ I`8B !"IaDQ>$I$@( qvGtw`zFF[;tg=tSt=@?.-j,_D1.IL[ N @ր U\``rp` b R4 򶉁FdPָzeCT/__zrrJbyr*XtHIC#G|== 6%7 Aݴ:4HvI)iy]gN ˚Pku8(TXӑCkk+J͆R$==w} rssinnTx ,YBZZ/ 288Hjj*_~a y睳<{$Ixa QOi"It}Y_~nn7 RWWoΝ;q:dddP^^ӧ X??3ϠT*y8x FIII!g&h>s IBIm?$IJ{Ud^IkG#䚴"TrX߸`y4ZrB.^sSx\?=V7v~ ՙFŬp$I$ ,޼ jVFc0yx@er+d3enk\DjoR9¡Γ'=ߌ( )Y\<|Ӂ;==(fZ}s4 j1+WJ1;=`RDVX}}}leːtuuFSSӼ?ğ1pMMD!#=-( -#5 ]!*|)Q(lQn@!+@2_k,B!1kvx0TdYR`At*XZ`k;5*:$I$ )3;]*ЙLȕJ]OCRQx)eWUR"44 `n)W(㛿9#3}ADB4z=_2zEE2':]1' {-B $7(HZ`/oss Uf[y9 *Eof#XuSBr1 $F$ISA@,@$~L.g}In+{=oL^Oiꭵ3sF$ί[Ɯ lٲsǏ#˯<'NH9 ?y)AR"pE&''Yvmˋ/SO=o)Ib$I$I$I$I$I/Iz$I$ #_O.<^rxK!.nWt:Z8{ER`cccXHq `||x<[ v-冄B!OOO[μ0#$$[@$a+DLvx&IYB! ŷ>WDI}ݎ力NdB_D6.jtww[μ0EQ$+++2đyT6Iہ.#ZoI>R8-p. svt1'Z  AD@9p8j ;G!CPܰ]" D" "I^Vo)s :+FBE1|y$O(?w]FBxH8L(sO-I~aeܔ~:nʛogϞH9k.-cN:;;9vXẻ㥗^$0/k,} QzbTZY%%h FBofaTde-sF#勗"")+."dr9A#*.Ag63K88۠,.hs; v Rb%rEb=CL[Nhȯ6:JoK35&4# $K ɫ;{ ,nA@RPB}PiLQXLÔ,l}Nn3  ~^> JEhۥCUmJuۓ$I$I$I ̓(d"wVe͛$IpW{{pMMt1+pAB$J%rG$F0ZЧ2ХCPT~Li~"0&Z>x %iIr-`jdwMVI)2]2zp0Pg* "Al,9r^>x;œF׃ 8{ H(@[+Ý uǮUZ^>+VsȟsjPTT-_ #]Xr{UV!'Ox`t$֡!;A[k |tf pSy5̙sHKqpH(L@ѠP((~m4"}BhxL9~g{{eܐ|xKo/Y-,6 I'Ag[gόN^H9pgFЉrC*z,J%?kX_S* ̼7[F26UfIp`Zxt/nyTmbyȒ$<ȕJVocZ(uNMJw%931x_HR(?erQIx~JCv`HI!QTDB!tFC8]Tv?ᠤIhcrp6swHgC 2~?AɁ~4zZbJOgQTt<:4Cg631ϒ-ې&xs^H8L0}Q:ɝ}45Yz=|%,9y\)<5>Ds9o7H˧rYΩ)ڭVid!W*I&0{ F(T*F//Ɓ_;1q׷ $}{ph?w>]Zv!"2KfD= S wuSVL.',=gG?O,yy,.}dgjt@{)Y,z/yU vspLLWYһq/pojSߟ~_PXXQTv^{5;Fzz:)..fddgQ__ϣ>Jz쨔Q~i:;;#33~xX~=sϬ|у$fmcXGyV&pZųosHm-?%=RnHexCkIccc\'|śoɹsE'xYcMOOos){1.] ӧίگQw MO\^H9z6vtpx` Rn55TPT2x]$s0o\p!iǧt]1$‘6c =PIw D1=V`I=c<]_{x mpdne D8"3+X3J=Q|*\JYl`Oz=lZ(#W*1Z0ĆUj4Йͳ,{9e|etF3-Hpw'Vi;z.^p8LR9?9=pW'iyy,~<5Z-(c wv\1#0Ǐp8ƫtP1bHM%5+z=5+V3948);FG8#&|X#4q_~>dɖmde#"/n11W_!c=|>G!IK$IZ"Bdr)Ydg|Dny%Zވ}~$Iٰzbz./k+KJ$I>1MD955ZAN|G[Ѿ^">ϕ6^;ek394B p0D崟8ߥ|F/pw?Zر͆E$B~!`֭G?bll,\F[o*r~k$w?NtD& &t4Z 'zxo4x~ϬBHǏ__ȑ#=zߏu!$$NklxHr ƒ.IlH̾ i~y$u,ηG{87N)c<^WTVku KbdID"5pr)RADa\v>xNL&pv80JQUT1F(djdp(FGRs_9eG0ՁR& rW B4Z&M uvPpC(`RQj5e qNY BdecLKQT.a Q.'i B\<|.JJI66J$a4zEhM&J;FՃ/FKZ^>G.-#v؉C(T*d 9CWUWQθ\:wFKfQ14.ɉ=e> Z͒aHy5VS\߈(Hx_/. : jj8gL" LOOF)+#]\:̴u'p;츧H$I@3yl7f*W{v&(^@D"aZ>>NVQŘL&|֬#%3 -[I/($ vp0`n}-itunh'`89,kkkTVV9tPFj5555ϋxlQ s,ǜ>Y]R4Γ|yÜ`'dr%lSxH֬xAk9OJfkv|X4Ám|šєB>0\.' qԯ@x]XHO7Cd1ގ$IInmԬ\M&ۢ%I2 \\i%5 It87_GD%rdr2J_AmK(ǿ+|3S#_n$"zjmǰPњL4M0W:2DJf&#=]HH~^o,u>6磤~!n潻Dﴓ3}@ٳ-t"FGЛSM1TZ-(5\)̙3邫@?Gz`,}pz0SCCd2,9/^Bb7gGڤ"dh h*521/3)+GT#SڸFCAM-G|2 K @0dh4FFFPձj Wn7J2֪JV#I###\3LtwwϯI$###n||{ߣM}}=ٱd2:ux^jkkJJ$ɭ1/ t(Pi݋4:.S>LQC8"W HPbKL{ gN{ۏ.RndkMnW/5R$#$Z xPQo:NjJF#ytsjXr{F!N|"ZcKGҼo^DQ$ V'ceJ,#8S}XP;Fgjlm I0Z,,k+-5=8snR$2SmJ(SPScr%KFS+U(5d `Á`V0߇( vLuM)H `eߠi&Yc(J~D:O *,b(̌;#7Nh d29x]N J%Zq&)ØN-Ws,IRwZre"ȼ_&--RJD۶n}72du8u o)7_8鮮xKDHNFROO8q4T*x^>jED"ƐطonD˖-c%&&-Pj4%1T*6ooIa^ (|pSh Dgv7^3X͒| G{'W F)0mD֠5 X*FՒ)+)Yf0=9 |`;U(5Z$~?LNբ3Z{׋ F;)=Ew܉FovP0H…zaS'^2jJܖVc$It:illd`` nQ(hZB(b6c$p8ErΞ=ollycj222-[MF- M&P(2>1XtLOO399Iqq1W&sAcCf$I{=@zz:ꑑx˘^]DU"!">PJ~_EXdu$l|~cyLdt2$1 HNe[jr.  GD>$_v\v[4gcj= BboLfR2vPtC!:rJ1QԒMlx*(T*3ttԯȾcMΟǃL.克2UT6-g8o^/XNoy,9yppK䔕WQpWjDHO7:s Z @?u hg{=LOY2+lSʸ\.)eC_cA[L;Bӣ5Y'*.A>^yχRAЛSp٦b5L4"0 :gځu(ڒ>1A895}0"df1" s{h*Ngþ.)iXg~Α7^eogzr}//?]Z)t&3E 8ytwQj 毰3w$,yRS9.OZn#=ݔ6.BMP~xhoo͔R]]͉'0 իeΝ,\SNQVVFJJ o6 .$??R>Cl6'N+Vw^^{5233a1|Z>p/& %t:)(( ''_Ggg'={`0'///Ξ=˙3g$ M~~>Ìad2KwIt}LMMJ J4<D"ǢA$@D$NLqg,70qERZɿoǨQ xl?.?d ڢǗgT^췛M߅Um1ފdrhKnH`b<֬֋t#N8Aee%VB& ca?w1OR~x;|ޤkMLLp8AR/o[Mٽ{7u^S*<ݻϳ}v***BX R?N(B&rJ"OF${18|0ǏN:l7zρ#G0~|n5ܣJwܙ,` ]!VKAشQ,6#u("$C%QO6riEVICn r̄J TOݤVr2$2"d,DQ`IcjEuP(Uә@Ej5ZEKH&-L/򫪱1{)ZMq1G^ U\>%RIjV6jSz:1B ƴt̙2 hذTڨj )ChѺYl۽)J098@Zsg)hV-[JCBbFKjvN4@n3FsF&Y%esQDPGIʎyEDQ$}PG+Vx疛5ԭYO(5jj +VSzY|ȕJVmcuzfm_~/>2Kfm\\:EK0|Č 6nƍgm3<{6ă>xloϩ廋Iۀ͆{n}ω}u1'S'NY{Kd2~=AäCN'LN^ @QQuƊl{eˮ0lݺ}V^իPeHT}8ْ2AȽÄ\.^QqK̬|5:I`SyW*Xe(NcEU+yK ⳠN$^HҦ\6gd`JxCo\$xVڕi޻SΧ~utKn:ahĜ9rY4Z}Y%WԬZ( MCe2g" AdIø" A(_ؖ.lN~Ewl{E"d-Z+qš/UVϮ+p 2E\wnDF~ 4CU5.T!¬*iyqWӼw7P66S[[o7$vgUO4rst_$BL&u]6WE C'abbUCRI{I Z6a{ xK!*m۶[FkHo$I$g]mz75n>\ǜ)pvEwEM4}?%MTXdq%[-q_fJe./Ȇ %N;}7I9`-0FAsUaDCX$($Iy\hL-G25rr?2y~x^Fg:I$*.]288H0Y6 UI?}z-cNN'WQ$p[(m%AO$Id9DY+z>wNطo_̢ф]NOO322Beeeɉ'XtieIKK eeeoPs"BEBxj&w$ 33t}LLLx(,,>B---,\0Rt[Nr$I$ dFT$vo($p&VO$L}d ZR$555aC2,a`tt4nn7 {} )))`~A EP|E"3&z(J$G韜$Wc^!%LS]o)tMJuubL(1a $g //Nkh#**RnCCCq#΄sJKKK .I [O\.'//{$6$I!I|$ \$a`0-$j}ONρD~$|!LA8$I+$E,F.v^/~ˉ W Q\ji&-7B8b7ئ Re2tSP]CFR35:BAu-91K&DBA׋1-쒲k4)/M$^JAhkk*2椧5&&&E1'D&n|dee`p-%U$ $I$I`"0'1:Et!c^.HO'uSS^/\2ys%"pС`$ $I$I`DFGD)DQ@c0!DT յhzAa\:K|aT:wPpiR8sJ;(]0BxN'!152 /}4CFG/PWҰ~#H_}Aݚu;mlABL['5aFFaD&c`mwq⽷jZA~u^?(_߁jxA= mD{M8HO7?xi٥e,ܴszmǏp>B% Yvw`d{Q| uơ78zh#iM#xe+XGȯUcɹn'yЛ{'Cx/^וp(a':` hOڏ!qLNg_}{8;sv爢 N?{U&|?j{$kı{!$$l YX]]KY$@ @z%Nދe꽍~رdK8#g3^s9i8~"NlJs1 Z7/>]w hZ^"ee|xw߻x|N|h3{*mvA/%[U IHڎJjj*k׮t7.ӟtpA7|^#15kHOOt7FT\\̂ "ݍiZHwC 9 qxH<~+fCᲐPcl, Xĥ۱tU:iiކng믐G L3W#W*(*d2wv d5XRo'w`M\@ -?L!h<#Bnm` Cɢ$ӓɰbhI= xΩ~>K}sSmm7L98ixQr˖28 F(dw3e*}t6Z(9]T͕dM.(L&Cѣ|xC/XOBtw̤Lr9 t;`ztL[~r9)ySĥt;T_PLصg&x3F32L$Agg'r=_|呙Iff&^J餸S>q׀J˝ ń.&D2 hB|szAbP+y „ }A$- *. >V}{|m6%)DNTgD& ([\NL 2 ik{PCᅦ1&9s1b 5BI(0pFŒ夣49裢i8_OpYzQi5>r{_/njGk45dx IY<{v~?S4JAO_{;GoT|ZSőq8|%ŤP[~1Đ]:HrN.͸1Ms?@J%3 g+(H/M6+k]}^F?lԁi|nXx{Oeo^N.^wye+ܻ^&gOFS)aKJJBTb2Ívtt[ot:;'lY-A&`N(-& IitA".>-@ݑ,f@ t57?0oÍ$feӹ0%$Rw̘IOk 2 Î$IȐ h:Bdy(TjNյ <PeMhz$Ie2 .A|n7ߏZEZ$ [o/ 8,~?@͆wpT nz=eKstXĥ!u?3oO>4rEm|Stױ{| 8iΗR"%/%݉)>F>-( jz=n,&\۩P*i`,\w=s-L^S| L_ꜵ*gr%ɡagM;m:RH"otHeSo7n%(]dpH7+]`2ǔ)CēbԚO9QnXxh:͝B8uIId=twQ[Faz![ojvl_Bs>i2l?Hc hxx8y$7pP(Dkk+/6ljz J%:Ν;1L:t.֯_OZZ%1ᒉ]gdg]7mV:=b ``5ĜhIVV`,3'fe#+Pi_FCRv*3I+,B&Sx iECKʈKIv!I!w4k)cSb5Q#30Y&[)Q20EEq|)B1Ltrޏ\@k4F;  \&D+Ɉѩ&amH! Oet. pH42iW3AoHwCӉt rOc Yl<鮜J]?.+]b'y;X,;v ~> MMM( `2,A___~n2&5MUUʰ:;;q8~v 0g#acT:5]@&!!ϙXkQLtF\\qqq-[,]9sD .\ЙJ0 DN/'zF… #ݍ g2E2 &)t>qjɗސ dYf]zc |bzzz׮ L`t>qq        LWm$~^= m}u|ܾC^   Wm I<]u ̮Z.%ovӁzKAAAHwFH$$@!!ɐCg~v (%?kY2KIL&C!?`HC   X\1元 l ''O]tې`I~,, F/8ns\G]>͉~d%Etgk}$EҲ" Z` xoGYU&vIAAAab"$}i78a$5?57ZŠ$6 wXj)EsH*AAA uE';d)N2וQ+xA>]9q[N¼DLZK8cgR.cufR*gdp|]vU]V     芘⮐Hbu $>ݓmTtXXQH4b {uRv sX;)IѸA$ RM:$ZCV^?ւ?(oQ}uAAAa] 77f~ZAIǁ^v_0Deim]l;j(IfFfzNU8lzW-MN@Bj"v I   8\:@Qb_\/t/)i3;x>fdkJ1U8CAÜxdţU*xlI1 s9bFR5T:=8z)N2͵et|ΤIh4>DA*;v ^L&;XFWUUaۙ:u*ln|N'#}0rHwCξaA; .?'xiӦ /uV$I"66j$Id2Nj/Hmm-o7z)O')) V; 0OS3n&{9mۆ --Ǐ#tDGGi&ZZZxx衇xYhUUU\Aj455k.B9r}ɒ%d]O__^V|?7xŋS\\LǎZ!'; pbÆ )((8}RIll,7pyTUU1m4zzzBƲpBN8SO=E}}=x^JKKIOO U%!!܌Z]a0Xv-wfs='`FF#N/J LF(B.# B|>$IB.s.nLy7Xt)Ǐ'66P(JB3ϠViool6_$oEp!ɐ$ LB@k7 !8Vnf2e _5k~ jF_Wz=fn}YF#E8a‰x IM%٨w{x`[?NJizW-H[f:m pRvRRR7odx;{8' pAo:Ef>tv'V;{lmhtwAΩS\w<C!ުtw!,">0qŌg}I:sd3+u!&U9n%VƩ$DE  L`f EEb8g~͉\&,Ӧje%Ȏt៚&=*Ϟ}z?M$ L+؄Еr%)єD^abs. 0<0mcf+`mCDHLNL$Zs3G0+h|j0hƢWĵ+\&D. n7mv;TV *x!tB qNihZ_0? REfx|kV~f͸ O+ BH Iנ  W7m,)o/_IAP`.$48JɓTtw#}xph YZ%51ݑ>lAB!޵;KK/4imY<҇-].c2" atA (Zam~>qqPo@fJ['OSp|]V+B&ɓ)D>R'Ϗ ˆ"d24M!Lpq$ ANpyyCyo?8?'doqQDFшB.Rh8|><OŗΥ$1DBT:bZʈBpEA+V-wp'|{ynv67G xrbb>ϗd(r^nHA8τ] tU8?|j5NB D 0~]^NM_"ݕ|v,bZRHwED<@$u`I~"F$qx!$ ! $I|u]/1  K  ̙$,:oNcfO`owp~ .h|@ ҧN"*(IAn+)!;:ҰM&yhkWgF0jg [iwۻqW6I654bg 32hs`v"BHp#JۏRg  .:zN:um:\~EӁ^ {ZO0jTNETnb#G>ǻJ[xr[;4Sd!,mpƍf7A 0o,OnA{x|$8܇B.euQ g>+yD 2;3.,s"}8  լϿ`p^ks9C^sϊ?0wW`{;M˻&^&7`S}=N^j\WR顲;_pWiC. 5|f~+Rȉ3g@.k i pc|kٲ nWksCcmpǴ9?+8^=~rl}4`($Iq.@wz(rTScj)r@0WQA!BCNSOۜqy=|? 'N+O=/MgdÚa2 դ$RÜp7$d1\z\.eK>,))IIA)pppqYqV7^:z}dDR ƧNeRBzBDAN tVZ]f`03BD2cbYS4K 4sZ( oVZG:;;xJ3U_&+:,X@nllتn ?Z nzJ iQQ|}bl^/.?l6=%/^L}ru4]xCPíHw_A1vwѩT#n$N*txh \Fd{i:v*W tsl;oFJ \O,W+_}?mv;/~;J(uGi0i.Q.aTGm-::L]{OS~Χ 1!TH4jQ)5edi2;P edXWA=x0trNˢ01V,OB{=uAA>v;Oٌ>vQmkqs\*9ɥdDPwiIZnNZl9$&ܑ#a>ɰ|t$-6ݗ`q8n7<`yc2deq#.YȌՓ8]Tx6y F>ZRMIJyAaS+tMOm-nxa1d u}=t,:by=hpGuf3^ OR&#``Yvvaj۬= ,vDQLI?sg .yP.תڮvEgRIS p0]_g޽,$^ [ۂ FAAl^/;٬~ [iY_BBlnjWjΞ ?\CvL :~~z{/hC!6>-'sϔ)amSt8xOXp(¸>+  #?=J!DNB!,K!LpP(]Apgi)nHp„D73(HHǢ˹glA>8UҼ|ʱe:dG[G!+]}wA^8~kqzF].s"ުU4Z,ؼ^^:yEYYGE&pux.j0xc' L SSIqҤQszpht*5 ?cʎ+Sku`04|T7,) onS +)KJ¤pԩam7'&Z̓ӧǔCNL 'RdGGB\E KoHY WI|}z4]T[OhY9ƭSGP)LH܅(˼%nׇ H7萝' o >Tោ㡼Sf3cr׋{ka2%9HX⭷$tE>Jm/4|p6]A8Eŷm)SB!l>ڟ; ah%lisk[!CZKIyvZm6:/1'Uׇ+|0P>-`^vjeeڌjQ)r84A&a&D{xH= =DAAvV*ڵc7 ITY4:_ZEcmV z֢8U5$>+=soW0/==l Q**豕A)py8gd W0D>+@0, ?ؽ;lazJ k P+#w$nIr,'V7?glAAF'$I1upMx3[ifܨ0%%„D ';j2Qmrh>}}MG{ӤIX|s˖ ӽFȂV(X_XHIb".fM?ܶX~a=kPTqM^Jz+m WN/?|my앃TtZ[i2:c?_l7hv{k~;-: Iѿ?w{"}x pUt8BvzR1Idwq摺Q*I2>|6/-Z I'& oBIĻUs@]]}X|YDze66z].\~?L 11ai>ɉ^W*qchܬldehtی3 p t D^:yI۟]΃*{^;/+Sss#}x pUt88_+*r8= qbQpPA&4oңLؼ}a'Q'Oyߐ$>e2jeENz를jk lkl֑<vgǖ.jzY?Tg%*՜󲣹Mm=X.qyYZʯ.}JJMMᙞ/\]"_$2c d虖K}C-}4;9mPK6zlȀh (WTAټ^:v<>\~Κsʡ495}XS;q.`v9~1IPcu`f4T_-6:~ WOӦ1#%%m?S^Β1Wn3hOV .8 徙sdtV:8msR9Bɱ+2xcxx W Ge SIDAT*!,.ziD35-4u b  \Qdz*/9o鬛H2Fjkh7j&5 M45UYaV$^oSUZ-RmstdX=JEo7_y}Fn<9l~, Ҟ?p?`ws3&: /<+ְ֠$7=Tww`wRo~T ѼZU=dOǤV c•m§{zJ㌨rfǓ%贻I4$Eӂ pΝ\[P_R;4;ʉY۹x2FIO4wH%hJb?XRvNNGNGzTQ `B"#GH1/5vGi):%c$!LKIJ J5vˇJ:$h^baf&fBm/+wlF9E^\„f-=ljX9 Ɏ4%aOC/uq(n Uh%KJ%aB3[iBX9ަ<^o7jz1LZ-qP+|m58|^8춝>/}ѷރs5I:|C~ W_0ȩ>1ut~\Ew7My9)F%`C}9QMè֌980jڊkYm8vw⸄q:Qj5q.KF`f<"@O4jXD^R!)t*fgbNvX]ˍS2Y\߾n* k uSQ%ZLqAq{.3,.!J&cmؽ^772/+E96]65Sgӽ=h]zgv8DGvXhrpP/BʁW2[[famwok+TV #ν6$ls)omFTG ~9l]rwp% Ǫb[c#h ヰr }nOnBLqύ7Qo)Y#OD8K: ?;w @~l,ܖ7JQm-5}VX͍'7.C-H>ւ4RN}VRtf$Ġ?(1591•yam  aiՁ`kc`Jj? ?xI&<{ΰ%*(sh9JFMA8Gyh v57 S32M&>3coP0ԑ,bYA!92%lmruA=1H91 DT;Lj53;^\x*윴4 j5e;7ΩSQ]ͭ'kiHz{ў=,&d K;6}Ӈ$D?|Y?•y}JSH0X}~Nt_#YYdEG[o弜4)dᲴ-Ll"@Ar=. <YVƜW7Kqb ;sS4Qzr95͍l ]*Lqu/7{%%@U#=fBӓ`õm[ۋ~Kx3{RR$0+t8P[,l9 ⍊8}^z=^6tqruf =a;th V7lm [ħKt7 n,SAdZ~fMt]@HV Ӱ@ÁL&͓ԬJ&5^yY9pL!;.Sp{<^Zȋ2Qf{V,n711LIJ (8pGf⅛okf4l0:li󱫱EďbK\A腏=d:!/'GlǠVSLqb2o<RM&Znd2תQ#aeV˼t楧SMft4MX~1Z-Ǻ,2M&/H!",I'&8 _y{;Z]w]XmZyVЇqJ;@ˁB.3s|<Ϛ'`wc}ؓ՛H091^^rŚ͊*w(>^W>\.lYXx؈^&h$e#N7G<.稒8&o݌e4bqDjxÇEϿ7wr+ hqiq)62)&꒎׫a9Ӓ+Dk4"@EY.7?G!|l^/:x'MB暻DE?0w*+ž`Re24S(IN Kk& 16 0oje9ӻvŋ#wq|n찌jR&#FcYvvXxiqr{ӡ7sY1K<7)=?/`0jSvM-ź+$A!˨1^R@^sx|oժ/L b  ѫT^Z䄄di?ۭ/_ !UU~o7.ŹX S8c,mOKKg[]-F_ K?J(-/'NFuuDΝ0>LNVt4S}Z[pn9k{vsE/p9{9cI3hQm?;3$hq9ouiC닊g <ӧg޶yAAYOOGH|p`RISSf&233IOO'>>cǎQ\\Ljj*{ \GR!I̝;lق륰֭[Yv-B!e [2ӻv#xpҰ[ڌOΙ)?ܶ/`Oihfd WBDIP30*MyWƒ7{PO^L `Ʈ]hkknVV\d"`6q\H|ahHMM;wj****jvZV+Cеj4iFk7!!L233)//';;;Fee% @ B@&?> 8p&,X01}tʰ|mE]mw7O [3.\#/S4=\6`(Dr~ʁe ĨǗbu,'6n䩅 Ö8>xVlb4l6p7p88q+V 11P(lpP^^Nss3r Jtضm3gΤX9_O(vMQedq^"-f&b|=0N+Z9s.t7VhvlBAjkk{͆b!##\Ό37j;̟?%Koo_{%55?466͛Yv-h4L)//tNJ"=7߬_x8ŊtÛePk 3.ϧGVG\oneaSVh539S..JcMNOQ<>y.^~eV+r!ɐdďcN8Fرc ^u$I"77_:u^x|If͚EWW@l-Zn}}}?Ӊl&%%JEQQ7P|L>+W7|_~k^{5oNYY۷og֬YL&N8=F#۷og׮]ªUH_;7jn0T鳲YǏ.KܵK/AA͊ H5 ^XD_%Wb+t_0k'r23%΄I4@Qk B|XW5$^Rv:E}tttw^J%6P(Dqq1g̙3Ǐ c…>l&DbqݵJfeqqnjbr89Oln߻XȖS]; 7i$f̘nvsI֭[GKK ӦM#// .\%++ Bn?-LFTTqqqjpݘf?λヒn'++4\n7ނfFɓPGiJ*neSURrN/Y\V F28MB6 dbZ~rE+V`v(X0={`4QT/!11dggo>:;;%..Nfc̙XV6mݻ BnvP97ofǎݍnܹsE~Mqңu|qI1q'AOZ(CQSSCOOtww#IÎ;hhh 4L]3SbQTDGGc2VTTNGG`Ǵi(bc7/|Ұ˕lojbFJ .?s2ófJ /$/QTRLMkk+eeexl6N8b˖-vmvm|_---:tJ9|0 Ip\w^oΩSöuUDEEb0Icmm-X,Q͝7.֮cܹa9ZUEib"MFSkuRi0j4.t}~O&rp./>P_0p}S>YA^趱z=:=,ߏ70жp:G*M#h$hk6XɸR9i 'N0ut:d,^ՊJbժU̝;\v;մmF ѣl6ҥKy(**ӟ4?00^l:6 56s.x(?mwPieJZ }./X։V~4*IȜ4t|nQ! sûnGA.jٰa۷/~M6z̘1ZMOOYYYÎNZ-zB^?gM{}}=%%%$$%h8S/Yƿ3$I~磔9j ϴvO6w_${hE|6OA]_/GZ–%>}pi37reTF#mpZf$˦BUYYFݰt: xv뭸~IMMEV/~ >Ct:hZFy|>fbռk;R[[ 77񍰜"Xf |w}PSS磴L4 V Ô&jz=JN`vʢx$R22uuOJ/}G^/s BD! IAIbG{7>S. A\N͗o2ȺlOUw'}N'Mi<^ި8NyȽ^\Lz 6q0MeSq~Ϗ?{IA! [B/<`Z7Rjf?ufqZ,deehp8(˗/'>>~qDW \|j~7/^2egv(=mbu#f tجDtUwvs#!Z|PQoc~Rɺ4#zǃRdŊCrJDFFvt.>nv~am?NAAAXrzWضmzd|>=[o1{l^z%v;ǎlɉ'룺n7\s vj+*ȼv6OtRnKv{{0yrn;v?ߵ/-^v\on&Q\_0:0@y q:(Fhi4T=Ձ}+c):bځ^BIVK?Zȍ39&j^d0t{yl\4 IPw^qwɑf/Wg@.j/^d2p8F1Llܸ믿'x ~_SOQRR"F/ :oN.Q^iE% RT^9r]Vt<Pʜ X}8p+W~z$I7|… ٸq#w^lBmm-.:Vя~VGyn^|q`ٳ۸n7jx<؈L&#==}\DZΚWsϊ+W[g %tK ?t_/EIjmaI˺RֶbȊcWc#g+gfB sͦMe<0dMj~0L^>` z{@XM۩"##>N'$9ytMlڴ)Sp"Immml޼rz]wE[[c֬YL>Z2NjjjMRRv{w~id2SLg ˅l`0Hnnc_k+k[(U|iQp+?Hjcmŏ黡OVDZQ]_I۷7F۰Lv-ZvȈQ+2=dV惺:tK }>vìZIk#GFӱ|r&O Msr(fϞ۩Cݍ JE\\!&l B d2P)dUtjrJ>#nph1CADEEHbb"A̚5kt]^~ߓԩSq8< bCYY{8kmEhoEMM lذa&B\?q?v>n(dZUw'`l쭟 {q 9ma6$f! Ǐs3|oSZZJ[k+tΞMTTK~TN7|g(Jؽ{7Z>h4`FP#̵wRQQAYYF%K0g~ӟHYY2rRSScʔ)b٘4iUUUb2(ZQ.*k7&&z-,Y2ZOOsRgsp(INE>ʋ_R# [,Z-5$s?L:QmꋏchnBE9#} [n;QdCk3w}JUv9ʕ+kGZZNӧ@ղpGN'JkWP`49z(x<ٳg:3f$qф 5J9J7$ dq7֜TxA:n@lIF-Z e4H]^ bJ h4|_,yG$*G}JKK׾` %%$LZ&))'x@ @I|uN3H2;Xnݰ7Oc}y+2R{!_g/fRR2)Q qihBDnq65EOz5ֶ+:ixrX۞MUwM}\[\2v` LFt$~abbbPjǃkjA~V.swzILLJڨjyG1-OhHKKh4bcc״qo$qWL yk2o޼aݨ1_g])SlNFn:iiNwTtX]7UH<0'6=M HrYQG$%_v] u1 ,(IX<E]>27sl'ֲL8d2q}^.J\CJ g]wK,9tqBа#b5a(-SbxX )&56N[XZĴXtJ%<QنwBIJ4EI&~w`sooo^$ʯ \NvGYe2%%MjDGGg?CR2Vtϙaϓ >iG.8^{-jO0ȶ^$e-ϋJ Q*^vU)՞|eʰ99)d?uKQ? l)JL1a#ɉ'$I&$b15(G! >t1h4$'$%%azqIh4W^LihVřŏ_233-(,3:lnZUMN秼2bil(1)qa Y3`(ğ9_>?={$Q>T9\moeaN]vۈm$IyT_磦=r\?LFJNL ?9B-/4Eg=(j`[ ( +*B!fg\/[.R)r3s`0$Xw )S7NEB7!00}5 !IEСqѐ>8sB. ]ձ443HfjK(x>^ZVeT0L5(v 8 .xzQMT]HN nCD}pXIQ۞`ý :Z]L> ߵk\CS:OgM]Aa=QZ @vx/* |Y.-! pٗ-8>3̘ѯT@(ߏfCIYXJe2-.aG2ȐqݤNvuy5hGR:/(u=93#CZM0v0qX&};n732`3n)<~p0 F#EHXM@r*ܺIX=lg-v^&ƢL/Ιn|$/WV˹eG?^k!tAA;w#Ή!gmFJ Pwjk3[({͸YJm{i4 % xv s~r'sϒd_UPF$ ϴ=;o *u΍ ۹t*?޾&p٘jn+A;ºه|SYjTjq n[17- O ֡kk d#`Ҽ|4Yk £oG9Tk7F#F#Zè\]mw9d#ZZ=R|LCm>vvV1+1v̕%rccVRgyo0%%|w d2E#a/\^%IEw& 0o.YBuo/AIBq qq'$To$6Ң>* rYW0}Gykzx^_i3Qe hF z݁=9m%}od66i7v6Frkc3 %eIC>:{m,2sFJʘAu()QWK-*8aZ0g;xf>;1PpĊdN|zoxRRqb/,g8A ~JSw _0F~{0oTWssC3t̚E%X>YC6j D.pqWW++C(r^WR:YY#N?h{+qonHFt u},L*J8֊NbNfVXʈ5>;1G[(LetFcy{ew'r0iîM]<6w.0#݇uul(.F7L>͟nDMMAdf/&%Aѳ{ uv+:~6֖evV*)NHB;C`O~8~r*Nv1GѲh#ȇ31`k+`yykX=>^WP@xvExP(MHM #3c:n4'MbcK'/WA2cbfR`Kh~?1'mF@bSo<Ά)ПnI:Kj*hibvFְe&Ō\w*n+)#藉^uTeglݯqP}~?iQQ%*OMZ;7 (n[ՉB.N„8@K!.> TE1@ƛ/m`ۛjk},Z@(DZEQ Ǐsx0A"a0֬V BAnf6mih`fj*aQ \~AAZ8_\ %UBaEKI2Fq ˢr\ѱ5j^zcg9Ά&[W@Zn6-dr9X.;CHϢOɅ8|^ds~l^1hJv7ևZX$I,]`^X;=Jߌ/6nvsbtwaqx$똕IA;lihkGkWs3<1~sE=v/ZWVNBR8/oCzA Nmo]]LMHR*%Ukql{wpJ%%ME|~fQQ:u:5=]adUj G͖~.'N't6>/X26 RCy"';`_k+32ƴommMOvJDa_VWo ^_@NOVGNGMM$oBUެXfŠQCKmj{{ȏO˃A=ǣ +8} >yvv`ƺɥ;c]N3sI~l,q̰@HwŹtAA.scXgEshu|{:~0.R~ҠְxTSxFNAӉQ CWuw`0f055}43mZ-LC@55ݿr;df# "K$9@BE~4@(8tSYAٌZXG?p_<)cՂޙ>ZvndH2‚%C&hyY9aѵ}{7_}zlœx!IgwJTū3nz{)NHS{].)@ 6a`Su'I4jOsm>pCyA6VupۆQSssɊMDTTwڰ},KD.QlF.f/& W$azǷ8ʞ\jP 7vm`䲡gsxl>]Ì TThʡ߹ n*FT)&'J7NqS^^/Snޭ r.ONt 8b毇}FFXA^BwU!Ip4Pڷ橙znošf3f)l͕:- e<6U%>tAA;F ţ>[V˺±~Z711d l 0zs/1q˒CkU*e圗,~m|5q ?Mv)::^9~YYƝ;3)) 7 쏭k]6Dy?zet\`/%*jhݲpyd22er,{vtB#EPs;ӡDk5gY~!c,7?޾//]9DR1%5~ ui*xabٷn2cxLX'. g_+@`HEK{t>EF×Xw~ȗUE\:t_tL*'1pS'^|]2w"/z0$ѫQ)HDn.'Dn`ZIVAQ j%Ek(d2nж2 92%dː$$WXAA GI5n'h~s2i0v df[F^\85;?tO_ĜQgSm 30]a9QQ\[\¡ңǼ|@K= )tՅ<{~2E̱4qװm]dbu-ǻyJ>߅\.cSM'Y2b5{fPb9o~b_N^CVH& s+HG;Y5}[mk^HӁQ~IF#>%SgPف? h{WGROPGHvl PfgPQarR s3׏^ fefkwȼc>g](\XшAjn4iLv;v\u3a{GkuCd͖W9d`hX2BJ4ѫv/w2I%&V*<4#|7JJ%fl?Mj ǾKbF,vƷmy|ز10qD<@We,-HD^K~Bi0iUy``-́ \!33=\> *ODn.F~? qHHjݪ|}嚡s՝ӧ͍ƨÌٹc ij K!|榧 B(Q03O0vD|8 4 Ep)]Dku=p*J(zYJP E29ʼnIЫƷbb~o2.l*@DG;/)EK*hϙTA0lIEK|{G&'G?XnS3AYVlƃӧ3M}4bZy3_3ZF֩1!So`PaTkFϬ|1>_H2So2c.[Scuz[c,˿z~E.N8N ;k'bj@~ ;M7]) ϨVcǘ6Qj5;|99LO \8vw^IdfsC_lS}vo 0uSH6t }o$ Ah)Fe ψ($Nީr155׮ezZ#зr?-MGPFJiԣ~LL6PcG^wz`ZMVǂPXr׌z}:Eo\9 >3.ӧ13SRHG`yɉc%Q4l~I{ȕ>c $fgd]qz=&B9Ku>OsUl>.}=yfeiO~5Z兿f6dgjn 6!II|nqUV!-.bF) pet /?2un.Ǐk-]C}z<ʱ%;ƚ*ң.cjjڨ0\a__+h\I\Uݝ4q}\MAa|z^=~HwAڴ1={Tvurݤ9xhL}K7h1)&oZ)gzz,EP. rM^Ƹ)o<}\1uvn_,_R隣ooo Ҽ}uީь4ޭ^{qB!@h ,` , $4l8vܻ\dZVmɊe'#yȺsϝsGy9}3}OPPYd?eDFSk x~XHYQ8FY[ 7 ;X 1ZMǎ!#pA*9/&\K&UYiiSAi ;]|jŚQ|j5}dT|s~q1ݼ8bp{Tltl,HHC Lzgyk8)]dh(7b Tc!ͨj[ml?S=ڼYYIƪڽV^fmAxK/BB!i xo=}jjT<]1ΠՎ*c6#I[:T*J@v;F濵z`(݅wZFMUs_/GiL L+; ݰШiffā1^}lHݎY7nJ8W簏I֟Aݑhqr‰Bz]J5MraL.};8=nvUjLE$qSpϲb>b$% -!6fğb2042Mr|fn;7)!Cv]P;JcpJEŁ%{hՔ=_*δ9q]Nx}>^=]DUg!ͤNbLf">pzh㚬Jnnn"`ffpo=KGejmngŞVc9} I󆱁Wȩ GPo*I+konspF/:~ zVBIqykll vbVR1*E &)jEE%%kntCcoτ?9ކ^~vP528iM= RLFu/mo'%<\b^l{΢tj#2 5]^3Q1Bȵz&':ts34jqD}?(OEGyc_nWKӥ !bQ䰰۩$E/#άξSndDF&51-~n}--ݝa pJxL ]^ex & ɜj(170N˧N`6;l xy*T^KV״^&f L'f|lE!Spپ=v K8?QP;ZMFKE'jgjY9NmqE I,MNvsyjT*2jc37nBѱ1qRL5 9!+kna\ۼ9vI+O?f@pV ]7#Kd O'#2pTU2g|2^odY̅zs\|yckT!^{-,v/n²/lh= vwBKN^T_^GR#">7^=vYQlI4jv[?o*9X[=~݃<~p/߀(:Y5S ҽ^/?p~k;1kZ>[ٮUtԚ3=xoXCBx ]m@p4jԊBt,l|WX8>XFK*J'ݯǏpDk4ܜ?^Ú޷k܄G}hԪי( ^uUtj5Z>vbf zD,(B!Ċ(lj ]MW稒eSUAmwW@mb@s'C[Y;ml-/a}z a{`j?o9PCo'}pYY1v.'jFmөTDLջn獊=x&vU쭫Ҿ9&tCz(ok_–7PƬ\j:cʺL&xp:y1׊pL>xc=_"-YNfl|NK}@Q 0qB𗢢 zyԩۉ)I|@m^ϋ±Ẕ!?P=gyAfw,H&¨g[Y(kNƜxvUbk:{Bբz>{Eh !YF')FTO֠U>xPoqyXSɠEnQ747{G`atYV2So)3U4IK;Z5ZMJm |KR)-xlƧ>]^Nāvτ%:lh綹 >~S\6 = x=NuI{*&+cjrML5COAd}ifl.?Qَ~Ňso?̀(*xq_,'Bv7K9PN瀃?|7a3@Q$8BqI0I MZM^dĸ&m2<-}tN#ZSo/݃o$9쯩p 5Y96?ž%~Uvt{n=y1:9yZ{+` 7**vF#YS6p` n]޻lgP>O J^Aߎw3]u] 8.U^r^?NF`MoVtAv/-Sϛ|q}KW$9]4 ɉKW沣(@nlӣXK|O~.{϶r}n2x.r`6BI ji *;jjbkyiܗ&aՊ 9$p:ޝ|l1SϧVX?Sm.'^4>nn- ,$lo0r{!2:9=/ȒdGQ:ZE쮩a-hG|C odSØ}/`>}NL,s ɍ3Z=r[U̱N1-0j> q&5{OQ8m?>VN|۶= &s\kFͽv|> 3Rc\Cs^CIćP;1jjEAVp{DY7`syXG!RUhpz}n ,h"-#h,]F˖1ɭ~}+_XN?14*&݃.9{TǞJZ{Q8{-YyenʛNͪMULcix;>91'<~䉘WD[]u9$[~s3M<ޟ.V`/fNS9~gř> Z5N{˃ỏ`u;j;H4a |Bq)9X_?iB%J[[ծ;Et2w_HIks>p EMfc?Hvt ZS,OI%de##zm7ṡ9V+9сO7' =E0r {jk w+*kn/백qvǏ}lcv.]gܐOs_ʎvBM>ɍ%/6KQEVT Sk4,OW^>65106bQzZW9yd/%+L͡vn/on$ʤ'=j t:Qx &/27rX=vh6-gy0L#[(imaS\B4]ښsZFBRZMbX`ީ`QbҘq>+#3ܠpG5(1&y>ԃk43 ]"c0!ΎQtJ6ARMpS=ά.:mdGnjy,~ksE8JY bcKʌz' ȵsyx-wq7o6&=0]c;J;yx ߺ~.!m1jI4gw&ۅB\n8weJjtVOi߹v=4Z}prNtXꦾ$[H< 卸|,foW3DuUj*=mLO'r(ȿ'&1iްqcVC58=n:pzďn2]gwln$ekj7AcTqi%[@p;1̚s JaeZ4P(i|hqHs cP9J |u/B!HyᮻVUH o6N9Il+S`ɏxŕ.}=v;! *BÁ`@RӨ 11&;wrjzH2?>1OIk NWednoY|>k2FmըG'1tܖ;S KX/>,4u׼q0׮WEFoQɱ_v[`9$>b5g;;xkІIkІYq>8|Qrb 1밣S 1pe:[HK ~tKӸƳfbE@=˙NWoFD*E ZF5G;]Źj*eȸ5*R]M!ogWM͔M 5:~銫6hT Kxc%-ͬHImetQYNqk3Ul.=M}}g9XOcOom#5}`#,K%l3C7 2"Ȍͤ`d|yR ~>ީ w[JJۚ+>[;6w'_]Eנ7JNS&ީ>[奔Qֲ:{SMvu,υ]^*ƽƫh{zƶxpy<~s$afd$WzEEnΜۉ/#B!x}>j|Ȝ} F쫩bx}!~~#?/I(۔?wd[ppȶjHLm*jnΟ:=1Yjy!D'N58u\UMV"1@]͆~%Yme\3>>w(R[qcgѻ F91t ڈ1)mm!7fjU:"m )Gh'9\buNڦtnfB!?ny4/KKE'nӨ `KE'}‹Z%["-Kׄz}>^>ubi馢udZZ(jmYmZ튧NRh|w9dž:rp~sRu`%D*JYQw:[ F6dpv'v11832#+>l>}JY7f^|B@ϡ( 7OsFwTH0_ߗWvT@npNRqS^.gLUkPڜ\4Ө|0P>9L6}k7ǍA1oXtkj5,^yt:[Vbzxhii v7 '7qQ+ TR¿Hhp] LU*z{(lhkBX8̧6@j6͝+⧻s̱F_uW'_ 0! ݈~1msb-}΂9Ήz>f>+>d9O܇^fn7z:uL' WٮVl糛7m|Nf;1;=@W$$vY\~!,MH@VSAN}rcbk44T)&ԌQ42t\N{{ɜdb+Y\?hjchv5U0L:mBA?a22OJx8\¦&O]fD̛ljfL!*DG@YК감qpw,[w ^f ~\*E0 'iZQ.#31i.UVfGfZ>oZ3ӹ}>zQ=n1tZU yV\4C}_]w7Gt~ۍ{ЫU1M\=kp Bq*蠺+v=]x0!)sc uobUYop>z{B5ݔvL-a91]GTGgoYּ9#cYR%bw t,[>qO77xlתTL0߶laSv7'|un t=˛?t;B!e㖜pykبr]礓l<$)eT1,%-;m|Mkfj!nՌKatͤ.eK'mwE7֮}__7qqINL]]թ 7gx7{nL:(7 :gwA`os9=~hT*BxL٨Q7JNk;]M_{;/Ĥ lNηׯ'Tx_zub oWD WZA!k4<{Ԥ5Պ2*ԪռSYAg5xO45P7QGn$Bq>h)!!_Qkb^+>E Ջ>7Tz;@ eŸ=oDu&;Nj5oUVr,(~fDڟ;uqM7)-}vN7x鵻xX-]3875kB!\Vdd?]ڬOϤsF@uwjH p vWUagp0c<%PSm-1#~V;}]sM_9q1̱X4nw…TvvEIYS0oܶM##em-x}>b&.^[BaC>}%;[d5bi#On8?[**ի*)f>7JQ=N7SުVMzj:%9,BE g5L^B!J?x>껻 {acV.^,:(Q .BBP E-Sdg=^qSao@I;>NwZxtKuYNFdO="Q{>bFe aZ}шnbQ6^-ksa ʢs`wM!$HJs7Ok䶊Ҁ=nmZ:^?x۝?6mm'PHVT4)Ә[B}ww6y7@7aM=?z|ȟ?Qpۿ>=z?gIR2Vc(ڻ\':q'&SPGRxe?pqfvuRQq3ؿP\̙NbB"z{5kB.S=_MgMtRO)w*ZEB,HAGLLLqQx<z{{t1֌`wW1 g_/&Y\S|tve$Pm $[Acof}`" pxNwn7>Fz=?^zTUk6PQrp ;v^-㡾O b äXl.9Meg;*E 5†:F#jyP(oC^0R1jup 7\DNDLՊa&fGxiןm?q֭[/wQO Z5>UxqyfT7BKSǏ jq,^P`MLId-Ck'l{3xpY˗&%NʏZqzsǞw^3OO[h}5];ހ6t5hcEJ6VI;yн11̻Dnz]mMsG8\Y Gm/ok%#*5E~A5pȶs#綝 k׏G-LHË9NN{픷r"ն?F<8vgNaCVݵܿpa@ ЫլOM ]fP":6x9VEMA|x&B\Ңn ( 7g8QT}h6Gk)kk>l4KuoJ;TwuNk=N3#:dGH0%8Lxd: };/bk-}Ș`c9oѸ׃-;:Keg>T~|>V'C0sZi$vKp~Qՠ+x_,΅ɤET!S<1q a~JZ--CS) QStKQ3~j )UiԤNTxH1&sM&ReR3ٵ;JŢƮwΊ:%%v@DSoWefsJ ۷r87]QȊ&WA^? ɍ"P֐"[ #fM u\/\Oo_Xǖ;nB!ĥ"l[}ܪ]i)56U*E!Dy}>TUb5GM3X#*~㭑Rw8xLy+Og~E%2q^ί&b $.|ngs&A'!,3f=&y >|555hY 2%sϢef.lN']еx}}> 0r-[(Iny D&ܠE(U zb!D%8B!i _]3'[ؔ7w:DLM8޾4rs;=B!!ܻx޷k:l6>b^M(h')ƽFïoڅ^KEg(02Q\ӻ+?.s5#MͬWm[8r#cG;g]zQBB\:(#"0}} (k@?6Щ/Iw8 1|z1~v~Yf3qq554ک{v66(%sp8 fq*˨j~w}㡴T)+bP0m qFDX?Fui%yV`ll@m`.1vҽ`!>BZ[\OEtk(<#*gX8hba%xuzlID:@Q9{б{{ ioeB>c?H5~ok7!4X5۫XL ÞZNA\:fER͈~!zq]PJm*2W}.R=dmM̏G%S:Lc1&+hT*RQsNuNMu!?ׯG\>N;vY+RR&T#?&}gMrK4|*«j5xBBTxum*5PjJ5ZO;|>d؊7$dxVO}lxuZWhܸt9;:lnd5ӽv'[2޻\yڊiV芢`6 E\:W![$LZ]@m-˧cGHUFl3zi6^nIe6p{^`sLhT֘ 5aԍ7ϰ`2ZK؟1Tm#lõ;tv 92|cc5wɲb|~]NKyew%B! `RvTWvz [90j[A Ie>p u{^ot)d\)vI3tiloN*v֎Ee~ݝ쫩mf;5mh|6;^ jw#]SU0;K'ɗ\3oA4Kt!Bܲeh4 2 h9i$[t4Wfdx ST.8PI!﹚n\L[ԳkІrϲbrcɏKa`,ckz8E@VXwf,dz{ n9EĘ̬R9۱jE!4~^;{dDnOtJ.W=-VQFFE{+ }^ʌ,10}̏O xOব_Z\ }} 8Zۋm>:D?&;y^L,EMjyf;/⅓2tGRH?{iV+?}11e3+ĝpyZF/ DRJÇjχ;fc m?TB!f/\H4֐^fʯw5Wz14"zQT|>(*^/*(x^4*EQlkV o;wmۇbmZϔze圴Q3B6LrWAF3ڭhU*| MM;'WnԨ h9rN:^/ \+_~Cgu׋J{ͽ_>W+ ˒R8XWCE{w[rUZO=^/fdԬ ;Mys9FκL=~3٨q QT ZVBbmeܵ`1bjɋ"6ͥi`6ok h5&4O ݴ oulTtA '  ED4;Mx^%BqΣ> F)c0: L9#s""RZmspǒ^,:9yuw6φ~5 :)QcoYZeDHXgY1[Ha}x n癣IdmɬRO,Zqٳtl;#f 5sRRTwϒF^X׮'Ҥ.xtcw 8^SDžɕ,f>O`M;V;ܦS\U`1 4xSܘYqN =ZQrhpmŬ͈Esd$=HAAAqQ8ɘS__O<<ovwk'v7+eKElt{:q;M ,IZMe՜K"T<[A΍hYZMBPfř<>{IɎ #WnlG?kҢ0 aA~n Z5K#ѪU$q{|<^R#B}g(oeihvpmn<YfZ{q 8(oTS.^.I :tL9Qik !ϊ<[O"ʋEǧZoi' ah{9ĥa:y&kj46oZI^/nv/["@| :*ãԱz .V k8CkU h(CKШKӫ3Q>tG^?AuG?nnGRkT8\ޡ0r1l B!.nӨx(nmt.T!+HUwuj:NiʎvZI6 dGFtE]Uy2I TW)l,ں|$K|YK%%,~q!hX :,s"Y1'N !h4|+QC7uL34h9oф}@*Es^5n&Za4ru BEY&<%by}"H{F:ǭ~N 3z\3}+t4j5^Z-bEOSѬеjҢ9>4As 7h)DR%,K B1EEp9Ģ[FDd5bcjhW.;:M nnZRf=E=4y՘y\m4 YS9s.l殂ձ&9ycoWUQ67z..0}T47`Nϲ(,KH 5VbIrKGGoЪܱ٘)aV9b+^L: 7MI<7|vmsm Bq 'hf)L9-[Ӛ1'aGe9qD\0_QBBFm0O$@Ri;F3:! f?#q[nnPff3j $7??NUW'bb<c4NѡY1]!qc͓'}PeG;]m)-fY9nʛovmg~pK,~׺^WDbWMM*:;W7:K%%$TFwG[|vR~gvrsSQNo֌ !wg~>}} \0r>=NE r|Et JMSoHɹ>~èBl;s`]o+RRȍnrLlHKcnL &W8w2ا4ě̈́tTtv5%1̊100n J-H!LJ"7**vGh}-_jcOe{*3XTUrCN>Vv >yW8}ť@}=F#/XO>$37&ڳ<So&zMl.\Q5[+jYvyf:vB˒`I|esi:m6gȴ͉-\›%x>CBPΛΞj Ũ|D.d4xqy0Z3~{^>yJJܲe>W_c3ra0 p `@+7$@Wn MB#3"dS)q{/gA42_f,ѡ&*[ɏdo2 bcN\1L˥lc 4fCM>Z"vn:~fO>㡮NbB:l<} mC $( sLF2C'DE(SdfQSSC~~~0̱Xowy̛Ǘ|8$?*oAFco/ܾEqqnk7$j'QU`s7e4=}t/lقJhc#y31^^ŤY,|nfj5CFE bc޽wt`sxxV##yݵu:e &bq1 ݼ r"#̋dq||@3Yps/ϺѣGYx1Jl:8hgnzp9ׅg),,W1466RPPn\ ?sϓ`wW1zbٸ__}% TS7^9uksH `Qb  euLg'ѡ#صkw\I]SnC:-uPC~w/)]P0 FCT=<K 6|tv󧧞>fNŁj{AmWߏ=8l)id)B\z=;:l]Qƚt Χe+j"SZ4ܓ0knB'&Jp>M_[@vj{zu1C\ճwtɶbk'W3 ) !~==9D˳R15l(!8y]55Ą`hqyfqW\vҾE\Rc^IB|͝tϔqϢ:68_  !jX/'*jh~Lo_6mhT*};? M e)bYhgȉ CWrEF m}RJ[z1Tȇesg1']<ˏ!;XdrH7FC'W EWrߊt <¯w1 =FW_9y|xIj_>!_7ok֍wneZefJV?6j4x$[=Z̈QZJÁyǛyo[71i^l,|y?k y.kY0|.~uAfMpO؎-aqrHsbZzy"2dFi챑i⡫x_)ccnzŝKkT0NEVѪp@RkmfТ( *E!D$sy8^:C͉ZQ7¨#¨Am ǂD噁O!%vӎ[(ok农| Zm8JN0>jܖv?֮E}^ewG$\p4.x%KH ii!۹`wQ0*@'ܠEVk'b="-҄jmv<^n]F^C[ׇsIxPn/"BiL[rc5< /+ w!ȉ$lvb-}}5,UƝjnPY9zoF=޳w/s jzɒ`wMqf3zQT>iKwI7x?A7\_X<]3ЬГ-FΎx|4p6=xoh`u{϶p{8VŇGuόF \n ;TV̉d~S1|0b!j2|mct0FI.|q1q /ׂpv+BIUsy|{zf>+;51 jN.X:^()w7]fN}e~r5̱X- ?fMf ڡN)PeƠQL^%Kxx`wx<1>NX3]!$}\v222]d=z(jkk ::f|gg'O&,, NG{{;$44Бc8qD[[ݔvS#,]³'m1֊2C)kԱBV$C]Ȋ'8Ԅ^[;vg2LNd$8@S?`nCa!E(·y0xow80UU|råyWHNT*}a6G~ϗ#FMM .^?Nhh(;vhI{{{9}4:H__@R@?'ODV Ǐ`GWffcYX\Z"  쬮RR֎jkB""ɾ}t Ϗ &9BYG.Iߋ[[KxHؾHUURVFJx8ܾJɖA}}xIxC+D_C=lܸ1]O~y.]G>~RWW`{6mb߾}FRSSCgg's=ǩSկ~g?YyV^MUUgNKCAz jp:ѩ(ƤasШTU*lN'&ۍ~Pg:A9N'z=YgpF0G[Q\#VZA я \*n, FVXj*T`@Vxزe _Yr%& eX]vq Z~3?˧?i|IJJJ0|sԩS<x<ZZZ蠮"""_BGG?O[?Jvz4F#az=CS:׋qo7Dǻ.sn7fA Up:1t#h>3|>F:|lJ( rVЪTCqH臏7>w/|3DGFUjQ\V}Q2޷ZSN1o< |C"33_W0o<8tٸq#FiyP]磳?=~@W6+|>v{!H !F*vW_ͯkj5\s ?oANN֭cΝXVbccYd v;wyf|>'Od``:;;3g?<yC0~d~8ۻ::V?Y-SˆJ޽{yiii~JJJpG8U=opmӝu;WcuS}wIulZkܬ,̙3ŠVq:ٽ{7_WQtM޽'ObhooW_ ZZZ7 o&w}7]wE+6ktn ]!npp#GP__o~>SUUG>HJJ"//ۍnW_L ={ʳ>˝wUW]k?yRR${ĉ:t믿6~iZZZj)..FQUU52Dww7]]]STTDII >o|ccŊT0ɓ'9s u]v~s뭷Yp!O?4lݺ'Oӧh4 sNhmmeݺu| _?9gʺ7***x뭷[^9s`0=w322n8~8F?;Y)FJ"222A.!ĬEAAs);FRR---<<䓴c0hoo'44Hjj*^EQ,ΝKMM *eee<3_`%駟FRQZZJ]]===455F\\rr֭[GXX$n&x ** /@CC }݄2… JJJf~{n$@?j^OZZZF墥Lgٳocڵ|cG!.gyZ͙3gӉ9sp]wyf6l؀j%44H6mDjj* oAUU[l;sœFbvR!twws)/_޽{ #??JE\\MMM;vEQ]] 0uuuR +|3I:ǚ5k;wnOvmBAA;n򕯐l&,,3g=CKK .(ŋ 99믿;ƒ%KX|HR1|6'OrXd bEXXfyϟO{{;NGbb"6m$`_v-&;3PΞ=Kee%Vbnz{{IMM.UUU裏MDDќ:u JŽދĉw}(™3gXv-*:X`W&***ا*8hpiB!.ƒ}?t:??[o%;;z)>n'66[nłFaŊ͢EHJJ{*&vZ`ϲ~z 孷r( iii<RVV6]5hCɨT*Yjaaa呟 %fj5pQرcuuu,XODGGh"JKKjt:cF^hs=`|IBCCO~ӽQUUM7ܹs?8\EQXr%N-[PZZUW]5r EQt#^}UwͲe˂}粒***(--%>>GylEaժUdЇ>4r Z=ݲeHnxg0|[ߒ !FEE֭cժU|r7( yyy{ڵB͛7r EQj477\v[r UAD\|RnO:Y8d:BKJ`0p]wȼy?HVV֨

U1LQ 7p|>6l@nn\{x^֬YCZZڨ """۰#ywwcZtC׾5|>ȵV%--Q.5kHII-."@ﵻ2]Jj@M;?i!j¯w3/Njpar VY3࣮pϯaI<'Ҥ=2>ȑ)F!!!r-~G>sss{˗tiZ֭[@^^}, k֬8aaa#grmBOϟ?thnsJQ=-製;-4jQ‚D+߸v.N7Um}Tsd ZYKOI!B!1+0Z{iX (k%ڬgND(?ܴnR"B9^58VZEd^֠ !B!QfwZEvLo50 ]ƠMZA)GL!Z;pyB!B1%b]Q >̀ZVYq̱;HQcQfJ[{)n7!;p!B!b:@IVPM1f!Z<^U$[ׇ@Yk/sp{ϯ}>`u!B!3 CZMdE10ĄJb51Kp{r>:P=?z s-jx~m>%!B!bĬXV)ܿ2Wl5y%~~c >!B!bY3.B!B\$@B!B!f ЅB!B@t!B!b]!B!n땺B!BK[tEQ0v{ B! `wCp B!B5B!B! 0#~7cwy!B!"(CÅ vwB!Bt ;&(::B!B!"[yo^;n/V#>p^)٣5؝D|_ߵ J,`M;91aHo!B!EנϤאm٣5Y6MPUi*6$9l{?KR"014Dwzv!B!Ȍ #C,QKc PωuY͉S lȎ%+. q; BI{짮.]B&׮3 vw3*@_,ީhj5q$b!||8HgI*89ZZQP K#14(!NbZdhvW8qD"jkW,55^lN4*JaCvN~\7'`6mn!B!GAOF9| VLzm#B!BEGЯOXB4j4/`wUO !B!.qAuj:^`wU vB!=}*T*qqqĬ.!B!{*kЅB!B1^~ye}wB!BLwFCXXx=cZ݅Fדn!B!f.B!B !B!3B!B! B!B1H.B!B !B!3B!B! B!B1H.B!B !B!3B!B! B!B1H.B!B^/.+}B!B!f=χ q辗^z% /5B!BYw"9<``[ #`n?`w2 !B!"ps}+_Լ]֟ !B!sn/Ϲ+}Y!B!sa-=4)%tEXtdate:create2012-02-23T14:40:55+09:00W"%tEXtdate:modify2012-02-23T14:40:45+09:00!tEXtSoftwaregnome-screenshot>IENDB`adlint-3.2.0/share/doc/adlint_on_vim_en.png0000644000004100000410000026363512224440633020717 0ustar www-datawww-dataPNG  IHDRb5sBIT|dtEXtSoftwaregnome-screenshot> IDATx{|W3D" A(RTmݺJ]-[TۥDkmz Uw겭] =d$#1w&'y\3g{D"H$D"H$D"H$D"H$D"HUTv>W"H$DbaJ!UJJ%H$DrVA7b~ %D"HARSS<xMؚ/, ;%D"HU<xo+1D"H$I bs}r1!CD"H$bv \YΈI$4|_裏/ ,, ^޽{iѢE-Xy{}H$wT̆<sR'[۴yÚ_C%I 9]vޭx~Dn BBΝ8zM4rL"##j44 GX]t4lذΝ:9Y1״)eee>>ϙgiݺ5eee̊7~VIrr 0ǏЦMw޼y=m̂ ,{EPp׭G1`gyR><9$od/^Lrr2~~~iğxh4vuY#2%O'pY {}`#}ڭϙkէa4i҄EY˿믿ݝozUI$qvQNAX9k11'RBkT^"TӦ#`ԨQٳsiZlW'GHH111L}}*F ֭0 N8T Ĭߓ'hݺ5,,wň#hڴ)|ooo:vÇgϞn?m4.\HF1bׯgsb„ vuY#22sg!̂$VXofniFÙ3g@Zlϟ>g5D"qΎ=juaUa@W[M&kbvزe LJ1cƐIHHl6sqd͚5ǂ hժẄnj=uTޏ? &rJR0tܙf͚qa+7:u ڵkiذ!̘1۷+eΝ;lwh4OӢE*>ѣy뭷8q"| |,_I&Ve'"Ύ=j3؞hc-Hn?FYfHHH@?wNPPP٪U+dggsrFk49wLyyB\E5bvVO?CѠAFu3b9r 6?[>=SUܬWDz{v9g17_Mbb"}QP\PNL&o\P\ <<{9˩W 6$!!r|}}iҤ BNwmpd69{,-['R,5kЧOn%]ָ ??)S0fBLJ*3dUnZqI-lLٛvVyD-]РAؼy3iii\O?9>t2l3 :Ԣi8Y9 iժ&+ѲeKLf3WҼys^0?ޝ9sm6^yUg3ϰ~zlѬY3N<ɓ'_>c^xr-ZGEaTz=4 t H$ۏc. (ѬX^"摝MDD˗-CxT6mR\\̹3gcoV#?lݺlqQf3  -[Vyߺuk0\tH0twg /l2֯_Onݬ |w}?ؠcFf+ussH-"#",2~<ޞmժ͜,JEVf&999h܈lBqI-أ9gڔ2kFٳnu*QnjlD"H$7Ύ=jͨT*†U|]6*d[^"H$:8;r73bZH$D"TFЌΙ(H$DڏH$D"wMʁD"H$m@,7/6H$D"ghذCYyxxдiS\jD"H$ɽ˗>b}UKD"H$u3wMJ$D"!@L"H$!bZP) 0a.>NsO0|"3 G{fR>RJ2z??sOYT׌"f\+ɭ*FIuq@l񬊉aEv07K7ًYw^S/"4sc9.LbZutmT\yc&^< #tte_C};yeF,`ijQ?[$00cvgHL;@mOJg3GEɔ `juŖ?hz[iܸ_m>HNA1mƒ1̜LÉ VݚY^?am*S,3^O䯘lh322DNv{Nw"wYGZ>'$ʊ/$N̛W-:?L.١乫œ\,\VuBfE9BGD,XKfxҧ@oB1/;K7 !HI1>e喲YWlUO^ ^x(,uJ]}B1o}%;p6Qn4wgbf0bĹ̅L!FO-v*g?{*oRV093cQl(Bnw2eHB.ҳ-WžE!XV|a6 a(-VN؋32QSU>d QֺZ@I(-+ //~".dZX3,0iXclbΪ_DQ܊6>/āSBB zm8xɮ-VSܰrQrLxDXqle )٢6l_IW>)2bdϒdg  z@(.[a6h{a$viSU)z'vֳDЊv+SPjz:>^ קj5Fk׭>gfgVAEl21Ci9Чc$tgsXQQn.gOߖ | yE%*kr VK:ơzyqX sWe4^z}op;n?{?Gxt\r KX9k\EbrjUťG:vץgͤ`T]fgE)?mu=,UԪʗ~B,[X=[ڦ3uch%mTT*z32;smZmNAb"_.W[cOcѸY|.V?F]zq<W}xPf4Rl(tE%9 @MU7wDZ䂎 /Wǣ[4*iYk">Pk쟣\NI_fnK61ғ\o4`\K&#rJ/Я(!vftDrvYuβm+*[TBTXbDLJ '~]LeǑs|2~Cثkq)}g#8Kbd[m^-JYڊQMErwRKIp eϛ` :#FɓW/Ap%= mdyN^B $]&ȿ.!,r!`ωd.e!CrxX戾& ꑒSqZ  hd6sEҲ*.Ov kW(3ո\&URxk7BfP=#G=vOиո9y!*`m߆0& y} nQ V9WcK_h?{KiC&;"=Ԇw\3Y}Ǔ.traz/pGgON[|=G0nh r?%5!4>C^Y0ɇ- l֘?-k54kVVEf-KrPQj/;,$$M{s/4iPN#H*ɦHpppTo\[3!9H$5bͮh(ao/֗徆8% } LfC%݋I$om$Dr#/MJ$D"!@L"H$!b(61xBL˸UXʁ>E'gFS];/2kfXNQn-wIm㒁YÊvX?x0i۷[m~)L [sMgaȾGZۍ|~찧ϖwdTd6etCrx9wSY+%ۅKG<4NEM5q"wB @̧S M( t3Oj@vW«]gIw;kY/naDR۸d ְ=CBp Z-n?5ƄYq?G^dΪݡAx{c ߫sX8)B99HJFZ zE3[a?~>F~uyD7d?̚'-,}Ď7[ba|<~8[5*2 ņR&3{SviNE),fF}jAr iddJNTX0Yz]gӨK{пK+ly[_ O)r9.LbZutmf#5ѧΥ1cFVsλXGF<;MH)ϔ[GdJ_qiX/J;\rV}Ī=ŎqDArr9t>yx ╼*GD?z+]jղr/>EČX {OQ.%WD?O$O!Y_WlFH}&.fէdbȔ"~EzvS.7%b]d6ǓD>zwnBmd632BE?Ե=mH)ϔ[]I,qH8Ya|k%\zqwkBB_%|Cuf#g.7}dH8n@G|PšL{qrI"-rDFF=N@k hZ-0e 4gUq ^]:oXFޓcƨhуPUJk$Sq#+_Ov` ֆ_T*Ѿ9ޞ:ҳ7v}:Ujvk5t EVq%OTl鮥5GpÙ MMh?]ۄDrX';Ѵr=LTX0j\fniY JEr(Ⴅl>iݸc;T8a߭ș\qw$$ =ULJ&G#CBzeL҅i*zF*52_U;y6v:A"r 6$ZEހdvHZVE~l_*s]VZ]ݪZURc4*]f)g(-YSPLoV|F򙿏z彧͎j>#O0;;ONJ|pwk1r&jb sp‚r咥zqܢr ys7Cg]JuH.I$wJJ\/FJFL.W{/]tnnjLPrr,Я(!vftD].3%?IZ0`\jRf6~-9"Fo"Y|໙udȅ\ 7G|R٢&>8#9V˷SPl^v^zs~N{9EՌŖbC,d;mo\VO׎Ķ4_\ݚ/ָ[ژ-\29~eF,`iU?3:6'm\;3V`;lYn;La4aK+΢J&m~v9Y::U|ߥ]d=* 9Y|ߵ81o{￯#NOsxsZv a23Xq!KY*ǿqTI-冽8ny+˱wnB-b},JʅB`lPZ&o=%bT{,LY(qTB,XKt-Y_WlFH}&.f ,0iXclbΪ_tgBg^-6eg^A{9sQ`%Dv(]{yfOKYlD̸Ebilmh_|ZV.ŧ8gJv [la2sř B!Jˍ˟W*)A!:#ƾU;m3v Q_ V&Y>$z(,3s Eٕs#䧫zņ='|vrxʱUex1dBZY"=;aJXH_n [Jjb3m̙~rDFF=N@k hZ-0e 4g0)/.\e3_5$W'9njQ4ȟV(6-RD7#׻x+iS١iݸ@q#+_Ov07Ҳ3 zCRs8s!qCcи k0vH\ZWܣ*|jX]ӝ.G\K@X|?5m:-ukCH/*hoO76!s3'V &˳T™\ {9ն\V9/äIуcխ0hu:;t~TW·+zV\~iZe:kKz{0Wj5F0wN]N'zHEYyxVUls偛k *ecr5 @=/L:t[;B2!bzߜV}5aˁ|jzFV׷37^i5vL;e-tdW?8|>K{q.ڙ7h>^ NR۴i+!>9?oJ%+OOn*[{|qFJ %}̙~ո9 JE^OVPUԨDQq]bgbj\nM2@8B_Q:Cyco^,jJzw3z˱aPZ̚2mp>3 K"& N7cǻ[SKqw"blb'i]gWdzFQʳRDhDQUӲDO}p,jjgAH2-[eӆ$gsyΏ;OPTrqCcj$7.>װ/rBI_Mlns_r55ixĸ8 WPVP@y xzԵ+g/GLǓ{$ :urj6<|=yE%U>oljtvH䐼Ǔ-4nnh5nvKz{/nQt߇Qn4a29r"iY4oT1tt%-YSxlzFv;(i;FaILNFܬܡs*2:M7ĖkD7oDtF [n$4ȟ̌4E@`J$#[ʳR۶y G8f5'/Dub8kgA.-fAuFy &<9hԴkBnaCiTeCm+*o~GQ&k>E)'Ė1g%WcOQjo-B^JO{ekmjBYʵ:o.\G"ݡŝ6E"H$LnN6eFU|j<^]rT.O]w")F~bxƒAO#$DB~8z;"1-Q/o=o9H$#ȁ3=D"H$*w~D"H$9H$D"Cȁ![9C#2]Obơ|U\29~h'sDc6'{" }Ɗcᳬz|=NVM]-H`?`6 ΐvdywM;/ A|!vOnCjFK7Eo&>0]ۄwK\sdD;ƌYhXGF<;];OYȟtfӾEcF{)Pl(h27>og*wGØcd4?&<_BZV>gMTXe=[sG?4ȟ)Eů7XG,S`-?C]-,O_f.chvkވ2#g/^!Iʌ&vH!sL#>^e8ЏgWĔg-!p-|!=z'ei/|ohE7_{57eG/aG5;uZ:` grS28v6欶ԙRN(#%J(bڷh^Iiy9I֗Y\;1g{Xj{r]ۊL_=}`;V;9pWAg۟R9S]\XÔ) #l ɴ;-eyM9zjbCbCY977aIҮbZXmx0_h23`\.ep>6!tZ VC} nш)pB&ƠqSO6a>lW޺=߉kP‚ KfniY JEr(ႥlN- Nƕ<}ņ#q,N8ЏƁ~9O|*'siY_epvT0h;X] G!$ zol69fR9Jqp6oHL;ܵDVlTBq#+_Ov֡}[Ҳ3 znnڙގlm~\Ù~^)m&9e3b:t>>t4=z}Om&ZE㏻J=Ͱʇ mQvxM&z{'/p5g<=j,WB|r:~?JVoVjxY@Necr5jNA1uo<_o@y7ǻq%ZF'^ҝѧc$v6b-de-=Dmn G[$V0[kbN:kߢ9o+5#mƥ:nlv;L%^U;y6v:A"Kii>^V^];88k8+堳V;**rtIf&Ӵi.Ww/]TIH/nj5/,HOӆw"lڐl:!q J2nhCzjřJǔ+*[TBTX0xy̿V[^}_o2r oܷeF#ņ2!#GtF\%1-_~MdgEf nTIًW0[j(-Ųt>3s]uh&̽E~uPr9o+`=- %WDM۴-lE_bmt3}:FBzu*f!PT\Z7PkGb[vd#Xӧhc~\Ù~VVyVRIp eϛ`r 2 ;7rн]3|Lm3-Z r 0$]ʦeӆmҠ)9VT:(+7r'^k0Ch(709s ǺF|A.dk2r KxH˷Ds"KYtlbWZw>\ 55*~%`6_ d6o+.m9bNgPVVFX嚦&U餝AjC@?N$WKrMT6m [vx5nnh5n0f_ݶRkGb[v[SSv1gsL?o+g<ψ4R׬c*-/"sv yj^x$vxmd_g=_7xwh쏵ۄp9vB-,ƽrc(-';_ϴEi5À;G5 ``( }0:v)\!,Öum/J 7|D6i+oCm+*o~GQ;mb "vfo9D73GrhF 8zLv<1 {O2`\t7f:MjYc˶ЬQZC; j33χM]iRrè?tv [WҒJ9ԎEIK.݄|^9kZb ['zGqCeov$m5Ŗ>[ܮ6w8 _EژRݮ݌fddZD"H$AY(vMY(|*8H$=Étr +.5OTxIj\X_"H$;DbZY @@_z%MN"bD"g3=*%ID"H$;I$D"!@w7[wg'gHj,C1>J^ѝ6C"H$5%kvO֑#P7,i<Ɂ)HJ30}B=ϔyk=uBMYog|>ᏄVnS+~9J IDAT|uoz60{u '?U멋xc&^<>'3sFr C&H$ .{|ž7 m6TZ-,@@HL 6oƷysw½^=Zp{ө99u1LJnQlݜb_| ScFp%S1*4gQ4o?DZi6g5C{C0y _lٛmC8Ye vJZԻ]փ ̙G|<,~y3' _ycZ6}"^:KoUhCv[&_o@y}Nj|-SK:LVgcYJiHrtf! fTwuo)@_m>H^Q j|l9^fu<ݫˣZDY9keΞLk47nŢV1e㉛Z,H$JJ\ ) *Oݰ021x.OķeF#ņ2 ?֖C!>?/jiٴ!8uC\eИ[칑"blb'i]mUl6Ђz˄?|[i{qpsSc-J٩QCiED"H~gE0\BYAa4+(JEʚ5 y =KsKxH˷Ds"KYtlRc|HIlvl0@CGфlș5Tpjhǖ <d&R6-6T,g(+Gq#rm_+*rHLN&g`GdZ^q")Rf"j(/OW\r s.2|"vW+H$ψ4R׬c*-/"sXпů~q%jh;7! {CFq"Vp@u`jݭlmbVukZuʰ̊M $9?(~s9={N*MG [c޸P i .Ǣg+!a1&Aq мGk]{"C=!/9_s7;!?F݌lѴ+ܜl+ fR!F}]ʬ0͎jv> tz`7c0]|Yyr%ҲrQ\ !"H&L /髱A_A!D Ya=@ K!b"4#B1?5I BQΈB! !BLbFZ$xaMr x (-Z*0pZ0u8umU߲ݸVꚿ(T+ui2n^,ڗ_e vO'8[vjZի8aaWŒU5LoE?ﴕP Eok~A;Z}[\ChVɦP*4n1y֖x|1I-(ۦ8S~މ9p7%C5X`DXByٶ2+ǖo_s{> ĚڅpPVTEI h9v,oބ!8` oEl>L@vn!vyZU(+c=ۡ%N2[gVޞy^s*+pb thQ+5N.7;a}&DX7@zv&hW(rLԤ[o"Z{zL `r9|v{Hޅ1WqsvYy((.!mp`!chw"!- .6tl>MP$-\dUoݿf?q~& Fx@Vn!~ `cia]'H |yR'ޞ)(ƈ[GW#I((.ŨAJUk~@; I~z!b|8S3$HaaH6Vg}Um+PU,mjj>}0a6 b|6r;1}P[Wk,g6aqĆ7t;F.ƊKdGK$Uӌ13b,.5jv'ᡪ\}=}vRl *e]+_ϡWmԷ 1)g]&liEccH$bZx -n1}wBP\LCӦ#qn0۶A!A!|Uc ATc k")>Y>[mn2%HHpɯ1<]q#mǠ0+B$_&& ό :jњ?V-_a!+*puAƞRazxZY\!+y} UEuԫ}y(PkPPTkKJ00tpo[vjO{p8@W& =;Oc=\=5^z})1-R W>OtmJݶK2P"+á˱H{ Ғ2`Un?{s6a3xݧ-? [Kshz4 lI~13a6,مBǷDf@PﴕH|Lj쩵>A-ptq{F}`iE>BW- ٷo5 ]~7 6m1VuҐnm-;}u'pƼq` ~كB7X[CR Z;3ԳS|J%wD&--w=5%m-[u: KJmw{>{ト!0yhWziU-j]GO?r!>kKeg|Ʊkqz:r r[(\㇭1aPy==meVE߾SX Kp9}fVO>]|,RmP>h)CPǗN: K |H !+BMV홪KqL?.Uy1rpUL F8v_e4C=?[y{sIJ5MAVN!&A-0?7pzzշ nXݿoppPVX?@)aOnpTy~AgRGHJKƐ(TzIAP1waіOd~Q ."7@yZ[TjGusuNވGٮ98ӪbocQcH]o<`N[znӴ Kswqr9jo63+?P%G1p9:}BVtm1OuMC{U<]a"5Cƞ.P*墡O z9:jCW-Gd ouC-hkep,F9W; fozs=Ģni膤l\((.Z;WcSp},4̠6hbXݿK a.H=,/1VA.¥MYx@ks±E VKS(-!G\q!&I^pwCcOl;v0+~| b({^A\R[kPӆ`H7tBgnCV&G\j&bDAm]JBNAgf>L4*#}5DVn*&m2yfhwup#~~ NvzA2d\8_O]ۗ\`omE:S4էKm+A6 YU1Х7B]g"am)P]җC907% CXBt[f\.lq ϜC=W W(0> t*OPK,}V$ӆhXjr|g8<RC?BQZ fmJ-͸x1kր]/68hRgć wMztێ݀5 p n:kCc̰kՓYUY L[h^ _ꣵ&T$0j@,wBʟjA3Ads賦8"bHK-oP H_|nvH[ ݝ#nkhZnNjͰt$& V\п/r-8oXc՚8y#|TO_r8?!s6ª0?<3pt8TU.j[w{Цۦ*Ӈœ c/ruogfwiRmS nJ<ܳTɯ1[)KU_ƞgEkoOH`Tf@, D>miE"LBɋTXa"tj,xZ<>e*c/mjz2ZI{ȫԡ 2߿9:Z%gCV&G)?E.Pb{Kֽ s0RN{SD'쬰b |{ `nF9 H^ h Fu1ujWEBZ joFvi 433ATbᤁG& !B:&fB!!B@B!D:bbVVdgرCAc*i^P\,G8""B1m ƔJZMTH>o,\\0e42NShޫ,bQĥfs 1C B`ˆpw6w!R;6Kܽ.R)JJ3fh>|8dȊ"i=p=ܺ+ā]*M(SxM%!B eXin.l >Rn-\iVl4@~J1M@jv֐+ʿ|Mn݃Z6B!Qb,ȑTHKxKHx!ٺ.53s@Cw' ."iiyB! 5 GpL/ZM׽;7Ν;վRLԡB!@5~JFqf&v_!xRpyq}<ށ-`gmaP!b ._^oKWWl`j^I%2s!kfP!btKQN! C!B5—H7G4ps4uB1:#F!b"4#B1XQa>JK*ЛB!u LHTbՏpx)rm ;q7u.7;;͛7TZy'NTKqܰaׯ֭[!R:bbVV:޺5}1R|wxx uλpB5 ͜9>>>FTU2}t|7zO?a刊24ΝðaТE $''cر.l*7!!YYY4(>B!e v{ >Yv5h /lVm;Q(19s~~~TlذF)_<ѣѼysL>5!b<11DG;,١(e=zG֭akkkruQPPPƍq-ͭ!1x &EN|<__:qύ-ZF)wARRڶm?3x Uw||<|}}M6GJJJB!b@ix8ދUx)x1)P)`Je JKWyD^AB\ر#u,}fܸq'NԚ/_۷2Z^p}v !];v q.@®]5] 0Gުz2( Gފ '\5 ;v}V IDATTHP(ݻw1bBl۶Zewo߮uo+WD`` .]gi밲B```_ v>B!=D2'gZ.55ǝ;wUqfذaxw0dȐj ĤI0zBN"ΆL0Rŏ] buH$ |C~z=pf̘.Ko'b4#B1 ߄B!&B1B!!B@̈qj-7l7n?0Vx"x<ʩn]'nק'$2j,եoxYZնen.ƨ1Il,!fj/s7ӵ+lG}XcVIPP\,G8BUj5AT)WUrB;99Fi{/5Fm s[y'Vk;ږgU}c`H}nkۋԯUS}Iqѫh1T…oҤB= N?~+f}S|[6s#6E\j& ;s~;BiF{XW8x1}:4-yg!9]l뼼B)<]M ˤOjv]+^EF{gpG~r*骿[-[ Ά&ՠT2<yCUi{`᫸uV9RkYYX1DK9&uE+b-?MDNA1F݂?FMl?qٹXi[4HZ B1}iѰnJ,pwr8@f^FΕ!wFH s>C:keӡs6r pwÔ@vp'!<3yC_]TES0pZ7GC_^LM&-ځ\ ķB莰Y3dk|Bw'mn`ɛ/* ' $HO@HG{|n:juYWEۺ_kZ[7֣!+B+Maa6T' iCU}ސe7!/¤6hj>{[u}ɶAZ"{a5N_B$g!S+%MV]+G_$1qvUINd,z*=<{ޝ)r&uz{/WeþȾ^JֲF~~,Y$f>]d0fg%26}lKnz7RقߏsH6u*cp2f?՚l_RɘTbueh0+)ς'-aERcCfco>c,9=OZJeeLP7X͔JV9.b|e2[_a~򋤌11Ml LTQe,P5mESfLz8t9]X׏Ill_OS }ڠ̆\>oV"+cWbծum7}=i껚MESk_|acr XO~QA߾˺UG㊺Q]!b"nh @5F4y{ Mqc|933cTK牛֫]; ݝ0o\(\IN#LL Bw'tlABtk ?n8t0JE%4r9 Jt.3CVn! a!÷nHvjO{p8@W& =;O5W{~ZJ0kkp87^V3V/Weub0O{4||?o#x83SR, \7>'_P|8Z#< /֩ުڠKn n s>ABpփ>і}W׽:ؠUcO\I__zBuqEUdIqL $=y%%8hsIUC~ T^u3.JUmХOT ym$tZĢG[>c]Mj_X=Xԧ/=Ϻv\x*2x &EN|m5FXh˧j^~YXIA1Z[ݗ㊶ѫ%4<ƪ~BBzt^L3ԩPBQZZޓIzSK1IM5i7'[lϬA@],RY<34(𝿓XeIuן6ĢG[>M}W"gnCV&G\j&bDHTS}MaHl`Ԁ Y:u `썐!;ä饐vpr,~vzzҜ}pz<i[!)0uKTCDl>ii^sŜ?.ºcxMI\.ǿ9z.2 1͎jv> tzB;BNA1>/?}쉪֭>1>b۱pƼqF9sPU,UkCh'i>mSMESն=H\wCPϵ>7}RML|H$yprvQ3lJdex˵X0=tlc/mz|9z45atbWcǃQ];UE"ΆL0Rŏ] FψãBعtzwg;:JW Y$B!Q׎G@W@7G4ps4uFBȋ. E1B!8L2F !BLbB!&B18qѼysHR3?ֿ9suB!/$燘իUi?{uk8iNJRKfΜ J .ĨQ`i8EyۏXXlZ2Ғ+>}:O!6cJ%n-\&M*7{=ݵ aϣ{gXՒZ//jdشi^!ľͰoWr(OTݽ{w$''ݻFByQm {7\a-(Vnnf8fTÇ ;;;ԯ_@,~tѣGW]Xt)B!AK7n܀P(O?m۶A(B(g3][[[4h@&/!16 GێPZR<]všg@!EF"nv®py,X< Am2d!qqL2 pvvƆ 0j(a„ 0aSNEJJ ZlY_)))0|p %%VVVy*]ɂR+NEyppv$[Ta-["22R;pkB!&c%K3r$66j̘vQh(n.\+vܽ{ヾ}8Cpp0222W_ޜUH+`5C. G >e 988 ''R͛7T.!22x &$:aaU#iiȾ}jI5ڵkܹs.#N0afKvvv(z~@@R +kLf%4nR+((P;jРпH!o֗"'>TiiN!/!/83BC%GGGũP(0n8|'={6|MXGkѢVXQ!\. S*+΄GS B3bM^l+$LAŋQv#jR)\ڴ1FDG_>ϟL\3g 11˖-ĉ1zhvuuݻwP(*Mر#ӑJT(y$lPi .O>ʔJ8q"gBHP/txHٷBCkW:n+WB`o_5݋WΘ3g'W_0k,dggcqBwň#  m6UC˫Nkkk 6 ;vKF O_k)>s9밲R=0bY7΂!BL&/d>N.[RSSѿܹs2u-Z뫝vY|'4#R'1B!#17!B@B!Dh F!b"431cӦM3u(B1$燘ի5UaDFFbҥ7u8B1 ĘR[ ¾IjM{A ԡB!6Kܽ.ִWÁR4uB1 Jsse |Ǐ4xyyŋB!&`%K3r$66՚Fŋ߇C!BH-3x &$:aa՚F͙3+V@\\C!BH-3[Xc*-)%$ybCݻ޽{: B!hܔ)pEUӫFBN!腮& B TL*zr_#!B)513f Ξ= B!h f"6l0uB11GB!Dh F!b"4#B1=6fxzzbڴiB!4H$ <89T0Il,?VBGN s̄rssagggp!!+# @㟢g~(1SLĭ aߤIi˖38y_^@B!m {7\\iχK,Ri0! 0=b۲ǫ~c<ݽ;|ځڋ /^4uBye v{ Mi~&ǺuY8Jֈŋ߇C!BHg@LIt4NvI͛L'- ko[-,Tx<0 fYK4kqV.<[ѮcԤM6GJJ j!B^LĚixsS&Nw{۶!/ _Hbc4wIKXXZ<ս Ibq.xx Y\ܰx J@t)S\^c&Bi ]g E~.KggGήhնjvBq08#zWsL[p3BԽ/d>N.y*00&MѣM !Bt$gCV&G)?E.PBߚ|}駟кukSB!@ߚ|"44aB!1B!!B@B!Dh 1w3—* 1I"S(0pZ0u8/ ]ًMHR:bbV_J? YK=?Y qXZ(J[ m< ݩ4QW䷃WuR~/+׃8S~މ9p7%(!{i}b1U їbLĭ aߤ*ͱysߺ-0X B`ˆpwDl>L@vn!vyRF{hkjLB^6?n;g{k\6ovUP*M^^mbuCwO9L9x W 0V/=aH5{`᫸uV9Ҡz"7BPdby/ 6}ʿU9{R;annS20c>IK!W(q9;25Rm͸0{A0ip0{hlP~)]3Ixr0U>MRDbDl>,wCбU#@2KH·B$G8y˦E!lz|7vZ5 ]ݝ4]փNi囑yxg[ Q hKc^}g5MN_B$g!S+X.3@5!5/8;$' evvdjUy2x IDATչ3˺}[r_ǯDZQWHo*r^6ۍ LTj-Kdl(cn'J nz74QWWkefJ%cRIJZBdfe;OG25{/X$_5[_a~򋤌1 =\ڴ1FuƟ'nbXvR3s0w4tw¼qr9(j-xZͧ gBdBo#yӲ[(ŐnmN|=`keru@reb`̸;cF .pM`m)@zvXYU,||r9xSSz=!U%SR, \7ӻ}YIxgxf~YuwOLuڧi=ʢ> 6jy>O_.Y +%B0vDUL}'lkKsJ^OTkm[C<"'>TiiN!/!?W˗^`UMݣmg>T fpF<"6EvQmwJpPP\fpay3%tBw@i+P޳k+SS,PW&m, Q$Jz吖Ҝ2Ϝm035c@qLO[۹\^7ū[.yÌEj=]T2=EC7O?m!٦?m-^ֺ0Uw ї=ix8ދUx)A$\۵G9ڋQI)(ia{{u2R{^A\R[ |y8ITP*NeJ]}҆rwCcOl;v0+]ed z-0:}YzNLܾtk{,WbuAbKkol=zrDR?oOlO>s29R3$BF50vV|;i^NPU4vDiis 1{A[z}BƢK/_}Hِ@ O3KnxS;FFtb~c؃a5iriT M )!- Ws7uA!FkR$!BUҤNgk*VB^:իrÇk1B!/OOOJCAHKL!BXP*/#j10uy-[/zq8 bbFY=ܚ2‘#ppUڽKQ sgg43ݺZ޽; {1.RA qv1X5MZT'BVz l\g7jwTL&MTB!ubLDհjذBzlDBB믐ܸoEG??4njk: Tgbs +z=%DWv?slÛ.LǍǏ#55UBg@6ݙ0:mR^'|w>Oض gpthHЫk(n=kh`@@۞deeC1w\E4isb2K \hiݱ;1s)6lFÔ)S3fE/_+Vի zB#VŅ ᏑJ{Hݽ9;cDuڅ?G Ŵ L&}G{)n3iefͷb24C~<T;ObbbJZf_XN']/ 0^#tf3N޻]L#FO?d'NiӦx6mƍ-nBK@ʕx޾LZ.FGk`xmLڦuft @FLaQE7;+S鄣ү(quiQ}=Dn^}i #NlbcxS-[FʼLR2 ŨUj EW/1-.cڴi,XmNe˖8:|-I!wMfjJ"+.<0Ldg^ݢ/-+hB!ĵjyZ7M;LRvrΞ%7.j<[' oX>Ԫ oҧ#Ύ0 Tj 9+]T~ف|:}вZލDEBi|m.T* Ά}Gq1t2-"f60K^f*5~qd7Աmq22d>ls3 6=z(ZB;-UBW^!a:v=1/]czݷ;J"ϓe*t6|omxs'<&n>\Ic\rBnϖ]hߐ1/`6>v-"vLcS*/í i2z2y888Yհay?xpAgN<]z}C˹gK_2Ŕ)SXnUاO8uSN%(( 6zjΞ=[rBN--kM~& co[Y==4;Z}]x뭷ֆhݺ5Ν#88?㺴5{n&MāpvvQYB!nkM*跨|;'W9MjZxZ{F#VkCuy{{믗 ”~z) „@pw߶QXOC' UҳgOҥ GJjԩS:uꖔ]_BJzx$k7OB΢@̫?(ĵf OM !B@L!J ҏg]ǎ[t[ʁlzAww#F~U !BZbfsܪU6cA{^xO?_yyFR !BZbg@Ke>`СRG)$ B! 33Tvz~e;DB!"ou]ZFmcÙ/l4rrEEV!Vq vN#ʤill5>ZAA֩SM!>Ǐq$:v,vaN.>ͽѤ{wBSQմZ!BZƁXѣi}zNߟd$vvvef͚E۰Alڻxwo {3fkgϞ*3l0Z+BXb/\Wp0*tHl?_ixh۶j5M]ǮlqEEEZ_- kVA8УPNK!!!q ڷo_VB!U)64ؠA-M vXrrH=rDjk 0){} _]v]ڻckf* M/8::s ^dJJ QQQDDDT]:ү36 MWTݛ-[T& BE@Pd$_AV\9hۛs璟YJU[kݳڠacй;z3qMĔ;8m4| `݄G\\O?t(O9RŠӤHBkR$8y2}/d0`Gbƍd;C^j>-Tn`M}Z̷5:wǹa#I6FGGӱcG^|EKBB+WK.BFF?m2c <==iBaMb^{Լ9έZI^J h0 8;3 CAWsrr"77W.^Hrr2HWeggW)h裏8|0'33SѶ!֠jZhġiSMPh$9|}V\ǟHYFٳtܙI&IMMU'O_<:uٙxBQ8+HOfdPΑyqq-MCB1 q TVaA>ǎu9cG~tlL%9+ףG  &&Kr!+g601M%&uݻ￿mj *B!45l4rlb1͸d j_}3gyn84kFOUW9Ylju.ո5UMRjooOXXׯgʔ)%11qakk˜9s;ӫW/zEQQQv`'?|DŀO)/At֭ +V1U'Biʛ@Tiqmv$j.!!!CpQwhƨQ>|xv֍ɓ'3~[2!f.QTls]y^>(@JJJ Ng4k֬Zy7m̙3Q|8W!PbB!VR@LB! ĄB!D1!B+@h*00ڋ_H˼r:s/f[9ƈWplRI;-B bƌa맗^*MKزmG. _O%50h ny=׼ⷦ2էXeN8\2233qqq!!Y]V+su|Sr&A[k8||}o*Hyevz63_nwVoW=is:s#UOV궳&>iKM^fw!KI.+8FSpmۦTURO:ކ1E<"6|r ]weqѣGW5qO EF%fF}!%G\v¨>8;ո(dފ2A#g{~X8/2ohԵoNLܮX.DM)u:466e7}0JU'oeԩ\|ѣGdɒ[ZOPUh/֭h `ٲe W*IULf>yIۦ,ڰj}WK9t<8N KJFexH'&=toef'sl27pB*LRZȟ,663/,bKcmʪ-ذ72iȉ##Sjdf.B Fu'6N_HفGYXl`ouZF̊o"t"xWfxcfҲrp0ung"tr6y<@=;Tx+jˈWзk3xrHwFRc}o QSb"#7hؾ=]fy'.q{=ze9y#mg# uEm-`KcOJOxw@X-.DM)rͼY+Vwp :<,\͟?772/Kק(O}ymև\`ӦMnm''e>+a^-!%7~91ZEn~aeT04#ZloQ":.]Vÿgy8y.ըmJYRҳ9xR#Xv /7gT* {;=.״JITJEώ-rsP gl IDATh((*f\^G~Aqu]5,8 _j3r*SU /8СWX_ʐg#:E}%BԔ"Wļz.}AAdҨC%V2qDFUfel6 m@!cXToJ/;wGymbcc+x\iYuۇ ?_W!bx07ቨOkLٛ7FK>bŴlFfN>z*^ XVo;HFvj̜| FS5{Vjc2s+ga0qe)| ;ʗ!7NTy}L\ߵ 9>W}ljE}Heۛ}߅)WVkjr?XtRl4h~TRSXh ?>NU#}:nsO C'xU7g{YSeRҳ)2/,FGH5W45+Hf+(*j+KF{& j4oUUZg[ rJ<\*ZMBr:-0\][ҿYDu>W]; Gg{jkKԤ7V}j*HOfdPΑyqqկ]шɄd*y/AZ3pر2EU/3"1ʤ ?;/Vyl33#F's!5WGZ6uc6?vU.~&=GOSl(9GjhJڙv]լqCҸlᕔ:6 .1 ?M\hƚb6OLxz^-Y /`oc%YҿYDu>W}EbR8~6ͫ}-t]XWF-^LV|"K9b3z3Js/>J~a1:2ʕak^m+Ow5qeجLfoL_;Txk1}Ky%%%uZ\[k٤VzUaϞ=U?(9r$4lذFeKX0|\U7ťW+t0 6}Ցvb#| +@ v#F}ѦM7[Å x7vs=W bF+'e![Mŝe˖$&&ݜri=tP]> y@']j24)B B!$B! Ĭd„ xyy1}tk7E!V=bƌ!-&gPzΝhٳk.._a꫸׾%_n<==T| D!BXGUS @`6;9quzYC>zl ĄBzHIN jt[3pn [WWƏ'?5KSTjXB!j'C|BtDYqq]عɴWy{{o>k7C!VH qd,_N+;8`n,͙CYdX]vnB!n3E1޽qjV$/%tcA}?JTYg̞=E{B!DjZhd0pCxzNbB!DT& I=|]˱qq3988mB4z=ʛ91hBQ80[xf3n,YZ'/% a˖<>Ll6{BzƁ;7l(7?^*ꬫZ%B! &k.~mlll!BXbVrJk7A!V&~ !BXbB!V"B!H &Ba%ܬmbbJ ܹyyRe7ݷ !Bj=5p!^-GhmmIغ/Ȉ{+UB!DX Д3GPP{{//4zuB!D}X v(2_xe 7/MWt:,]VjB!jV%%%uZ\YTH84khe\:z͛Q_Y̺(;˗9f 5kP9!B=i(*69ry( yS8jEPd$y))d\YG@舃7]r.\o)QB!De)VJl4MTPT(]B!DS{ I=|]˱qqϏI>p{ڵqI !Bj5F#/&+>ٌ[@!KQi G/i}wvVB!"7 !Bf}!BQu !BXbB!V"B!H fe9Y[B! Ĭd2^ I3 |f) |yO!_-.ҥKmۖ^`` ;vQŭ3dwʕ4k֌e%QdmcƐSoh(=νnFgCxi gc9swڴExzZwܹ<ٕI5kڵSU}-/S4`ЈiݼF6?~Æ r^!֡H p!^4&ŹU+j5M]ǮlqEEEZ_- ѣPc=o־ojMuџfaڒB\\'N}egg]& 9Bܩ EFUHdŕn/$$ه-7mаtA8&cbbz6mU{n#..~e\u9#ɄsCw~ܼ˸4 Rv |9E|*:u냧w 5۷ȑ#UsiRSSEBq+(24qd5l4r|2 ݼVoU>-b2J|]?0ȱ#?̷u&322prrRL:[[[&Nqtt`[eYSOWQk(.*ὴNgCqQ!;мmA=dEb~?~qƹ{Jpqq!##FǏ3g|B!O@̫wA|DFl,N7Pa'''rss)ŋ$''3l0J0'2jԨ2y{@Z:Ɉm{]ş۔ө[Gu)KgoTwptuiPrWU>iӦѽ{wf̘K噄BY*VJl4Kɓر4Ν\>}{Sjh"E5jO>aҤIF&Lc=LTTT< O?i Qդ&DfZ n%Wr&6|Dط+Z댽stz]˭L]lظ[N)S_璘(,?b6Ⱥα#?ck׀Vj6T=HLL$55ww3Tё"""ػw//f߾}Z2WvELӲ] l_v˧ڟ֮}Ca_.gēWid޽z Bb0nAB*5F#/&+>ٌ[@!Kh_֯V|1[Z[cb~zLRߟ\7n̙3c`'O2pjl6$+>^*k=z= !bZCccs6/d tJdv3Ba#v(2BB +.Qt$l=zu߾ ٷo!B+P$8y2}/d0PKqNy ߵ{9\>sFjycѮ]wB!DH ջ7N͛ܪA䥤шzܻt?R:a,ZXk7E!WZTj5fMKnWplYjkSN1p@k7C!VP@ =;vPAaz:GW??vv4уSk`6I;vi|=JN0hBQ80[xf3n,YZ d/yWqnٲ +f3kB!DQ@ݝ64A&ÚVS']/-B!5ȘL0]vocskB!$+WZ B!2Y[!J$B! ĄB!D={JݶW\ٳiذ!111^!R$6f i ܹd݈et)z)QuӲM8wiok.>Æ !bWĂ.+8dY#a۶>|tSq$}j\&ӧIMM˫F}B! :NLbz1 s;;֩Ujg "#6F:n?a-zHjDom_='Ҽx[`k@c?ll裏6mݻwgƌTKB!ŧPkjFc鶼7PZmW֮A{Vdh0kj>6IKMf~cQԩX !25 I=|]˱qq` nFܻv^m[8z^OJ9<ޤ)n=u}/^͚W 'LW]ZmQjnRB!ĭS@l4rlb1͸duOFkyUv DoϻȽ :(ݧkϾ\H8C̡}=VgVrk@>Ch2+V1 T!)o]RRR^ŵmonݺ1ydƏo!Vz% xzz+k֤(`!5)Jjf!\B! ĄB!D1!B+@ dǎulܛ w|шWplQk1t2M_vs ĶZO/T~8[y]snV%4k,ڵkWg+OlϬ^<>Wֺ $]R9Fx5>y>O ·kU2k7;*{;=ߙ?V~is:s#UO(/Ӟʬ-i\wsd} }09"^{3!~U~z% .]RZQEGۻW3vA{b.4r m&p)3nrN"u :*R֭,S_kvٞN{;2o0Ls V?Y[*bsd}X ؠA}emDDnb"GVZ%7I.n ,^[ /%%("""vZu_gll-[wS)&wàKM݇,ڰpvQ=3qo|ņ+*3!9ZC1hb}Ϣ2%ȫ+,ްbFviЙ"7Kxu&R3sL}m(ͳjzi)#0s '3t2~?`e Jˬ-7SY}ƞc+?P2L/.._ExLYWVX\Ryt*L}wVog9ubi"+{uT{6n IDATޘ3<6zQ:_HD.?s&<q%.;2kKZe,9וw EFUHdŕ|_mT\̅ĦaC\ZVZaiӦOvMXX~~~O[V]OFR駟ָk<| W*G|2 4r`4r(& RԼ;> w&ܫQU2۱Ef^]cT5Ecveы? o݅ G.\Ş%3صhSF敥ߒWPo63Gà$63 [2+jTV$INʢ/wSTlWe1|WWo]|9ߒ[PUv^_c{݅J˳UUrM&ܜwcRqv'#?;߼u+*Uƒs]yH@Y+Vwp :<ӕţΚEwi` ?t{M4JT+nV5v[R_tt4;v_o߾$$$rJtRaZMzڶm?+a^-!%7~91ZEn~aeT04#ZloQ":.]V g}P`̀7_]KL&?VƷ+=:4gg/7gT* {;=.WؖʼY[jjXp6:-A*.fXԇ kz6BӔ滙lN_He{PT/7gŞv*:f)ٜM~]P~]j,R_uYz\n_TV-sbz%Wق}ٱ9kis@JRQ%2;GG̬ջwH> "#6֭9a&H;v] \͕ZB'NdԨQel(f.^Hrr2Æ # GGGjLJXʃa,Cz+Z1<D'ZMy<\PJul`F]p咠㉨OJӲi:mCVX+yԵ2zÕl*냝WjuiGbo/؀ϩJ*:fWk`[R^ᆡﯺ,=.708۲} ؅߿{wb@pڒVu7;GG/qjQ՘F.9CnR- Νqjޜ@Xt)QQQe4Ha&Mhd„ T-EEAGzvI |c[-U` ;#9\hԥkҡGKV,1F,=.7rwFVN /7L&3.frG0dmct.,߸4sEe֖4K\W9>(HOfdPΑyqqϏMR0Ɉ%)||hŞy;VhѢ[V#İtR:Dxxxi1L Ř&LkNH.fdӱ<|u;ddhi5a-pc>EurՑ6Ld\H$VCsϒ=Sڮ:6 .1 lQ5U^}UՉ^n f3YJͤKf.cH˦|af߮݅߯̾ihIߛ5nH\RZ,.Pb+%`4Etr_G[~ơ-2@"W=Ed؀dd2]yoڒVuYU5"f69x1YfY^+Λх 90{66O*vQ撘ȸq㰵eΜ9X!w^zѫW/޼[Qڍ~;{H0 : //KҵkWBBB,n|d{ {# +6ip0nI1g"Ӹ#\Zb3^>TEpƿ%h̃W& dܛőpڷk?ΠjblYS7f,CuDM %j6|7g{"'Vz2N+6 WP~t?:Iv>CeS7硗R[4yCuˌr3} o?Vx\<7Z>yQ}eo[Ci9K0N7-;]ygA]RRR^ŵ[9B-۷ogȑӰaUPTC/-c?,ġ(QTlg箻J _\i#iӬ"0vb#| +@ Ίzo׮]|؝3s̙wܹ$"}&HbHE-;qfٲexѢ0 hgZ4`a닰 QSXk51AoEZ\%8ga>̟?+Wĵk:Z`0Lqddl bI%<b6p lׯ_ǰa:Z `0Xmi)ΝSH@? u (KOd .~=lvPhh RO`0D H*ŕXTܾ "Cj|@ɓz5H"k~lB?NU `0wSR`,@&ܧ$063k  `0i v9'"nn0rQq<\*EeVBCe0 x1@}q}&T+WPz*BC55۠AH$dl9zl  `0iZ=ba ^Fh~}|? 5ާ2mC+`dg0 F`ӡl=zյ뙑(X[E(W>]i%mB[ݫW9ݱ0<㯪&:B"|x,]5Iu6alސ:ײ(+tФ>P_y~z=|:~y;ޮZV:YZCc0U{JyŨ0*mISjB9G\h;xTR\DP~&mۗ.=<~Ӿ y3myjYr:'_Q?"}'kvõWnQ^=+ tfalI,P'˔iyQHV~ )}jSWiWVL^A'/ߤӪ&ل>:hy}lLOSRtWM%]Ec?]K5bhvON4ٮ^4v܇/UҐ:kK*tsTU Q~~>`B<@ %KըBMAƜ8-C(44'-Gb¿Bi բ:yNp=}a.#\?vpOytFP7r SWˆAD`kYJyG )F'*ka.0Qo)0AeuNyϘ{U(.)@oHi[V"TT"r@p8+C{(Oyi˳PKW«a?L+\_ŖɢJU/1B;捓o*]vm 0 ζpBiENAhڼ6F102ȢM@!"{ģS )]kۮ&Үs@ΝpmR#.s:4ilj Jup }` (f|T`Ho1KV]}uЙkx0e502^LokilgiZܫol s_)U,/j\^m|MX o~=PwV/ⳑ$2ʫE4G~\##י< U@Iy5\hWubKdчr_az)vm545k?uAhڼ6.;y:>F/֣3i]kmD[ڵB`S[jD6稛8\|ODcO?'GWai%') ٱh/zb"b)TNjZj.Na/8EbHTɢKB&Eu6 h`i\#E>DrW͑_'Mm ]mIT`mK3Sl[ִm.6l^-m?m#6d2’ 5$?>=|`om5&&nzM@ݜmbj,o_\ߴ $^ PIՁd2L&6nY%ċu߰ \k< 3dzn빾t0Ye䛼K/hj[UjKP%KNpĺIH!p.=9E .b5ӆ>ho]B,L1{33')&&y\>&_S7護-=W1c1[>Dg)%3nEŊk3w@矣KTTkȲ֧+M[%?W\'Ktp#BW{2age9 bӡ8XcQ:{& 9scT;Hr:?K)][Rf.?Q]=l-1׹&YtUqկ`3x\uK4iſWєtx-z*kmY#v G*|v?y's^gy[ ]`<[c" |\k>%p6_5o/Wo,(F7]38H1_Oz W P|]꺻+gO7~lj"GL"bܻtmmrN-S6s;/j`PVU[bx/|;e4Bk_ ;OiWخ`0Ll-T&aϧ>m>UύXX{X?XHf&|䕖ny~3WbQxmPoX p63Q#w:Os6.c ?Y|5}?Y\xI&&.߀-^*EH) 07#O#?j~JLI卑A@vrEʲ987Fc1X,Yd0O K}>:Z[l7s/cZ *?~yE8~&4ݜp:# S~GʍlU1x\WJPMWy07#aޛ_<D-s&F}\ѨH="Wgef/';7bx@NX,ި!^,#0AH.qZNvZӵw~o뎞L1^C:O1;fYwʔB';|8IgyU v/Ǘ[3G`Osi c0:!NBܫ!=Hqͻ#Cc.1w)Q\Sj{8Cϑ!]jkuGO|]`fG6.AE7鮮v߽1{= _n;2^r|G0NP|# =p|c/Va F~ }=Y{V>۔٧m,fן8|!|­\2 # D'ADdp2LJqu2F|SrEUa_"j8~?} \##t¿z% L~ Ub؂U学C[䩎[%oñd2_t|I})p8}k4P z}L}lP"a1xul`0L>? ~م)| >Z3Wmǜݰ05׍ VpƲɑ0 cdmz??Υ)7p.&ø^xaAï.|]䇏7UQV-]l-Pj~?MU ?Se~G'Y- yYXҠ^%:9o̅X"h(y6kj[[⟴*7ǛMΔ'oyMqq|:sHN}pQPVU1=0^*y3ǟG —GøHJ1O]dֽ7+G!/}3pub8}]sh<+EuW-];cB^xIS;y( c{p 򻚓FdAtSl7q1 o;f־n_ )vwoF^i9:bՌov׈o[90CT^?FtŞOĿ7:UocW)X)τny%**jjqu ဃ篵j]=h]\tkdzz^:-MZa{{lzuvú&{\9Z1[7 KC!wO##Agg{|F!U`ո}4 _6 Oy4{䷵dyb ֻz'ӍaaWCrFvkZ~`׿ 1cK ܊w9/n( Vʩ MկƄlsNvX(c0O.p8dgG(\mP)) ;xՊ)x$2 a~^t)6-8~NNnNi@<:][]72x;dP|1paF1C vqiphppj&}y'\#Z= <-VhO0ſ ;_)!6~>45YZR qc4U7,P.{-绽'Y5rvz~ P2ٞtIxxRG[}2 ! НG_`0 <wĺq`0 t`0  `0)-vzFD011AFF 0tPtWwp8flٲ}Ìtnݺ5˳VoݭpmG{!Hixpxx8?fe=J8`h۶8 -jQ6X={Cxxx0bG,* pwo Q@2VV/}{ĉwIu{_{bbc35rdGb0QQQpocҥ 퍷~...(++oqA")..(("Hwibg} xsA$ɓD055m`0Qcx)..ۻEںuvVBo4 ̝ ? OIYشIY(j/@Hk/Ҁ~k%1?VF`fyƍ@P DF#F3u ވC>/Lu *д82zƁ^BMl7qWwo9jp[X _LKKS #" ''K,'{*]+ +___̝; ~h4Po Bf5;s accfEX#]v!++ Bطo>Cyy9!q8*6oތ(:t(^xX[[sUrW8^M?kX|9<==aaaPdk3z4_Nrppk1kkk|@ŨQ`eelnZ&9+++8;;/INMhJ>>4@SSSI QPP~եJM+W$LF#JzfddW}M{!www7om۶FAW^%CUUU4k,ʢZfƸՑ:uYݾ;NJΦp\JNN֩^ۛ5}RRjb۷o6+GIn{{{JKK#DBj*dT}hŔFvvv5&d2DD{n*'QTT͙3d2UWWSRR:urjM4)N>>>I555tA$o5O뫃U!uѼyH*ҒJL: .Tٟ>Cvv64OӔN-ƂFZ2?4RR\D` !'x9riD#crXVCT^~?GUȹsDr#v*GTUu_&{#0P n"W"AV|&GvFw^yuys|HJEѣ}o}H.]͛7رcU^L/^T|;̑&jcc4Xh]p,--I`h:ux=z4-X,X@=-[̙3󩰰?ӷ~1)۷o'???esĴSW عsBQŊz*xuiU->K[-i#j07脧bӎVVÜ()762){D,xyiNZxt~ExSQq1;uj^WV xMMQWVpmDxx8RRRN:HIIQl GHH<<<  Q\\z<<4̛(U҆tEEEpppQX+&/\ &Ν;B.]`nnz١FMM ,,,45_~ItPg~~>5zQQk!!!@@@/hLV,Y<{7mۦUNMhK>>زe z\r!!!G׮]{AQQeBaoo?6&++ (,--rP$%%K.5j#66VVV۷ƸF֯_7)JQ[[ TYqU4I&aٲe`)))tT(SV,+G:&:00Xx1b1$ ?L A~ܽ{p4ʩ^SW8}$o:moZ===ѭ[7,[ Ddff*g*Դ}ۡǗ Z@?oڤ[qOFG|>^ظI:?5}ۡi_b,g~Un;/??_^7A#))}7J{ dRZR qc4U7,PΚd0ԩS(,,[aaa c0 Fi;Ӧ=zo={1~.]ѣADu:Z$C+MX߹f0V$`0 F+–& `0#`0 A#! prrRzKkѳgf><*r> 4=0I IEaF  +++ܾ}zצCLL P'gkQnpa `0Z#DTTTG%s `aa 055m h #P˗cӦM  Jo=v|}}aii~AQF ؼys' c„ 䇳zzz ػw"/ΝEIt /tuiaŊ ͖ :頉gviS>|-_\FPdgg^WWW899)^Ј:WƍgggDFFbĈǙ3g>>>JeꫯꐘX[[?Y7xSIq [o,LJ"##Q> IDAT֭7oL&]v@ ӧO'"T%9hΜ9$ɨ۾}; 8ӦQPP>|YؼyH*ҒJJJ :u⻽=霧*9uO_\.%''JyqqqM׮]#"$uo/#FH$gϒ]~ l^]+EDDPee%QBB-]̙CDL*+?jkkJky<<4 ;;SNʼn' @>"֯_ؾ};N+rJ-.ufooZTTT(&ɻwNҠi~Q+ܹ,{ݻw>6)ύ7̃Y~PVVK.aϞ=8}.\rʡg0 }i;bHMMm搨#00Xx1b1$ ?6)|>]vٳEEE:ݿbxJ^.]R<==ѭ[7,[ Ddff3:uJ!X,6(F4闕___߿_buM?R:&Me˖o߾mh#668٭nMΜ9 &&ْCVVktrrrpk.deeA('|SSS{(//Gbb"ڵkѷo_Icٲe >#磠@c&9mt~V/5>~jkM헛QF X|4Pdgg#%%B˗/ǦM  ! u>|]Y 0)k\vӦ>iju,~_' ?NNNl~7"((ΈĈ#`oo3 qISЧuZZ"""`aa???aӥ;v TO}mSLA>}燸8E&iwm髃󩤸TDtrϩDHt?~BRyy @TZ*~r#J'$*)QG# ѪUD2QL @-Ӈ(:H,&JK## WJ"33K_"8"ookߓnR͍| *b1xi*pA Dk6o$"*'^|.ɤR=qRݽ{wïS9P[VF{G"qe%x]6K^dرatrss#"u͛7I&Ѯ]H PEEZ///0`6# JDM B]:TJ޴rJd4o<gFFxEؗ_~IѴgrwwyѶmhĈtUp8TUUEf͢, 5kQqq1uڕ)22.\O:u"DS*9r)99YzH$AV"LF111E]]o>}Ptt4bJKK#;;; "8k 3))n5 . ZG"l211itɮ5Ջ6YhΜ9$ɨtˋFA"Ξ=Kffftul~_"""(!!.]Js&u㒶`H;렠 7oIRڿ?YZZR.<}||(22jjjJvnnn4yd""!}CK]~t().|0x KV{j2*JkWĤe䣣[[g]K?#oo?5sPVLp89RS%KOg;Z99z @a@\<{X< 1~]'OU]=`憚]ScdN IjM.|&MOݲҸNNN|2Ξ=g3ydx{{ 22VVVuRѰm0Ƴl@~>fU|21c p8|w6wΟ?ӧܹsB.]P]] jlذ7n܀sŬY`eeVֲ2{ruS%r%ap8Ӵȃ헚cɒ%x>? 3,, V-Eӧ驷Ev{jtӶgCu1zm.̓9,X_W"""g28onkdXTPP`=D9agggE%793U*M΃q^^^~ˡ1S( ڸCi)r.]3{{xk/*FN/'DuIY5/ra^"{xP\Օ2*Xi~>!J@aejޔ,HO'V'>M %3<<ǏȼyXl̟?lƏϮ]t TV!Wӓ<"Ǯ}dgg# $$6mڰ~S 鄅QUUӧ o#Y~-ǎ#>> yfÃknQQo /nnn ?kq*:ut1+٥)2MǪUذaǏgذaK.GEEmBL毾zNii)zGҥKxXr3"MC/^䡇jrLQ_ݑzz-@Npں22o_:wggGt χrsNnSuҽ`w]'u@f*Ոjq-[WQ؜]fÍpIXX̟?r*++ٹs'71cXp!'o6Δ2k5NOOORSSjs+]" zJTbkkkCQll,:t_ۆb_2u@@:ub…!غu+5w5!M'|Bii) 9979/],vtRSgukXfV[f%/ ?mMߜskmsf̀hHJҽYæMs -ߜ.:ux龟֯.I@Mqj:u+鯾҇iCXM=Ç />"}#2>{>" pkH ۛo\VܞF䡹&44RIϞ= VˤI޽;}߿酅 RiR\֭[G\\cooρLӳGSUUE^7Y[[ό3&)) Z 1شixzz۵q8q"ɉI&Lz{{V-~k1KL٥2Mߞ={ҥ ̙3իW[$ty߿?~~m)=[6Sr:..~'''NJ\\ţIi+MɃV%00dڵkg6CL)yjJZ7}XObZMRR=m]JKKqtt`D"wVٴi^J~J7ŵKRפDrٻw+V%;sG[IKrG7'F^|3L~Z?]9“O> VXqUH$fVҒȩID"H$fDNMJ$D"HGL"H$.qW`L^ӭ[z7mLNRXXF˫Y\2%K$DrpϏ͝;V{ӛ7o'Nczԇ U=n^ÇQ(s=~)OFPsԩ_ܢcԚ H$#sG%u#G _|E|]]"H$h#h%<<Z͈#L^VIKK38'U;ٙ>Hŋh4;h"prr"22l}10^JJ Ef4 Futqqqۛ,QFmZ-[Xۧ<<<{a;w₿?k׮5+/k׮x{{3d;LѾ} Օsbggg}}ed戋///v$;6֭}EK$DP<"n:oNNN7ymtttu;NI?ѣGٸq#so2m4233رcVbҥ$&&RTTl0jaL)Aff&3gddffo{ڵk9sAMW^paHHH`iӆ]vQ\\OLLLdO?MPP$&&2eN>m6l߾S2{l֯_Yuu5#F^RIYY59[#--3gΰm6MƩSw^z]+H$ICi#6uTnCxDGGs***ѣ8ph5&Lޞ'xkkkQc\Yf @TTI2J"77\2ʊCqF sرP(2d...9s:r!,XRD2`nj6nvprrˋۣh_6ѣGcĉ( O^皖(ɓ'cggG=ݻ7۶mkR @ZZD"H$EKJJM6$&&bU*f?^q}4FfcGDD-2ǰaƍ6l>,..ph4QQQhsssGբjٽ{ES~5Z[[ye<<>SQQco1cưpBN< ygff6$55wJ%95ӓSN% `Cl޼˗/ !55|AAAݻW0?>TVVsN222a twww%K4(1[#66R:į%~~~tE"ZrvMff&ݻwǩTj7 IDAT=i*,++`wD"ܟ+ ETҳgO7/,, FCjj*>,5k0n8&NH~prrbҤI)b*=gyoooj~jkϞ=tggg̙ի-Nsذaڵ`ZR2i$wN߾}7שS'ƌkڵkgM6'mjt 1f3+++?UUUT*GS:t 005G_~eK GGG}Y>3us^9rEaddd4 D"M%-Nii)xՑH$E~K:{տ]b &H$m4xDb G'DAPP+V*I$Dr!&%D"H95)H$Dr 1D"H$Dnݠ=Yw8j2jE`j EE|lӇcѴeԦ[nnJ/oho߾w4ŋӺuk\]]lCKʡuK~^NYw"͝ Zm̛'64%ɕljܙc~?wvV!KNtrbHb"oฦ~Hֆ{^T̝;mCDqwwPJũSp?8tܙ+++W_{{{ryP*LiP(f{2335zͼyز3w\8իW 3EStizm͚\߉>Nw_ߚi 5$#9TMH%,Ü}>6}hx&1wAe &00ÇCAA| < o/Izz^;ذaC4'OlT1l٢ Օ~x@DBغ܉z/zKi22#bFu&a||࣏tSRtq-5kt PFj5;={o۶Y= Zنav_B׮ C5M= @72-q#ݺV#`ۈQ+ԯ#"6|87.\ahGDe Keߎ9=JU*U*L-AVfpN+999,XjlٲZFCll,jFܬ̙3>}G5TFֶΰx#44WWWΝlVVZ[8b999( 6mDVV ;^u2e ׮]cϞ=TTT|r/_NW^z?8_hժ%%%FeSTbgg١Rر` r9 i`LLOO'::y뭷 ʯԝٽJSRRh4,Z5k֠hh4 FϞ=qrr}lۗ(2SRRr0UM٬ʻbJOEw$fk/h\7V\>>[M>)S4)<ϻ,kW!  1a85U{{!JJn/\8Ѷ=$ĕ+OoQU%DBB/J!S!;W";[BL*DyiiBn-ĩSB|={ qBl*?!̙E!V"0P't'% q5~~~"F-ŮW_G?'~ۼ7شI| !7Q#bSO>HTWUsvU}ܳ/m_?&uM}v1СCի Υ ???!+V6mPm۶mC=$ܬoV  1fNMMvBtU$ ūbҥZ0S }]1uTyfVo!֯_/(?. (**ӦMYYY"<<\'N[pssjZ|u+k5PS2MYJ%[.C 7n=x1uTQ^^.D֭ũS};ϔ̘1sLQ]]-ERRuwwwiii7l ~zuy li ]vo񆨪 Y`JjLS*:^Mlf,cz\R7;ޤ$qfk/0U0U~~~~bرB!rrr^suX6su>ʃ%94W]jL5$o.ZjgwY?^OH#g@loM֌>v*UO nn ݨё#0kXYA?dZΑ#PP&B3g KMC`P*u vtV^^Q/.^l.+Wⅆ5 1(qm͙oرܜpG??n\@ɓt7mzG??.ܶ&9}zx!OpkDСCL0EHH(JYz5O" ),,$''ǫJjjIM4%L0{{{x !55C`J%Z3'SRKnn.Ӿwl9¬YbРA%L63wKڊ1V\ɬYFEE/h>cccÃ>ؤ{c l=%}K͵/^䡇n[Kp/Ac4.5rjmۖ~7X6=nj:…:ghVsuQ ,L@|(/9h;w6U, qnj;yRJ dfN/$&QǏG˔)z'LTUQUVFTW-0l!\ \9~sp5$+@rw(;m[edPvtj0g+doNYAeWphBTbٷcooOPPߟ ;Fxx8͛7sF:w;9K,sMVV$ԪLX[[B 22$BBBg|TTT > <,Y*ρx*cS2MXgSYYΝ;08 3!!K. lmmhPP{t@vHHIӓTotԉ "`֭ddd4˷9LT-i+3f .͎7%%LSe['|Bii) 997[{1uѣ={6t5@Ҕ` .Q^[w6!juw-/Zwoy??!om+u;&DTn|P7׽>K]ㅰX?;[?Yu/|5kуt 7l"&2]NҽPߺBQ! -J}~5bMǎeG  !z6bXףcGG.<\Zi cz޸tIl})߽M$# ob}!t ,b޼y"<<\6g,~a1uT/תtm۶5S;v(ڶm+Jm۶_l%%% wwwo J%rn4!E{sBi&T*EeeB\ѯ_?agg'Drr>^VVxG3Xd>YL4g Kvv,\\\xaL_*  xIIIBшH1{:bڴiA8::^l{Op1%DPP|[til6e3KfnS!}VY7;^s}1=Ma*~~~bڴiGxzz˗yc\)ʃWuהCNNA:АrﻌZ&)) m_.8::RXXhC"rZͦM۪HIYYTVVsN222q&!!%'H$D$ZtDL2i$w]vN:1fP(;wVZgƏOqq1~~~^ZgӦML<OOOwdddp̞D"H$I~K$D"4#roD"H$I$D"%#&H$DrpB"H$gXc1D"H$DngvХEJNV(jDrr_x(*l}/ۥ6ݺ?o?jBIag7Nhl9X,x+d^^o߷:O!)kZ_,y/Q_ճ{i#6w ř7'74y%;tm>c]yl!YێXJ'CƟOTUƷ|w}G.\}#6mo_7wsBmӢi@rM@J5SsU=GӹLٚ ct8{t>۠:tP*GҩLvEv4b֖fmdk 4Dqq'3s)/mU,^ X~4AטCrZpiep ׽_O8"bt4غ?ϣjH翰8q: k ПiGTT܅ Wz1|q`%|<%X3yz**63fC|6]ҟ?˗lzt89=УG;-mFÝ(?ɽap4?ak;dp@L>g>HwHIqCfM͟hč͟ "<1 @Z ={>So?m|,swBCЪՓ̞ 9{Sf-]>_2}n.' O89=Edcdg;X/cA"i+?Y1m͍ arGgˠ%+5 ®#uJ V`ʦiZ=s%'' ! `ϢNc˖j4=ᯣVOdĈŀn:bΜ5&>>,^F #LoiBC_u,s箭3}V;[υGNN> p6mOVV'U|^IL2kngIJJʍ;MEE?0 W_@~uGZNNmJeu->=lmmW㔔 4WX;֬4WqlٓNhkjGO3juӧbʔgׇ95F&ԝωjʞ0v8FpXn-B@$#2r.ٷڦ1t7.KrN}XZ9zNNѾklvXKt<x_}M/oꉨie\p0_dS68m)23رi+Wlر9s:SZjMDD ̜Ydf&&}nrrccc]pfr֤UU Ffƌ\ AY٭,>tO]Lҝӧu#INNddlevoN=_h]VҰti0)*?>HUU}Rv'V%>uW0YߧR]QEΎtTnxt߿Sqytٸ~@+sˌ _+1+R N\Zv)%ME으3yMRgéSprCvM7vz/x noO?+E6sOM'23ұ^W]-1b16(֔U+/$==s۷!++C2Q9xw ̙KTVV8*>  :N?7.7qw~ yxts:9q ՕuKnρSQQ׋=Ł;/^( Ş3g.Ș:unnJi=E^u&N|B AKfDС3LЏt|(..CիwqT 9;;%˗DUU5Kl`_zg0}*I=[#GRPP̄ P(9JСQlܘ @b| ʶ饦p,RiVǀغPa'SңG {kOF&>~{ƊloV%uv٬12Maʞ0&L臽-O<kk+ʕ;5τVEEx6I&ȑ6ךm;Lvv>Gd1k_R0hPw'@J$7 88 % 3zfv8?P(,.ds6i6G(O OyyUr˫Ɉ8{~DQEEE[;y$7pr3fgd,ZV'9!ܚ:wuu$0ЋEٳ'݄-C~~.z;[d3ad$6nLfذ&[@xhj{w7n5IO/V]=՛N2rׇ)5V1L;_Jݞ?_@۶F#tq^^!yy)qq5`B^}(6DD!0֯߫T93S4\t1c>fWi[Zlv?A!LSZjMaR]dQƵkFlo nn8N/l[}6&Lj4Kt릩BJAaaӧ EۛÙkn=Z|[KAA1Ge4)=__Wܜ8qbqxg6ZOݰnG9Z?ڶ~cdnkVu>VNwXm!Og)Lٳ$>jE\xꀻ3Ktj=[6l2lX4 d930^~+G--۳cf3wu5O2RS],ZNpa{[}po_Ӎsk8;W㏺ix}XXX!7?VTV*عӓ oZKVIH5;fL& r򤮢)Bb"umO.SgpqA3!(8q'/nR&@Lpo+\CH[+ASe_;R֝k)j(5J'ݦJ+doOeW9T` cooKP7{߿;Mxx;KC?6oN}~9ww'>|;K]𛕕Gp9;cmm3 N⃽-"6{\\y&~,yy9Iѽ{ q?\)w`>=AvfL<=]HMͩ7f3gg{~Q8>WSWAp:f*0ݙ?k+bdd\l?PZZCg xkѽ=K\]9yc6DfH/9PywI}J=Ma71cb-<[7_>DWNriJ@:pflz sX&[[e*꙱Ac3{GS\lCn>vv̟ѣ}-ή'[g%1~|$[B\\Q(kkA||/}:]ViӯLOϿнU/O19]˭puCs*{%:\Mvp}#o=a+lvOuJ1?\yG#P̉{ta#b!^ҍo Ԏ(%En[ֿ3bwRGOGce۴ΞCgP.^-Z&=AkM׮m7︚#,le^g?ΖG0ztqOc̘WR) :J22.YCD##O,]:1W3Q*͆ơj F|4Jkb73gΝزuZbL=^qz^dg/v=;;%'O~hrxcooKN֪+aذY:%JoӦ@,_>ɬWe1g; HVS|}6DfN0Q(ܹhʁ7|#a^y1{X{7r7._._w)((C5_=REUK@v{?eѢu%.n~tgϞtƏ2Zzzy̵SXA gd\RSWF)~^>7Zyr[ k^-Z=}$:RZZC&eexx 5ArϠVOdӦ_u!GyE%C_qDrwI.^M+XIL|OtV%w Y[;X9y0a/;j5$9c`7$:v9r,O>BYbVIrӮݫTVV5DdlyԤD"H$II GĆD"H$5bD"H$w;bݺ-J`g99w[ jrQ+اǎivMn~?5?vvvuFcxg h4D"c`Gl\jg<8)ȑ >֭|C\.{Rɉ!DFbr2ϬуʕǛK;ܹs6A4www !PT:u .cooOΝٿ:Sa?;vޞݻ띁ÇP(m+tԩNR}yAcND"XL ]ҌCb$AןW6q"m ڙǘU<}:_|zi~~5DUĠnBVᇓ/\@uu5L< xxg}XXII Æ _ƍ :*vJII"-q_,vyiDe% FQv*WRSZ&--WWWrrrX`888jٲeXQՌY 3g}LJj*6xb4 uL۷o2w:WYYYhZnݪ?WP(شiYYYh4***xױcʔ)\v={PRRb4رcTTTϣP(xW( kJ2'}FaѢEYFF fٳPZjr 2QnLw9 D3G\\xyyUROΔ)S{QըjڴiBn*`=ѳgOh߾E#<;bӦAf&tX+ϰc)+-]3ahqf&8yut]N  =:'pp]9r3fի`cevEzi |HL)Si]dd:Uĭ_x]VKuit㛾}9y2gX-xt2G~5 hG92c׮xe~,cDGGYcs)7]vQ\\OLL ׯn:oNNNk@^r;v0g4۴i̤Q_jFkFAAJ2mIOO>~۷'++CV9x YYYp*++ d?`M7N4ZYެ 333g2zh23361b3fիX9Ջ> @YY >d+t$dLoR5lԩ; ҍ9ۻ訪CߙIH3Ͻ9}f9oNXxrݾ **`7ƹ͘1cFWV={uXXo( FRp!S'~INfSOj\_摚 m381 .L1IWKZ^ׯrwx/]xKJJ8x L>)))`޼ydggc25k|)ܖ? C[R$$$D=h>੧d23tY/77l ,X!577Oss3VۗˊHLLdx^^u\.WM6ѿ Wkɂ 0L:Kl?9ׯ`۶mti%MyUUUTTTdgƌlٲOرc}g}̙3h~E$Ē_[,Л0j23é #0ѽc^\l|سbi˯ 0|xu6讻HΦ_n.~{.=z Ē@|Hb͆鼢zbIH`ʕe*+zk{+"V^^ΠAضmիWS\\СCpx:lcX/)ĶX,Wt^mm-vMOO'..AСC̙3'NXRRSWWԩSx"a%&&vZ^yǾ}())!5Dz-Ν>_ uuudddf̞=;֯_ّo?"瓟Ϟ={x 33뺺:b6lvZ~6Źs;w.V n?>}p8$&&v8?233qDC("a]GL_f36йs`w]7=jMMp@խ< qqq=zB^/ǏgԨQaL6*<ۂ:u۷o\c`2pv; !_ꦦɓq:TVViӦ.Wg:t Fh }=a>|8[ne]Zzxǘ?~,CFKK 0v9HX冮F`GҥFڲ5eJ %v0PXh _n#elJ 7w\w\ccnj0ȅR_ON\T,]JBZ c|ֆxŁ͞5OW䂿|BS$ HZ^X>CSM  epq?pt=Rm-H/( %>XVrrr(++cx<9Bqq1Ӈ۴i]֕(**fc]>_搓)%%łnd21~xjr}/xXlL812?ӧYp!~;#G oswvZ]=;G: ##nǧtRRRR~#tO2l0rssBŋqݴk.˖- >_%--K/xx:n6lGfҥ|>lBuu5SB~{:'D$Xa1 }xѭ|(.bjغUZj,#|-Z%%P^n\q#gC >GmNyqiӦ.\ˑe8mMF}USxG>_5c5T[ǚc9n]}q> ;~K֎ǿ^x2w2?q`XCXZ^#f+.=wy4c1υ L^4")))aԨQ3i$ZCƔ)SرcC ʢG},ލ0͔ꫯbz$$$th}pTWWw 77q0~xɓ'IMM#֭#>>>ⲭ[Cnn. ]ʕ+{쩞cǎjz;Z0dȐWMZ,Xh%%%'Kٳٽ{wnɞ֋Tƍٷol6DZ/>}:Zls> ;ƚ5kؿ?vv{խ}dlݺdJKKYzu YIDAT /ʇ~˵2du/N ǥ$;) r|Gź:"<[ϚٳgXb&LP/_Θ1cDnReWhѢ.W{\*++O#''+VĺJ-6bZ[[ٰaC""׈&EDDDtMF"ko_-:1pMU~蚗'8jXpQADDDis=[ټ?ARwӈuͫWAb1cKGB=k}!n{:yY:B%V5b(﹛\`gNaY;gj)/Sgk?[Y6 Ŏ9:+/>X/޿O>c>FkgEs\DDD֫xᵷ9r;p{ZiBM$p88E .ນ4GlٵƳ210?;>68E^V仵\>~lˢ|K-n{^{i)=?͇SWeهފf3e"""rUL$J'.׋hY5b(}>r{wj }֝;?Ōl"k-KXǟV3x4t9H ?HF~X+/}h]=Y&"""7^OBB||gG~…拜Ͽ:ɱ/k'z>N-7OLm=A2U'ɚܟMǚ'xd|i5|r{,7hS=#-GTֳ&EDDD . # # Schema version of the traits file. # DO NOT EDIT MANUALLY! version: "3.0.0" # List of names of source code examination packages. # # "c_builtin" is a builtin source code examination package for C language. # You can install optional examination packages and append (or replace) this # list to specify which examination packages are to be run. exam_packages: - "c_builtin" # # Project specific traits section # project_traits: # Project name. project_name: "screen-4.0.3" # Project root directory. project_root: ".." # Analysys target selection. # Ex. # target_files: # inclusion_paths: # - "../foo" # - "../bar" # exclusion_paths: # - "../bar/baz" target_files: inclusion_paths: - ".." exclusion_paths: # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the # target source file. initial_header: "adlint_pinit.h" # Project specific additional include paths. # Ex. # file_search_paths: # - "include/foo" # - "../include/bar" # - "/opt/baz/include" file_search_paths: - "../screen-4.0.3" # # Project specific coding style section # coding_style: # Indent style which is a convention governing the identation of blocks. # Select from "K&R", "Allman" and "GNU". # # The value "K&R" means... # int foo(int i) # { # if (i == 0) { # return 0; # } # return i; # } # # The value "Allman" means... # int foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } # # The value "GNU" means... # int # foo(int i) # { # if (i == 0) # { # return 0; # } # return i; # } indent_style: "GNU" # Appearance width of a TAB character. tab_width: 8 # Appearance width of 1-level of the indentation. indent_width: 2 # Character encoding of source files. file_encoding: # # Compiler specific traits section # compiler_traits: # Pathname of the compiler specific initial header file. # This header file is automatically included above the first line of the # project specific initial header file. initial_header: "adlint_cinit.h" # Compiler specific include paths. # Ex. # file_search_paths: # - "/usr/include" # - "/usr/local/include" file_search_paths: - "/usr/local/include" - "/usr/include" - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include" # # Compiler specific standard type section # standard_types: # Bit size of the `char' type family. char_size: 8 # Bit size of the alignment of the `char' type family. char_alignment: 8 # Bit size of the `short' type family. short_size: 16 # Bit size of the alignment of the `short' type family. short_alignment: 16 # Bit size of the `int' type family. int_size: 32 # Bit size of the alignment of the `int' type family. int_alignment: 32 # Bit size of the `long int' type family. long_size: 32 # Bit size of the alignment of the `long int' type family. long_alignment: 32 # Bit size of the `long long int' type family. long_long_size: 64 # Bit size of the alignment of the `long long int' type family. long_long_alignment: 64 # Bit size of the `float' type. float_size: 32 # Bit size of the alignment of the `float' type. float_alignment: 32 # Bit size of the `double' type. double_size: 64 # Bit size of the alignment of the `double' type. double_alignment: 64 # Bit size of the `long double' type. long_double_size: 96 # Bit size of the alignment of the `long double' type. long_double_alignment: 96 # Bit size of the pointer to functions. code_ptr_size: 32 # Bit size of the alignment of the pointer to functions. code_ptr_alignment: 32 # Bit size of the pointer to data. data_ptr_size: 32 # Bit size of the alignment of the pointer to data. data_ptr_alignment: 32 # Treat the `char' type as same as the `unsigned char' type? char_as_unsigned_char: true # Treat the `>>' operator as a logical shift, not an arithmetic shift? arithmetic: logical_right_shift: true # Max length of all symbols can be identified by the compiler. identifier_max: 128 # Token substitution setting to warn the use of compiler specific extensions. # # If your compiler supports `__attribute__(...)' extension and you want to # know the use of this extension, specify as below. # extension_substitutions: # "__attribute__(__adlint__any)": "" # The token sequence consists of `__attribute__', `(', any kind of tokens, # `)' will be replaced with nothing (erased) after the preprocessing phase. # And this substitution will be warned by the message W0061. extension_substitutions: "__extension__": "" "__attribute__(__adlint__any)": "" "__inline__": "inline" "__asm__ __adlint__any(__adlint__any)": "" # Token substitution setting to silently ignore the use of compiler specific # extensions. # # If your compiler supports `__asm__ volatile (...)' extension and you do not # mind the use of this extension, specify as below. # arbitrary_substitutions: # "__asm__ __adlint__any(__adlint__any)": "" # The token sequence consists of `__asm__', any kind of tokens, `(', any kind # of tokens, `)' will be replaced with nothing (erased) silently after the # preprocessing phase. arbitrary_substitutions: "typeof": "__typeof__" "__typeof": "__typeof__" "alignof": "__alignof__" "__alignof": "__alignof__" "__signed__": "signed" # # Linker specific traits section # linker_traits: # Max length of external symbols can be identified by the linker. identifier_max: 128 # Are external symbols identified without case by the linker? identifier_ignore_case: false # # Message traits section # message_traits: # Language of the message text. # Currently, "en_US" and "ja_JP" are supported. # Please help to translate the message catalog into your language. language: "ja_JP" # Enable inline annotation based message suppression? individual_suppression: true # Project-wide code check exclusion settings. # Ex. # exclusion: # categories: # - "REL" # - "PRT" # severities: "[ABC][5-9][0-9]" # messages: # W0001: "c_builtin" # W0002: "c_ansi" exclusion: # Project-wide code check inclusion settings. # Ex. # inclusion: # messages: # W0001: "c_builtin" # W0002: "c_ansi" inclusion: # Message text replacement. # Ex. # change_list: # W9999: # package: "c_builtin" # classes: # - "REL:A10" # - "PRT:B20" # format: "Your custom message for the warning of W9999." # X9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of X9999." # E9999: # package: "core" # classes: # - "ERR:X99" # format: "Your custom message for the warning of E9999." change_list: adlint-3.2.0/share/doc/samples/GNUmakefile0000644000004100000410000001072512224440633020411 0ustar www-datawww-data# ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # # How... # - to validate configuration files # % make check # - to analyze whole project with compiler like messages # % make all # - to do only single module analyses with compiler like messages # % make sma-only # - to analyze whole project with progress report # % make verbose-all # - to do only single module analyses with progress report # % make verbose-sma-only # - to do only cross module analysis with progress report # % make verbose-cma-only # - to analyze whole project *FAST* on 4-core processor machine # % make -j 4 all # - to analyze whole project *FAST* and silently with elapsed time # % time make -j 4 all 2>/dev/null # - to delete all result files # % make clean # PROJECT = screen-4.0.3 SOURCES = \ screen-4.0.3/screen.c \ screen-4.0.3/ansi.c \ screen-4.0.3/fileio.c \ screen-4.0.3/mark.c \ screen-4.0.3/misc.c \ screen-4.0.3/resize.c \ screen-4.0.3/socket.c \ screen-4.0.3/search.c \ screen-4.0.3/tty.c \ screen-4.0.3/term.c \ screen-4.0.3/window.c \ screen-4.0.3/utmp.c \ screen-4.0.3/loadav.c \ screen-4.0.3/putenv.c \ screen-4.0.3/help.c \ screen-4.0.3/termcap.c \ screen-4.0.3/input.c \ screen-4.0.3/attacher.c \ screen-4.0.3/pty.c \ screen-4.0.3/process.c \ screen-4.0.3/display.c \ screen-4.0.3/comm.c \ screen-4.0.3/kmapdef.c \ screen-4.0.3/acls.c \ screen-4.0.3/braille.c \ screen-4.0.3/braille_tsi.c \ screen-4.0.3/logfile.c \ screen-4.0.3/layer.c \ screen-4.0.3/sched.c \ screen-4.0.3/teln.c \ screen-4.0.3/nethack.c \ screen-4.0.3/encoding.c VPATH = .. VPATH_COMPONENTS = 1 RUBY = ruby ADLINT = adlint ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_SMA = adlint_sma ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) ADLINT_CMA = adlint_cma ADLINT_CMA_FLAGS = -t adlint_traits.yml -o . ADLINT_CHK = adlint_chk ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS) RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)' VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES)) SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES)) SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES)) SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES))) SMA_LOG_FILES = $(addsuffix .log, $(SOURCES)) CMA_MSG_FILE = $(PROJECT).msg.csv CMA_MET_FILE = $(PROJECT).met.csv CMA_LOG_FILE = $(PROJECT).log .SUFFIXES: %.c.msg.csv %.c.met.csv : %.c $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $< $(CMA_MET_FILE) : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^ .PHONY: adlint_sma-all adlint_sma-all : $(SMA_MET_FILES) .PHONY: adlint_cma-all adlint_cma-all : $(CMA_MET_FILE) .PHONY: adlint_chk-all adlint_chk-all : $(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-all adlint_verbose-all : $(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-sma-only adlint_verbose-sma-only : $(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES) .PHONY: adlint_verbose-cma-only adlint_verbose-cma-only : $(SMA_MET_FILES) $(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^ .PHONY: adlint_clean adlint_clean : @$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \ $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE) .PHONY: all all : adlint_cma-all .PHONY: sma-only sma-only : adlint_sma-all .PHONY: verbose-all verbose-all : adlint_verbose-all .PHONY: verbose-sma-only verbose-sma-only : adlint_verbose-sma-only .PHONY: verbose-cma-only verbose-cma-only : adlint_verbose-cma-only .PHONY: check check : adlint_chk-all .PHONY: clean clean : adlint_clean adlint-3.2.0/share/doc/adlint_on_eclipse_en.png0000644000004100000410000034667312224440633021554 0ustar www-datawww-dataPNG  IHDR׎úsBIT|dtEXtSoftwaregnome-screenshot> IDATxgxUْ !!H tB/`Q"*X>EłKPEtB!dcd7$s[-3sϜ[@ @ @ @ @ @ @ T @ _ tQA@ ۉì)\H  ..%@ [8vfOL84@ @ pޘ>HN-bD@ @ \`xaVԀ\CDZEqpI @ Mo_eP.?vn %P \(B||oСCtԉ&NdذaV9/";oGѸ|y,IIIh5Z%$8|9SΤ/гG>9eY K]\BaѣٳyҎAtI UBBw(/!!=3fj슌?Κ5kݻ7/?VAݩh~nsKcKW^ UA'(?bʕN ùsy3m۶ᡥknHٺm+C2&sp=(ӕ1溚Xx锖;[f\*"Y+Ϥ<h60V[A9p۞m]NJ2lڽ///:ud=߮][+5{ )) Z}Nl2`ؼy31}UdIFgmh4zj^|Zjgw[@tUߢ˝rЩ%$;~(&4. Sضm;Z/$66\垳K@VVwr gΜg\exn#Gd ǃ "y$?/VСC;v5|BBk4 GҎ3 lgqp7~)| iiiqM7O8_wKҋ/h5ZyҎZ_/?ǭco'@$k~.2"EtRbbb//d 4ȚvMy2C:b۷EQ۷/_~SձkW*8,vޞ{hۮ-&Yqz׏V^Myׯ[l_`׮] """w8LRc;K=|\{lܰÇ`*2oܰӧsQgmcyG|kFZwҕW_V[n FCڎ@ hZ@I,"+U+(4p t]Yb{1-ׂIHH@d̜s9qKa2fr N?AII 30ۓj$''?Ujbcc坷A|}}III 11 &#s:yӭ[7yMFQQ7tFys1kje{Y`> 2'xHdd$(+/”)SL4 ___fϚ͢r4 `lٲ 233SdFym:?@aБ5s&L`\uU >^ݻw{nnu95oylr;:Աi۶-رcL"IF3ֱݻ{SҮ];LFKe,/]vE6IرC׭[Gll,&Mn#337xnv0`111L0cXm]ڎp wa=ΉZ> yv TYaL&SY‰e_@tt4:tpzo9r/Υ0'N;׳|O׮]Y|y?[_{5ڷo_rArr2,[L?ɓ$ Yٳ'Zb֭9S؅7n/5___~'"""HHHgٵk}4oޜ ,X@ve0{l%"<<Fëڵk[2M0~Gyŋӹsgk {1T*55k[׶ezVرch4~m;5l="++ `IKK6=Ky>,cǎ%;;_gϒV%//`ݻ7SNE$Wc;ٳ={|.]j1 zoΝ;9wC q&55]rرNѮ|xoyغeժIի.6m"11???9u -[@rȊ±c(**ӓظ8L6ҶyI;îE־ >̔)S㚑#1ɲΝ;3f qqeP;]XЙL&F^{|]ygMooy}%:VTqDGG믿hx|4L)S0KNƠSZZFMb"*2\$&&"+í*lQ)(,d…벢8mΝ###JE6m\ϟ\>ڭjvI]W. ,Wu 'pMݷ2b|}}ټy3OsWpes֯_ri 5?~Km[de 8}OR2ޞw?yf۵Ko޼+hт.%Y0EU6⪫S'LRR ^xy>|njq(rCRb"jI"YrrrШ$iS{Rע kWZ=JMmK.3eƍ|9퓓QKRڶ¤ٱ}Y޻եwFiwTǖcnfonݚ>;,ʮ]5s& , >>>訨Y^淲￟-ZjJkvXSlK֥'p v=zTHӷ__P b>4P@)׷B}g]F_FԵ`ժUq=2$?(J]RAȺՕWA`0Ю]2ÇQ UZj#ڂ@ Pw٢vqSKe,@ ԎӧO; z͚5hѢqeظZ5 >" h4,B 7c4KW&!! A9 @ =*"B գViӦZ3 @ h8J/X@ @ T =w1@ A=pɟC%ˋXle+@ `4fZ1^ @ .j9U@ @ߣZuQ&@ MIrc%P @ ."%P @ ."-;;v)s3xMM>Wen Бo1EԭOV~^\Ȉ%ܠd ""܎;cDC:pر.sn$ d Zsfť˖qW;nw;[6ldaDGСX~}XضVpǝήS\[wcKZƑᖸ¬Ys-vze/ ᄈ;t2w$@p!3gè뮳{xxйs'8^ZYJ4= nYʪh={[ֲeKFڑ#Dkӟ~W^}zܡc'̝#gn)]`0Hݳ6ѿ_?Zjew...HLk煳jb6w}^ywW;pȑ?'MB5|@ ?*Iu*,W>O&cǒ=j|-?KiVEQqǝscYd| Y٧l/7p}jݺÇ cYA)ێ:դ9̤IrϽRRRµ#GPXX(F~GZ;-wmؿɓ'l29KQ~ cɬYΝ^S䷔Î;k͟FnVIݽݻw8:Y|9?-%55^\ z'8Q3q <Ç3}l_ؒt~uRR*JYl֯'NԻ5 ݺucÆ († ի={;׻w*xM2ͦM0L9^g˖-(±c(..]n WL^\vb_k(.*ͷު p 'pWb |iKnOyS;vĉ<1mZy'?-_V%w`۶mt:0Iӧ wzGfIOOrꫮ"((I a߾}DGGөcG~Wgޤ؅ߺu+"3~ѝ#Yӏi$ 7ɓ']J&k=uΛ-O>;umdt:OOʉ(..fIT*tQXt]|Օ+t'>8Qt햂=aǏZFVs%R}aㆍldV{ewo>Euu/{aƍ\:h>|جJUGngݣZm;ZJb;-@ O\'`a~ :K3 ONv ~~~deemyb˘N62xݵg}FnN.jgR\\Qױl2n,]j7Bvv6v碚7w94Tɔ)S68#ˋs{O>!//\ c)z]kjz^Tw}a;z>} زe+}QJkCgʕ+Ï߿v"@ [ ν gkTfᄄ↑h_[fM2X #;;.lYe:T:u .HLt5K/iݺ5GVdEꫯfC lF3ƹF6dY#._طN[q]*[(ߟ0k #L&U8ua./[n>nnǔӥKzh*/" BբwJJ |h=ztGQE &&ƩdyQSӛU~ɓL<,Y–[nϺ k\m~ ڵkk}$k3@ , O#RRR7ߤ 4v:X@Ft:Yz-Yʁ)5Q9 QG'N`9;vc쳅tԩ4k2ݺv%<<_yٲukeouKۛyヒ,yYKrȑv+P[n̙ ~ڷOk8}4V iVˋΝ:`zWϞ,X>}VGMϋO%͛ӫWOV'ΝCȱk?= (((d\3bD(ㆅaDyoIb"8@]h '' zan(F?W_e5#y 20Yx>,ZEMg{еk ƠAr7j* 7(u^kZ,F棏>>#m;f͜W_Jr)m:c= N@@3g(զYugq`wH|ZQ]N⩜Ffgr*$&qxgѣKMt{;ۛ;n9s2c +cϘUZ![QzMvv6=MQzIvv6l,Gu2W^ֶKݭָaSrjp ݉iCMuK'p 'pj̙3zF,~r ׺X¢G^|Gb9\tҕ/mۤ-@ 7`y棁R.u8aغmΙg:֬/=R Bnn.9994@ @.ܲ0w^sb8@ @ \DTk @ jo1rs]+@@ E)} $@P{(@ EJBG(@ A5Z(/ @@  '/"@Aط7}w|"@ @EQ0dE>4** VIP'%0$4 oˮV"ڥ{(i#GИN:E]dg䅎J"$$;ضl:"wl Ac!ڥ{(i#GWN<ҾC':wt.I%%l޼ bcηX1T @ g`бgn:tꌯ"v h&Q([@ @аȲBnN.ѨhTjQ ';"R~!@@ E hAe$@TH*E U2%P kn;uȒ uj;D+GB. HM-@ 4*h(V'8iJorúOT#77z++#$$\~~FKC;qYQU<TIi9LX$ڴ啁6 rv "Z )sƭAYܰ>:=r>!75 YJQP %8^m'LdgQTThDM~h47 '+3 __|hF~~> OAA!yۤ[O1]L%U+yS׽gy۝dU /?Ǩ/䟿-pɉSǸsgHؚٔDp0 ׃x7L|h*mYD6nہIK_-n'5'- [261 &i ΢ҩQJ-#I0n|և}NYPb eGIJ'!֠@PJKKtx{{N@RR`$Ix{yYRT*5ZZ/,C끧G=g yhnܚ'.7wdP3=&R[=z>p{5,_WYtl7"BҎfӸOe \ѷuVȊB-s(,S}Ib[G@)B s>jý9i#'.@)9; ͕>j!aHðEiܿ|BRѹS'&LݻͷVb1FSTa 4%240<; ,~ _(p;L&C6ȊE"x)ZEFΞ$FKLl_t p(Z@Re+3@I2IJ .mo5Sm,f;8t:fΚ͓ga֤.2![Zjeee.GIII9F j Ȩ$ 7cgϯC=>}pw~{dRPm?NYIT|f͚R Li|}e"[WsN 6+f[7oBe:tB`` J|Z-*Daa~>s&,QQ1 8|aSWp6[(eto^qlY ߎ!?j pӫP9|8X?x+\4u+ TURumez)_GA+&FsѲYΠ_k\#|er~vs 4~FNN>HN7oMxh5.|ړlnhkז3߮?AF*sYژ &T`RyQPx6K>/Dl<==ko}*8U@bPI./cJ^1'!L*dYa݆\|p 7sÇϑmzOkܻj^e4 ]:w&;;sc公(xyhJR$IuW$7 I*2Ξh4'jF|xgeZyB/-9Ez(rKX,]n/]M'}$p _sԕHB~q6Z=:ݖodW"y<s%pɖ%< a^|lɟĽnMbE(0ʊJsD㫯<7wgJ*Ks;w7Y+@ddhyB@YX!zO t][ڟ~=4L{`[N*\?a00tzzIVp>: sEҢEsN8eVSRRVSa$!!q(U-lo jϖ-ZÖd] A(3?ިURnjꠖ6QjPĖ?:jIŅ?3̺jR*6t+}\OB_m9Óe甲POps+zq@+LԇE~ːeY{ǟU ؓChy%[oċ::ogxKhВ%W0& btzJJ,'!(JKC_j5:0X_yꂮHo4o#y0yyy#77ԼOo9^z$jHYuC^Io4oA?WCLDE5 <<=QThtLkb LH.Q{;?ubẊ8lWy&BoƠ7ij8Reل" $''Vu71ػw%%%dd%!>^5dk \ Pl0y?|uԒhP4"}-,Tj:|ʖ|aR 7c eֶ75zyV6oر`뉍m(5,]ڮ.vq8X^'$PKҿCJQY4!lf$Lίߵ??OO?cU@ 8}:Uc 4r}4pP5Je]$Y3vځf˜NFVST\_ LVNu 2s;j5 VjolϸE[m̿3?ۇb=^<7۳%ezލ'eogo ++&%+װ\HfiӓS; 5/2d^-<ϐɤO G-O/ KSݣtxOWqc ^}ӦZ[wXF&Z,s?}=#ʜWڦ\77f IDAT+Z?ΨQGȫԯu|PCPSXXL\\|Հ@||]:wrIz/b;'iPY ƺA0P7XsXFbqZ,dH `R=V~O 5d,駙v~.ϝ9r|b^~5TDq[>}z0X]wqxJAy!$PPdQJE%U wWuB*3tvۨ,6_JJ/˵(ؿҨdUȲēacZmOj5qdf%** Y1Mբ$Is`ߏР*odyxngpb8Q*B:5#U f]mb0 +剿dá}.g#l*#E!>.JRm%EM2nQ&w׿t-CA+usgOal`V:PT4AVk_r\_[oqx2i4%P͚wa)"_oPiLf/st=Ŷ_fXo!F7| Ç(ը oF@{Ϩ$Ixzz%JjRʟ-cR¬3#<}3)Ÿ-h$Gʟ- |Lfm]ȚCBI/Ԧ'o]L[-̿g mﴷ~k*~7gk tƠA](cР.s㲼@6w|΢Y_74jzQ$@˻¬PPKK+^Sk=gCUph^ 2"©p}b @d{E~ۆ4mtFoM_<޻~s/5z-,`0)}Pm>oYLrc֥ٻ㟤M-mii -(P6Ȕ-"(\@q^(^A"\K)C){ZJKKW4t&9i["9soC[[K"*- J|λ=_Ees]xx(II?^H,Z6NJJ*=凅thx=HLL.(ce>/55UsS""Їv__Lu ZYbUr=_g]l(;Cl`w-;ɾm$|tZwr53X?J -xCli|}M ,$2 99ynpխ+(Gtr [K=i\zXBTF,x$U VE-r7rA.Iu=dAD; ]CEA"zRwaaV* EaU:&.e*mIRW-IB!7 Z}앩x$B!SH+ V &//onƛ Ԯ-D@!Bq.eyjh2m[ҬY>>>9!Wot:Cr %i}#/rRH$7iB!ͦs_{Uۖ@M{paCVA!BXWo?ϡwǛJ9<ةqUaCkGCn"(BaC&1ftڙCEK g މmHPEӥ^I(nV|vDP!T}S$ݥt oRc2C/T_`̻SuUDtli*UyO"qrr_5_tDDP!T}KPhf)j &+7Cg a,?;">OU<Ǣ7扭++zq&F _:/ĶP0o<ڵk0+_ӓ)S; )^J+NA!BTuu[j|c I`ߎԣ#OoQ4iܨVOf$<-=&U̙31bgΜW^e̙%Sf,~b[z*C% Z5~ʮ71W xGY]C=䴘G7 k%EP!T}Sm[1Jtz5#h߈9VҖ>4fjXf>k/J4lȽd"::Nsvm6S[ZJEnN] vpTިW4aGa0z_rbbb̭{u?;waÆzz)2d111̞=<χ~H퉏tbbblϞ={hժjbРAL`` uaCԩôihҤ ?ݻSF zMffyz{;{,& Zj1f%ϥ/$"(BQRMKw<7HyL^kc3_'\\ GKHx- %vV;qɚk[;wkNE8srmVTdWaĶ5t +\GnGn3a0t1Ǿ}ظq#ǎ`ڴiԩS%Kp̙-;wd˖-hԨ\|'xB,7,$B!DyZB-Om FCK|˟kGʿVW_%==֭[{}'xjʍuໆt|@)cc0ƒ3Y6~фFK`iǏ޽{o>L0m۶,^}Uj5۷_~sοm6Z-=*ݻӷo_;wri&O<̛7{I&DPP]vE4iÇsN۾};IIIL:͵cǎlNB!mX5@`4n\yYmF@m@^ .+QnZ$˝#;+KJ4n-.xZ{bGɹmc77}4:tFL:ݻ駟c4YbgΜaٲe;v$88z\;VU؊o̙Z op^}UZ-z[]fB8@) !*ךj~˯~i~UM}r!W!;r ;J~r)xk=O$5kJ:`m9y⸢ e^˰q5`PV,] HW7k' jޒ x_Kֶź^ׄfxwd! *(BQ1tuH;v @Np(GVA!si謮ѻ_uW &$B!\:ۧ<B!DIB!BwT=s]wq%%|jڵmGtLLv9$7#ҡSW2ү;*iz$xB!¶gNyfzK؆xxx`21L0/xo2IRr7oƤ-A Ϟ;B!&c4nZ!?|z=z6rrrPT &ֺ5ni 7.-3J !C-IIRzC7 w=C׮n.gO]lsFuPBy9NӇ^rI*Οι*ZЩq<#:9y wcL ,O8WЯ_?{=1Ԫ͛Z ҺgVL4TʍCg6/VyNOz%JU&tVX~ߺ?nG*1|- le<oыСQ+= gыy|;$=i,oN_\YذzUdks6.(> ϛ娪6tPFcAAA 0. %7בVsٜߒw_t0SE@ )LT@hqQJӡR+hPTh4j5Z-yyy <<<ƷX Ag& -h42ouy؜KvKWSX cU̓Iھ' M.{79=v!nfӡqۖZ}[u"ȯbBE@ 4J~ lݯk6we'zFC^^999,,|LXy6مdGa]e_u0>5\2gmXD|t7^ݙ'ΞJLhg.'r"Øy=7xi|GY ߯_Ȋf:)#,0Iyl,~+}j]S'׈:WO86/LJ">o6mÄUt :xoH)||ߩD}/_AbB#o?<ϖf?ĄEҐq4ms/Gkm7[} @fek:J?qT: 'llj+ ʓ3DYZo#f`{fds0 ļI/2rx@ĄEWpՑe`R;[q sO'8= lFBÏE\ /q׈a/}Xb;L&<==QըT*<==&;;s !ZF:= '%u5wuQ7☰H:7~ x4hy&ݧX{-Nڹ8zJ eښ_8hyvïk| KxaX"Ix{JmO撔|GY`~b?G>KM?l\[Gޠa(ƒBzl}Zu`۱@ӈ6Wסm˃]$9yZ>[>k暷oR&8m{qh:Z{6ౌy7STWSc.MIr(ֿ{$=|^i&O|0q^c IDAT]hŞ1 Fٲc$dُdis\HKߘOQ!uhß=c0HYdYJUd^e#oժXO?&Ϛ 'iXWk_[:>:b*;%p'%[ھP3wS\^ogaD}4D{ri~~~/jh4 1 5Kq6i ϟDB_,m# $ߐϪ}Xp;?`sYr;d2f81>sB}uGۨ@,ݵ Cv@-;R|l_G_$.2gf'x5Ztk˦#I-*JͯmXΰz1+a ԯ]oְOTy4j3nܻQK 28~ۭ?JUVJrk\[:7m{k9Y}<6GO":4ǵ\jy}Zubލ$C;ެ~57@ZĆ#.2 Bki8Zciz، =WQovMn.IS z R`~-,-<" ( A1.M4 ++^Frrr \*UaQR?|c?լkN)3#'lm. "bꑓ%=ԾuGVW|GY?1-^DŽ?(3OZVB׎yzj'3eD*oQJ?z4h)zveJju]ۯgy)<>Z4S8~whcip+ܯ|t/3y%GFd2qj uL&7=;HL+lq;Vʹ+[+MGv(g[c~xyjxz)>>8j[Xlپ`}s|[d:l ;ns6\ X%I`be>*wvE q+Z7;^=.KhFFWSӿ&>]=^M05`0G`sNL*ޥ)l9ׯ(aQl)OUEń?d M 5FRן]'ቷƋ)om~KF^ zFL ׏ wժKLWzVm}cx~T^};Y-*T<ҫkmN.> ]q`M#Cb ڊϑb~o=\EuW{߿WH-{{ҿ+ٿJBK󙺲&{d]:K0]Ă .FRmVv-___sK```Kt%i tұqkl6eq%*6roBX?_N_NaxO]A~M(:I6LvuSZڣN<28oRT*Ƶa?{kӶuT2+*?UR3y~r4ubEX&;/3~>5rl]I([]ϦՉs)QTԭO ZMRkv,ONaгelm?KOI6ogf|֎JF.yYeci*-.y(ЛӗeN_"*pK /gMs?ݞL9'̯O|g5at^';;`0$$8ڵ]j\VȽdce#L_+'sq>Z=Pnّ7,إtӫe5kQTl< ^G~k`QZZ&6+nJf:Vӓclj\Hc7ukǖ{^7kgbZy EΧ&x%1m]Ĵտr12g.'N)` l7׬-ZMc~U;rob4V#-lO۞Ս/1co,^:{ؓ}F9<7CLP"FMs8.ŵlna>3Xc]ʯ{ߋƋ@jV:at-uVV1 .u=]Z^^1Z1 7 waNPm>߬io+TÃ/Bj>o4mÃ]ٵꗻ+EZ3 +s6.D9⣛^GAc` !58Z|4^tiچCNo0gi)ǿ8>8R?ヒ;C_9O#&4qH8HN]Hk\LyXvV6u YVQp1I`Z, FxzKBSiu ݡ!9Ѳ +|cACIW}?}bN AyNNOݺu@Wv_뾢Y1g+ul,P&DBJJ*zWIm@I``%/7,mghBR_]n ={UFX(f"+M tg !čf$&trK! E_UVw@!1㱷&;I'7\f}ŧdY->!*R/;HK{ٸ-n7t550P7FUthOª{&ϵuu|U}W ׬]IK{umږiEaĖxpθvfo\œSll6^OLX$/ GъO86/LJ">o6mÄW /OOH}F0}O6[} @f%k%%/?x{,oiG=t6K|Γ `g f}w/h.?c^bF2ٴnʤ! VT I<7kr$^>F*u|bd2ѵi[>^@A D^UN"-]q6%)e 9mvs|+G6d{ry 挟c_|j2uZ|JvkO)4Sړ,}oy"Ix{> o"Y%@{6үu?&&`%qW2ݏR;dot5N0l=#''[|k$_aSiрzOǼC9krq>{e*\<ʹ5XC;8h,^@iX'gv۱@ӈ6O2߿꯭)a~S~Ԯo5kgk*a2~|?/)cFRkXs-%%Sվ%pAQ~mN#-_0@ ڷ3NY~jf斁nm`n%>9%6{C݇CNVlvcލquk^XҲ2 Cth$g|4E"cxvhNyWS쥻_.O}-ߒ\Vog`L25VZB?J=}x GoHK{8<5 k<=HLKF1,3-+)I 4ֶ3r ,<,69yZҳPGUbtk?<J2j"]u:clV?@Y>tN0 ֯Lӓ/ƾ¿~O[D Y~}*淓 l9AmӯusWW%lߪ!I#UV (WF._o^f5ߙ~c{'OvtFv`>q;wR{=PT֏,uT|G&yFɩ]"xqq4mc!Xkmrr" ߩ!O*qm<=<ڴyn[_9~PZ׮K^0J(ۯՂj2]U-jiT'F'#'6l6Mʵ4_:gR/kSI$L jذzػ+df+]Zb]h: ,W]{Ŋ.gޛܶ\b_v3~̯Rݲ#?nXıKg9~,7,WJVŵcѽut/ݛ3W}UqU[Zҫe,hP>Ã^-;izg(:wwBXW[$~M]VZ2ESO\V8i ކw3GsĄF5 w{zx\HMGMmx E{yjxjO|<k3,G8`uon-W8%6O|U`p>]6ke{ߋƋ@jV:at+y-m_'6yoexѷV[?gs>d.M VV1 .u=ckk9c*"~#;uiclmG)~٣Qh^/:9;Ҝ|kwO!utKS:yvu -JEVLpHmvFlÂ׭^i+.ñ3艏ߴ]f[Yp:m)V 32[24)?%%15ס8m@Lz[_P8M:QQHKb5znP!fT<'Zx!-[ţC#vnƠ.{|>urbs  `,fg*w%JFBǾ;зcߓ.cdfʽqDV8^^Q't0"-B!wpBT X=Xp>˿#;_cunJum䞙NM|:W [id]c2P,ZY`UO BqSzxk}Qbgg!jMD0kp?754KI~Xg^@k j&Iȳ32s2{f3\#[eWr,aɘ^1Mݓi1":OCZ> ED/|MbqKd/u&Ol2sdk aX(#?_Sdقu,? Ie=z58?N7_ζui(^\ұt{"3]"i BQ&tPY!pC'P˼7%4á@cuO ^Dw0 e==1bױTu䔘^m_^z фZblXvMecԫ]7"%C˙XVPl:惗iPǟِ[ ט~><>38]pfjQ|=yfh෍gHthZxT I+9l8Ln61AFS[ !rJ'r~B4 ܔxgaΤ%\vQӆqN)V>? |?xz(ziF2Ot'>}>qc)'<.f["|(|c0?`xE\B,O Ƃju롄P{A4].]nCeYjNLd6o"} fMd{u8oͶˍMP(,v-GO7u)_ߋuGSb'Y:L&ײudkLŖ2qT{E+]vm|Z0JHK`հvtznx C?3eʽ险naPカ<>ޞUo/^dd~YU߾SR2[ݪz|֬z[tzCj%c^Aiߩ_տ?>PszAf\䡎0 ,?|_?ɋKdMU8A IDATʳtȡÆkd"'ug>fīңGG3a  zC9Xf|kzY{LtFzLԫ]vB}"NDfQL&j{":ȜJ$[Oxz0LzUF1=Z0(S>H!qZ-7&ȯ&~޾N_~U;>w/nLNo L8n18%6ѽѭ<^6ÂH߸(ӻYE+UHCϱV[rtӛx>d_t0AN^>~Ϩn{z YWi ){.rohFh-2L|(wom#gsxL|zҷm]rM(iˎrOh& .kYu(L MdBx&)O_-Hq)-KinmNi tM2mh:Lrtr6z^[q sO1 D^knll6^OLX$/ Gl8~6t׹ e4 ">)3wdzUh Yw#lZG7eҐq䃅߱a#>]VKLK/_6O%=Bthϼmkx}؊^RYbB#vJK86/LJ">o6mÄ{&g#C/_AbB#쪿ww|֜L:c3fK_S\:/ǽF\dgHZ/WaÑ]L&6m\S8t-M@ uuOcҐqިe:{OߧCI|GO͚I<};t֖om}re|GsI .'(˻362nt׆[R+/DҦqJ=hjtgu\&Y|Fu QƑ՗)_aOq+w&X*;Vz({ٵNgpfnew7->Q󦃗tr̐86LfIXzwCe5]ܯ07aZFAhQՄ,{3<-/$"B1?~^ foX h?wǼB-'*CNfIx{>_>l{].gӨgL,5}q o9dُdis\HKص}mo-pޞNII$Kc>avV|L&v8}3nZVEUhр<--5s8hykǑt.߳e\ϻh]VU!>K։"<(ѧU'Z4h(p$~o|˨T*_-j0xr{o݅!>O\tLx"?[KJ2m^:^Ǻ[KLcm*'G٪_w$>g|=~蜞L0Lst3FtF-?lY 85+2ERB~}<9+oݝVNl^_,m# $ߐϪ}Xp;?`{>}e{$g\h2QB=Fpŵe鮢[ffn[@[px~bB#Ѽ=.R|l_G_$.2gf'x55>=C#׎sIX>J֬d"9=:ʓ@Gdr&|C>tgҐqԮT)Uئd:^JXTbѥt+^ +nl߈ZV*Y--6'CvT*@(G7LٿtKแr;2\d,$`MLFαKgW ԯ]oְOTiY-}EIU++dm:r8= ΅bkG&1bX%pݴj5ҒPyJz 8n߆]AFuVgp[Xߋ)\ͲPר`1̋jQxw3oDK+hꋾ/=[s?N: &>iy)Rz HЈ2IӒuL2N@h4SeAX=[>J\}eU?3ujuս%G/fښMƵQۂkA߲6ː]ăϟucIWGheRvU'-U?ذ( FCaRlmn*J]WTUoS6l>fI_{Ûӗ/Q,pAc+>%riGWPGv2rX;-1MwBe(?b4y/v1_?6W~.S8] BΨ_85M#cϮ[E%ϑodM"p9#KWSPT{Jbe^oÖ4GoMe}Vl_Yھ?oNOƴa׺7:-Kiǰ=רC#?-ޠUV D֪ٞƋĴdƒJ{k4ϩYv/?FMw_|g|j^EDj5(H|Ϧ\R\ndp8/?NmʌTZMRkx5Ed؅|j^"*- qv̆;Yc3qmѥ,3OE\Jjf:#;0'(?ΪJoyl_gqg|*qm<=<ڴ9SJ"kkˉ4 /8>|_/C;~h֘84m5¨iAĆcɊ],TRSZlh|~;z8'>[P.GeR30 yɐgI͏[P>[:T׍RBZo|j;8aAE!47pMS',-,5[&YdOcOiVc.e斻憨 dtf0"~߯/=s{Һqs'+3y>7Ed`!^S&v;'bIΙ8;[#EګoՑ[Dc8_q*[[ԇ~b#$gsj{z=h4\Lcѽ&<]ܰ"~ (*..3ϱ DeS%5Ɔ>m2GlUxBѲs:9h@Bħ%*ⓐwTP}cZJM3#NS oQgmmM F7ru ?s㷲on,ؾӉqIcUibִ`c`kBZ@4~Th`h/.&2{\IObr-XƘs|*UQSRo*۾ h=V^:a:nD+0 lL?{g6IUj>_#iYx:| F3e|I ֢q&4.|!L_3"bljXVɂvͽΠoX:۩mU?%f["f4̭lVXmX[[S\\Lw2e1+bߟz0V̍Cj""V =B^oPժ@I'p۱}++"Sŕר;GMMK=TjnkKoTEX2%l+T*11@?<,;wUvAb/bznkEXR[CwC@`ͷn\O~覉{WiN~tSi?[vڤ:**(*o3ukԤé.Rj" }C6/֢Ӱ{B>њU+hӶ*iÀAwo/[oo!@.s_myUpV|c+NJ&a&u0#U?ȥwYSN\>s+brKZSwo!B2w0xxugܧГS 2o,B}OX3%iӵ da(BQTBT3'PԤЀ,~}ZMQ X^/B:KFE'#BTΎ? !(<'P!B[(< J,޹ ^)c5i4&.EƦ3~TZ_Vq?|jrQmUmi,޹|_Jӯy,jn ub&/jWL}Yh,_۔~߳ù.gl0ߩ+tǪ)%jCuU]iԯUWR]WQ;ɃaD'#5kQja&^Ka] he{6|:5Y4߀[4ή-ѵE;)*tEͨ㫨(lRm_ah4m[˦} ~t .OXH8wp"<j{n@^a_[jFHv@J>\LNԕy2yx<8Ks&jLc^1(˿-kDS)fCؚ_lz3o*Z?97b..횶4iOBUkʎ^{dj{E _%%К{D%W$,^͢W-1J˟ Q=|֯k,}c_Xkd,{214n(LY=՘vM8|4߾nNnCCI3g4SoeW?~꿱k9R o%7Ծ_K_-!Uzϲhr9d$f{2"lq) ĥ\axy)Z6 $ZkHBUr.ĸ2ߟNHo3[u"j|^UuyGZi?lg1yx~77'>^ⴓ2R`-}fZy Gw1=N^Mꥱ>& ʉ3qqtf6jW>}H7LO3vl/vX:a:?:FMu"j|c&'j|Pbra>?b;PV?*Z?JW 噰,zu*3FG|UݴĤ2V?^Jڗ!J%g9Ki_|?т5V_cc,1[8|4_z_γ=E*N f11T?,0!JOI7~ 1Zʜ㗱mn7V=Zɛ uX F1GCcá\e3spW.K='2rn]>73XwpӉqviat qF bzNEE,߻_C/ r-EQFݛ=^PZKs?ͽ2*|ٍeVkƖrA7gp(;N>HL#Z 6Zp5#*=[͑oϤcJeu[ZX^˭Q ;8QlllSIsįUU:ҿ|[Z?UI/3}>l? MJXߜ<ۗcYqG4m_J/Vua!AX_9L#pz=`w3QزtF|]=8[kȯ ĥz٥+X[Yꁽ;gRX\9hJ8iਬneeEXp;NƆP_7/[?4Zޏ c7j5I+9e>oO~ ْ3~-Ѿ 3T* uӲ2K_ 1~Kkם~h_]*z7چ 6+Ϸ1}֏?,m9/C[I RJY/J=Γ{nBz|}$G.fٞM  W|okD15!X{ `?F cFnIӍq2]q9*s,[wpDekc0cO;{tb߿S^\JMd_m[ۦ tbgX}}t1J:uN$խ{,?VVDO^aEŊwPӣeلFjf[5)oK(~s׿3vĞ/Ī[D(-׼QSvB2snNg%o[n'D,)9qskhY{:2w2S='+QZ?*77|_귒j`Vͪd$pъ]`~U ݞ֏|hH0u}vlʪ2`[mxvֻħ޺G1K'L׻L^1,QƦҿCWs%5m[MIUj>_#iYx:8F ܙ>j"mZ`Rp[g=4-"rgh#(DJmkkkuTPr&Cf>sn, F3e|I ֢q&R&R4 IDATMWZ?*9_m/1sݲ /wܗ1[cXRcJ*jC>'E$w$>3_گokcüm˹ʎA!<6@qe9C<?'G*^QZ?X m;~Jo}ձkN5 Ԫ[ұsWR%:rh~yFНXrӷ#iUZ'o>n la4OwB!iu9Rd+5fOf ڴmJRbaMλ7o-UPX ȹ/s<Ty2(BTϱ1 򹘜һWQs0EEFzGGG4pͭ!xxЍ]WUB葧 !/ kp5# z ܗw鰄Ta'~XՂZYL:HBQBZi5U ,(,qOV8ئmߪZ=2(B!-U /˯`UK+ e$PT B!*T8?B_̿~K)WprpdD˼xuit h=",Z+ɦûj:!֪N`~~k>V/BA~aUe- 6EAQ!!VEѫϫ1_ziSW.0v'DM_% !B&U 2 G]]zH`ZZipRtxY4<8ַhB!uMv y*%?B֬Pfohu/x^'j 午ث퀒5?|v!]~_kh:׆ϟyS}V^2sGax8Füm+Xw0yٴoۏx]zH~t ]LZ:Ug0y8;eh4Ō{h:&X ?\ŔUv##pP4n؈sIHLO3>x%ŝecOr͇w0z5^N]̹s9p8^9WӉ mݶc{q թ6j@v~.τ `ѫS1=Ӯ%zKm^: -=Cu?'?'|!4{˭B!1Ur9?!~}9~G`Ue=5:9 縖u]Ѳ9YdW]9ydd_ɥށ’X W+,yS,m˕'7`iDs:"h]o ߀r8u7-Ty]\JuAT݈?d穃tkގǛ~EYjo^őFG7Ғ+BܫѣGvKUEFk3)}wҿhB{OW=Riӌ4`cm W3HHO.өR۪,hx { gGazk4z>#B'py)WVFS&.mY3 k++'bE˩lmySf}gN#|{EOF.+7ؚV=M_~G;b >-U1[̷D,<@|j.gg_fʦ_%ۯy>7Ed`㡝wPӣeلFjf[-ww~}8m!:YῪP#B2xw0ZB^7ܢyԫ0}|fyE!c>J$-+Og7‚CchwVV`meEo)/1sݲ /wܗ1[ڋѫ|Mxsho7x!_DKXpGSbCatkю8F+B{QyUjխsgع+imKnwDO? gN4VRމƫ&ӫU'pM"B ֬ZAP(N#f z(Ј_/tm"߾y 97ew.'#Γ@!BQ\ZN@!BQ[Y/JȃaDgHuɬ1ȥB!#@QHB!H'Py2(B!- B|2@Q&,Fǀ<#C-޹1}aֆةԼT2|Mܽk8"q;?o~Jf#T{ދweCAD]i^_˥+898zJk#h|y  6M^Zu>Y:x/ҜIl?SVԕ 4Zx9Mz#wd~eֹ'0zv1ܚFt h+ ̬ h4zdV.H.;Օ(z5y5f[_/WW_SwKGz:gy(0֬EѫIHx-W)^㥳HϾΔyi:&UԠ-T;.kbhD5lF6OƔl9%7tX:Jsvp$Y+YCQ|=6MZ>v5=äWDعkT4 s{kVXP(7J^aZ:u Qlv~.N3I 1~ȰaP޿wa΁WMqFKDRf-}/uv&/'{GԶ=Mq cPF/,˵ q2B=}{7U4}>BZp>\LNԕyveP&-u,wbJ*;‚Bx8.{.)Lbę8Jc^1`VPr͇w0z5^ _?f3e^8NWc5 |Gy̩_ʯ}*) 5~}i&v;ûW.]ee=|n6oDz=Xv>Ĭ `Rňor=}jԻؘܾfopvp4{h9/"y1tiVN0ilVMi0$Fz_N%5 o$oMP7a4?|v!t3 ,픕vҪtH`eDd&ZUDmN&q]'No^‘3|9W& evn^DMϩ+;&/wyshԕ?pj8޳<|<Y~#C۫xyot |7>ԝ'ՠ!5װvl/;? %)3MQ+cpi.O8VեklzxNDM'NJcx5h[JqeZVP7^e5]eLZ4#'?/.MKտFjАݧPso\ ifvJ[?Zləi|t6M<|WeJڧU!?(پyħ&/P]+@<ٕ6Tj;{$16oG=-@o3.$;aDk|?gVlr96maRݧs4Ɯĸ2Ӊ 5iܰ-}zt$ҁ)ӭy;߸>=x+*x餉֬o6BV^{DPT\ĆC;vt/=2*[[^d3ѡY+zHJjl:7"F:?~$2b$VVUY4A @=Y0¢"ϾEo?Kq\t,߶i UCecJ/[w<¸" Ol,wgWEKwfs^Ʀtj^%mFŽSGx޴wʎNΓe37}C̭yl?>>{Ыu'''˜RⳔlV~gdR> Z|NmHv~.`ž-ۏ~QVՌ4)zzGoY4n؈$߼PiZkPV_y}8puwj tb7;;n=VPٖt-1 g.t'P֬Gû((*䭁q-#B¾G9t$6=yddK3O_~瑑}7'(R޷,+,J.+,yS,i t{a̷RT\̧O^f^ߛ@W5$e<`*c|B{<Т=n^n{N{Z*}JmrPPٛp*._S.E  C~aV={OOX[?3R(iSn'˜RⳔl[*n/fmXyX[Wc+m&U/[ekKudKsz5a[qZbh9?77OZNEѮ{߅Rj"ޮ8˿o;Ƙ[>c_] @QH`*=k٘bMwJԫCmPn`̃-keY[Ѣ9ʷgc˧\O'=+fo{^b6cIs01gi;n`uLjߘNdtF_f.|:5~<+N#7N?wjob[qǺ)g՘[?LD 4>sUPZoz%:3^œz`.ddGlNb@H8]*isoB4Lxlm1]>\5?X[Ds[[4#93k)X[ckmՌ4ғ P3[|ᠶmӖ)_U_i|ձeΓ!Q 3'܂<\9hF'_AmOGff ndT*qu{TjƟTJh4LY12CL^1G.u!So]է_|8ڋ]4to_sxcR=VHu?|/&a!8y'c ]4}[ktS((*}N˺̭ <>q)o,寨}[>*D1^mGcFyI u8gtX#{>1 b<;RX4$Զ*e햠t7q?o |Eѫ9w5*ji{7?fXg#wpTCm`뱽l=w)sEeW7_uj3:Oxw?͇ws19/˵ i+VVVmӍWr:13q,ܾ>m>Y-/|J↵WX@Qq(9X>X!93G,/zn̨^((*dQz8_'ļyE{mMvOĒr=3qw ?Fb5 7x9sur΁؛OKbUVܑ]שhrxRodp#7[7y>7Ed`[7~ګoՑ[Dc8_q寴Os˧Te? œte{6)zj)lmlӦ+V',߱ Dec L]kC6]5?Z">C?7ؚV=M_I !zێ]S(kP堢Γ[Kf,ܾ+RSh۴% q uZm~ˤ[{\Cf>s<ސ}^?ao7,^͗]c/ڼ)tkю709  Ws!2Lc0or.%aGPτ P J_z agy᧤Xry_DКůO0U`Kj:QrPQAB!E:Γ@!B!nNd$P!B[(< 6ۍηtFo'B!ĽI:Γ(z5 Wu`rh4,ۻ'B!9tPQH` e_+,@]B!λ~Z-Zw(B!2(< Y@\Jq)W#f~λtFw~kjR!!#Γ_axphێGFw4,̛5B!ĽA:3u$'k:::9. yks\˺^fvo=pWQ !B;rPQH`rur 15TS IDATv:@!B*'@Q=C`ƴ/w{7ӭE{|\=7(!B{tE'#[v^.Fk!B!tE'#ۚQ4qm5B!=A:ΓګXS(B!D5Nd$JIDH^!+"D'##0B!) u'P!BV'{ENd$P!Bf&oV8O u^ّ5t/Z?p-d\PB! uޝ/qKR2AQ9fm`srz=~O1j(Yy&_Sҷo_Ӭ.4iY'''ӫW/իǸqJK!u\*;;xyf\}\ bŅl~'-cbkFmʕ+㏜={mڴV C0qD*O?Dbb"4lМPBQͪOC([CwbWh4xϖ@3< ]ˢ(M틕Jܹ rGDDQݻ7?#}QOJJBq{?'?×G#xcb.3PnC|&Y _sqLtŊ߿˖- +++\z"##;wԩSu'L/""~qk4*B! u^齀%;;QZchrrrx@a&at~<˝nT8{zJ?:ϤAoܸ#G -3'@gUVeߟ֭[G׮]+^eԩǎ###Rbk+w!8 Ҏ]ꕋ<Z6XVCG{phX tՐ.\\f %+)?n׍7984 Y̚5^x~|||,hZhРI&%%e VE !*U=2(<\Z<(q͗{A)qH⡼DW#;;pB"## @z[eU*22ooo&L`BQH'P.%dHO07?0Lǧ!RO5ͭd4733Ӣ6?EѦMKM/Zmb)-I}W$$$h/+B!jɛ  X;X)(p#`cVht͚5^z<<<4iqqq|G,[ F'@^ޭ$&&V*ӧOcooO``зo_=ZBqoN'k4x{+9c*~>5cOQν0 9G.竵lZ,[[[x\ST >ݻwcggǶm-ۡC֮]K^^,XR1޽]V+ZR !"ugNmtdK=aRqk(Q8=3}wt.4EŴby=̞=_ N:\zyf|||^ޡC͛xdzm6|||hݺ5fҥ&Ƿ|rƎkr+})B!j,^ GKOKȾ#mԨ >|8~!}Ot_>M8vePٵy;G /.dX echTQ|Qby.$`#,((Ç r_7O&sI[̹s9p8sɸ9Ғ j;}Ek)\LͿΠuE:5i>/}Lھn^DM/} @ԤDM_Dži_aA͸@V^KjԻ2s(ZVq|<6ENeOʷ>& ʉ3qqtfպi_Y@V^?Gl޲J/c/vX:a:?:FMo4`@& EԤRʟʄhӌ_7GMfU /7/H3F+W$>CG?_k|0x,6bUV}$]Kso|%g}Yb=M=[?gJ֟aWΓ+xk.L_3_7 1?;M:Γ{\HN`@hl?b#fYQEE,߻_C/ r-M[0 4]#NH@+jf*QVՌ4NͽJPZl)"':Ѩ;^~<޹.ԛW5BecKPN]tnw<Ç-;<(j{ܝ]}ү({ru"Ы1cj|Z-bTcwSF#CP|P~J]=#7 7lDS_MP֯ʖD %Ы1;4iG%We0σ;才 CxN" 0~2~(=~Vt\*Bײ+J3!*y6oJiYz|!C/ S+tZnaIi 2v'o-?H\`%J8O^a@K7mRKHEᣛӏKiI&P;%W%O-XZfNy4}GN~qsr19(mUKVڒoBʧ~GIm_Jx߶L~gQU>ՃbM1I43~2~(=~VttE'#u_v:›akSj3} KgeՌT鰄NdVx-ăpo3D=gso,ƻ^v]V/3}>l? 泲E{6ַ.Joí΂~ӷ+([9WUTW7cXac|/C Ϝ~6eY">sƖ7>fn)htknZ~S?? E&:O ~߻n-,)Qc/uNh h4LY12CL^1GwT ;*SVmgrW~c`h/v>(HqvpRj|5pښTw_&X[JEAQsZVIxqR ׏sށ '_AmOGNT&>%&)_X2_gQڇWυ˷NIښF ͮd+j':OF\RlmySf}gN#|wy~ksx`FDAQ!0)O7>;66nܜ *LXYZ15ۉ>Kt$w))G;bJ:b*AmOXgil=W7ӷ捚sL{M^\JMd_m[7Q+++Ƃ+9Ǚ8n_E6]cE)i?5Ii2|Jڗ1JG%kJ_mo?;Nħ&1orhўzvfP_QrPQ=uۚ%h۴E?ث|GҲ2tv#,8sWY/G^yS֢-}wOuZcNå^}=ks=7WDmӕ1[y&l`q8\>[m[$Uv ᙰzTV_be^.<޹/+b(€LY1!_DҰ~hGͳU% 0/`{ܑ/ߨ;GMMK=Tjn)a~{h_[DjGPb(>C(_OI2F"֏4%X ɗi47`Yժ+Vy2TjUq=}ӭ`\u{(<^>ﹹg1侘pTn~cf=_/r_*2rn#""5^"Ҟ ӡ.'W_,s#26o[Ϡ,^Toܼ|Ç@_? tP1<]h\t5uᴾ>}:111#66ɓ'nԩL0Rq@1_glTܹ3-[`rpcǎ1|&NXbj#88FKy0a .ȑ#[ '( ;I[agl6V+$m]ƤaU  Of| qYYY/a6Pjgy/;wҴiS@`` ,駟СCSO1o<4haðlL6킾۶mfcl6l6+V(1_zz:;w{%gffw^㢢8p%ٳ';N*u=z@1.aE7جtiX˜={7|ٳgӫW/ڵkٳ_8x }eܸqs=7;T\\VSRR a :»&''722F\\[c9!8# =<9_Čp16+G0iL٧Is۷Ӓhݺ5/"]t!//e˖=L˜iӦPm۶щJ I|퐖 !}jzG 'Oc?0N8a?UwG!))*VO>]b|Q/%%7|7|Du\Em5jDDDDΥ$P+̾ZI/xYdAڶm??spwr3aƎK~~K PVZ%H /fӦMq6mm۶k۷B6mJ]FJJ .-"""R%R'8e^ 5_XL֑#[R`y:Lq=ǏgŊ$$$rJƌc_&--^x)SË/r7ol>#++ӽݻwdȸqx7Yv-?3gdܸq̷a-5QFqeHitM޴%vֿ؅ʜ;HKM!qHH3}t7n4oޜ!Cc^xV^b`ۗӣG:t޽{=>!!f͚n<1` :f~m&O\bĉ9vz+6ロ{Xt)y{<""""$P k gw;_Zj_PXxyy_0K.deeףG{qj9&MbҤIeN=z4>,۶m[nf^{ğk׮]$$$0jԨRgggm6-ZT""""bxs~H'i)e.OjM]<>lX1c?[e^+Cyӭ;e˖?]DDDJ6؞9[jM]b=1#ǜ rȂl`ṒX%D=1K""""$P O@:?k""""$P O@bJT Z'N$ k$O#""""( S%j͘1#GGJT ztڕDO"""""( S%zfVX=t""""‒@18DDDD:](W+M$ꑁ y4?DhܸGcT ë˕twne$:uPDDDT 3z%0;-﫭Ka8©Sꁹ^;hwen鿈jd2~""""^ѭ??٫-^UXte:otEo"Iɻ"yyyx{{'O'21<#W=D܏nܱ|2+&~ƙ__tX>LNjޏLX乭(<tժU9")""""n$P Ja!iwp`6Fvq1toIou[̚5;裏:FDDDD@1<#WDtoM%l[ILL 3fguT %bxF^ Dd.LN%W>o= g.lz6F]EQWuכ=ջ\ߑbbbصkWRDDDDII+=м$;]iזK#=< +yg~Mx[|C^Z~$9ԥK~~7H-yguJ\ Ej+>\:,z \ԧ_b˜p=ZtauXD. ٌfsJE9-75/OI+eރ\ ˣ$P H8C(""""RLI )$P OaO_—kmRG⟾tuÿ'zDODOc85R) S%z}a%}X׿P;7Ӟ_gJuX3z\m!]g_l#n1x?b1Vխ˨lX~|L|>ξ#"R(J`Z,-ã-Z%GӎۇO&/ܾ]uՍnﷺ -ٸ⅑XVVx:,OGi?"R6T Ow>k؂f#cOʏņ{qo[L-.o})vyz!?Jn^-"y{h©dgszh7m4k;>g祥sg ۛ]G-=aZ2m9tkс'n/4boZ8vxʾo{+w<GǙddg] яAx-C#8|({&28D{GrryE}oLt'_J?8޾ٹ9/gþD4 OXk'l_;2 bpݗ,zxSۧ2y~5+n-;0|u-Tq[ǗDM3)ө\ъgGQ|UvkHT S%|a%/}\˰Hn;%ctA kR!bǗJLҞbW#|*vc]OG^a7cٜ 9{)u~D_>:><6M/՟a6^|zAL-{̳w0ά'zw&9M`4G;<,_1[Olµ_:~ű£'$(Acv&gƝO1I9v->%>%}G[8;8}*ʙWܳ$$ѱYKhq8Geʮ?V=2uC,{|A4G3ײ*}DlX=v%Љ|[+KFN " ~]Nѱ{rlm_D73uN=[xu eh{r k̝ gxe\Ge9v2F  ՟k>w*>g//>w2pj>͙7K-?8\Ʒ;3q]h ]«O;1Ly+ox߹GE&ZcSsۧJs:+L-l6+v s\)ou2Ǘ"vEDp#zȃs,>~z}Tξ#R['>pw?KPI* +>Գ?A4׀v'7?o'3x(J b?>Oӻ}7u#)2,>EhDI`sM;NN^.iihcxۏ{ 9yN L.,߾SRoo9AfN6y}Z5#l2\/>"hYɢEh}|eT,W#{.O_G*s|)W(kIRhק_pȍS(J`K<ը^Z5ZPbtlDZq6ą/-r}n]O>M5>ZL,uF kwo]ZvY;_eM%\Qx:g:Qޝ*emSۚ8oY5wPY<2SbZyj:ǗsZtgU(-WU9QMX>WV2t6MO92 z}G~oN oًCT⒝V[dp||ٕgN~W  @ς+j=ݥ;UTP@=-%^'ka`p}|>ܿ||ϳf6{a28[ NY_e׏!M}}#܄@?+;ȡGN>liÐ*߿c\HIX2suu_m]˺?|&qlKNqͥ=j )Il=;?p7Ϭo>;9q:vg 1gHHMͫ/',(ĺ[%ݥ;Ud"|s%Ʊ?1k+^<~|ۏ%h״m'7?Y}l6:#)Hti=zܱ_M߳vcoVvwVeۗ2Ǘ"?JBJV/wnY|.RۧƿVOUbxV~]E!ti#;iRE!r폣R&aO˹`8=~axJ8tcc/瓚q&>L>\ZBaU% p&;-][~y]xf aAЀn}ຑL=<a=U6٧biIKzf/kg;yiٻ,{RW7♏e78eߑ> Љ#tkсn>keoy<#.3J'111ק߯\Ǹ‡7[uYZj Pr(1f}׮ ,$-5E_ $ (Oc^J|J"ϏxӡH z&[9"yxKD_ړaQ{:xROo|m7 LVVV6rrZmƍ1͢Ϡ,^Toܼ|Ç@_? tP1-L֞4Wvf<HO#bxlZϞCT *_`eg ` /iL,^ &J dbӬڑaj׈K/ςU.K>}[E*""".Q(w.jf`Be4>Ew?*l6'9|}̜8u,u `zvܲmHfqەdqUq zkȚ)g>ρL$fNDDD\$P _Y<xx tJ`=~k[^'37 lEPkvpͳ/I)LxsM(4 NfzG2&&1]Cٮ}y Ws4->ܸ/ q}_v>MF"-3.׋뺅6^f)Y|-\. Mgf}o@KvxgRnrY$ZU( Y&pM ,Hya2Af,%bxE/Aff6$یludeex|´%T "XZ4!,!.oB;CzV>-4' )٘&4 a)" ?N&<_3Xy?go]D 6cCGESgٶ_׮LMeڒ}Z0KmmJzG2txi\ߗcI;m&7R=7b'pZ#L[ΕiP|ndb]IDDD.$P ϔc־k //3جt>@*|qNfҡY}B7 jiIϜdh{f0wI`XA~`u<Ǎ'Z-iC?s0): Wۆl^~^$axBq-ܺ]ʳ;!^<;^d0$*ďNr) l؟|J%"""UKIޤa_<( HÓN oxģ٩鹄4ujA`릁L־ }-/Da"|,9ZЙ}'bTۜQ,{oĎgsz~EDDܡś J lV36k56hJNH?@ /ӧ4+0 m'(\†> dÕGDD6ZeJKnt ^0YR5 +1c6h!tv'eAiQεa:@ƅ7=g&L9SxfW= !7ߊe_@wUO˷KDc ^ldFg]hېף*ye2S}7qL:w銏/^^^NۼicF嘒@ lٲf=;?gM/hȑ_vP` 'L.CܳI#ͷqT,X| k;ި͞qIN> );AZF.A~ݜ?/&냉's8M8uz4gw$d}M[M9ԍ}riziTǞ4%ϋ3Xml?t+/&>9 zk/O9ݿk*ʭW~Y8%bxi)\vֿ؅ʜ;;h2 3[]D=6M+9|g <;{ibPGPNeHzEDD5J +NLh>7?W)WSWZ&^E}o27ua^qMx曭Iǝgqm,lNוv\_{+3Fx8>Q4'<<|( dy@@՜I=әߎs@[>BMu:+ S(kEDDDD) S%PDDDD@1PDDDDJT ^pNr^ #jAnFˈeɥN>}:111.YNʄ *lj'& |MH]D*WWwO}j1xرc̟?:sxyy#\lܸ_|sIh֬Yy&L@֭y'/?Dhܸ;B:J@1g&77{w{. 22F\\ 6tmRRVbȑnKDDDUT 233wk .$66nsUIbcc Gu{\"""R( S% .|]N>~Gɔ)SXh;wfƌUE7jȥv3gѣXVf̘QH$P OگUVx eԩsϱd"""?ܺ}aXhӦm#""a׮]nIDDD&%bxV\V.`E`̯Yݟmrrݻ76s0zh~g6l؀?Sm322ضm`l۶mذ(|}}+/j+"""r.F Ja!(8YߔX tn[֘1cx˶m֭}={*oeEGG;LvEBBFr/HKK_#)"""R:T ObaƌϞeׯ^!"nvi֬>F@1%Σ _fO_;_5=>q@1_glU ߟj]O?M6mI&<補={͘1^zܮsgzҧV/ݎ| y߻SY{3?~yZ5WnHyf+&gV=nt+?+cZݺWesqQGD.%xCHں 8 I[1i-٧J`-Ă }M4W_y8p &/yAAfbڴi.4h r;YVl[Ku>x2owknq벣w%}WYKl\Ɋ?Mf|22ͭj\9~v) +>4-h3xK9>|R{ٳK.>@fͪm'NݣGl† *g}jep?,Y>Kĉl64iR؜-l6;ۡ;o\lXwe̔O֗Oog?ˌ㞭2,'ov-j2e|:s2֢O|aA_Hex (>.cծM,P%ã _G뎌Sw;ֳpݗ,zx:k~~Gѷ匿v}-6GӎsOه==v; '/7Yd7vAwbsjۺzЭe_9u: ,o<ζbhK!A[^yOT.h3Ca`}(GL8c _e/v(#"ebxE/Aff6$ی$#++#JҡCl6_4{lL&S?K}l6ʕ+] O?~<?7l0l6_O+>ݰz]>eX$L\Q⒏1 Zo?_B7*1K{f);q.#|*vc]OG^a7cٜ՟a6^|zAL-9}J|J"o /q)̳w0ά'zwإ>܄5S0)5S?经ٙw>Ŭ'!#=KBJY'lS}_u ևwpiUWe"?׿Z`qwo~ݾ㏈M@1.a./ 6+]nö"P%5j})uZddی?= /r,ׯg׮],_5:q>/gŶa&x}ktm:[eۗ'54M앙twm^~>K7}+c<2p,?ȱɄ7 xt]ie[^ƠK~!1Wavz&-[xt'f2 ϔOfkp*+?LO>.K ]9ݶ2Wk;""8 oGvnJ>E/Eƅg\}Iwc,Ǐ?"R6%bxC_<( HÓN ox|Xz5nܘ :oGUW]Ů]xy7u:ʌmV%d n,%Əj5Ɍ3UKu b?>Oӻ}7u#Gӎy`ZZi,dd"4>Eh||{o?fуOEj2ɦUX*Úu6Sgt_{.OFYq82Wȿ@FX H:B >!Y_geDlJNH?@ /ӧ`? nBήY;UЉgJ>li}*8ۧ3?adv2JPP`Ȗ}4L&9o -9 njTjBB*~ Ǚ2e 7tM6e߾}<|Nqi͛_;~te5]v~3suL[-ں$2>_Еۛ[{g7CH⒏b<7L&;Eeh$,#$@횶`þ3Vn>Q\ץ7 I|y5Al6:# ۇ?o3,(ĺ[jo^eL+`\ X wd`,k̒2J瞇e*W. `n~=ee_gT1ߋʾ575/OI޴%vֿ؅ʜ;HKM!n #'99{wd2d}̝;:зo СCk.:5Ge9sJկk($.-ڻog4 )ʼnmm?}u\o//#IX|r;ǗWOj)X%N[Q4'<<|( dy@(746iKRvIMM%sSΝK !sSD^nn=ͩ+:lq-[?T]fu_ƯsXQpxk밳"72Obb-5%|n+m(>w},Sjm-ccgʕ+m;~YOԈ8vtC=.Ts?s~_7omN|>v̟#/}[hnnz-0>$Pj5g@W@g)w5oְ5a T5#$&Pj5W `~@) @nyRVUsĉ3g={?iӦIDDDpXf̘#GHIIaѢEGDDDDP(j%P\L׮]ILLt(""""‒@1ۭT(Jd=Vܾ<*kEDDDD) S%PDDDDN5""""RU)Q(JT3t: )$P O@bJT )$P O@bJT )$P Oq*2x:)@1N8Att4CIHHwީp?"""FŋZ 4,!J>i9'3ɣI ~g\;w.ф:}РA 4B}W3gtR6l.**N`` ,駟СCSO1o<4h}]ҳgO~wN:Uyyyx{{OP%PU֥CҡWѭpЉ _2NhwyqqqXV"##ݙ3g?>g&77{w{ӧOm%%%j 99ӷo_ƍ=܃/wy'w=޽{KT:vȮ]õ}:noF\\ 6IIIZ}GUm Lz$$ % -@BҕQm`+^gAP*%PEPCKr? i3I&$y)ϞdS bzB!DE%I/99WWWW_1e^yy4M&伷zf͚j]gy[O}>p-Xjʔ)_qƼ V+Br.'\wV$PTx2XUy\ܹc(9C ƍeƍ7ѣGd&NX/}|2p -ZkKrq+$$Ī}^i\x.G}+B׮]Yp!U !6UE22겦rW5f&PTxrM`Wn]믿lZnjx78<:k׮%00#FpIJLLLѣGZ;5bi~T\^ϨQx駙4i#GDY?Ņ k׮N1B!l`0tt:Z-ڌ RIMM!%%dHJu2(*< ,9 X ո h=>"mٿz9[rttdذa 6-Z/s=kĭ(ƍǼyر#>(׳,X@bb"o&j[ooXb޽DEETɵB$PTxrM`ѧks=ت=tz%Çgҥ̜93`N>m}/RF ӢE >ԩS(˜1cx8z(o&;v%q˖-}ݛ?H{~"VQņ !WAMrLHHpr,ᶭڽ'U KyĜm"#xwV%ě7AZZAAAlڴDr1~a/ bpBw^5B!DQd?>Ͽ6Uz=֭]vTRE1Nbb"vg  _dAW\-C# 1 Hz%x 5“k+.\ݻ(e{>(r0bQ>k]![nw>ܺu [n3h`vΑVv&B,)[)%@FB!DiR >̍f+Q aC2`7o]vwB!xXN-H,'Id$дiSwn06}tpttϏ^xt{%B 89:=Vs18>&PTx2`իzwVߧf͚_L4 ,X`ЄBQtc׮]RN]4fNT׮ϹtڭO@QY;8c<""w|]v EQ+6Ba`]lܰ `j5Ui۾uj)MP01!!!Clۺ{; Qm۶nf$޼aB!ޙW./0x HR^9ާirMm IDATB!B<@$ B!BH= ϝcmhnTFP Ed.rwttKs;!B]V-_VRa׮]jIdTNN7ݷyn'ƭ4mn/K.'\aڌW-Z655}{k.v;!B'.-wO[*ICp4l(zU t%]<\2ɩԷ]V)bnJٜЩ3ٽw} cB!iK> y&uEף(UulAF)mU~ լ]~(+N!B-$`0h(јC`Ձ,EU/ׯg֭,^uthr첕v'B!?/sD$={?m'PpZQpG`?`zGd_-j2Ocخ];͟ϳ=FB޲yrUiФib$yrE!n%ޤKu Vts.kEJOcXJ6_OΝyYhQKK !DY`Bao}}9ƁVmس7ڸiM+F?/^҅4 EכMI˰95.e+) CO*D- `]s.k꽵Ly۷4h0m qK !DY`BaoztZbcSϟ&Ms{X*HXkשΒsy[s5xX2S=viӦ,X0({ NB4w,M}h,;wn+RQ@ZݻwјiH:uqrv&S uF;h~yo۳Gz9`bcB!9C@`uܾUzRO~&IKM-p(wڇu^v ooȼB!黃ؿiK> `׮]ԩSMXK P#z%Me&F'z;wەBd+N!B-$v:l߾cǎ[}{J "ؿϮ/K/C]Rv  !B<肝_Ӗ}'k0DUۧmQ"e !BQR*ƕB!B!,RnGmlDzr{ B!D*`cBBBcB!⁓ dsOtP!B!xH(B! s+ wNaRB!BIaشrLz?6T,?~X%De kvbB!mۺ#6폗d'=  5Co*W'uKBXlۺY$+B{۶uspKo Sn{KW\'[dDdI ! K+tv;ty9gmV2F%+B{3ZLE(こK!l߸( !B!JN ܶu3{ &YN;DٴZ2BFJԯB!T 4(K<si5$B!Ba6 4(ϑ8pO\₋'Bh B#$B!Be7 40-1h^řsvf4`߾+ׯZZ>n'gо ~߲}"8q.bnWxY4McB!ee}ƛ7ۥܒR7 Tp1O?}-?onQTI g߾+4'-JҶ@vo] 6M_,_^hmWFZB֠qPQ;FGMOwwB!(`0VqrrٹĶwu}J*re̜ef9EQ~@Ck2*@ҖMx^Dfܽx[6ahP@Xq]a|b=8{&|4n֢c)L:Uݱx^N6q"hСh˅.:o{`(ߏGw4@*Ú\IWUO:Z΀^o@g0`0l,kђe_|NXXCB!(i餥r&##ruT*Ud8 -dW{ܻwѣs~5:p4wn&RPU58_GQѨh4/5@8Sv9u*;A)1If|\ ߌӨQB!LT*ҳ.RT8::VIMK#==^FbqMm*y"\7 4(jӧS 43(JPRqLbdn%eвꕄbsŠ1^ſf dM3AW+8:: wӦM`00tPbbݳ'''Ξ=ˈGRn=pqD_?}t  0:OKFFF150klBBOPݛׯ[T~^ΟgԭD`('Ow>g} :Y3_=rвTj5ԫWs CB裏ҵ:vɓ<ҫ5k&EKVXNpH(z&M4> >:uʇ.̵nm+\v#'EKVZdzȑB˛3g. 5n #8tu,BE'''/.RtKV=cC7o\0 -̑S\8UQk8?5ph8|/cʽ~P@oԔdvN?}Ɓ -SߠM:Qv}7mT*^xz(,Zs/dnK30yPڴ»έD՗uP'>_wn1.9./cz;i>\J*tN4yӉS :Q:&22t/ԔYdѐQ`9ݻyc6碷l$OBBڵח׭cl-Zܿ~?| jr~a=;vdȑ˯,Y?۷knquu|dK||<חO?e=xyyYT:-?I:1ν1;tTpl Z-G`#qFbcc?Ql @ѣlXJŘ'd{kb06l8]taٲ/HLL_ԯ_}ۖJb-Nf{ۛx/BTZ6t:zqyGGG;F`(I`k [k 0ݍ384T(('Z7೵lj i6ޟ {{w(Ͻ4;kD>>8sԔdF*Mg?-ZßGe<}gc_:S^EP-pP`ēqGe" u2{>(8ʙ'/XoŭHLʠY!ḠmĞdGEW Y#Oqnnn&_ifY&ZJbwW_J{o~ mKcqHM<ÃzhԨ!gBRzώ'>>ϛͶm~:zI0=Cnjuw3nSL2_{_Dاb $0 c)S' yB#ܹsdZ-TNJHIIAb0d4v(r.-Ui7N#h \|jPU٣*W76+{V5qPPXg@{on޸+AJe22;8]RQc㲞Ռ\5~vpr&##A^ƌ4E fqYwekZM;څ˾Fp׉Q2hҾ?q14hqpLUV:0 ,8 Yܸyo|$$dZu3Fr9VR%32Ocڵ+~?ڵko*2O_S*f-gA3Ҷr}knBL틻;nnny׮hW5kk\oոul||DG6ƍ]14\yM7f35 Ξ=K׮]?o^ٍBQݹs[nQ~[7 ̾k^'==*U,GFMs\Oo QA/Fz3Zr0sCySHn<1n/(9UkWNKxzW3^_x-!z 2q5!Y(xy {򝂖]Nf_gs#=p$wo'k0i;fCj.;JcE;tB#nzDPϼ7:kl7N2O5>DLÃ{1w\~q*66P2:{olOlىi^ά\[nq,^͛77lq95lؐy>~~~] o۟UO ,oGTVsV#>!޸/]Ε]xƍ3#.^7\___z{oo)+ѣF1z(8q|!c{#B󒒒Q$''Uj޽q$J*6)LY&(~DZ"6nW7Ѻ]MXA 5*(6E|yƊ1쉉9ϛ2o7eYа֨P>Sy iGO>[iRSShgJ8eݡ*FR9Ck g`y"Xݯ*]>;#` ߂ÃyÄXb%;wFÆ OԩS\8GzϏ .ҷo?X~Q#GZﯿ…:5*U xzyZ]#={ϟ_q\z_~Ϣx2tiy\߯-.ۜp\]x"&MH\\k֮of%iJ… ߿?ZEɼ:e ...ܻw3<9B͕JJJ ͛7RJʳDBNՒo+xWj7)I|BfGK_̜ȜOvҾMoϤd%Yw yjo5 z*^<6.ݩWhө?oTT*]-΍Q5jesn7놧?cSHJN9SJMhϹM3+=qr޸Aè<fF\/g -cСCY&/Zߩ^=3lXff=:|0M{xg'#G>θcquuJ* ~cw` Iݺu-{<>qAi+lE+x͹sӇnwիу_~ ZU>c&!1 ̙&7i$MΔS3\<=0eT.\Z&::wB!D J?[1HDŽ 'Dznۺ}yjMygׯ޿_uĶڶqOviΈy{84mfQ"]~U@ɼ]FMŠftaX%8$uGHH>B!{_NqZrR2a'S ǀT %땜}*Vv3B&`ȼg_h\!~'zzw >B!DyV7fd$ $PllƎ)R92mfP;7q-KB!DSC2&rpŒx/-{w8!>XN|,܌ӨQ]ce;iҴYOjB!DT x׹s'Oٳ?`DE\NCӬ-L1P~X7b4oޜ.YJg-KoȐ!y%NlmF!BsHVg+A4p ~u>|u#8$?\hG}Dбi'O^Y6a-Zr7f˘3g. 5n #8tEקOoztNe 3 :v숧'M4+aZēO?7m֜cxiҴ5j֢Mt[v:G`qhZ:9O-l#GЮ}gذL2s4/J]:/ ׮]c kђUVDzvW6#B!9> x")))4i8I&:u Æ '88?O_vjj6lh\plݻ~/pVetҕ?c̙G8pu?={lܸb{bb"'ϝqoSIOO/pݷ+Wj8psϓLPš7vryLScǒax: IDATjǍ?5k֚ԲZF3f(SN+j]ZN[/+W|͑ùF97nM?n$H qqnjem+6#B!DOQTT111pW_})6l`\f8::R v!2e2j-Z0h@wus#5%'Nj $ ~m~W~m'{&p /p:kSR%;ƞ{ysg9s {vMTjufӧ7^^^T* wժ8ql;FFc3e<``رn݊]+j]ZN,92yUVLJ޽zvWRmF!BrVrwGQҌӒTR'NtvDF!2 ϿIO0.oӮ_N`@1aQׯ_+p&3ՙ̚4䩱cqFv8www{YV/ƍcm&iͮ]ٻg/mi׶-a=D6./رM6#EK.]Lrrrre{WW2rԩ޸~\+j]ZN,9Y/nnnݕTB!'5k5׭?App7a߷Ç/-f5j'c0._Lj&=jNCZ=Sk4@QL6ݻww>FG6=gnFg&N7OcqG9s5k+F|pʕ\s}.J]ZN ;y0Eiw%fB!(I#=(>)))8qk2to*//O͟o■Dx8n|hX֬]ˣӧ`0PR%02_|gyt:z=t:Æݻܼg}ݺ,mt4EZj*b$&ޢiӦ@\\\Uyٳg-hJ>2ܾ}q~QvR1 ~ !BQ> xpusQp _3yZU8u4!].?͛oё+VeVjשQys\" \>))I'S^CHIM3weZner[, z X˿&z y]3gP^]Uִlْiӧ,/((wwwd֏k&25pzE۶[n%88)GGGr} ׯ/jMfS-N]ZN ;Ɠ&MbԭW˗_ֶ;s)B!DqtNcBBBc}Nٶh0u4vz=m۵g_qvrw8e1OЮm[ƍkrK!BQ?ڽgZ@J+9T BW}{HҒIL!ٱcG;DR!B˔>:~#V}u;,!B!*IE3z(Fe0B!}mf{ B!%.(UG;!B!0)\ϟ;Cqj5Uv:WO22B!Bصk]=LzAh4EQPPiuIqvڅi*D"B!B};oUH6 Fף0  @zzJ׏uj˶IP!@E@!B!D9:*:kϲqu7ߔZ<a0x~äIٻw// >O>aAܻw1} ,t: 6lyeZB!(gK/Ę'1s&_|y)F_v<1Wy%K'LѣGe<=0 8W^{ lS*H`urTjOOOz5Y~=BQ.]A N,Xq^E:u ^&MqE 4@רOשT:&?9tqypwZG0nxRSSQ)SrUBhhcV\oǏӵژ˗.Kn4iڌcƐQ`K^򒗼%/yɫ/s}ڵjѧO:R>`O/\b+Ә3wsASsYs:V(x2x#<۶ EM?ݜݻƍxyyɚ5y6͙r*_ 0!gC14ž{kޜAѵkW^7o&һO7O`@}؏QBc!\  111q!qpp<9{6JbQ̛7ٳgO?ʕh¸_gdd0hFŖ?qzKPPQQQ=z-kU<q!BQprC/dziժz%}yFrOg WYpMZP9iZժU+}0&M'~ѣp6駛ӯ_?syzz#)b$>>>ܾ}Çsyfz'''?n,X?qVK@8x W^͹squuё֭[*駟JUǍFAV3~x{>p ɼ jZlɐY;2ǏCѠhܩG^QB!ƍU< ىzHOK?5ן5_ya ///T*Æ ۛǏkeU EQ]~ptZ4fdиIc5ly8{,]ta޼wt2իW`0fUSjS3=FLL C c/ju> ?z}e긠*/_HLLAÕ+W}NV_xB$Vr{(7g6NͷM?ҠA"`P (R~zYSa@0hZ9pfϦw^4o'/`Is^nмY3qsu`ӲE UƛoiP3<_wZt QQT*~/kh޼y[l+-f„牋;c劯s$~B!c#F '-7nΝ;1|8._f֭=:Or?sp5Ͽ\k3ei{ҽ{PfMEaΝ={Xw1ݷmYMVI 0q*U~<1f4O<1fJ^}U4m` ^=O //^DVӦM~T*+V|3 AC=Kxrw^ٓWѽü y'<ό3y=k. ,_/2.ӓ9o̦u?%H`AB!asՕ1OaV? \&M̲/X=Ν;#Ϛ@`)L2y|L`r[h#={ҾCGWNHp052]q9Ui8:9< xtDŽ 'DznۺF3܏We6kΚիw(B!:sܸ~ޡTX\I`}wgvo ǀT %땜}*Vv3=+ѮF B!D#}'u\2GD!B!ăLFKQ+B!ԀkW; MdI(B!IB!R+;!B!0;ySOmB!fΜ9̞=aTh!R@///{ B!0}C*R'޼arGD!Ba%Je*)Ν;cѲy[ g-9\Jͅqԩߎ-V1Wsҥ |H k>NKZqꥬ-TvWa׫cZƚ:.]VIXZAS!=!s56nO?o !##êz!ԨQâr~-Z?kZ۶m ~zxg_>,_t:W6ß~)?0kfڴib^r%SN5ꯢСSLZXz~Ba#O?C:u'x¦e9N%QY-ci}K匫(uQy8>]aTG= ,VeڴijՊڵkӱcG6nhm؋ZsyGxkl()/^?ӻm8p@Œ%Kh4]Nرc;w( 0w%&&ӰaC"## ٳgOMMUV<#ilذf)-t:J״-%}r =P]VdNYZe5mlyLb5%JOOݝ ???l„ hԨ 6J + I …Uڵki߾= bչѥKBBB5jw޵ܜaaa,Y~ͳ>N`ƌ\~1cڵkشi?q}Vؿ?VvmtxxxЬY3 5k l|m۶jժH^zѭ[7*WlU}c.]ѣiԨ!!!Laaa,ZGynݺYr~-S߿? 4 22UVGT~}7UW'O_~w!22gZ]-_-\[R~AlR>Y6Mo*ƜujZ[Pˎ9ad׮]oߞ`&OLzzq.{~KڷoO 3g}ӧ;w@fSO1tPN8>˺u֝~߹pw}jժl2oOopttE߿}I֭sMx")))߸qcN>mV^͠A0UOz#GRn]bcccԨQV_q5 5F֭[Yv-6m*R6m~~~ :b}O>Yfq# sտ/:v̙3ٿ?uԱ^-9E.gie΋--?o5])l,m/ݙkַ,)Ϛ)Qߤ7Sl¦M8p.\`…u.[i&mիygX`G%## 0&ۍ ^v%m6/[MEei8 4UEisٮ]ƅ hܸq*+$ ,#}zT{xeC\'H: *CG޽;գAѷCرcQTiӆ;y?x 4 :GL?>-2~nӦ 2Gڴi@rr2* $''[4?˗/o߾RKMSLL ׮]^í.ŋ6m1f~"^zATTk׶(FWWWRSS9u:ƖLmjza&L>>>x W^xzzR8p UVԩS:>ٞ|IL3sQf}:td&LZ&,,Y*[^zd|mQ6ow}mV)Y[wN.8 Tfʳ>Kʕ`ҤIK1.govDFFҶm[pwwGĉ6QF 6mʖ-[ؽ{w,ϹE=kI,껨Z-=C%$$qvp_8\|3o<\y~LuspW*Bk֬cǎxxxзo_V^͸qq5jՑU([ɔ Z?**e˖qmn޼Iݺuaʔ)ܾ}ӧOOtwwGQҌ^rr2i͚5DFFڍLիW^z/ǓNΝӴZ-6o+o?йsgz-dn9Sec6֪U߻qBc/ILL+W̝;w|| ɚz3վoܸA@@j-֨QSfre-(0|0]fj,mo%m+&s7 xRQڝjժ;;;+&n::vhURs_{8}l,9(mN1~x;wn)k$ ,P30p-@* .5--7 2/`{.'NLJ7nZƍdrd><&c>*{ܹ&N>;Æ _>ڵ;𪊴MOHH%,5Z  UtQDDTteTDw]EX) )z%tRH)rn9ޛv{$wf;̙뫔?=Gjj*:NHʤUڵ*`.Tk[X+`lZoIGkeV.D9أm&R9j"--MdJvjh6ZxǙ?>v-Wd$G?[D@ih4L6 ^ҥK b;h I>yCEO?:|*N~!߳gJCLL "227NHJJb߾}h42Lx{{dfx0P\ IDAT >ҥ ˗/7:G,_\z@R1zh/^Z&>>-[H[:Q6芎6nVNtmk׮Jq:udP96?g-_'\~8˄-X˜={Nnnnt:b)9+%qqqYf@7nܐlbON5ep\]]/tlݺQF[dj+vKu-ȵ\"R]-eӚ|K:Z+r&ŔrkcW%̱l2rss?gĈ@=//RW^̜9͛A-2e}RU3,öa4kZ^{5ݻǒ%Kjl-6Ǟٽ?T[ 8?s#mܸz&M ]?+Xp!Fbܹ 8_-[Jo![ӧ3w\ڵkǺua$[DEA=$H222&>t҅~9sM(::؏?-[vZ֯_O˖-YhۊRd͚5$$$ЩS':uTۇe|| 6yѿORYWRɺu|2aaa0}tiK-e,队ϬYh߾=:u3gZԭ̅3'ۜ{eC׮]6l>(ǏV?ؽ{7Ǐt:a/T*V^MLL !!!̛7Okȱ\ _^su-ȵ\"R]-eӚ|K:Z+r&ŔrkcW%1tPqR^V.~Cl)Gȑ#3ƮTԧʔY{IauLT+r|mvѣGi׮4VmwƎqO؈q aU5LMSSSN}{3dkY ˔)S:ujm3e.]D~ur(Q08+m3?a숡Ktk}<9v(FNsb4tXxK4 +0uPP=ZU@PGyX&'uߓlۣC+=$P <2zh~۶m;@ R=}]]qM0v+Յ  bcck[ @ <ԕ?I@ @ *Um{*@ q~/dcT&_@ @PU49_Mm5j&wm@ AaٞD1fz? ԉ!@ a fj[aO^Â~-@PnZ6>I`mk`;&V.9l:ӇDP >ZXfmP#l\}I`}Zxs{<؜Â)(rFT*>}m5]U*z;sn{ܭx牭vNN>˽wflCfnlٵAmckUlw4+@Pt cUePȱq]w]O[vj+:=PTNi1|Mr9BM'k?&Y=mR&z !M&89N᎙׽7M|]&=hS58 G@7 Kt͹[RXkN K3yZ~|N tفb-)yr)[jlƦѵE5t1kf牭vX<߫Md/9ڽ|YG!rˈ|Y{KU55R"ޕg5%%hȀ~4vD'!%BC0 m l'䧴z8ރ16Cn*:WEDǴ/&UZ͌B"Z{I:8T*odHrf!z= QDyW#2sJH*,+ FRr@rK)]OpdD@2r]Yl剭vT>WVsaK#?O쮃{ɩgu`IBQ;d@PXŶ̞({aU#4llاȵ\wV u5z, cW۵WSI`}_ْO_qT)Q*zZM' k'>)vM=H[@jvz`c]tUUHKAH^_Q&ywvVpwq -E3Vh|6ri䎃RA|Jم( 8q^A I(^~ J!M [+/JF 'vtP[X̳? rG`O-r5ofֿ({aU#ih0KȦ[K/<\Uz33[]Ȏw(֔~\~<[l ZMѺ;z=\3(+Vz^:?G q&Fb=N88(A>vؖS۬BzlR IHR`d@N_ϩkhʸA~H-z&mJ&Oe_]Z5rc[l4wQRr.B]HS_3 seiAA")Etli-Mgh/=~ 'ԇl_Em{P`QB{4Fpur`|dp5-ߦ2R֍Xw81ADx,.&JAQBAl>jR^ڽBN\ͦXGh3OjMJa¢rb[O2 BT^#N*%wIO [)(T&R1o3g#ny" y;jQ AѽOJёVB3{7&;=؃o$QPU^_:5nXt5W> +\Mjji8<ӯ)s< vft:t0[綫VWmUoì;lZ=h]HS:L:Z <9q, ymlJ4qlPƵ45z].˨sem+PUʶk֨V$Ђ `+!/u$YZYe*}\tUq552sKhijtJ{tjc9 m 0v3ӕx&Ö]1gwRF+ə$g%e׃ʡhh%:UJ/&HC6 FE;N* XS2OڋF.maK);^I+>5sEq;(5^.x8r1VOnӦmeD8~: uMW%%~!u".SPC ktΚ-,)_ 0,٩>J(oL_nQW#M}\H,@3{jr;di킻C(j<mStouR>y;R{9RGH5:T Lkd'b$N[CsXc}哓_­ByrRN -FKnzdz?UXU=RXsH#EcquRU@vnu @?O'QT!tjmxpZ6!9w+B87'G2]8(LLwP*s&}*Y'+H)A}},Bx[+oܜxlaI= ʈFCY)}n v7.LcgnQ = GWU|rs侺 q"d+ɡtWXdE4q!2x$O'E maVNYW'6Vgmf)/u}o8m~ޖv4۠/)踟oz}KyU }^ll~ hȍ17hh4BR}b/gبto+cȖ{-W7~XחZKсTΠtXG.%tPt/ U 7DlG+`$١Iz3'K1_cS$eqqTҋz ҋ ybJ:8q/[VR Yo0>H33fuK'm[ YMyb bb@HOwB8k2 JPiY}wNVF"M_jwOW R m6ݤ,/g7oఞWUs*Z7*%%:v2ŭt5mx/3(()M|]9q%\92_wUM>1(^n*dS7Oy<]jH~AiyZ6e ze;f˷ʇaX[ @tkoі䙡^-rxwB{%0jV1) myCEO?:|*A5YDe_g,sexWM?xFVAzTia8D 'B+Zmԃ<ؾٶ!wՒ{݂ nZmi%/':7 }z=A ]psvII5tpqIMc"!9;Flek_Vz>#zW,Mr YHK~8<x8ҨMJsv>88nŤVq))1=UȽbrhKWz=-t29[Xc; i^=(,ɔ> pC~~ j䎛Y6ם23j_M|]lc2BJOuR)cOIjJ:B|=:1st" D[ K0eÑ=|4Eؒgmd)z^ln֦ex}ߋ:ۆ2F0C1TNkϫm{|4>~9VX :'('݇6oݜ"%J`5/283 k|ߋV{7(Y oľ3wp${'ԗ"-WnV(#"$qn? ϰ!bx ~|bPs7KoϏ|[toӐ[n{O1GcfnCQqJϷٿmzA o~E^O JAVn1{Ol|ȆazmSv0D۔'v?w>읊zAYúx,n-_ӭk^OW ):gw][z#Y9jsӰ/!~walas*Q=޺!%\K˓:/Kv2OFN/ d畐_pbSNĬ1m$tWmr\J8Z=J"{};QP%L4ueD 79t.N&ð-%Z'.gq,!^ tfzp-5Sk[z#h?$PT~1-k"IuQV@{CwmZ]Fà*).4(| º;ӳ>.uVb[젉VLm-!>\ubmm򻦮nA1D@P_`RG|mP#l\}I@ N*%ǵ#G]ڟnYueE w]{N] :I{|g]aDL(*o-:mpZ@@P]kmb>_jT u#~s@@ A 3gbZW~(V@ 5͇SVFظum@ 3<'"Y?_ @ 5BaKk{"l\}I@ @ JR#l\}I@ @ JUWFک] ste@ rTՏq!Vkӟ}ƍ?nuy'"gϞ,]Vh4Ο?ovMz ̙3ܸq'|mi_0ydƍ͛9{,'NM6kJ% ޽;Ç[+vgW4 *h@P( {ӿΚ qѢE$W'={6;v쨶XC$H=JFV*޴i}elذܹs 83ydrrrlkҥK5jzbڴih4~m޽˔)SdӦM޽m۶IpbccիZ2r &00Fömۘ5ktܙ1cưqF/^$553fR|wRk߾}K`屖'ev_t)/߼yxw"355{vg}f>۷/ڵcƌl2^z%.ͫ c޽IW۶m cɒ% >G"T IDATM6DFF@ ՁIUQ2F cۗ6m0|n߾͸qhժO=yyyRx9%''sB1cF0rVm4Q3:99EGG3x`4h`u1 !2nߤ>W'ܜUydn߬72bFC{.P:Qz0a/^dڴil*o!.\`˖-9rDi~?V"66VzRraV] cLjGFneIIIjBCC;t@BBMeF5.]2 60~Jƒ 'FbRjٹs'c[ ~wwwm % %Kj9{,0zZUFJJ ǎ$IӦMԩ{_~ՕnݺɒGRRo&2evU22m44h'-DFFJ_yCEO?:|*N~!߳gJCLL "227N.'%%o߾ r4 EEEUMRR0PK.,_=z|r}@(`GfŨjٲeeӚ?ٳg ;;e˖q9}Y#&AѲl 5OW^̜9͛ӦM2'\~8l2rss?gĈ L>04ibRƵkט9s&_~%5I_S_|N_e֭5 (O?d5M@ ȡ&Czgʎ"?ڵ+|ԩSdƆzښfZͮ] 77M6#Z-:cFLkwH<+W'jʶqFz)4iB@@t=K+V`…5s2p r^uZl)]ol]Oܹsi׮֭lEFF=z"##0ҥK~i̙c4yw^Cxx8bƍ4lذ qssf[`J)O =z4Gp 2J%֭˄ʪ>PzKtt44nܸJ㉏x\]W^!<$P  ZM׮]iܸ @ F*Ujjmftw}aDLpss#!!ک+ bcck[jaD #@ Ȥ:N#l\}I@ @ JUW~;hvvvm @ SO)lGظ+@ L6>$P @ Om#l\} Y@ b6>J` ҰaCNmAZ9S[+L @ uJUWbX;3˺[n 8իWW:,^ئC 󕎫/ӫW/xj|~''&&2fzk[JQ{׏+WX|u9FMP<'%?tȵ{mۧ㯌(u~JUW`yZn 96I` Q EPTNsUp牊X^GfΝ&^}U7nlXx_5ӟ܆n~ ??7x  LNII!""?[II gРA1bk?+WK rl.kSűcǘ8q]ee_]e:ʮgYTW4[_Ӿ5mѣGɽ{$~zJݽ{wN>mtߪU:us}њ*F&rV-[v-O<aaa̟?Oбc G}dw=x'?)/o+p |L䦤GPPdȐ!P#GE@DD+WD@FFK.%&&Eܺu_|VZn${_|?7ߤuִjʪma檫-񥧧ӷoj]SسKMguיJ(w;T*V\ɬYj[:U*{}];k9VW]kԨ*{R0h  T-X4lؐO_qT)qvrèj?YwwATT#Gd۶mF~/^d̘1DEE+k\e~rJ&Mİax7h4%33W_}!Cc~G{:vHII :u=zТE #f͚FgxxxСCپ}GP#3{lڶmKÆ 7n\p&bN`=?믿f„ 7;w0}tzI~X|t۷>}:DEE1g|̙Ñ#GXx1C ֭[ukv4Vkrch_ۗ={2l0Ν;gcǎMϞ=3g mSϟ7*+ͳ}_~|DGGӽ{w-ZDZZSL!<3gJ(eKu˚5~[ʕ+pB>Cr96K.dddH?#>32#זzmƶP6'OfÆ FbmmvӐr˻7 o%PN+ >^]eKoؾ};jZO96= Ly"""8u:wRRRB\\IIIjڶmk^X[rTmsÆ SղgX)3rZks6Ӗ۫hٲ%믿6ܓ+厣&-e.G?[ڛsXo^oV$)[-8xAn<f ^WӧOs @pp0-[V(..fҤI( wN޽+'z"!!b{ Jwɓ'Unݺѭ[7#IZFP,Z~/[ÇӴiSz0{lƎk4(_.T8q"* B HII3Ow^Ν;GFFfJE.]*-ǖre r @̆Ã_~Y""7~si<{,:Nz2,,>}XL /'͚5#<,YYY M,QoEpp0;ܿWJnnnzZ k׮qlb1NF믿NÆ MZ T0|0FqqQh ݻU}[+-a6gGKi!!!!k|ܺu>}0g|}}M7\ Iɍ\+YL`~~~o-a7no%;;JEzz:Z,qYYYMP7n,{+ayruunR~UN)Θڭ[ӓ'OrYwn֜ E-ȩseȑ#G{n.+rjVʰ^jh֬,[={)Jt:N37+rW*32,i?=l)w9:nJ9{W3 7I`+ADq\J@.pAκrw^Z-JD%!! '33F%UzR]0rssٴi]vJ+?6m_j4i W\cǎ\|֭[iii <(ZRR!CJ+ٳ,Z#}ۛ懟ܹHKK)-#'LxC̦*rǏws믿6` ==],ܹ#uUߐ r#T7̣\zŋn:Zh mVN妱|ܹc4HLMM5TXɃi۷%]jأDDDpARRRxiРv"..~Z4qyT*,77WWW~׶WmGFA&M}}}}[JJJI}T{YYlɏʴIn=m\Fu۷[=U.?hzO^PpQ0Ӆࢀ$J@˖~J%;v`l޼;wҥ :#GC*h4KU0<JtЁ5k0ۭ[7֬Y#m{,[\®]6FbϞ=R'MD׮] 5뭷> .DQ\\Vɿ:5?,ҥK)**֭[?N:'|"aA`:_UV&!ZY׮]t:quudېoO?eҤI,X)PBryݺuޓ_|ٓM6Ôѽ{w233֭Nff$7ŅGy^z3gJGggg4(mYHKKcϞ=?~={Ji[nMՁJ)?̡T*ꫯv#22޽{(J ^J>}۷wMOUJʄ/VVZw%**}RXXhiޣ>ʄ 8p 5bڴiUN!*>o(+jՙN:1h F /UvkTn˗=JҥK駟dƌ̞=ۨMt5* iӦR~a.zxxЬY3vZb / >\: KS8pl?mc~W7o7&^?\Tjc1 :HBBx{{3| #jQ.Ν;fw]wo:u#b(uՋÙ"E]Y  IDAT NFب+6~@ 2Gظ@@ @&qraov@ @`ozxaqVfFm`X @ dPҚWb(@ aZWb(@ DRU?G'vj+Eg6FcjY#@ \*U#l\}Gy\ֽ-Z "",XU:ĉ eڴi?,,x;kU3o޼i׮|MXYeW!֩r}ԃ@ 0UZk96I` vj+:=PTEtnrعs'+?oߞbY ͛M͞=M$'<}ƍ?nuy'"gϞ,]Vh4Ο?ovMz ̙3ܸq'|m N,X~JΝINNK3((ٳgc:Yo ggg_.>w8::׿FAU7--U=d}^TTWZ:@ ( {q7llHu)sΥSNܭ7*b%H\$zGg'H=Z&qU]6~x6l`w9H3qdN:Ѯ];zř3gh޼9R{>B|<=6mw}3駟X`Ffk-̰LK% gTWx 2q'''sB1cn…ӺukeM0>ƌC~1cEEE`\ݚ ST&?mw}s='ݻ7/;""Bjw[l/w}y٬z`k0'_N!kLߖ`sX ZCV^M߾}iӦ ی7VZSO' 9+ZMg giY"M:qurYzG!*޸q##F`Ĉ:tw_| &pEM֭rl‘#GHLL<~j*bcc'1f@k׮p1"##ѣ[*`RRjP):@vv6W\!11nݺٳƖ&^|lݺX.\ L1ydBBB8w{eӦM޽۬8v,)vo㢪?YaRRR%-53J'\2Z.i(d+&.$Xh(03? .;u_ Μsܹ9tܹNNNzŭMaܸqx琑sٳg7ߠO>5kN> WWg YGMV~Vƌ4L>]8-*TW_}p.^^{MX퍣G?io*]x;vQPPe˖m[Rv4ŨuS~B}S ӧ!pH$$%%nܸxyyi,o8~pTVV{bĈ:ǫsK7dADGߑ+=ߺ샫v,~%&&Ǒ#G}vXhRRRPZZM6 k|ھK cE[}iaa!K̛7X"&uO 㷟S3( Gfll,dE[5eڴih۶-*م 3fڵøq/-k„ 011[XX(++ktӦMH$ &lRWg YGM;w2Lf!!!*9mߥcE[}+WÇ&3fΆ\.4d!GbLak֬gX'd0iPZ*H`lCޥ#::R>>>GGjj*쐛\Cz___c˖-Pm׮lقv ;&XXX ==]X4tOV~mĉ׏3cƌ{{oży`jj4l~~>,--U쐝 L&oݺeV:-nVu-++ nnnqttDVV0 |طox @޽~R)LmI[x6Dԧ~qadffbhݺ5vڅ$W[y̙3#G`Μ9z[>*^zլ.iCڎx4}*ΧOFVVIQXXR3=LLy_L\jORw̍0/s#+NʀTF~AD"СC8tN8DEE2L(33GVNYYJJJI@iJѣ֮]4g^vZz@011СCl2"==vBXXp]<@^^6lؠtnzIRd2uӥ6m`ɒ%(..\zU5ʕ+HNNL&5,--G.]pI;fMljӪ1XXX`ՐdHIIݻ1dA[hZGC󃑑6luv'lSכ...OWvѥ.׬Y|D>Jw g͕`ffԻxR^fgg63E@/B}s4uqaҤIN7n8O>L5kŘ0aB}DFFӳCiv3 99Y"ǹ^tӔ8r_f̜-ٽ{F֭AЁAi3|A!Z}J%eprr@aT@qUT{*O ;ڶmSN!66VAi[n^|E&DTMSINR111jBۻmڴƽ{ :p`'@""?~ j"Jꑫ JDDDDDԌ0 $"""""jFpu=z~CvH~^neׯNOo\8 @@` t}4#"""vE{H/oc:=񈋋psu$<@\-P[-JY[DЁ˗He2Y('''jS\Tr>G%"""[3}o[[Z0> C\\:ۻ;u_%9O%"""N$ITZSpM?ӻ"OO]GKzmbb|-DDDDDDڜ=X!m͚:?7W @> <}] ]>55A=9p纴yL *E""""""5'AơiI`QA&DDDDDD@"""""fĠ$6v8s!"""jxDD =ywsk2"""&IDԐtP"""""fI Q3$aXǜû{Z2>=Frr؍{x&O&ֻӫ *>vt!׻:Q`C WShǦDDD&E맛t"X͛8[[[

NO`ԨV=oEAäɓ!H b|۶mDGvzD"K ;O>l|<<չ3=:IIIW=SHm"L]€4W,_?gպDDD]'Oyst^ %,;N܁v@^xǗ?>_]YmۆC`!8v8ҫEĨ4رt~ƙ3qMlEppp-?!8366  PT BtMxnݐr\022RZ˗S t쉮]a xG]=(ҧM3l>R)ًÇUL&èQĕt?m۷c߾h\H͛7h+aa8z(<,++]1RE]O8 d޼wߙ&HеM4SUAAHHLL&۷!Hp97PPP]ϏƅxgTiHOqcK9.`޽?$ "FF~q5z̜5 Oٳg{տj竢nP϶Tpvvƨ IDATQ#uj'_q*&"""ys*2N$H>v}qp_F׃!x ۖ ƶg¹N%&FVVN:s秄sII(..ƛo###!$$4iall>}K5>%X; '$Tĝ8@Ҽ Â\xh[ޥKk˖/T*畒JNz6j>m=c'O~~?lh+q&fϞ3338::bĉmdкukj >T\ٮ];ŁػocE=TK/m۶022Bxx8lmlZyBr4TOU.]B|B #ğ80"ѣ]L *?;II#''})ajj R"'M\R @$gϞ1;w킅% Dggg899C P[S" ƏS>yLMMaddqH7&u$ k9>S.`Ү^GqQ|pYe9MIHUVC"22o&...Ja ~VZ --p/^~zܻww{{{L:CZZ:$ rBWPPkkka-1c֮?<6lҩ`mm kkk 2O[kX@6>|8vڅpعG mefeeAyI)vf6서g9r$6*Jr6l܈w`bb۷o@s5Յ>娣T  B\ܩXкukٳ\[,--qjݹsڷ].(wPxl/?9Y)Q.\@]1k,3\z¯R;ήj>鳭KЭLzn'P*A @ @V1Iea 2~nyHg^vpUpe\|UzM?jJ{麭lظ7ffo3mMDDDyX&3T䀴b*U|'uZ066FB)v"EbBh۶m/d29|јCS&)CII0ilBmƍJsss`  zw¨@KPXX4ر#Gi9P~z_nn.bJ\c_P~{ 7x-[&/,,,dpv CFFΟ?LkkkXZZB&}mtVOt_NT}Lz?cU.Q3UI`Ը'PUL2DD(t4i$DE퀑6m܀/|A'矯Vӧù}aze'pM7PRpPrss "77W =0", u^nqx,?E"틆8(O<>|̟ANmh8qSAu)S$amHOπWpusݻyBC ͻ;ڷo>Rȑ#W^Q[/2tSЧ/XV~1slt1ChVlCh~- ƒzҊ QRٗDZ= HOH«KWo?&ܤ""Ʃγ)>KKKܸ~ i'q[!""j< EH\^enOCDDDDD,y8lؘ~K"""""".8"""""fI Q3$aHDDDDDԌ0 $"""""jF5#"b5Q$"jT3.53[J%eprr@aT@1O%"""""jF5#LJ2""""""z|ebWL*19 +nDDDDDD SQTD]O٢1%DDDDDD0< ,PG=r@頕݄WX1y-ՏR' K*{PV&DDDDDD0ToSeo`en't TJEr2'P1TFP&DDDDDD IHy_z+C9T5(ՏM1T'P{IQϠDDDDDDD $CNm"g_""""""j8?٠v&x;&IENDB`adlint-3.2.0/share/doc/developers_guide_ja.html0000644000004100000410000002371412224440633021562 0ustar www-datawww-data AdLint 3.2.0 開発者ガイド

AdLint 3.2.0 開発者ガイド


Next: , Up: (dir)

導入

ライセンス

Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.

AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with AdLint. If not, see <http://www.gnu.org/licenses/>.

開発環境

名称 バージョン 用途
Ruby 1.9.3-p194 ベースとなる実装言語
Racc 1.4.8 構文解析器の生成
RSpec 2.10.0 単体仕様の記述と回帰テスト
Cucumber 1.2.0 機能仕様の記述と回帰テスト

文書化環境

利用者ガイド、開発者ガイドなどの文書化には GNU Texinfo を使用する。

コーディング規約

Ruby 言語コードの整形は、http://shugo.net/ruby-codeconv/codeconv.html に 従う。ただし、return は原則として使用しない。

Ruby 言語ソースを含む全てのテキストファイルは UTF-8 でエンコードし、改行文字は LF とする。

目次


Next: , Previous: Top, Up: Top

1 アーキテクチャ

追記予定。


Next: , Previous: Architecture, Up: Top

2 略語一覧

object                 -> obj
variable               -> var
function               -> fun
value                  -> val
expression             -> expr
interpreter            -> interp
array                  -> ary
pointer                -> ptr
subscript              -> subs
alignment              -> align
declaration            -> dcl
declarator             -> dcr
definition             -> def
enumerator             -> enum
member                 -> memb
element                -> elem
original               -> orig
converted              -> conved
conversion             -> conv
arithmetic             -> arith
alternative            -> alt
manipulator            -> manip
sequence-point         -> seqp
operator               -> op
initializer            -> init
source                 -> src
destination            -> dst
translation-unit       -> tunit
parameter              -> param
constant               -> const
specifier              -> spec
controlling            -> ctrl
reference              -> ref
dereference            -> deref
statement              -> stmt
controlling-expression -> ctrlexpr
option                 -> opt
options                -> opts
first                  -> fst
second                 -> snd
last                   -> lst
location               -> loc
composite              -> cmp
identifier             -> id
substitute             -> sub
indirection            -> ind
category               -> cat
severity               -> sev
complement             -> comp
message                -> msg
metric                 -> met
package                -> pkg
representation         -> rep
assignment             -> assign
literal                -> lit
directive              -> dire
count                  -> cnt
signature              -> sig
suppress               -> supp
version                -> ver
storage-class          -> sc
command                -> cmd
file-path              -> fpath
directory-path         -> dpath
length                 -> len
content                -> cont
context                -> ctxt
exception              -> ex
template               -> tmpl
format                 -> fmt
return                 -> ret
current                -> cur
replacement            -> repl
index                  -> idx
modifier               -> mod
environment            -> env
precision              -> prec
cyclomatic-complexity  -> cycle_compl
token                  -> tok
next                   -> nxt
encoding               -> enc
annotation             -> annot
pathname               -> path
user                   -> usr
system                 -> sys
new-line               -> nl
table                  -> tbl
abstract-syntax-tree   -> ast
pattern                -> ptn
condition              -> cond
collector              -> col
branch                 -> br
function-call          -> funcall
program                -> prog
address                -> addr
memory                 -> mem
window                 -> win
anonymous              -> anon
qualifier              -> qual
symbol                 -> sym
candidate              -> cand
terminator             -> term
initiator              -> init
selection              -> sel
global-variable        -> gvar
record                 -> rec
referrer               -> ref
cross-reference        -> xref
monitor                -> mon
iteration              -> iter
local-variable         -> lvar
previous               -> prv
operation              -> op
extractor              -> extr
enclosure              -> encl
relational             -> relat
equality               -> equal
logical-and            -> land
logical-or             -> lor
relationship           -> relat
prototype              -> proto
termination            -> term
result                 -> rslt
operand                -> ope
domain                 -> dom
qualified              -> qualed
error                  -> err
project                -> proj
temporary              -> tmp
referrer-function      -> ref_fun
sample                 -> smpl
representative         -> repr
descendant             -> desc
transition             -> trans
contributor            -> contrib
positive               -> pos
negative               -> neg
evidence               -> evid


Previous: Abbreviation, Up: Top

索引

adlint-3.2.0/share/doc/texinfo.css0000644000004100000410000000055512224440633017061 0ustar www-datawww-datatable { width: 100%; border-spacing: 0px; border-collapse: collapse; border: 2px solid black; } th { border: 1px solid black; background: gray; color: white; text-align: center; } td { border: 1px solid black; } .verbatim { background: lightgray; margin-left: 2em; margin-right: 2em; padding: 5px 10px 5px 10px; } adlint-3.2.0/share/doc/c99gram.pdf0000644000004100000410000026004112224440633016637 0ustar www-datawww-data%PDF-1.5 % 3 0 obj << /Length 4 0 R /Filter /FlateDecode >> stream xĽM$;_KoEfYαRzsk%1h~?\/ɍ ?9P8˜rq<ڬB _ N^|qqO.zP_apz[VO~}UOk45O_a?f> *5>sJ-֗ao|H0Sc |rP9n J ( 8$g?)LDFnp4/Yiĵ? H-Å)8A>=k)5KXօ)8o]`q]v==C<sޗ&k}AŬbwJ%Dy9ZiXcgvXc{qIy}qח^eTh>ԯ~q 'pҎ.JA\}9\&ST\^+RpB;Qx\W B8зזa˰: TƯŔV֏9gl~g4`߬F7>)byutN>QaG1LY|>cRYB>:Z/ Nk2@T>EO8KpqM4um2WH҉t #Sh>R61#~ަ )KSl^/|(㵟9bP>c Ew7Qm*8-;|p|W{5"pQ}LK#Zy[?yeB|D{``7mp͖ݕgO?:#LOgU~_M|k@-Re>|*igwk0Q_ˮW^\7sÑykσkql߮}AūoΆKO&K:zd53|k[l8m3ܶXUi? kbULȏ^8ő~N)cک[Ǘ򠩵}A?]5?1n\?gqOy 1tS?hd&ncݮ~ŭd;^*K~w [M_aii+?olR ~/v@Gjj_zA?sͿ"Jbk/_b8齌/=;[Gҟs1>0}涟?s8;Kk\~V`VW].ï=rD3PCce||Wm-'$xB[|mտ0枖2AKwEYkO?m>HL}cm7'v:DZ?}NO ly7󕐓 wר/LB}[,ݓM}%Wl߯_zԯNyaP_^Mį4;K[MČq8|/mWV۾.S}&ڗͻ V=mt!d&oڣm8o8FVM Wط~Ͷڷgďe:smvk댼+0!?n^p^J “(yQpvz=y7@IamSٖb%*Jzf+-IŮJ1q7&q3Ch[ ӆp [[ :ck֣k/]Prֻf,Q:%7nz6k V[#mTcf]Qa}ڼ~61lȜz]B[4)snF@f3{lDD9~ab1ۻw{])ޘm;9{fm˶.60(- ?l+tdT{ÆFI/NoR=`msW1xl\͆j3֪/ᦥV\n@TF.Ìm++[?~lQgf)jߊ A;Ig}%f{fzo\b)Bb;>OxaթM%b@v-=\}بAZz׆-x{P޾r}s^MCgi.75蜀`Ãp- ^&G[tؒأlI3dR6IˆF}'ƴQ&}iscjc3K>|O81MEK$ْm2)675;ϛeÔ>M"!fޏ};6~-[,'2x[bR R4IU z)m[719<|m@rA8)GJ)S v"CJQ Ä=.J +0X0Ѥ&Un^~}R{xҺ޶ d`j֏ ?#Z7Q֣_ W}ٴYϐ8@:b'E;o.m*8vqg:=/hڏ[0 Em8#l@ <%9<vlKxΌd?qn m:V; TOsBBUbDķIжyxcT׏͛֠׃o5_u`e?s jyDۼ/E5o\Toخk}s>'`5GH}9MAQ`LevakBӛq.N |yb4&VBf16;Mw;cJYi1a(kCix^lےx_붉 B"؛WzDMZHgfa(a9o_ ۧ(\C9LnsArWڟB'qU}y1ě;JJYTPLo[o8QɾDZur8ػ >W=t~ӐFS@4b@ 7Snh6N(C36qͬsA[^LmnESr`Ԋ3XC+΄:ˆu#Ό qÖw _W)N l50 HYr_쀆VLY|T9cavRq>qFme =cq<0sxnT8Ἁqlm8#S6(4}m[lge#:x1[5ѣm{a2usNQI!Z8GmDU@*5ӈE+um'6NjbO?$e.z[0zT,D~+hlQGm ٕ>vÁ?ؑ_FmqƔN0ב+_?gB+XOU n 8SAg&k<53˭|k)삔X;ʖ(Mdpigk  b|uRx06 3P,xͣ# B7ގX'ְҖc5kˮqahKEnb1Bc9R6.BU$G{W6;=vڸ;tm!{o eKv+ekeTK| Jг?ķn%z }(a uv{Jlۍf&Fg AX87c5)o~6jJ(Z0(;FA{-|i6k9V;ʙ-b<( G)DV(~wK㴰CMmG kaB. `jnBb @m̶߷T$fk30%/$ X}uGXe89!fJVR{2>^VW f }<clVxʫT; p<4_n퍇AZqx9k)Bٱiۅ 867=ʳ`NIL{76Q{Ay"sfݞa }\yW֤a,3z =X8Xw&rȀ6C.Xm+PSMOl 4qS`Sٹ=L Q:v" TGD8 O~u4"E |XF>6|hTJ9Jux wO hũ|L]m9f߉fuza5Ffs.t^6^# >o1 ۷N"tGtQS6OkPNE*kUƃԗu&h+Ff@$z-opcl _ tbSǞrDrMo\@RtN2j h}}8%L:~K .L8H8f-p%|(.бdwz~%c}rǔ3?Vv_[Gݿ}^e I~xW>?:[*'^׿N7VCʼn]4@˟38L l>^ZӁG "6P4mIGU3cg! \qŃj6 ™=MC 0KhC4z/4]amႀ# 7/Gu5֎Kփ5ۈvzd `SUH)8u3E`@ 70awwԾQ.ua#eB[8An§wS /6oC]4q7o[wK 80´*1ޑoYz&fv+ٗ vh)(_?JM3uJBPGZ^ZWyxkqz+MhyC7#MfNޣD"v%/CRLFp&$1n1{߶9h`ޱ3h"8K|r!Q/ED463NN8+{T W%! MУm8.OxPvKy 54BO. &Ů0D&GK"y96VC^R\C*X_߾/|,A h7AI9^0;}9PHuC'@}ܨs~4C;:YXA.wmV*p -3rMH3Fy]x\}0 NXhi/\af{+[/Upkc<(aMOt}<,8%&x+ Y|U̚M9?vt%$} #ovQv`+ka$޿k&"JXw Bcsw]zɷkJ$K J%.x31 =-vIX@왎o8yóa|s"`&;R _vu6PK9n*C7tLԍFam30 ϝd^ĞMQ zv!1𘴾{LM>zU_,N $ġD;%<tĤw!m'=TC-'hP- ̟tߠs۠ 8 !*` -HLPyhr^fPʡ~ A`te"Ds;nb2g*t]>L|_ VJ$I~"@rP#  an2 ;MQfcs44#ZRB6fP'F2d-L@ӛӸ0yQkb*" *w3KypTrA8~7p:Nf:d*P,:D޾Na`b 12!('Ɨ 32stLBȧbc_8غ -9)ۃ߃Z6|02ΑS{1^ m"q\{l=[! 6O6-@M3BSXIl2u,Xf &lӃ\Pv\8I$73GP泌y)C(w2Lm6.J #6@T ೩o|+?Π4y[|ӟPz#c'" L̆ W2Rl.7\tlg ]CIֹ9)  7Pu]sŎH\!]aF0񾱞#o?AKL-SR{zGD nq@ɉx:޸$cz\V'DMj/9}]:5a(S#m tTNH`&)""9g0R߄DKS (S=n˂NՀ`jE%gPquzI_B"ӱ ?W++1xvǴ?Pfz_Y#'}^S~Nͳo |0Hgp\(H3ZH n@eatW|Tf|jzgbv 1 q5h:}g*>Ydyzs|⫤"hv_%wr WyrUu~}Qij};TBpr?IɷGL A8[MܔDDTol:B&kٛ1 B|V(@{S=$|t讦njk>芯;؜L٬]]K٦}ܯۛ\F)By6=GUyd2Ǻr|4^EwGs9H8<];KtOd^odAqЉF@QݥPOS"W{|)UԪQ}|H9풴0B0L pU&aB?4Og6i5/%܉p:h)C5}zqLiHdghuWҧyV{B$F%ܔ%j4(TonRbMT׳;l7y&VS\V.  q!kD3oГHDY8y|0^ȰJ>+BqzV΢ vf&t"p_A"PSN +;%`8GY;,ğlá<|!G!LLlyJv> (=)cOSD =i9UШt%j6m5̥fl`(a *-jW~λ%J:w"^PG*gDɸ靵3V;([iz=uH(L 7ܽثgDL.2yws;y^{_Q=6H0rxXIzJ]2 C".Ůt;gMl/(͕.\v$>>fX5D {$Cө'tBIp+eAMF^kS)iٰw:Hy(u%J8~vW>TJ3P!)yT*M7AӕyI?8jǠ0 F5Yt9":p1#džS=ӛNO\Hpd µo:Ft?.\ k&L+bfh: QV*):=ND= cʼPX`aoɮ<Kde}=2h{9^i4r&9YwS-e^i^d|V }.\_.SqI{{A]ڡbfνnN CJ$,I`{*AUlԟBs7 (}oDȥpkobo4Rc? X$MIYBU &;7/]!- =Me=x]P0z˹+I*~lo<+ &Ӱ O306@"b@hzʺ@?bd3d޲ƺr|o߽ݫ(Q$Cр*ع/ֿj?YV} '+YZV;PjgZ"w0^n a% ?Q] óbd (A%Yt2\KQ{$D. 6iHa?̩#Kl$zJW)"ע{2`6shd\uGd%7>oVf:>8lSSt7NQ36A%M#pzCWC:Pfqg*:]k 5p߿۫*}]Sb=ٶ ch7dсXgzDJX!4]Ϻm\xK0΍K@/niёfk9XLےL$.CdHcLl04uXk5 LKΙ4\C䛊zuef)@>CH0677@#ePcެ|Zp:?ČT}p) ć?i/)Rf V9 l˟:}uH4.PLY3y})w/}v/FuyL?ܹ U;z?e|CQ;u`(9|T2 g+g`Fl̬j`?T|r$$xFmCeځHAk<-(/Ie2@F6谈*/ h%r;佈{F3a|G|o^lf.7 1#mVAn"I 'b3ᔼ7$-16$&tA0o;d,rnhfwO$۷~uOFCQ&|ElXYw̑9 Z·u /p&QW[fj _%;`a*9QuP)XH=IP,#P!+j@YCd>5H >̨|ex7pYwy٫!7/%pAzbWo?[x(Kb8ZՄ{6pqW&`%+J"s-ۦo n9\:Ĺ+,`R# 4٬[hVqxgi:t)C-'yRpM6=z# u_ơVH Ol"2YTp+I+hC<!6`sh"e'Խ{WVf*#az$(b#r9W{.ԡ0S,S.&qfgsolA:Vb "3e2PCܠks%/C|V7"@LYWQYo}Lށso> ݉~UFq`ސE [o7XB:+/4Fuל]k->W*:!=iЄqy5jNܓ! .fm N+; p ٧P/( λF^mPشُiT7]*(he:w.N^:D"L{Ԙ,9ZRzՒUYGh)!Fx}\yrX> Z>0yy`=荍s90*+Uhںn%_?'1ΜآW9-~tW1*^ElK~^ur0oz9TV?Jpws.oZrL*/:twӕNqp3*bu~|+`uI 1PK"c$0^04ز~!dVuo ma2 Cm Ll=0q ӷ+)0Hr`D2sĢ8Y|+xYq;K@Db# !Ϊ'81u=RXh(X)z]?@H38YQ2ץ Si]QҺ3[ <q&y,Hgwi0ca"R%>zzɔ>o\=tqMʸ\31#ʯ~<+6qo;s #}/|c"zwX3%S[g3*$6Z0e\GwL0;9xmo3 H!p|S@m#LfhQg *MA$cW9cYieUuӘ[V҂OTrDErmȘ%uK(jd}D:QD#"pꃾ$Lݓ q~}RL O5*l'珠¦lw))"󀚮\yin%B4T_z3j$7Jb@ʜ)gWtlSjO{L zDuk$5}|WCi^G~LyrCfV"4@_VpaY 1.7ͥ ?dY>aT02n}[/PA b :Y;\\rW,1A+xB2C{K<7{1?bb9b#7)wCVP ѫP]݁A@CXɐ9҃T|>U }G/lт! sk>nNЗlLA\UC"6q 1QH[и$@q1n~ˆMǮg {| ~2p;CVZ\_o۾~ca}u6^ŵϳ[N5~|Vŏ` QZ"\<udIB ſ~0H`.̛] iļw͇ g̜FOB~*Tb n$J( ra˟$!< f7˹*j㘼0jq+T v .!{MB1I֏Eh4G}[1^̓4\#\;=ٽDTr`M iuLDAJ,]<^_PowBߪH_ l! #sGTc!yv?#mqL=QPw +6^gzqUUk,s,9z+IgWu,u!)qTH//_h7HX+1q fqfȣä0UȱƱOk!$+hy ]ˎcs6nw-/t(]'SiY,k-5U":!J_Б%<~[guEBF(' Dz1٭NWGQNjԼn1B]2 , o TU-R8!АϽ1drI}pY֎˄%f5x tp?EUyk 8SD#x.gO,?wMwf9kZ&,r,a 314Ze$m喭fՎ w%`!{}`*A,p(st5Bb+'-|^-(l3 Nqgu#^\ Oaƕ7a,-SKs%*t& <Γ&p6jwm$aw @yW?=JPƲ:P"zyr?n$;Ah[G6j^qϺizkѕE_dmv]ҕt^w7N 2 QY4OLx:W=9}bP42=AW اisH@Byҳ!Vcʔ3`MzOy 'fݺs(X U1[zG l0oYmWRdMf+C9]0֓+2ԹLlخ#oQ֣_LlT*U/io"IJG\"]9RkD7Q sby  PE蝔j[7RdLSoTm(*GO)&c814n =#e3i׉m`8SdA- M탱% 3HӌMG$$`ep)# {Tzº?Olm=~} wxRyO]ia NS|}|ɡN(tXF$*d5?vKhB8$h=,ȹGu{@$gCMY+A&ՐhĮ7GjCL$z S ][_alЎ1Ҭ,?6/8h4G}[1xDH*>tx._?pfK:l&UJGϋ ΆOE.bX5&N_L$)ԃx_UYu $ZĠv7pOVAyzJp*k9J)R|O"$X,B\-g䃧B;@\RT^ig$k[+ZΙ+B.8ucFRbϹl8ҡ)Qkmgo,HU/N]avvA##5eTQ. s!$ HD[VJ3s0T`/=1Q*ǡ&e2*fȬ;J|5!_jQB#כ4]YgcX; Pj/i<4u* ѹ\a3"}Mxn$L\y>ƃtnʋ6`$Ld-2vH:LF/y $HGX#PsxD2p}hdocR!Zwp4˟zԸ9xQo. {BBdJK.Xp<qH7t֙`겒6BypǼt1{g?.sSFwP[5p4U٢EX4o܊j/q{C9y-<őP J ;\婆\7=ɓ߁wv42L*hN79S" 1ImlNV&A}b̟$F4^vyMZ4#N7nc&#~W nU@j웄TiV'UUz4~VCrjS `H&e 3 &H_A/CAV9 )V Uyh#?eR MTBrtQĉq ߰)1m݋^HȘ++PJX/b#?)EqkELMDm΄ rQHr 0>S50c,iYYT{NjK^Sd!WX[T#nї5kٔ_҈<7D kߴ*Ò I`ԣ+b}fm$i|Wd-C8N69;\Cfr?7a'y1+q ?35,:W$\@cVMg>aR3|z-R&Lbm ..Vk^0IT&ѕT4O tYGU,Σ1Pd+D %;D&7$VBX톉a=$JVR*SNKK!|qo 9F@%v,?;L8m ,?Bk-(I/t+^=KX D*`FUGhJ`Έ_L4rg1AqTdԯ,~ڋ/v/T~.=d%aKі7]X[mzR-< _e8gp2i㩚}o/(m@Y |J`40x 0^"& "Jۄ1k# fQtjÏ] c`e{{/LX-(C</(1_lo/Gz;8ֈMsG݋QU_tc8㙣J3OƙNHF۶iuyڀX0 ME5hҵ/' e0M\>O]ԩ >wC?ڡ4+/܇iSV.+o ̡=֏s~z_/& jLc/EP7*,wK`;eߎpCYh=nQk`uK1ݿ*;޿苧"T$JkmLҗrBKd$A+~ Tyc\č%wqCS&fDz1"jQ,AE7]/++%yְb'!'\L;r}Cq<UPhĒ3jVG  YUV;)::Cln%ax d9X{* QY|/&GQMv%d_Z`b^P9U]s/IvDcs`ѺG}[1"%"U\DrR78 cƉsW! /O c@oL~FHnbxPVKsG<({=kBeA4_!&3XiU<%HۓY=#:QtR쾠l=zU&fjJeޛjSWjc4͉*qIBN홴}xc?#7AJ2w+_)uAUߗ2APQ)OnE-w>Qxzv}SG#< FBJ5q|qWd+C}f? NK_aڤ#zp-p"Д%i'릃6d " l$1%oQ/&,Z[ZHLkKdRԉECOGvːC"8 YBu737Q*r\>[mCq(4 ,r%"qlzQA, gTuFBp`dp``'4PH6C*{=2h+ CD4R^YI=FO&1}YY{#sQ{01gP1O|!Sb+ Q`Q*JK|iؑvHSpeӻanYDO !CY;'!hh4ji1Z*][OlJꚤQ$~m3ϣ&ډzo=~TI:x.609Y C~%!v> A1 5ocDH0.xj}cC{CLoJ{䆱 Oгpxʺ@jg|9 ?7֣_Ǭu|xWՋ 8^

\~#wUg'J`:W#{Gԅ%vQZ.|'0þ@ bdFLt("/L/%2KAj_ "͢4E(.ĄZJ,}zm]C\!-N >dq`!·T%"0Y>cd*>0<\wٸݵ\|&ܬNZa=̓BAVr/ nQDH"*ct>9`6cE√"g]PwTL:ݗiҚ7xf@p|e7TB\yM>^5y+08ߜT^A؛=iq( Xo= >R_gz?<zGEF`̲۬`Y vl$5Pe`5 ƥETX|Y&ԕk$ȨP6I|؎[m] QǝB KHy5J.H p)b8 ԯNz)䞆H -ȍ@!aa $sfރ6S'@ʔ0!kp62qvz : .f #SѤGz⪃}LM~ܔ!4+Kѳ5"t=i^13~l#Z7oQ/昛W}sɧ+Il=qa/9VO%JB^x]؞ {%vߴ=‚Gg 0]8l.Y> H*J1$ۡzCѺ 6k6m,( OD0)8XT"p x̑Lr kDsBHDixA̽`f$xq fB[k #[㋍ :?ua+{S!A%3fO719!6w!aJUnz({5yz{͗KB_ MƸ@ǔg$Q׆=%7/>A l٧׬w$L"lT5<e<*%q}W!}2hhjFJAC/ɐ?R-<]pbܶlZY`Mf,k2^&+sF-7vMrw}]f6~X,h&:(X] i5) ]6P AILA)V8':\W1tb}%Ѓ%Vb" >)t"+{< D||J ss$eq6"XjN~RW!(&2Aro0Y;$. Y8LmfR( 'Y!}6O]wwFյN-6M]\ $`JKQ%lf,m8ǹ+ J%U*y(JF0Tb9O(C~e;Y(_HtFzs2LD!.gʔ{U).WXȿOC?u΃X@-.7G ͟ F2oYc]O9 o7m~>co=0^|NML"%*i %w+Ȫ_'T3ӿ1XSd&7IQxZ|C N?8bM,b<2+C7-[fԊR',jEZqce|Utn/'d@@nĈ`/`O._;.p-@ *݆BI-EE3(kèHxk .diQlp݃8m +mP](Ln6+:㩉fZ w]57%ݚ(8됸v+=hT&j cYr'eojwmً+{{Ao&g(']iK >ly\n'PPT!t*jɒDF>QnDR"~²DX88s: 1ρ%8H>O]}I@!MRCD?&.Dގ ?xc`TKQ0܉MF(?ޠF TCU` U!5MIBV-D/1Ox A6e䦛tCB#PպjΧns5RؕŠJ),cJ7O!:@TVy6G[V{2\򖱼=҇+eUa{%E W n\_B\D} 17 P.uV#.N.ߵo9Z- i3dk|׏7R qVF„/B$S_%M( ;-lCru}hF6rcWgsc dFH>JJ&Hw@yy`bho-#E1Nj_9ā8c7+lSU9\{),C` {/0!Ϧbi7TאU!԰֖lKB|(0oayD&Q]<({i{mPgUO)(&FDƐW?ǎ.) 9))T%Gd+. &o; @P@q02Cp5%c3T+DG))`&# )Wn.'&s)*@CYwq `Wr[*x.B8Th(E <m}@# 8R^7*5Zi,ㄅfB-ml(<3q"j gN%og.iuGdt`1AM^o7X@g8mx"0j̳,#$@I7d=KK#8@j5c!"ۡG&dn j&~s4?8%V!l7WfU VB}#Ɣnvinn%sSJoCZչ#lVNtgBQR]n,1|3x"QCY"V3dYRGʤZ㘷_E6ݻ(,I0 G& wlXdRo@G7! X!rsTXvg!ZǿoJ"L8v-EVe&QyQD-ڄϞHHOw>i tB4Cl:q f,^{_1j,JTo3ϻ#7ɧQ;0CqS݋J,;A O8[e;h>1=-pr-3,gfT+4)GOLcMH=T^[KZ@Kf(&j%Su>vEmfl͕ͥGOWHq`<7_[͹8G3H󡮇DY7{1 +K >+}6Yq`P腕HT7yc[ًtۀ? rt0tr8K!~W ixL7$M0TŎ6ٖ{;6=UpM8ɰ xn Ą/~=)-euëÄ354ppը8X2[p6sm2SmĹ=~@nF;`opnS> oxDL"eEL*WF.k! \0n`ģ߉`?v[YD JQVhB1.ywj\@Aߜ$B䈪T()?Џ1 O-rXaAq8>m* "pHpUjʨ,b#Z]H$Sa~9Yt0$c"{a."_dԙ8 ^Hf\R0#ڄڪG=5h۲66+qPԗ!e nqn(šDb31ά c _,e`sFg36cI[HwO~m&%IuAfzD}w7G2oYc]O9t{U룴$eO~g/VXk3 D|Lrԓ_fD`z=97mMzk=u6H@RJ,Q曔.\ax*}zWJ$M)C"`KFܕHl눋*c@s4Z. ),&Zt" S'XHmÃX`O]YT% f2fч iҋmQwj,-6a=e]k5{V|jgg*Fnc]O9eō!#Fv׾;]Fo='Gtק@ #]z$uJiQ.MX&.AS3&4gfP0qIV=JGqt(Il0h:vk 9n7m$ fq "֜l<\ݬ@ 5T ;+<+ 2&"A*|_mfA~]L>"+!~KeH'6H0f+DE)uTGj y`IbU  rŌ,)(a=u IcM ߕ-TAXqrxZcB cDa@Brpz$IeL@8ĽN}?{)x6鶇A5@sEU䄠TMw~%f?Tr?YYYVj;D:} xk皌pv݃Z%n;Uexoc;\e,m2aQ2`(]dH~.H#hޘGf&ѣXB;ʗ'Q˱(*J'P؄5@O\mURUlP51vhx *rXцMo.r7㶭Y庈^8>pd ߅NE4.7*1lHSH.~>$5ZR%ae.\(Ug z6)0F|qcW\Ui 噜WUBr*{&U]mEwg]08B]S]h T؀u>?*Ql98vTݓJkQ)](l1Q- f͒dcrB"ңU^H"XuTj#zН"܊5˦h#H.|jeR6Y@@/"P* d1{?t(tѩy o-~@-rmzi4ˍ$Ivpy9lMJOI#^=&ʽڝT|eH\KHw/}Tmz2a gU_1*pQ3v~{ =WDhN: *TRADFlJqJٴm mgH>&\jR'ݘa YB&V veHlrk߆\*}WzAK 䖫oP޳Yt4p.eT;XfճH o>xكKT9(P,& Zċv7Z݌g%1L=Bn/8GlϡmRs8o?\9Џd?Vcӈ*6bIQrp0CF)E*(=Hlm֩jTWYP ~"9^}A; 2dCGU"RSHͺdVGQ?'$ :V%Ph L? l"E z 𬱺PIq|pBIyWW FIAjaoo|Jujfd}]%l/VA9mfL^˃r$mɯ%'i˭z3ulT@>o&8:#E8*mN]gz5F eqE3KYc\8_8|WոOe5eHVcеdn=]jwaM2> z wc$ð3}*>T*ru:Kwfy~-Aq\xɟV)* hC~ti--G.S9DC ;-` } ,gdOK dUE1@H:<|zȻ퓨& Z7-V4[zs xbpߢ#8K#Yu[J!x߯KF{W+07򣃈-wMSz, 5e9Q>T2Bݛ{m̛$nZ /QqV)LWH7Ii;v[k{_]>.NB"q͟Pf7~/L3J䅼QI\_W?oN mj'}>:']pz3e}b}Jji  {o\QO>2H8ȣqGSaj2N3&Ti֍+=N4ߕm0dyFOP֌ aYvI~ vPoJdXI@e3F,~e\crzp J#ӗaӠU([uLBٺ/&@NROB3X=jU? )0ϯ]{9Y𥌊wXdhꑔnQ1~j!kFq|[O͠63߳5W~&q&kz[>YwifƦL\rL8K\:eWcQ]62fsBTRC~ EjݷTǔ-jWMQU"ӂ;xscOuL+~SoDK[\ןt<ͳe*eg&FB{ T ms0[ߪUP^]O}g%ǰ#P`P8\+,P&3ʟFr ՘d=;6weSUl;K@Eݚhi~ ~`ޫ>GIV\{UX G WkF"^lEN4By*^aWxjDYbP%iD=1'b_Cԑ*내릎freA \S, }c~W\b) W^P]${%_ұR'2_CJ3? I|8 čJA0Pl$/P=SvNFuB g!Ց⡉u(!ӒaOJH-g%\ 3Pt"R\ԁ'㛺s˦}`YI:"etƑAiiqX~"wѬ@@D~ ꏩLtdrқOgBH)T!P(P-?[`XN%(lKOI! ?-.Rf@b>(cfRʁL͠r^4m^m1ηAs|IIq=DSsc#66B̟z2YI/^wR( xpBFM#3L  p:4},t |9joTˮ4V'Ieqg7hNwǎu\8(5Nu1Ӆo$ ӼM0tk}G_$H`Ir8+ѱ^ R륧 O] C6u}Y`W(AVW+TDZoF5Tm]w>['soKGFvV)~qoK09θȭlS4s=0ZNn %ɍ6xvrWexvrs`EU^aa/N4z~MYY?;:h8ŽO]\Dxѻ&N A,A|u)nziK?_̴~ZK H5CTm7S.6Ϯ_`6њD{hA!ꇩHPITrbB;{=8қXb޳Y]-YPoz.(@RrGK'6LwQͅ"r~,n;ڛXكP"ǩ*/`ݱ}^K3?:f* k2>4WޛWN?d4i,ث5U_Ќ%M?T1">P6} ~-7hh\r! # t,'k'b#R` ޗScnM Ąۻ UU k3e'G$5y %B9~g 4ZKGmrhz, O&A4$(fdRRV^9:;e-ĔHy"xj&![2#K=@hvX"Rf\پ?;=U5?7\Л/# &=+AL}Sوtkʄ|F?! dHT'hn`^D=fZE(0leE|$* 230/%cѫ?V[yȣ(dUYc5G-`KwU2|{^o Z&XҾ;9XJɽS߆[SyUR0b$̣~(fnXKs3:R:hXڍ#jkh槿7!G+j( aIFxᎼqmS .֋hDz=> WHeXn{$ƢHxswpWǸX/OVJ^iEĈ|ۢafaey~&]lIԃ~u9؈"mI`T*ʊ. 3=k*xE N\#EI`$>)AJO msLX-fis(IVX.*Gky82} E;$[tk.0HMYlP;wk4e<z$")3Z쎪GLKY&"خ}EPٺ`.9@ In."ޓ#EoVM Uc~^tIZrRd^;%fZ/BV%&WJȞı[Q2(h6T/t8P|S9<5&4{d9 }zxss#,hTEuyz8Tha9*_Ҷb{' CAChYWcyn 2^}OxbV- 7m@5k3ˁ]>ECX|6Xڣ!T 'gc4Zl#Tf >IE6!c%bPbk!rP] H~.Zn# طHmnԈ-E҈'vRb4rCWU"*HD_ԔHL׈~ۥ+~{ bG}-<֒Q[DҖsX;T Kds_ʰP[ҾGزJ_EVΔd#%֖Su#R,pnce%OiH[XݷlqhPm.kUhIBd37,g xEj!խR(DmCADZ)ölK/lVq1Dso霮/GuqA|ckX;0@BGZv偦fon0mz%ϫQt=hF$&Z ymH`-UrtIʾΥo#M'ָui9iK!wo2T8j2?D&d;^Elk+Ҕa5\Mqd-EeWp0X=G[LRR*=ȅ(7iecrUjd#Qض1ɬw=IS`n~n̍fv,{Ȕpӊ^ QBe+.v(/oCm۵Kos _jX@$i| -\̗RXcf*u,4G+GDa#5;B?oIXZڡX) -a;`^JVgzv-WuTu#Sֽo\k~cNYo)K,67w5ڏr/|8K{OP 힎|K9 ZC#^[+fa txz&rPJnU&x[t<#tWB{5]zra3+:rhn\|:8YoswhnRZNeigz)z4Pfz߸8<7ӹY^wʇ?T ;D'v&nˆ)hFk)ё7*ڌT5t{5VT&a:F۸,AJk2ѭb\ 3N"^qMI~(~FߺGS7Ll=@KPV>Y^#j+0a'-ޖ̤gb{|~R$SvrUiPH'Qg婚DAK^'zT1ځH,5O^:]O?qmr?+%婁5 4=Nߠ: #N&f{}5.6Y?1s7;v.7: $[XːRT[`S;M,ݧ8<TWN0`dyO+;5:|klU-G*T\cJB]W/=*bTo8\H4&ކJOa'S2c^SU2-5熡}ZPC|ano ;ю$j1̆4+cxBQH^K|Ȗ8*A/ Z,DE|H+!Qރ!o#LY"݆h5lVpAP䪂ݳ^XP[W{BlTS_AAǧ 1 IA֫v2U2AE3P ֩Sv2`t|57u ~i L3K~Sʖ>jI 쀡䶏=>|VWGVlw?M΅'+^÷&'M!}I9sGgԀKhE/FfӺɺRd=5K A]T yqxi4s\KuvwZDk&2&6qQ1>k xV@Qmt|׭{N6 lj/-ϪuEJ}m٨񙖣hvrGGXs7^rIȥnJG^{fzxgא]j(9Q[&Ń\ S^!c5T"O}ʫN 4m=0E ŕa5H#¶ɮR9wf]p+ͮ)ogct((_cWN3Jڞ4<֠[c .Qc{Â䪈;> >> /Font << /f-0-0 5 0 R >> >> endobj 6 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 4391 2632 ] /Contents 3 0 R /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Resources 2 0 R >> endobj 7 0 obj << /Length 8 0 R /Filter /FlateDecode /Length1 2546 /Length2 49171 /Length3 545 >> stream xeT۲5n6n n 4w48cs{kY5WUV2"e:!cC#=#7@dedc%g%C4uT@+L hw=-C d 0XXY̌‘غكL|P*Sо{nF_ Sky6V@kGțd0t5sP3Z@ [[gDGZZ;񯑉؛@ih`;[8DEl/ {[n -m\=/dmc'[UkP˿6K {M6FfF.&t52c7[nkc/8@&8g ߁ #G!d ˖5p߆ `o:oJ0t{3D @6듑qx1s9Loq1 @U6pW'@ g2 yj31)^]B1'K˿gI/9d` x@, wՁ:/:IGnM-=rA 4V9lZ-A@_*f # kÛƀ,107pc|$3 v[ vv3; 4/'hoI>.՛ea|4Z[McD/$hrxwZ +1x~wq]!濕Vٻ/&K4ַrV}+;mH]@v.η A-D{kU0|y0c%f'Kco{ަ$ n-&^y~,)cQ(ǽ+c*+MUzEzW'yz۰Л^??@ #ӻjs09yx 6Vw뭒wuXޱEMޭ4n.E@q[o-fޥͻI||{uAy|[}ou:q:Un%[;??vvdiY}gdv8v6]@+!,t(9vIIS؇r. k8Ƶ;8u >iݒtc+~w|}f6ٜc@Me7x `#RҸ`%DS}9(8-'Eזn̢V$ .˩t \pTZq.xh#w}b R~vewuAu@ ݗ)d/|߰ayaݞɚo5ԫRY~٠-/P 59]tI;8s$.,GW OŜx$ܺf EbC炢lb ~zm5.ƾ^zb0d3 vq[ЀTl%F)v3Lj񊎩N) @Yx_kDGc:4Q fpdGSf\f,Wэ? Sƿ(eH!ca}^aplKCx۬o-> f!,lnM!+QQf. fG@0Ftzv)KvYwk3cHNaVdt¶spColu"3ng)MVGdyؚՀ#Pv8e֨rXօ`!LOlOg`^+Ͱ*ģ]p共$kVyxʇ'N4<7`hzȪߠ[Tڻ[57ɂ X/6'chwR*D\+;W>`KE9~kE 5b]H^S# B!!{;!H9G[=ͦ>Au&/}sUB[ QbD0A]Ы{,?k.Lz- eXDfPY@”,psO(sDEE41{%x=7D'v|?W%VJK}]3G^z[ `UG?cZanܺ6ݞ%Bdeǯ>{>Bbl"KjwϿe'" }D}?Jc`|kyyjJ*b{}PTlSjfepHY`>d H8@z'oaT: 㻨$INWw"sN$Hs˨niT?PSM:}Eґt6Y'PMV_2gWpB>JJjwY!? (] F./(Md˰r/eJ³~k3 2\3g@"j.Uṗٛ>11m(/~o?rHC4څH3 5eg-iqK%ŏw1 =:;Õ&nFҌC'%RkA'+|bf_4_ XjXCL婴{ _ja^rd#g0Z|)l[bS^,t[# #. }R6JhQ}7(_xaE8t<&QiIgꀚnB:Jvp\щyI[q#$ń׸н3q Cke_Kq%oy6Wl;!EX$&ZbNrTn"jt^ O+by)JI}&:;5"qa3t6/Ai1ݹ$9HO$8?F놏tc(ŃdC\wy8m\tҬ! ʄ¤U\@:&6yلwQ?>o37?i,8K-%ri%| b#,5{I%Zۙu@(U)@u}*;wd0G\BMZޜ9T᪦`2lFV"x{Y/F^oEHX[\,xkwu/Vi2| 9g Iyk?G`̧5d7k\] +ϻ|==/&캐 vn "?((P/uZ{ٛ)ʾ|Zx"7eӢJD R3sVBUMG`s6)? ukRM--MrN{xpko~It3iB_'@4~U Å, 2GQܜ'BjLJN4BK3]Z"2aK%>I'gbR;f+%Ws%i4cN|L X75jZUölj֨1hWD># c i ;PL>'ˉZv3Ou/V\S}a6`iiGK ^>b1x,OW>ӜqFǞy0EuDޓOvw@n H$klct s„s D4q%S\Ԩs䪸A3Jk=u'Ϧ3_9ŸȘ]i,Ǽ;q tv3їP۴#ZF,LV=#V:$`D"3* O{mLfnN?1W"PaQ֧8^٫66uV!;%8YƣFod/ $a3B|_LIH1"e%%[ .3RTƵ}7?1oȬk\$a8.C S*\ui 2 {+N˸aGP p!sg?xtԓ;*&9I Kg=iPu\Z8fl)ds)P[k#4D| DB:ʢͷ AAJ*ҙ1Eܤ 1mUv}d(V#d"t}3YLZT8# l'I";<}na Œ0Gi m0x:BT"taD;:Թ_BV67Fd}՚⥴@#bȨ$~, {>x3 "Ȉz$J*[ |O3vgZ^ʣ GpGO`34.&#Tz 3@OăqNͨ#IeDt FHA&>3?E瓢Au G~aGáV ć 2)ۓd@4͵m+ڜbuw<@ U EDg]Z–eڍX@W1%hg1`mtcMHѢ of2SfP  ey.**8fR/?nHRaRݰxPsg)?qEöǴEAc; nۖyl4&W#hOoWyLr| 5yv]mCc+3f9SI`Y#Ѻ2H% %ȗs9v0i!oBIAj`AS[cJy~j˶lm~Az I\dž-;3S{R(mU:uHk H, L拧ƴ<<&"4bYvLncM cRW~ݶR[c%Ds{Ŕi/S9-XFMO ESu/ѳ%e'DKBW$V~OOn;E%Ɨ;(hu elvD$ NvN6 ;O]S^3 ,+Mƻc'/dek>J12.0cP)tIVC=Uk~֥Gx 1I>ǹ? yP"]k@gVv?/7[diD568CTBDcޛa2&r~*t5<$Gz[G?/'DHD3l?r;;/"-V VPfAB kb釄9=UOD(7DR: |D1YʍI_Fj;d}ϘA(}+AO;?@rk`åJt_6ń)٦?2d@utsu)fhC衘rp3]j4^M[G xjp%-qˠs1 peEShB8^nHE$aE0H$)E$@89t ̙y.A+FY2݃#p W<ԢG wCٽ/d 7IuI?zN_+>uV?Ixp։Nb};9SON=M{QLt ?_*mt{  SPEL}Rlh P ;s,a2J6wm{Uj}&j}7*]mjį{1Fj*^q%+\Iq䝐NvR:G>Cň * ygl+|;^ e֤֓tfrTk^K_/U}>v>]kGzgyN(g9}!rqL wl¤ED&ryCYMAE!C~NCǎuSrJy}8GR1@<q"䞺&׎gՍksO̺e,oJ|0 sng?-ݜM씞aփKiʘײ\-2 dz&h?Jv_ׅVR,) U~%tf0]h:"ȨPb)/Qz;Zcs.Jx"C;]jlHc;ߢ_6`$bË~ْ#ݩg[f/[fmm'c 2$Z"? K{/bg.zI[&\jM,E(FgaŽ$6`Lj9NZYèpʗsSQ3U{y@Y8.q c!J!ؐ$KzR=WV$8P>Ԡ 0Ȼ0^a֋w.!C6ֈ[q m?۹"EDʘ,K8_JPN[Il4MitqMOdVOϨ'W틠Z?nd1; yu$FgC2$G1#l0 eydB'Z3pdܴ]$5 LkF,F,Ī-º)"G9; v/WQPDD˘+Iqa~Y4Oڎ)]Ÿ}"H/*Cz.\gԵv0{|i&R[fk范Ǫǻ.(?H=!Ԫ y 2sT)Puk/fܾv+%LJPQNϪJ-Y 8y}Gh-%@~0:~0 e nXe0l8hu8DJ1oP"Kb+dL e8ycViV}(p0b}S6 ۲k،^'EOraua^j:Zp]EDOpڄN|4z[u+r!g~P! "I*/P'[͒LS)tHM.'TZիӔlj-h|U#<``Jh/zG̼$cgJ xt:';H΍T kT᳊R{9P`diE9[38̷OSì=AFE 0<"0jfЭG){@ݏ}Ĭ\BfZ@DXR$_K2uqvSgMms[sjGSĹօвy7kj Un l̝ȶ)ntLn )u`Z mY@# w ]]j%2q튖ʧY| PX=3(qk\MEZdn3);+/CG"c~= A :D`g\O.[/:?O. L k 46ƕc Π}: (;!]"ʹې eo;\*BXPmE$~؀ Zf L\+7S?4ڝjI Q-$XkTsQ6BJ)kkMm*@~X3Vbm]ݐ3奙 n@I(aLH8K r)(wOh+UW-"v6,y)|;Z*kIf ϊ;{`-{ԗqXZtwͪE>|gˍxm%;N|N.)l.4)yIB*}vܟ ȢohKR16&Od? XUąxW Uu#֦3^Iy6VW.=۷(%;VE!`,ɹ9KH:])M|ѧ'+8zUs"1tOɃHL`1Uf#@? Wr8QN<{8i}s^u\$tn=o+ 0HSbr@hf`=j)ձф ;Lj~> :mb<~$m#e2M_ǂ{r[DˌDNR7FD?( g.%Yi5? m}pMKf}gʎiҼ(ϑլE>99,%;`*g:e\j VlP{Ff+Np-=sT"Cp* `XIL#2 '߹j@BCH5QCݗGM~.{mu2" ꚻbOH9*z[&~A dԹn 4'A,Z.'49U겧J#[EџsS`^hNR= 7U}'6I)1p aЃQ?u:L#sYp?ceg汖ٕ٣/ \ AjWE*PצY٤BizY06n=B8EKhF@;t\o"S U8_i,Z͕YTr?F=.tͰ<'. GScS5`K4ՐyhI٪ S 4dPf:u{f"zä9~D Eo[v(%@E][ia<(.ά\Us]+ ePf o\ѕ&Od[/!^6T;K vh#hۻΏk /7c~0^̚@^ҋ{ ۬C8MUyˌbgC[3Q_VxЬ )b"nG ?Ju#t-G j_F"ͣYȱ$kvEG*m5?h%Ӵ ȞNNUj}WR1zD·Xag?uSîx'b ]Éxaaɒrlj|~qLjX0Ņ?nWbD ).nq3UCok+d2xxT1DtMU 1WVvP˙Pŕ%?|SC%p/G &SPw%k>,N깟7 J<.@ͽ'< 1!zǐPPT*\ )v HHov>Ni::vɍ"ãf$Ќ965nz{;1m+c%kC'BA~a ƴ7*MPLCPC#|!fg&P1bi5Sծl TC<ÇG}mTad@ zSJO(k-Yq*fo-'D#:Ck$k޹fun2%!g|tn\ ιrr|8./k3؋ ,MZ3$GE$xpo=<`_N[d$vt.kSVXc7c(C w m'h’xk=k9cr >B?':G1tkz׃K ۪U>|uFDEw4yP\b@t4bhz51A's7Q;(IFcFE1iQ+mC4=Xg>8ZfyNR~ _=oM[}ۢ'IF|n|iCMrMT2do~1v"Ű/2!a;Yr meni G\ȨN(…Evy5`F }Ҭywe|@WYFAޝNLJZsџs9|bl54<:AMO>:.]09AֻLL! [7G_tlj7A<ʢ_B#=xsC5IuC>67!.Spם sV'M}2ϼ#9$~Ui(5Lu ⶤpO쯳w3R8<ֱ ?v`h:-Y?ẽ(uVgGLSń-kGoIBWqB+չهЂ2X*"8&` Β;v"XF8ܤR?GtמuSK`e!˞tm`Z@zRIGfudO:mYjю6Xb]H)EM9 +JA˛vm u XZ'T}] ) 2pJzZ4Gh),@7Ԗ{jTe@Xh'\@Pto2BYխN.RYF!R8Oq=ߒGЄ9z/ eaԐme5ᮺ+'p3Oy8Kpɴv[FE}H*I At_u{>PbgssԤCkV+;v8xFd8( o`lKeGBѲ^΃+Z<*qVRQm;,G@t& iU"W C*k>۶4g$b^7'n@h3핍 &ʕTHϷ5´^1ښU]9y1MYYF+ 'KEHT´ᚠ@%~}xCatA*ueviM6Cg-}2U@=U{_NGqTKl`o +3nB IVlqw0Jd63 ج0,RqMOl^CM~Ν \l{Vۏ}vFt\?ǥg6'+ڽ_c/^B*B!|h4,cbԏKI) k]zR hfBl3h^Ȫu.6]L^bA \- zf>qGg*0Jݢ85e[TXO a;,%GOYX+ .}Δ5J.;V];<:Mêovª}#8^@ ˂@wFn!FgPb0' @'O`LC<1Xt'~^@mX$#_mᛒ9(a9ҔնSف3Vaq_URo,-}lD|OzѠ> βIfd5;I0FI?lwTH6p$',f49XT UAl^s _8mp ӎ u^A|d}Ak)=v)rtN7cCrEq8?dcQ--L3]ҽ YlPgb$+R ЇsˁD0bwSpEZ|<֖PeX$v߰fTMU548'h(koʼPaqfkJ[\~HDN$i;4a}Ia* 6MSgaR;P+$y|3`#2q_UıwဂxmQnL`a^U>*`k"MՀ7̾$Ơ̥^+i2!τ$? 2d$ {s/z:˯MڀhhgxǿM4{& -GjǐVz(l.N!C ?H^4H5],>Z}oTLvDZXy1D q@1x >Vd(rg6Ts ~5zbq,qfL#sO;s@y;@cplF<)q mg>ٟ/`%G]TrǒO"KB<6'U#-tQ'ᾜkRAs-(|ų5KWE,K K>g}`"m7><ntO?c04khŻa0kl!ku|=;ߚh '#L*Tr!zp=]q:ihl/-d6?u3<3h<;prQ]Ƌn\iỎZ R֫E .E2Yoj|tG>sH&JF|ƶFAS{Hk> a @b㳒1Ri޹p@mֳ_ Bu%b lQû;OF>/)itG³W|(Ilc'-JcT4A˔CY2yE:r3p?o`4gF*{}Z j'vD3mBrԮ&8l@#+IT F *)fe$`v=' 0bh^_X#ZnydjFb61(d,Cz -LKC%l<-IvW^ZtZG3KJ@eSԓ/()hS P5}1q#T;}\쵁G3QeeArS#*m'X<󍉇s#d.%G"as_.m[z z+vf X /BYr(!:kڴ7Py6Fj{ T B4S~=e: hsxC+Iǒ EdYCLT0 $G ht=8"]_X\dν9&%j(5F}zkob"3oh%"~-אQc^SϘ> !.d8jxM˞e95xCd0`uJv9Gﴤ,o/6"I$UȄ&RAR|ZQ9Wԁѡڹr%pEy$85חj-`Y][)*')(XTIsg8"|c%Em0l҉\;u9]I3vTBuk =TlNr<r 櫆S\|_Sjvf}!MΌcH櫄MtQ??*m)e̞نe +{}yx:nma믷J#l΀X7#Ѻ=4z &O*K k}oׯ=DK@^>?~Ɩޙ,؂ Ɛ  v F(u͘BBՠ)qILvDqn*[i˰Zg ٲf|0n z;{ |Dè}H 9{2$Ki`Xc$W ~ .Ei`_]f^iЧ;]M|Dܲ@lM9Q6*O KO'߃|υ sݑ>p|6Ö;Ugrb$Dtpwe.: #%7kEC[IQ@fU X]gKE]p{:̀Ǝ+-41񳺭kv(pC ROBnX!wڂ#!`Ob\DƟgmQyqM'[SXeKRr >ɯh} ֹhwt!WlطJ %r6:ҜC2! )TѓfJ*V uY tP&.أ-+M͸Q84@zM-8݀$]yvU{:z$P5=ohểw`uE6 \:5HPm "mv ̑> ,d =^g}3LLkP<wh^$0}WpA78wjͼ6HPQy1ŅSϹ-:h/7$^ܬ^;/="M N2&Z_@O UEX6w1.Q-MQ#=؆sKm~M"ѪM'f[l͙ kWFUq|N~=yGqCfu(NR/; .[ dB]Senxi6f .-S%5-=L"UDoPitXoji@z'Yae.Z)X,qxe%KX gpt(IeY`-)O=.|lEkR<%+Ÿ!ƀYM_jm\Lo1RY|7ɤ_J1%39q&%sh_ӫP,=p36q2|ݶP *Qu-tISԡe# lJpMǸXʽ$ͩIuK􁪍p4QuQt1i:˾9ȡTWX^΃A=}H_s*R*s%JQX?rͿXw<ʡ6. pH'd@_&n%iҙB~ҦO|[}@u4j@uD /Xn;EcM-O@T1/,dFʔJw_f&F5v՚J3T6e+vgI"e+X@5Kh:_hHo3n%!Uo>!n&?C/iNByTPTHo!;x^[9z56m;:,<^E'*uSfm>Ǖ(8x8WN٢:9;Tj=_D~/Yq־h }T.P㎼*;6#KFݐP-]4Tw< Eym1(.]/k]؎Ӷ-N!%ӵSNpOHs U)jX5p|_DQ|q)t@JV I.qz#L̬BaݧӢ-yh??N'&^@` fӫ,dEfUk*D3M?tΝ8(|+;B>/eG okj˜q<,xTJ}:3aad}o|_,<ِPb5i'V&}a60_A5|;ђ@;e@l("?ml2)]sf'yerN}qK}(MQ̋%jVF[(@Il. rHj:G녫?xr30(b66l7-UOI͚iMf9>GF~dSuCm9Gq %ɷ2 Ũ3/sKk+3@}9|$bSeC$?@1VmM~vR3n-Ү8J )~rk"DQ'M "VX&]g500I:/ٕ( 쮧R"EWywup?fE$h`NS7ώ>̚&uI~NbFD+cg?Ug@{17RufY0hac0=.BҒ:+"XljKhY1'ӟc/XP ׷KP2 S4"eE)J!n1Iꆠ %mv&^g5=qQY%yem*˰)(s}.T* gx((;j@,e uڗ,9Wvrd9@$ Rb{&2`"һ,1e([TCs74huo96Hx x"½`9PWh,6K/ "^y'q5C*Y,op ӀJ?ml*:+!턗V?uHrO4_wPCBQpq VSp!%e*|5_-i#(~rjKwR͚UuX"zu1&%!1AcH, -~FPj$tg=[ĊN}ީ~xЙ_ *\,@)|{v?AꖴUWx *)(6^|k%a軺貢 {n, T1.W'=ݢs-m~N<\'~s؉VXi"M/Ě;r6>aI@bs|l[XudyMg{6Цl*u%/T5@'TH[gXv~\Y'P vl-6%SO,hPN؆w@4;]0x_;a\ق[/r!墒%^91z^` %A+"p-Wwᥔ\7^ Rˠ+{X`xB IՍiT"~:rk8e\epʚ2S@{cΫ'9Dq}XI6aiI2%ӪNti.O*✡>Ү„09*bzQq3 ^ |caX XOkڝ%t^l#Ig+Rpp)Wq}mB-0/{6vO,^ )B,)bh;H@ZHqC#}؃Dr+uh@A[w)B!L3hUũb4d-U+by!>PKuoqumϏ}tGMg"Ͼd1cVKL?y* byPA=As 7"X¼)胆)᚝OwXS]i>Kw*qNvHtǰyr qᑜ=bS]YyG,>'ҩ8g p!oJ`}wijۺ8{ZM( %&R+z(Nf[Ri-iHe=O׍x*^:Uod`W }Gzbq!O9@EG^QH.`ٟĶ<(qyqmN]=O)^ou@%0'ٹnb;qGzY(=ωn}f{ez3v]1٣ 7 $h4E",/?<"76!z4nX~kg͓֬.0}5`C^NP;=RE (Vvg-!S ̣KEX) <)1+uaTyc^P-o%Gzh(%}88D~WqD)l3 yr}䠍oؿ%Tb) ٻ |җ\0*a3b_N a5Om ~;׋㵣J9). ଂwxWί*>U-+2%< ?"؟Nr+ x:7ͷAS[ '/R:\^~VD ѧ lQv )|9kڻvZ@#xԍGޞ Y¿ّU$Gx*NtdusxL1˜. zs;Z14w9rSOw3a@&If^!; *uJ"M5z0@\,ic"U|偞^jb4ᦐumӄ徛իK=^ܵʃ;7oz#̺P6 m% Ȭ\ϫnKIș3e&Ziaecqqo@OgdP%vDk&F3Oy宄a,6 %IWM;4p23gA"-29(ohvz|mt}Iv}TixY‚`/j y6D3ӰsHZsW\3<9kgp~9:bMcdtVVѡ/gݷxEpm6:#6t`WV 6k3hbk%72 1HFN@C~/yu( w<)Y銂$hì._5]ʝ.J|TG(Z)zFN6, >I:5-r^nA3(HC9- "ͧxl2D|3XtDiMı% _%~=eb.t}UΘnTԲ)hhGRhަp,lS>nsF%^ I=x[p!2Ih!u?'Lє`֠*팉t3@ IUv6[f| \uN<=8Ѳ_C / E ȟX9~c!Q\6(eG}D]ħ_V5"{ƖцxO b%Lʡŋ&? FLر۰B'=^SLзQ. R,B}Hl"hj#ɮ؀jr]V|,M^FWEI?F܀, .(:1J۱`ʐrHwݒ7wy,6,8ӨK :R"Cf:-A6nwAE+L<"f\uGzO2uvJȫ[ t}^ʙng gifDfx_`l G9 TDm̠@>K>'j=HnpN\eb  HqE=څ5sj8@UAP-0 3w,F΄UXI9']~JrMW:fy2͕p-āxhŞ4]1s aڇ%e@˦[3*f`$~qn)6GP: c, mȚ $ToTfK?,vr4~jp|<{XTX[q%JB2KX=)ZtvR|R2 |VbhOUV#Ŷn`O:w&aTEڕHH0x:ؠ6"n<-Ҹ}e*s BH6{b|ݥ)C&>NMذe#6G#x, *&G6I)mw=Lz@K` Yۡr?aqNYE/F Uv7R0E!y3mRiR pc,!!ƦK~S,e@$X }gE_FI @Yչ"^FlQFq#SS۪pxQίg!vz5Z0IN[ T W^ØN Ww_J.9%YY jQmZ6& Ġ;P?L:%~#!obt(s{n_R4 ]6keX150BcyZ>TSgKGoN ZznRm1DQy>I`֠6tŀG(Lnq&L*| K(W^`(tJ(jXmm*RG!=)ՙtdaDĚgqsDJOI2`}`!IGMkWYre-_%d0㚻2)q*;i_ms5Rpb1ClAа !LwW@ZV+#} !ܶ/@ȏ nnƱy~v%(a#6s)*O ֕ 4#l[XuR ia"N$0HnR#!9a$Sj18.N2Ґo}#%ia!08p%>\c&.1|HcA | έFCgC#EcG\VTxܟ$5FpջRFd ii_PY% ><izo/-F*%C~ڤV@7U2rO3 )X63Piçn< ,Y Rh,in].|"ܟcߢQ*/Hk*/ɘs#SAN*ƋTUd LGvl748Q>HvEH3C6n6^WhIepbksg| E@+6 @w%Fӈi>^GDyg1L~ U%d Ֆ'Ф}͋~ QI i8F7Ve;ceO4 3 X6c s2>hqDQ`Nx)EfMw@j\eH!c}zڕo(go;mpOz%)RDZ5b M~0R-V-Vg~keTE ej@J3D5cRDD^#H~"w~$&e+7c@p6g8>/@Xx0Koz;T ̃AJUiU8Qq n@FG0|n.jFa!2s{5{e^prN\t~ZUEazq')ʬ7bXhtV Ƅ)Oj+"ַSaCȍvm7j&u$vl?m_J:W` Z?@r<ېCw->GpV ~E z|05_~Gpl"F'nć6.Ίg U3 [[.A1/' f\=;Ƣ{ /UD Fn A9]'[Z`}s><~Ccr޳bnQCph=̖ T*S!WzC;$`{3r]:9#XfX }X(?~iKV #;f +@^#zְmelh1^Z0GtL"rcA|E@&3SgMq뜘gul$׬:ͷB]vp>y2@j}*_xgs咞ĵ RWh6ej%7 @y#q2EN!*2&i &oZguSGYXt%CZ Z(eE'K ԩԖ"H-PQOXՍRz\ե!JJTĹ5\ ȵ8HTH -˚pqYwۉG2`#U+zu[b:Iӈ5ջG[C .P{ 0rqxh(ӌKZ %_#A57{a9k'Vc gn)Hd/\DkcGQzEk]5^ݾq[<@9_Q< -yaׅFÙBXIvؙNi9i{!~c%CIŗ.q"0.U!]ŅGyd(\W&r1ME/ \X0U&c0ݢA>{Y}φQ#@ɓtm>c]lEsC'y7!ۘe pG _ʿow{] HHɊGխt^8a0Zt2҉m]ZrA~KQ䗋-= @9*,-ICUEj՝!n;PMjx;Օ;[gcϝwxN~8ᨩA+n4{B0бk;Fù`J0=4if7?沬k1%T} <͖J/&ʱM Il'ɍ_Оb\W[' t_P1D{Q(N )؄o:<[0_yfg޼6rmJM#s$)v.ڕsäGNydژoHүsd)>J7VKHH+h }U to5u _&  !%)NqK%Y(+ F.ė ]CR* ;dDxann`?N ` OH7ՋXDTۋ{֣ B#(v!B7 !LF|s󯩦cdYs]ڸPs*x0tQ`W)Z7gpAuR%EUBq=Jؙn^ o&s\́ZIS0ftf;lic*J VI@ ٻ۷[­nL@t^Y]VA1TY&|l;A44:H.䛛ִ݁I]jvWiFkqހ𑇱GWm.Y@lԃc9g5sAɍA3`r\RJߊcOOf]>(SCx7n҉kn <`/җ7ۚ7U͹6" JwuR5 [W'G IU7t06FdQ*T{kiՔ͖k"U JV DchLcR'+<.mlz6Ź+- i.* =#L4ɬu`OBlp85c"w.؅_wxKNjG drX %?b";HsXHE]'Eǻ$`Kzb[Vm`AZ)˦%L5%B[n(2#+ BTx\L~]]c)q`t3vǘg0 (1CzhВL!i"2,\d>@{Ƅ3g?4CFC\fuvOO.QWz/{:4rk=.7#oE Zʠyx}Y9AhzJ^L+.SDCE7_ò@  @f#Xԣ6VGbox d9A؟LyyAR\J i9ӟbL%j>}C4˚F2^.@>ILQƥ IDHʟ6it(?ۺ4wIO*f]-t&y{ =^Q5t(@sN m݊: Cynٱ+𷌤g!w!V ,wC\2I1.a-_eKE ]Dl+is#HnCfoqJ[?p H2aOŽv;2%զR|1S`WTS}Dy+1+KJEuy>4* 9el f*RiA%h!rk~1o͚i9#}&6\S~8.Cksi㳄@YzB7^.(X|D)=((`aͱ|$Q5&ʫ<}<m*?EMk_f\i3_%>𥍹o&ME*Pve`loelFk'UߖZc0krvQvƱrf~}ɫ {vN#eu=?Z;FCgfJƗ,Q󞓂-)gX/׊mZDR[޲G ZնGS4CES^]W Ҋ–su3 3߾:KL\:ڡ|v`Us-RCftV~͕3ۤy|1tw"tZ;}8 % teb4o%NT\Sp?3V@ F?n`p& sS^Wr';%̄^ B'dv)'ihvLca g]4YKف|fY>V|Fɍ[ ni-o簊㛵ká:No.*ըj.GfG\AR>/ tSuLͱvUo\?C{#I]ۭ]AG65o+jȆ}ٰm"w!%޸NX^<4u1nJTbs|1~8=V\a"%[DJ wan~QفS|%#ԓ59\:l+IC{}w3=_L̯EA:az?7?pU-:dp1p--t i lW2;:xkE2.@ϓܖ@;#du67[ ê,wxs`7nlݐr_2U4}WzȤbzÁZT(!2+TCιNu. a-sॊ5"=\*Ij7<1-w{OCH&2ؑ='.e؉D6fp7K!+{u ,5'11y JE!yIYe.FOHxi"sGBMvv'76>Gz91bJJ]_"ϟ[)O(zw\ayogAh$,)}9?)AW\„XZmUcڕ2/<^Z5Cv<֗Jwjj5CΊ. ߐ9TK~{{ K+g+{J%@b1ꞑiWp54$9|כrkUECJPBG)cW1'咪Ɂ5jt_.Y=E w o3͙dzd?ƤDn/R}K?Φف;&&7ɀgTB+Y~xi=)v9cO̤xx%2oPS2Ǜ5΋&mp#uPNxb9"a9iH6V={Ut誤Vb|̓@j J`|D#ehRF[M.1#0pz.jyg8(~|ռ5Mh7yG:`ecP`Iw}0˲ ==Z@?2zq܉Aes}+]?9"̢@ Z~*g8PGpLM}deT󻛾10wm<8dz~NVxuK3c(P1 DUUJ{h>9B[GC[^+HrP*EI1ƼЅ*5;Q kЇ ,`~HWL߶  Fˤ!b1'8(  -`w?Fq n՚UW#Nk098شhy!Dyʛ'RY<4*{F<6=s/k9k}eze ߕ5O1L,gUldI^p&vb֢h_%9\? ?#u"%  +QU;!vʂO''$Elc5&~GLP|e2 Pke:1R'aUv YA#ua+w;Ua Ȫv' bXރ͐*,Ef;Xfq>-0 <lBkh>(b6R9TƖ]MN{Aɼ2q\B!z݌J#o|m\p޺z}qAx뿼[©΄$Ho͚Z(F-#pOCa~71%i']>'1#AR>r8^ 3'%@22ԚHAcE V.bam 6şc0$!A=yK2->="H/Y喙qG8L_=[. BЂIBL9Ru zE_?_HP z jY ?iBcbmNHM}Uk}UtlR!Y3 h\n%51I.A(yQ6#&9蝄_A0@x!/=+;Ͳ:~N9*vIY] V0Sn+^yq8Q#X`q&Ek Rp6 wFwUˈ'8CjQe3-(T];1Ur_{l(΃,K粆3Aڴ_\w3;j+JNE:@t['e]8&b1ǫ1otp&yi<"oyA7= --rK}erXbir\>3 m;LG(K\ș dGt^]}!t w87WiYrr9\ͤ7A0|z[BI٥¾9x)ي.:! f q(I&eW e̔^&D'#iQH4&l-Qfnr: N'4_:4TZu'x"7jzֺ`j@`/U{|J[f@53_mKn PYV4{Qt1iqt)^Eyu[T9xk W(۪ll> } $tXCpVݕfSB7Dd]!½y vVԿXPǾ]gж ЉnX1+*Y`!,Oz2()@Ϗ;'c0`2r~XMN=|9Lt8o"f )EЅ3,Xw`iQb!_Fy`9e*bg \+3)tfX[!%a+hREPWo A7 22& >zct*ʡ.vh@HDRA-FF[>q^9yg+H^i֎ fo][[EJvzwA"Ni"{+l(#,ye'US++^Gk1鐢p*(*r??s+6 d FsQٳǕSր1*(<:J3:i"0gzmfF3E0)5-CVς*vJ&hPgCh=vxA._` Lò\} -6"/=OZ2$/%X5פ9l]k"PW [sM G:3eF3K|{"rӱ}%t 3ѽ';ܟ Ԯk|P+ 7Jzp&\좲IƳ>GljkhC"|ۼbFSb!S[dmU!J`v jׯsӠ-~KxQtq}& &0r3ci" ,kuG&W3~hMťC2+Fۓ*ֱvs[Heh]UhP%/Zgp: .N#|O*dZɓTm^4իM_2yyHMZ 27u)E,PU65õ٠9_gāF.J(Q,Gö BZi{y;* ^ c20 9ӁY)\"4hTǫ񬼨tT`KO>L{%Hu"q7HdCmχ٬ pXƃZ|XO?n?rf PuV}iJGHif ӳO^CFrc >Ί<-Bvсz]@(|1Pv:a=5E=M|IŶ@վl /,k.xOm!tA(WWA,X{0!RA&RP?Hl%Q]ov=dU)r7tpf ׶Mb $Pdͩ-L̂xL굳ـz19¥`,D=&uq.@6CfUfJֹWl'-t {]v?EbPO{#ZϰI0I:/&KH㗝-I7f:k\0(zU\0nO?YS(@v%zΪ48s0/$)yp:od["Q4pNF*F?Ǎy"ŷ QNdd|VVG:&NCԙ\lZ 1eXc3soʺV"T;aۙ&pٔ򷇓_zr.^<)\~4GxHnf:WYy}&{6)׎ԿA!@vm7"ʲe,\wt0$LsP7܎xݾdUഇwDs!OV }.r0iBU> Bnhn"N MozֆE8Li:EnQ铺rD:?VYިol$qV 8- Q}8qv 0Q+&12>*'p*[w=3/t}; -m5m+t< !6~!Y: -?`ygF#PO=Mj_<]*,1'ؚ ϣh!r݅2Y( |(~qMB ۰ ,.)L3@:Y P;uYhݟ&[ B^R;#qXPtH5#1U dXm)s3_ߚ:+̏M#1sl vz%([:JP&ʰB,jgbpDj[ih9ކF|Q?$/>'5L(/:A4cud~.~Eh$s=Ct\qoA7\KF8՝=G9]12l 9`ї<3G AR8F茗! 03o\A1Nb.0(mkhBZ_Ӎq1N`^/և,8gW0ߓ$qexU&cri:f} C/,3WZ]?qߠ7gAsiz=&_bRQm-kD3dp6uI7rA)h<]@WњiP]J!Y"⩽{K5~ BLe<0NtĂJB V+O>Fxefz&:N"U$1se© 1Y_S)9Gў\ND'q܊nT߻uB'KxA?i}Q,x4i0=TF)HP4Ť(g6UU\Ѕ빟EP*N|`m!"/f&<; hQ@: iDƌZ;dwr/b0rɣ ?Sql\8gLafY3ϩ X\Ĥ4M:gc-EoC0](Z&L Xҭ+ ?V\u:#K6 E@:y hPv3h_y a.PxoqwC{n@ \cUrRP$H[5=}o% _]> rAl+V{{<9qš6fBz[{.B.dlx%dZ,f|{ ~!vr r.@}_Ğ Wv\5$ ZK$:ŞGyUxr[`SXp`2IJzI'c1X 5=.<_(OKy+CʒX͙,|I&ۑSBeBS+Ԧ F׏{K6e iD\t 8hTʧvHm^ڇbHlbG_ؓ2 {s_ gxX30PP 8sSd R nܦ -b{I iBg.rvAayтV¨oP%1jwɶ3Ѕ5Bá V-л K2s+%,u4f׃#kv4 z!S?ܾ@4P ~YS 4 L /j>(= ^b8)U D)E.6Ivfj˙hx e_2Ŕ;ݭQH5|=uMT'ǩ?.ttPu(+Fw0AVN%f;W]Mð,FMȠN`lwf Әd׋Uh݃=87|alɩ%ِZ?Tlxfߏ.4sI@ ?=u%gB2׃mY4Pųn@= bfԯ j-^{I*Ok.L roBA7""TGE6G|/Yf"yZϳFE1nZoi&[y[bmcȢ;Hz` ja2%/[Q)9@;6:M}4KIb=C"y?LRʦx"ÔsEsyN EU$c-l "diEf>qaN{q Y^1524#7V: 2=)+&2j ,Ņ?}ڣ)˂=ˈO;U?;=ӬP@Y5{<,̹hD^HwtS5:**lm[zT{Kٕgi}O52io~=owwQ5-Ȫsޏ]'2D t\Y ﲣ-R=W7S\k*`Nt o®\Flr z'Ъ",Y%̋)]*gg:!mBs޾͚lw8ezٟ"DQ|q 8aL}hMy59\ۣa\41D\L08Qr=c.e8vGŷM&]rKΚVǖYQΕs8Sugd<#rvǞ6}$fV@:c2ꀍvuL0 }zMfZRMNIZq̘AHVIdSPizQzHTQNw/DaIJ}FD(_, =yـ?iotYy_|EӠ?#WFp$KpNv =p[V{YZK$0 <g;1ROJ0UC pPlmPm0@VaOR1w~ l:~uGz_.Ś=#I#=m\l 9vFd\v0T_e xPIJ( >R`aY övK,Z1pfB9 QWC=i¿C5ٱ(Kn];[ŪUf8}@"kYҹPr;{%i,NP+�~'op$[z>ixY" `J /dkh?>ʻ)&:r$Gdu d|A-~a'J_Y`cIVf7וQP}F 2EJ80< Ɔ=W) rQJҌKg;WT_M_.vY]AvGd ߲[Pƭ5b 3sL.:e_ݵv2^TRGx %j B+djՁ4*2 S ^tlTΈ㼟(FZp/n~79[g9k /l|0=q[ <{J")H'tƉ+*M̸lAf]ץO k )Q'ѰĄ C!Xg o5 TX!8nc]"ȹi6bA?̠.HTv@2kj2(u*`A@TЀMm[pPR}v[/5[k]Qh9g(w5qQpY>}},ʼT;֮:Eo(REjUYp@1Av|=Bk]k~k14TS@O'׉a?tVEĐUxf#͆ܧ)WE3Otg==~Sť 4WcWA\w&D-]U4/tiI.b뢮w_q{%a;b+}^woOEd[ۦ[ {Z(Tcmؓ)?E'1}BYV_;>OytRʒצgiwuYM]-.lsbxbl+3/\UCZJͫ?{7칻.o̻`ۃn2q˓'Jg >}oz{$Oy7 |Y;VpiI} /M_ XYvȿb QaUqCcR1GCe7V49GӺSv^%c1ٚQB[ -?peMlDY).Vz^n{\KV5@ǎ;'E8*qc0AնM᫬~30=%wޱ;/o._?UBBr-5b<.{s^:̹Gkz>ԋ88f}?틾c뽾wSxQ;|3_ݢ9I-.h}xS8x9K)uE@A #Vo@!5`XXTXU]Z\_Z& endstream endobj 8 0 obj 50674 endobj 9 0 obj << /Length 10 0 R /Filter /FlateDecode >> stream x]͎0=Ot1=#E&i 5Y˹ǚJ]$:&|;}9MfܟfqkOKq*j1q|]r|~ܶt=M\߼m<}s>Ƙ:N̡}Yk6Sǣi}mo5R'?~K25Imi%:04)п^ZU^{fldǜ͍x{qA~a֞r< w[#92[Ĭb8Gio^o~sXKڟ~!/0[kE/ڇ~ߢ_'B) B ~V{o'V{oFkoo?Akc[?`o-k{K~Zﱟ=,k{5&[x^~X?`o]:7X\}3@QK>~_ G;N8w2/" endstream endobj 10 0 obj 536 endobj 11 0 obj << /Type /FontDescriptor /FontName /KIWHLE+NimbusRomanNo9L /Flags 4 /FontBBox [ -168 -281 1030 924 ] /ItalicAngle 0 /Ascent 924 /Descent -281 /CapHeight 924 /StemV 80 /StemH 80 /FontFile 7 0 R >> endobj 5 0 obj << /Type /Font /Subtype /Type1 /BaseFont /KIWHLE+NimbusRomanNo9L /FirstChar 0 /LastChar 74 /FontDescriptor 11 0 R /Widths [ 500 333 721 610 721 610 556 667 721 556 500 721 889 667 721 556 721 610 610 721 721 721 667 721 943 721 333 563 832 778 333 333 500 563 250 333 563 250 278 278 278 563 444 333 333 468 479 200 479 541 500 333 278 778 444 500 444 500 389 500 500 444 500 500 278 333 500 278 444 500 500 500 500 278 500 ] /ToUnicode 9 0 R >> endobj 1 0 obj << /Type /Pages /Kids [ 6 0 R ] /Count 1 >> endobj 12 0 obj << /Creator (cairo 1.10.2 (http://cairographics.org)) /Producer (cairo 1.10.2 (http://cairographics.org)) >> endobj 13 0 obj << /Type /Catalog /Pages 1 0 R >> endobj xref 0 14 0000000000 65535 f 0000089532 00000 n 0000037033 00000 n 0000000015 00000 n 0000037009 00000 n 0000089049 00000 n 0000037142 00000 n 0000037344 00000 n 0000088146 00000 n 0000088170 00000 n 0000088784 00000 n 0000088807 00000 n 0000089597 00000 n 0000089725 00000 n trailer << /Size 14 /Root 13 0 R /Info 12 0 R >> startxref 89778 %%EOF adlint-3.2.0/share/doc/users_guide_en.html0000644000004100000410000674531612224440633020602 0ustar www-datawww-data AdLint 3.2.0 User's Guide

AdLint 3.2.0 User's Guide


Next: , Up: (dir)

Overview

AdLint is

AdLint is an open source and free source code static analyzer.

It can point out insecure or nonportable code fragments, and can measure various quality metrics of the source code.

For a part of utilization examples, see screenshots.

It (currently) can analyze source code compliant with ANSI C89 / ISO C90 and partly ISO C99.

AdLint is written in Ruby. So, it is available for Windows, Mac OS X, GNU/Linux, FreeBSD and any other platforms supported by Ruby.

License

Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.

AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with AdLint. If not, see <http://www.gnu.org/licenses/>.

Index


Next: , Previous: Top, Up: Top

1 Installation

1.1 Operation requirements

AdLint requires installation of Ruby version 1.9.3-p0 or later.

And it recommended to install GNU Make version 3 or later to enable to auto analyze by using the GNUmakefile which created by adlintize command.


Next: , Previous: Requirements, Up: Installation

1.2 Hardware environment

For the recommended hardware environment, it can't be completely defined because it depends on the size of software. The following is the test environment of AdLint and the analysis time.

1.2.1 MS Windows

  • Environment
    • OS : MS Windows XP (SP3)
    • CPU : Intel Core i5 3.33GHz (660)
    • Memory : 2 GB
  • Tested code : Ruby 1.9.3-p0 (lines of code : 620,000)
    • serial analysis : about 7.9 hour
    • run 3 parallel to single module analysis : about 3.7 hour

1.2.2 GNU/Linux

  • Environment
    • OS : Fedora 14
    • CPU : Intel Core i5 3.33GHz (660)
    • Memory : 2 GB
  • Tested code : Ruby 1.9.3-p0 (lines of code : 620,000)
    • serial analysis : about 6.5 hour
    • run 2 parallel to single module analysis : about 4.2 hour

1.3 Installation instructions for MS Windows environment

1.3.1 Install Ruby

Get the RubyInstaller for Windows 1.9.3-p0 or later from the download page.

Execute RubyInstaller and install ruby with the instructions in the installer.

1.3.2 Install DEVELOPMENT KIT (DevKit)

Recommend to install DEVELOPMENT KIT (DevKit) including GNU Make.

Get the DEVELOPMENT KIT (DevKit) from download page distributed in RubyInstaller for Windows

When user execute the DevKit-*.exe ,DEVELOPMENT KIT will expand to the specified directory.

1.3.3 Set PATH environment variable

Append the following path to PATH environment variable : bin of Ruby directory where Install ruby, bin mingw\bin of DevKit directory where Install DEVELOPMENT KIT (DevKit)

1.3.4 Install AdLint

Start command prompt, and download and install the latest AdLint by the following command.

> gem install adlint

If you have to use HTTP proxy, set --http-proxy http://user name:password@proxy host:port number to gem command as follows.

> gem install adlint --http-proxy http://user:passwd@proxy:3128


Next: , Previous: Install on Windows, Up: Installation

1.4 Installation instructions on Unix environment

Install Ruby interpreter by following Download Ruby.

And download and install the latest version of AdLint.

% gem install adlint
or
% sudo gem install adlint

If you have to use HTTP proxy, set --http-proxy http://user name:password@proxy host:port number to gem command.


Previous: Install on Unix, Up: Installation

1.5 Evaluation test and trial use AdLint

AdLint provided with small sample C language projects. Evaluation test can be execute with intro_demo project by the following procedure.

Copy intro_demo project to user's workspace.

% cp -r `adlint --prefix`/share/demo/intro_demo .

Generate the setting file for static analysis by adlintize command

% cd intro_demo
% adlintize

The following files will be generated.

  • GNUmakefile — Make file for GNU make describing the analysis procedure
  • adlint_traits.yml — Traits file for customize AdLint analysis behavior
  • adlint_pinit.h — Initial header file of specific project
  • adlint_cinit.h — Initial header file of compiler
  • adlint_all.sh — Shell script describing the analysis procedure
  • adlint_all.bat — Windows batch file describing the analysis procedure
  • adlint_files.txt — Analyzed file list for shell script and batch file

If GNU Make version 3 or later installed, it can analyze by the following commands.

% make verbose-all
adlint --verbose -t adlint_traits.yml -o . intro_demo.c
                  intro_demo.c [fin] |============================| 0.401s
                    intro_demo [fin] |============================| 0.029s
  1.125s user, 0.765s system, 00:00:01.89 total

If GNU Make doesn't installed, use adlint command directly as follows.

% adlint -v -t adlint_traits.yml -l adlint_files.txt
                  intro_demo.c [fin] |============================| 0.401s
                    intro_demo [fin] |============================| 0.029s
  1.125s user, 0.765s system, 00:00:01.89 total

When the analysis process is finished with no errors, the following file will be generated.

  • intro_demo.i — Source files with pre-processed.
  • intro_demo.c.met.csv — Code information of single module analysis and metric information
  • intro_demo.c.msg.csv — Warning message list of single module analysis
  • intro_demo.met.csv — Metric information of cross module analysis
  • intro_demo.msg.csv — Warning message list of cross module analysis

The body of intro_demo.c.msg.csv ,"doesn't reach the control " "divided by zero ".


Next: , Previous: Installation, Up: Top

2 Sample session

2.1 Analyze GNU Screen

2.1.1 Preparation for project

Download ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz, unpack the appropriate directory.

% wget ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz
Length: 840602 (821K) [application/x-tar]
Saving to: `screen-4.0.3.tar.gz'

100%[======================================>] 840,602     --.-K/s   in 0.1s

2011-09-28 11:41:55 (6.18 MB/s) - `screen-4.0.3.tar.gz' saved [840602/840602]

% tar xzf screen-4.0.3.tar.gz
% ls -F
screen-4.0.3/   screen-4.0.3.tar.gz

2.1.2 Investigate project

Confirm how to build in analysis runtime environment by building GNU Screen.

% cd screen-4.0.3
% ./configure
this is screen version 4.0.3
checking for prefix by checking for screen... /usr/bin/screen
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
...snip...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing default commands

Now please check the pathnames in the Makefile and in the user
configuration section in config.h.
Then type 'make' to make screen. Good luck.

% make 2>&1 | tee make.log
CPP="gcc -E " srcdir=. sh ./osdef.sh
AWK=gawk CC="gcc -g -O2" srcdir=. sh ./comm.sh
AWK=gawk srcdir=. sh ./term.sh
gcc -c -I. -I.    -g -O2 screen.c
gcc -c -I. -I.    -g -O2 ansi.c
gcc -c -I. -I.    -g -O2 fileio.c
gcc -c -I. -I.    -g -O2 mark.c
gcc -c -I. -I.    -g -O2 misc.c
gcc -c -I. -I.    -g -O2 resize.c
gcc -c -I. -I.    -g -O2 socket.c
gcc -c -I. -I.    -g -O2 search.c
sh ./tty.sh tty.c
gcc -c -I. -I.    -g -O2 tty.c
gcc -c -I. -I.    -g -O2 term.c
gcc -c -I. -I.    -g -O2 window.c
gcc -c -I. -I.    -g -O2 utmp.c
gcc -c -I. -I.    -g -O2 loadav.c
gcc -c -I. -I.    -g -O2 putenv.c
gcc -c -I. -I.    -g -O2 help.c
gcc -c -I. -I.    -g -O2 termcap.c
gcc -c -I. -I.    -g -O2 input.c
gcc -c -I. -I.    -g -O2 attacher.c
gcc -c -I. -I.    -g -O2 pty.c
gcc -c -I. -I.    -g -O2 process.c
gcc -c -I. -I.    -g -O2 display.c
gcc -c -I. -I.    -g -O2 comm.c
gcc -c -I. -I.    -g -O2 kmapdef.c
gcc -c -I. -I.    -g -O2 acls.c
gcc -c -I. -I.    -g -O2 braille.c
gcc -c -I. -I.    -g -O2 braille_tsi.c
gcc -c -I. -I.    -g -O2 logfile.c
gcc -c -I. -I.    -g -O2 layer.c
gcc -c -I. -I.    -g -O2 sched.c
gcc -c -I. -I.    -g -O2 teln.c
gcc -c -I. -I.    -g -O2 nethack.c
gcc -c -I. -I.    -g -O2 encoding.c
gcc  -o screen screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o
search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o termcap.o
input.o attacher.o pty.o process.o display.o comm.o kmapdef.o acls.o braille.o
braille_tsi.o logfile.o layer.o sched.o teln.o nethack.o encoding.o -lcurses
-lcrypt

2.1.3 Preparation static analysis

Generate the file template of static analysis by using adlintize command. Edit setting file depending on the analyzed project.

Investigate computer environment, compiler environment of project build.

% uname -mo
i686 GNU/Linux
% gcc --version
gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Shows the preset build environment which supports adlintize command. Select near the build environment. In this session, GCC 4.5.1 on GNU/Linux i686 architecture is using.So select i686-linux-gcc_4.5.1 .

% adlintize -L
i686-linux-gcc_4.5.1
i686-cygwin-gcc_4.3.4
i686-mingw-gcc_4.5.2
x86_64-ubuntu_12.04-gcc_4.6.3

Generate file template which required static analysis by using adlintize command.

% adlintize -e i686-linux-gcc_4.5.1 -o adlint
% cd adlint
% ls
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

Compare make.log file which generated at Project investigation and SOURCES list in GNUmakefile which generated by adlintize, edit equally.

% cp GNUmakefile GNUmakefile.orig
% vi GNUmakefile
% diff -u GNUmakefile.orig GNUmakefile
--- GNUmakefile.orig    2011-09-28 13:36:24.328078206 +0900
+++ GNUmakefile 2011-09-28 13:36:37.573902006 +0900
@@ -29,8 +29,6 @@
   putenv.c \
   fileio.c \
   kmapdef.c \
-  terminfo/checktc.c \
-  terminfo/tetris.c \
   search.c \
   input.c \
   ansi.c \

Then find project specific include path from make.log file which generated project investigation. Edit the path to adlint_traits.yml.

% cp adlint_traits.yml adlint_traits.yml.orig
% vi adlint_traits.yml
% diff -u adlint_traits.yml.orig adlint_traits.yml
--- adlint_traits.yml.orig      2011-09-28 13:40:10.748222288 +0900
+++ adlint_traits.yml   2011-09-28 13:40:24.105054386 +0900
@@ -25,6 +25,7 @@
   #     - "../include/bar"
   #     - "/opt/baz/include"
   include_path:
+    - ".."

   # Pathname of the project specific initial header file.
   # This header file is automatically included above the first line of the

2.1.4 Execute the static analysis

Execute static analysis by using GNUmakefile which generated Preparation static analysis.

% make --version
GNU Make 3.82
Built for i386-redhat-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

% make verbose-all
adlint --verbose -t adlint_traits.yml -o . ../braille.c ../acls.c ../putenv.c
../fileio.c ../kmapdef.c ../search.c ../input.c ../ansi.c ../pty.c ../layer.c
../termcap.c ../loadav.c ../comm.c ../screen.c ../term.c ../teln.c ../socket.c
../encoding.c ../utmp.c ../logfile.c ../display.c ../misc.c ../attacher.c
../help.c ../tty.c ../nethack.c ../braille_tsi.c ../sched.c ../process.c
../window.c ../mark.c ../resize.c
                  ../braille.c [fin] |============================| 7.999s
                     ../acls.c [fin] |============================| 12.152s
                   ../putenv.c [fin] |============================| 0.203s
                   ../fileio.c [fin] |============================| 13.013s
...snip...
                   ../window.c [fin] |============================| 22.388s
                     ../mark.c [fin] |============================| 14.827s
                   ../resize.c [fin] |============================| 18.964s
                  screen-4.0.3 [fin] |============================| 58.346s
  771.510s user, 2.370s system, 00:12:53.87 total

% ls *.{i,msg.csv,met.csv,log}
acls.c.log             kmapdef.c.log      sched.c.log
acls.c.met.csv         kmapdef.c.met.csv  sched.c.met.csv
acls.c.msg.csv         kmapdef.c.msg.csv  sched.c.msg.csv
acls.i                 kmapdef.i          sched.i
ansi.c.log             layer.c.log        screen-4.0.3.log
ansi.c.met.csv         layer.c.met.csv    screen-4.0.3.met.csv
ansi.c.msg.csv         layer.c.msg.csv    screen-4.0.3.msg.csv
...snip...
input.c.log            resize.c.log       window.c.met.csv
input.c.met.csv        resize.c.met.csv   window.c.msg.csv
input.c.msg.csv        resize.c.msg.csv   window.i
input.i                resize.i


Previous: Analyzing Screen, Up: Sample Session

2.2 Distributed parallel analysis with distmake


Next: , Previous: Sample Session, Up: Top

3 Command specification


Next: , Up: Command

3.1 adlintize command

3.1.1 Function

Generate the following files which required static analysis by AdLint.

  • GNUmakefile — Make file for GNU make describing the analysis procedure
  • adlint_traits.yml — Traits file for customize AdLint analysis behavior
  • adlint_pinit.h — Initial header file of specific project
  • adlint_cinit.h — Initial header file of compiler
  • adlint_all.sh — Shell script describing the analysis procedure
  • adlint_all.bat — Windows batch file describing the analysis procedure
  • adlint_files.txt — Analyzed file list for shell script and batch file

When it run a adlintize command, all *.c files under the directory will set to SOURCES variable in GNUmakefile.

3.1.2 How to use

When it run a adlintize command at the root directory of analyzed project, generate required files for static analysis to adlint directory.

% cd project-root
% adlintize -o adlint
% ls adlint
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

adlintize command provides some preset build environment. To specify the preset build environment, more information can set automatically to the file templates.

-L option shows the list of preset build environment.

% adlintize -L
i686-linux-gcc_4.5.1
i686-cygwin-gcc_4.3.4
i686-mingw-gcc_4.5.2
x86_64-ubuntu_12.04-gcc_4.6.3

-e option can set the preset build environment.

% cd project-root
% adlintize -e i686-linux-gcc_4.5.1 -o adlint
% ls adlint
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

3.1.3 Help message

Usage: adlintize [options] [project-name]
Options:
  -t FILE, --traits FILE         Write traits to FILE
                                 If omitted, `adlint_traits.yml' will be used
  -p FILE, --pinit-header FILE   Write project initial header to FILE
                                 If omitted, `adlint_pinit.h' will be used
  -c FILE, --cinit-header FILE   Write compiler initial header to FILE
                                 If omitted, `adlint_cinit.h' will be used
  -l FILE, --list-file FILE      Write list file to FILE
                                 If omitted, `adlint_files.txt' will be used
  -m FILE, --makefile FILE       Write analysis procedure GNUmakefile to FILE
                                 If omitted, `GNUmakefile' will be used
  -s FILE, --sh-script FILE      Write analysis procedure sh script to FILE
                                 If omitted, `adlint_all.sh' will be used
  -b FILE, --bat-file FILE       Write analysis procedure bat file to FILE
                                 If omitted, `adlint_all.bat' will be used
  -o DIR, --output-dir DIR       Set output directory
                                 If omitted, `.' will be used
  -e ENV, --environment ENV      Assume ENV as target build environment
  -L, --list-environment         List all preset build environments
  -f, --force                    Force to overwrite existing files
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: AdLintize Command, Up: Command

3.2 adlint command

3.2.1 Function

Run both single module analysis ( correspond to the compile phase ) and cross module analysis ( correspond to the link phase ) at once.

It supports the following method to specify the analyzed source code : from command line and set to the list file.

Its activity is same as the following steps. Run a single module analysis by using adlint_sma command with specify all analyzed source file. Then run a cross module analysis by using adlint_cma.

The result of single module analysis, the following files will be generated for each source files.

  • *.i — The result of preprocessed.
  • *.c.msg.csv — Output message of single module analysis.
  • *.c.met.csv — Metric measurement result by single module analysis.
  • *.c.log — Log message of single module analysis.

The result of cross module analysis, the following files will be generated.

  • project_name.msg.csv — Output message of cross module analysis for whole project.
  • project_name.met.csv — Metric measurement result by cross module analysis for whole project.
  • project_name.log — Log message of cross module analysis for whole project.

3.2.2 How to use

When it run a adlint command as follows at the directory which generated the template of setting files by adlintize, run a single module analysis and cross module analysis at once.

% cd project-root
% adlintize -o adlint
% cd adlint
% adlint -v -t adlint_traits.yml -o . -p 1 -l adlint_files.txt
               ../intro_demo.c [fin] |============================| 0.134s
                    intro_demo [fin] |============================| 0.012s
  0.718s user, 0.500s system, 00:00:01.21 total

When it collaborate with text editor or integrated development environment, the message can output to stderr without display the progress by not specifying the -v,--verbose option.

% adlint -t adlint_traits.yml -o . -p 1 -l adlint_files.txt
../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:The same identifier name `i' is also used in the member of structure/union, label, tag or normal identifier.
../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:Comparison operation is being made by pointer variable.
../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:Value of the dereferencing pointer may be NULL.
../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:This controlling expression always makes false.
...snip...
../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:Control never reaches to this statement.
../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:Included "../useless_header.h" is not referenced in the translation unit. It can be removed.
../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:A function `int bar(void)' is defined, but this is not used in this project.

3.2.3 Help message

Usage: adlint [options] [source-file...]
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -l FILE, --list-file FILE      Use FILE as list file
  -o DIR, --output-dir DIR       Output result files to DIR
  -p NUM, --strip NUM            Use source file names from which stripped NUM
                                 leading components as the base name of output
                                 files
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: AdLint Command, Up: Command

3.3 adlint_sma command

3.3.1 Function

Execute only single module analysis (correspond to the compile phase) which specified by command line.
For the result of single module analysis, generate the following files for each source file.

  • *.i — The result of preprocessed.
  • *.c.msg.csv — Output message of single module analysis.
  • *.c.met.csv — Metric measurement result by single module analysis.
  • *.c.log — Log message of single module analysis.

3.3.2 How to use

When it run a adlint_sma command as follows at the directory which generated the template of setting files by adlintize, run only single module analysis.

% adlint_sma -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c
               ../intro_demo.c [fin] |============================| 0.134s
  1.062s user, 0.843s system, 00:00:01.90 total

When it collaborate with text editor or integrated development environment, the message can output to stderr without display the progress by not specifying the -v,--verbose option.

% adlint_sma -t adlint_traits.yml -o . -p 1 ../intro_demo.c
../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:The same identifier name `i' is also used in the member of structure/union, label, tag or normal identifier.
../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:Comparison operation is being made by pointer variable.
../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:Value of the dereferencing pointer may be NULL.
../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:This controlling expression always makes false.
...snip...
../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:Control never reaches to this statement.
../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:Included "../useless_header.h" is not referenced in the translation unit. It can be removed.
../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:A function `int bar(void)' is defined, but this is not used in this project.

3.3.3 Help message

Usage: adlint_sma [options] source-file...
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -o DIR, --output-dir DIR       Output result files to DIR
  -p NUM, --strip NUM            Use source file names from which stripped NUM
                                 leading components as the base name of output
                                 files
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: AdLint SMA Command, Up: Command

3.4 adlint_cma command

3.4.1 Function

Execute only cross module analysis (correspond to the link phase) which specified by command line.
For the result of cross module analysis, generate the following files.

  • project_name.msg.csv — Output message of cross module analysis for whole project.
  • project_name.met.csv — Metric measurement result by cross module analysis for whole project.
  • project_name.log — Log message of cross module analysis for whole project.

3.4.2 How to use

When it run a adlint_cma command as follows after finished the single module analysis by adlint_sma command at the directory which generated the template of setting files by adlintize, run only cross module analysis.

% ls *.c.met.csv
intro_demo.c.met.csv
% adlint_cma -v -t adlint_traits.yml -o . intro_demo.c.met.csv
                    intro_demo [fin] |============================| 0.011s
  1.203s user, 0.843s system, 00:00:02.04 total

When it collaborate with text editor or integrated development environment, the message can output to stderr without display the progress by not specifying the -v,--verbose option.

% adlint_cma -t adlint_traits.yml -o . intro_demo.c.met.csv
../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:A function `int bar(void)' is defined, but this is not used in this project.

3.4.3 Help message

Usage: adlint_cma [options] sma-metric-file...
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -o DIR, --output-dir DIR       Output result files to DIR
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Previous: AdLint CMA Command, Up: Command

3.5 adlint_chk command

3.5.1 Function

It can validate the body of traits file by execute only preprocessing to analyzed source file which set by command line.

3.5.2 How to use

Create the template of setting file by adlintize, and edit the traits file. Then run a adlint_chk command as follows. It can validate the body of traits file by execute preprocessing.

% adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c
               ../intro_demo.c [fin] |============================| 0.047s
  0.812s user, 0.875s system, 00:00:01.68 total

If the include path of header file doesn't set properly,the error occurs as follows. It can check which header file doesn't included by referring the *.c.msg.csv file which correspond to the source file.

% adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c
               ../intro_demo.c [cpp] |=======                     | 0.006s!
An error was occurred while processing `../intro_demo.c'.
See `intro_demo.c.msg.csv' and `intro_demo.c.log' for more details.

% tail intro_demo.c.msg.csv
E,../intro_demo.c,1,1,E0009,A header file of <stdio.h> doesn't found.
X,../intro_demo.c,1,1,X0003,Analysis processing has been stopped due to unrecoverable error. For the details, refer to `intro_demo.c.msg.csv' and `intro_demo.c.log'.

3.5.3 Help message

Usage: adlint_chk [options] source-file...
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -o DIR, --output-dir DIR       Output result files to DIR
  -p NUM, --strip NUM            Use source file names from which stripped NUM
                                 leading components as the base name of output
                                 files
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: Command, Up: Top

4 Input specification


Next: , Up: Input

4.1 Input files

Analysis action can set the following two kind of files.

traits file
Describe how to process the analysis. Edit by YAML style.
Message definition file
Describe the message catalog.Edit by YAML style.

Traits file sets the path by the command option --traits of adlint , adlint_sma , adlint_cma.

Message definition file is installed in etc/mesg.d at AdLint install path. adlint , adlint_sma , adlint_cma command selects the appropriate the message definition file by following the language which specified in language of message traits.


Next: , Previous: Input Files, Up: Input

4.2 Traits file

Describe Project Traits , Compiler Traits , Linker Traits , Message Traits to a single YAML format setting file ( sample ).

When it run a adlintize command at the root directory of analyzed project, generate the template of traits file for the project, GNUmakefile and shell script.

% cd project
% adlintize -o adlint
% ls adlint
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

You can specify environment variable as items in the traits file to be described.

For example, specify the environment variable ENV_VAR as the item item like below;

  item: $ENV_VAR

And embed environment variables in a string value like below;

  item: "prefix${ENV_VAR}suffix"

You can also specify multiple values of directory pathname list item by one environment variable like below;

% export ENV_VAR="/usr/local/include:/usr/include"
  include_path:
    - $ENV_VAR


Next: , Up: Traits

4.2.1 Global Traits

Global Traits can be configured by root items in traits file.

No. Items Styles Contents
1 version string This item represents the format version of this traits file. You should not edit this item manually.
2 exam_packages array of string This item represents list of the source code examination package names to be used by AdLint.

"c_builtin" is a builtin examination package name bundled with AdLint core. New optional source code examination packages will be released in the future.

For example, If you install adlint-exam-c_ansi optional examination package which checks whether the source code complies with ANSI C, you can edit exam_packages item as below;

In this case, only ANSI C compliance check will be run.

     exam_packages:
       - "c_ansi"

In this case, both AdLint builtin check and ANSI C compliance check will be run.

     exam_packages:
       - "c_builtin"
       - "c_ansi"



Next: , Previous: Global Traits, Up: Traits

4.2.2 Project Traits

Project Traits can set under the project_traits in traits file.

No. Items Styles Contents
1 project_name string Set project name.
2 project_root string Set pathname of the project root directory.
3 target_files:inclusion_paths array of string Specify directory paths which contain analysis target source files. An entry can have multiple pathnames with `:' (or `;' on windows) separators.
4 target_files:exclusion_paths array of string Specify directory paths to eliminate analysis target source files under the directory. If omitted, AdLint will check all the files included by the target source files such as 3rd-party library headers under target_files:inclusion_paths. An entry can have multiple pathnames with `:' (or `;' on windows) separators.
5 initial_header string Set the header files which is included at the top of specified source files. For example, project specific macro definition will be described in this file.
6 file_search_paths array of string Set project specific include-file search paths. An entry can have multiple pathnames with `:' (or `;' on windows) separators.
7 coding_style:indent_style string Indent style which is a convention governing the identation of blocks. Select from "K&R", "Allman" and "GNU".

"K&R" style is

     int foo(int i)
     {
         if (i == 0) {
             return 0;
         }
         return i;
     }

"Allman" style is

     int foo(int i)
     {
         if (i == 0)
         {
             return 0;
         }
         return i;
     }

"GNU" style is

     int
     foo(int i)
     {
       if (i == 0)
         {
           return 0;
         }
       return i;
     }


8 coding_style:tab_width integer value Set the appearance number of digits of tab character
9 coding_style:indent_width integer value Set the appearance number of digits of indent
10 file_encoding string Set the character encoding. If the value is not set, process as "ASCII-8BIT".


Next: , Previous: Project Traits, Up: Traits

4.2.3 Compiler Traits

Compiler Traits can set under the compiler_traits in traits file.

No. Items Styles Contents
1 initial_header string Set the header files which is included at the top of specified source files and automatically included before project specific initial_header. This file describes compiler specific macro, type definition and others.
2 file_search_paths array of string Set the compiler specific include-file search paths. An entry can have multiple pathnames with `:' (or `;' on windows) separators.
3 standard_types:char_size integer value Set the size of char type family by bit quantities.
4 standard_types:char_alignment integer value Set the memory alignment of char type family by bit quantities.
5 standard_types:short_size integer value Set the size of short type family by bit quantities.
6 standard_types:short_alignment integer value Set the memory alignment of short family by bit quantities.
7 standard_types:int_size integer value Set the size of int type family by bit quantities.
8 standard_types:int_alignment integer value Set the memory alignment of int type family by bit quantities.
9 standard_types:long_size integer value Set the size of long int type family by bit quantities.
10 standard_types:long_alignment integer value Set the memory alignment of long int type family by bit quantities.
11 standard_types:long_long_size integer value Set the size of long long int type family by bit quantities.
12 standard_types:long_long_alignment integer value Set the memory alignment of long long int type family by bit quantities.
13 standard_types:float_size integer value Set the size of float type family by bit quantities.
14 standard_types:float_alignment integer value Set the memory alignment of float type family by bit quantities.
15 standard_types:double_size integer value Set the size of double type family by bit quantities.
16 standard_types:double_alignment integer value Set the memory alignment of double type family by bit quantities.
17 standard_types:long_double_size integer value Set the size of long double type family by bit quantities.
18 standard_types:long_double_alignment integer value Set the memory alignment of long double type family by bit quantities.
19 standard_types:code_ptr_size integer value Set the size of function pointer by bit quantities.
20 standard_types:code_ptr_alignment integer value Set the memory alignment of function pointer by bit quantities.
21 standard_types:data_ptr_size integer value Set the size of data pointer by bit quantities.
22 standard_types:data_ptr_alignment integer value Set the memory alignment of data pointer by bit quantities.
23 standard_types:char_as_unsigned_char boolean value If `char' type treat as `unsigned char', set true.
24 arithmetic:logical_right_shift boolean value If right shift expression `>>' treat as logical shift instead of arithmetic shift, set true.
25 identifier_max integer value Set the maximum number of length which compiler can identifier.
26 extension_substitutions map of string Set the token replacement pattern to adjust compiler specific extension. AdLint puts the warning message W0061 all uses of this extension. If `__attribute__ ( arbitrary token row )' delete after pre-process and puts the warning W0061, set as follows.
     extension_substitutions:
       "__attribute__(__adlint__any)": ""

And if the token `__restrict' replaces `restrict' and put the warning W0061, set as follows.

     extension_substitutions:
       "__restrict": "restrict"


27 arbitrary_substitutions map of string Same as extension_substitutions, replace the token after pre-process, the difference is doesn't put the warning W0061.


Next: , Previous: Compiler Traits, Up: Traits

4.2.4 Linker Traits

Linker Traits sets under linker_traits items.

No. Items Styles Contents
1 identifier_max integer value Set the maximum number of length which linker can identifier.
2 identifier_ignore_case boolean value Set whether check case sensitive by linker when identifier external symbol.


Previous: Linker Traits, Up: Traits

4.2.5 Message Traits

Message Traits can set under the message_traits in traits file. .

No. Items Styles Contents
1 language string Set the language of message body.(Currently) it available "en_US" or "ja_JP".
2 individual_suppression boolean This item enables message suppression by source code annotations.

In case of true, message suppression by annotations will be enabled.

3 exclusion:categories array of string This item represents excluding code checks by its message categories.
4 exclusion:severities regexp string This item represents excluding code checks by its message severities.
5 exclusion:messages map of Message ID and string This item represents excluding code checks by its message ID.

Because a message ID is not unique in multiple examination packages, you should also specify the name of the examination package including the message.

6 inclusion:messages map of Message ID and string This item represents messages which is excluded by settings of exclusion section but will be used by AdLint.

For example, you can bring back the specified code checks which is excluded by exclusion:categories.

7 change_list map of Message ID and changed contents This item represents overriding contents of existing one in the message definition.

For example, you can change contents of W9999 message in "c_builtin" examination package as below;

     change_list:
       W9999:
         package: "c_builtin"
         classes:
           - "<name of new message category #1>:<severity of this message #1>"
           - "<name of new message category #2>:<severity of this message #2>"
         format: "new message format of this message."


Next: , Previous: Traits, Up: Input

4.3 Message Definition file.

Describe all error and warning message to setting file by format. Normally this file doesn't edit directly. If it need to change the message body, set the changes to change_list in traits file.


Previous: Message Definition, Up: Input

4.4 Source Code Annotation

You can write an annotation which controls AdLint's analysis behavior as an ordinary comment of the programming language.

4.4.1 Warning message suppression annotation

An annotation starts with ADLINT:SF in an ordinary comment specifies that messages listed in the annotation of the annotated file will be suppressed.

An annotation starts with ADLINT:SL in an ordinary comment specifies that messages listed in the annotation of the annotated line will be suppressed.

The following describes format and usage of the annotation.

• Common definitions

     message_specifier_list : qualified_message_specifier
                            | unqualified_message_specifier
                            | message_specifier_list qualified_message_specifier
                            | message_specifier_list unqualified_message_specifier
     
     qualified_message_specifier : ':' package_name unqualified_message_specifier
     
     unqualified_message_specifier : ':' '[' message_name_list ']'
     
     message_name_list : message_name
                       | message_name_list ',' message_name
     
     message_name : 'W' [0-9]{4}
     
     package_name : any string specified in exam_packages of the traits file.

• File-wise message suppressor

     file_wise_suppressor_annotation : "/*" file_wise_suppressor_head message_specifier_list "*/"
                                     | "//" file_wise_suppressor_head message_specifier_list
     
     file_wise_suppressor_head : "ADLINT:SF"

• Line-wise message suppressor

     line_wise_suppressor_annotation : "/*" line_wise_suppressor_head message_specifier_list "*/"
                                     | "//" line_wise_suppressor_head message_specifier_list
     
     line_wise_suppressor_head : "ADLINT:SL"

• Sample code

/* ADLINT:SF:[W0001,W0002] (to suppress W0001 and W0002 of all exam-packages in this file.) */
#include <stdio.h>

extern int i; /* ADLINT:SL:[W0003] (to suppress W0003 of all exam-packages only at this line.) */
extern int j; /* ADLINT:SL:c_staging:[W2001] (to suppress W2001 of `c_staging' exam-package only at this line.) */

void foo(void)
{
    printf("%d\n", i + j);
}


Next: , Previous: Input, Up: Top

5 Output specification


Next: , Up: Output

5.1 Output files

Print the result of single module analysis to the following four different files.

No. Name File name Contents
1 Preprocessed source <source file name except the extension>.i The line beginning with # is line marker.
2 metrics file <source file name>.met.csv Print the metrics and the code information by CSV format.
3 message file <source file name>.msg.csv Print the error and the warning message by CSV format.
4 Log file <source file name>.log Print the log of single module analysis.

Print the result of cross module analysis to the following three different files.

No. Name File name Contents
1 metrics file <project name>.met.csv Print the metrics information by CSV format.
2 message file <project name>.msg.csv Print the warning message by CSV format.
3 Log file <project name>.log Print the log of cross module analysis.


Next: , Previous: Output Files, Up: Output

5.2 Common definition

     version_number
       : major_version '.' minor_version '.' patch_level
     
     major_version : integer value
     
     minor_version : integer value
     
     patch_level : integer value
     
     exec_timestamp : Year '-' Month '-' Day ' ' Hour ':' Minute ':' Second ':' Time zone
     
     exec_working_directory : Full path name of run the analysis.
     
     new_line : line feed string depends on runtime environment.
     
     file_path : file path name depends on runtime environment.
     
     line_no : integer value
     
     lines : integer value
     
     column_no : integer value
     
     location : file_path ',' line_no ',' column_no
     
     function_identifier
       : function_name ',' function_signature
     
     function_name : c_identifier
     
     function_signature : c_declaration_specifiers c_declarator
     
     function_linkage_type
       : 'I'  <- Internal
       | 'X'  <- eXternal
     
     function_scope_type
       : 'F'  <- File
       | 'B'  <- Block
     
     function_declaration_type
       : 'E'  <- Explicit
       | 'I'  <- Implicit
     
     type_name : c_identifier
     
     type_rep : c_declaration
     
     variable_name : c_identifier
     
     initializer_rep : c_initializer
     
     assignment_rep : c_assignment_operator c_assignment_expression
     
     macro_name : c_identifier
     
     macro_value
       :
       | pp_tokens
     
     pp_tokens : c_pp_tokens
     
     exam_package_name : arbitrary string
     
     message_id
       : 'W' [0-9]{4}
       | 'E' [0-9]{4}
       | 'C' [0-9]{4}
     
     message_category : [A-Z]{3}
     
     message_severity : [A-Z][0-9]{2}
     
     message_text : arbitrary string


Next: , Previous: Common, Up: Output

5.3 metrics file

5.3.1 Version records

     metrics_version_record
       : metrics_version_head ',' version_number ',' exec_timestamp ',' exec_working_directory
     
     metrics_version_head : "VER"

• Output example

     VER,0.6.4,2012-02-16 14:10:59 +0900,/home/yanoh/intro_demo

5.3.2 Declaration records

     declaration_record
       : declaration_head ',' location ',' typedcl_record_body
       | declaration_head ',' location ',' gvardcl_record_body
       | declaration_head ',' location ',' funcdcl_record_body
     
     declaration_head : "DCL"

• Type definition records

     typedcl_record_body
       : 'T' ',' typedcl_type ',' type_name ',' type_rep
     
     typedcl_type
       : 'T'  <- typedef
       | 'S'  <- struct
       | 'U'  <- union
       | 'E'  <- enum

• Global variable declaration Record

     gvardcl_record_body
       : 'V' ',' variable_name ',' type_rep

• Function declaration record

     funcdcl_record_body
       : 'F' ',' function_linkage_type ',' function_scope_type ',' function_declaration_type ',' function_identifier

• Output example

 1: typedef int *int_ptr;
 2:
 3: struct Foo {
 4:     int i;
 5:     long l;
 6: };
 7:
 8: union Bar {
 9:     int i;
10:     char c;
11: };
12:
13: enum Color {
14:     RED = 1,
15:     GREEN,
16:     BLUE
17: };
18:
19: extern int global_1;
20:
21: extern int foo(long);
     DCL,test.c,1,14,T,T,int_ptr,int *
     DCL,test.c,3,8,T,S,Foo,struct Foo { int i; long l; }
     DCL,test.c,8,7,T,U,Bar,union Bar { int i; char c; }
     DCL,test.c,13,6,T,E,Color,"enum Color { RED = 1, GREEN, BLUE }"
     DCL,test.c,19,12,V,global_1,int
     DCL,test.c,21,12,F,X,F,E,foo,int foo(long)

5.3.3 Declaration records

     definition_record
       : definition_head ',' location ',' vardef_record_body
       | definition_head ',' location ',' fundef_record_body
       | definition_head ',' location ',' macrodef_record_body
       | definition_head ',' location ',' labeldef_record_body
     
     definition_head : "DEF"

• Variable declaration records

     vardef_record_body
       : 'V' ',' variable_linkage_type ',' variable_scope_type ',' storage_class_type ',' variable_name ',' type_rep
     
     variable_linkage_type
       : 'I'  <- Internal
       | 'X'  <- eXternal
       | 'N'  <- None
     
     variable_scope_type
       : 'F'  <- File
       | 'B'  <- Block
       | 'P'  <- Parameter
     
     storage_class_type
       : 'A'  <- Auto
       | 'R'  <- Register
       | 'S'  <- Static
       | 'N'  <- None

• Function definition records

     fundef_record_body
       : 'F' ',' function_linkage_type ',' function_scope_type ',' function_identifier ',' lines

• Macro definition records

     macrodef_record_body
       : 'M' ',' macro_name ',' macro_form_type
     
     macro_form_type
       : 'O'  <- Object
       | 'F'  <- Function

• Label definition record

     labeldef_record_body
       : 'L' ',' label_name
     
     label_name : c_identifier

• Output example

 1: int global_1;
 2: struct { int i; long l; } global_2;
 3:
 4: static long static_1;
 5: static enum { FOO, BAR, BAZ } static_2;
 6:
 7: int foo(int i, register short s)
 8: {
 9:     static char static_3 = 0;
10:     register int local_1 = i + s + static_3;
11:     auto int local_2 = 0;
12:     int local_3 = 0;
13:     goto end;
14: end:
15:     return local_1 + local_2 + local_3;
16: }
17:
18: static void bar(void) {}
19:
20: #define OBJ_FORM_MACRO (1 + 2)
21: #define MAX(a, b) ((a) < (b) ? (b) : (a))
     DEF,test.c,1,5,V,X,F,N,global_1,int
     DEF,test.c,2,27,V,X,F,N,global_2,struct __adlint__unnamed_1
     DEF,test.c,4,13,V,I,F,S,static_1,long
     DEF,test.c,5,31,V,I,F,S,static_2,enum __adlint__unnamed_2
     DEF,test.c,7,13,V,I,P,N,i,int
     DEF,test.c,7,31,V,I,P,R,s,short
     DEF,test.c,9,17,V,I,B,S,static_3,char
     DEF,test.c,10,18,V,I,B,R,local_1,int
     DEF,test.c,11,14,V,I,B,A,local_2,int
     DEF,test.c,12,9,V,I,B,N,local_3,int
     DEF,test.c,7,5,F,X,F,foo,"int foo(int,short)",10
     DEF,test.c,18,13,F,I,F,bar,void bar(void),1
     DEF,test.c,20,1,M,OBJ_FORM_MACRO,O
     DEF,test.c,21,1,M,MAX,F
     DEF,test.c,14,1,L,end

5.3.4 Initialization record

     initialization_record
       : initialization_head ',' location ',' variable_name ',' initializer_rep
     
     initialization_head : "INI"

• Output example

1: int global_1 = 1;
2:
3: int main(void)
4: {
5:     int local_1 = global_1;
6:     int local_2 = local_1 + 1;
7:
8:     return local_1 + local_2;
9: }
     INI,test.c,1,5,global_1,1
     INI,test.c,5,9,local_1,global_1
     INI,test.c,6,9,local_2,local_1 + 1

5.3.5 Assignment records

     assignment_record
       : assignment_head ',' location ',' variable_name ',' assignment_rep
     
     assignment_head : "ASN"

• Output example

 1: int main(void)
 2: {
 3:     int i;
 4:
 5:     for (i = 0; i < 10; i++) {
 6:         if (i % 2) {
 7:             i += 1;
 8:         }
 9:     }
10:
11:     return 0;
12: }
     ASN,test.c,5,12,i,= 0
     ASN,test.c,7,15,i,+= 1

5.3.6 Dependency records

     dependency_record
       : dependency_head ',' location ',' include_record_body
       | dependency_head ',' location ',' call_record_body
       | dependency_head ',' location ',' xref_record_body
     
     dependency_head : "DEP"

• Include records

     include_record_body
       : 'I' ',' included_fpath
     
     included_fpath : '<' file_path '>' | '"' file_path '"'

• Caller function records

     call_record_body
       : 'C' ',' caller_function ',' callee_function
     
     caller_function : function_identifier
     
     callee_function : function_identifier

• external reference records

     xref_record_body
       : 'X' ',' xref_variable_record_body
       | 'X' ',' xref_function_record_body
     
     xref_variable_record_body
       : 'V' ',' accessor_function ',' access_type ',' accessee_variable
     
     xref_function_record_body
       : 'F' ',' accessor_function ',' access_type ',' accessee_function
     
     accessor_function : function_identifier
     
     access_type : 'R' | 'W'
     
     accessee_variable : variable_name
     
     accessee_function : function_identifier

• Output example

 1: #include <stdio.h>
 2: #include "test.h"
 3:
 4: extern int global;
 5:
 6: int foo(long l)
 7: {
 8:     int i = global;
 9:
10:     return l - i;
11: }
12:
13: int main(void)
14: {
15:     int (*p)(long) = &foo;
16:
17:     global = 5;
18:
19:     return (*p)(10);
20: }
     DEP,test.c,1,1,I,</usr/include/stdio.h>
     DEP,test.c,2,1,I,"""test.h"""
     DEP,test.c,8,13,X,V,foo,int foo(long),R,global
     DEP,test.c,19,16,C,main,int main(void),foo,int foo(long)
     DEP,test.c,15,23,X,F,main,int main(void),R,foo,int foo(long)
     DEP,test.c,17,12,X,V,main,int main(void),W,global

5.3.7 Literal records

     literal_record
       : literal_head ',' location ',' literal_type ',' literal_prefix ',' literal_suffix ',' literal_value
     
     literal_head : "LIT"
     
     literal_type
       : 'DN'  <- Decimal Number
       | 'HN'  <- Hexadecimal Number
       | 'ON'  <- Octal Number
       | 'BN'  <- Binary Number
       | 'FN'  <- Floating point Number
       | 'CN'  <- Character Narrow
       | 'SN'  <- String Narrow
       | 'CW'  <- Character Wide
       | 'SW'  <- String Wide
     
     literal_prefix
       :
       | 'l'  | 'L'
       | '0'
       | '0x' | '0X'
       | '0b' | '0B'
     
     literal_suffix
       :
       | 'u'   | 'U'
       | 'l'   | 'L'
       | 'ul'  | 'Ul'  | 'uL'  | 'UL'
       | 'ull' | 'Ull' | 'uLL' | 'ULL'
       | 'll'  | 'LL'
       | 'f'   | 'F'
     
     literal_value
       : c_constant
       | c_string_literal

• Output example

1: unsigned int i = 0xFFU;
2:
3: int foo(long l)
4: {
5:     const wchar_t *s = L"foobar";
6:
7:     return 0;
8: }
     LIT,test.c,1,18,HN,0x,U,0xFFU
     LIT,test.c,5,24,SW,L,,"L""foobar"""

5.3.8 Preprocess record

     preprocess_record
       : preprocess_head ',' location ',' pp_directive ',' pp_tokens
     
     preprocess_head : "PRE"
     
     pp_directive
       : "#if"
       | "#ifdef"
       | "#ifndef"
       | "#elif"
       | "#else"
       | "#endif"
       | "#include"
       | "#define"
       | "#undef"
       | "#line"
       | "#error"
       | "#pragma"
       | "#"

• Output example

 1: #pragma once
 2:
 3: #if defined(NDEBUG)
 4: void debug(const char *msg) {}
 5: #else
 6: #include <stdio.h>
 7: void debug(const char *msg)
 8: {
 9:     puts(msg);
10: }
11: #endif
     PRE,test.c,1,1,#pragma,once
     PRE,test.c,3,1,#if,defined(NDEBUG)
     PRE,test.c,5,1,#else,
     PRE,test.c,6,1,#include,<stdio.h>
     PRE,test.c,11,1,#endif,

5.3.9 Metric value records

     metric_record
       : metric_head ',' file_metric_record_body
       | metric_head ',' func_metric_record_body
     
     metric_head : "MET"
     
     file_metric_record_body
       : file_metric_name ',' file_path ',' metric_value
     
     func_metric_record_body
       : func_metric_name ',' function_identifier ',' location ',' metric_value
     
     file_metric_name
       : "FL_STMT"  <- Number of statements
       | "FL_FUNC"  <- Number of functions
     
     func_metric_name
       : "FN_STMT"  <- Number of statements
       | "FN_UNRC"  <- Number of unreached statements
       | "FN_LINE"  <- Number of lines
       | "FN_PARA"  <- Number of parameters
       | "FN_UNUV"  <- Number of not use /not reuse variables
       | "FN_CSUB"  <- Location number of call function
       | "FN_CALL"  <- Location number of called from function
       | "FN_GOTO"  <- Number of goto statement
       | "FN_RETN"  <- Number of return point in a function
       | "FN_UELS"  <- Number of 'if' statement unless 'else'
       | "FN_NEST"  <- Maximum number of nest of control flow graph
       | "FN_PATH"  <- Presumed  number of static path
       | "FN_CYCM"  <- Cyclomatic complexity
     
     metric_value : integer value


Previous: Metrics File, Up: Output

5.4 message file

     message_file
       : message_version_record
       | message_version_record new_line message_list
     
     message_version_record
       : 'V' ',' version_number ',' exec_timestamp ',' exec_working_directory
     
     message_list
       : error_record
       | warning_record
       | message_list new_line error_record
       | message_list new_line warning_record
     
     error_record
       : error_line new_line context_line_list
     
     error_line
       : 'E' ',' file_path ',' line_no ',' column_no ',' exam_package_name ',' message_id ',' message_category ',' message_severity ',' message_text
     
     warning_record
       : warning_line new_line context_line_list
     
     warning_line
       : 'W' ',' file_path ',' line_no ',' column_no ',' exam_package_name ',' message_id ',' message_category ',' message_severity ',' message_text
     
     context_line_list
       :
       | context_line new_line context_line_list
     
     context_line
       : 'C' ',' file_path ',' line_no ',' column_no ',' exam_package_name ',' message_id ',' message_category ',' message_severity ',' message_text


Next: , Previous: Output, Up: Top

6 Message list


Next: , Up: Messages

6.1 X0001

6.1.1 Message body

An unknown exception `%s' is found.

6.1.2 Content

If you find this message, please send appropriate source file, traits file, message file and log file to AdLint development team. It will lead to improve quality of AdLint.

6.1.3 Sample code

None.

6.1.4 Related message

None.

6.1.5 Since

1.0.0


Next: , Previous: X0001, Up: Messages

6.2 X0002

6.2.1 Message body

An illegal message ID `%s' is found.

6.2.2 Content

There's a possibility that the message catalog which AdLint using in internal is broken. Please reinstall AdLint. If you still cannot solve this issue, please report it to AdLint development team.

6.2.3 Sample code

None.

6.2.4 Related message

None.

6.2.5 Since

1.0.0


Next: , Previous: X0002, Up: Messages

6.3 X0003

6.3.1 Message body

Analysis processing has been stopped due to unrecoverable error. For the details, refer to `%s' and `%s'.

6.3.2 Content

AdLint cannot process the analysis. This error occurred because it cannot find header file or it cannot parse the source file. This error can be solve by reviewing the traits file.

6.3.3 Sample code

None.

6.3.4 Related message

None.

6.3.5 Since

1.0.0


Next: , Previous: X0003, Up: Messages

6.4 X0004

6.4.1 Message body

An illegal message format `%s' is found.

6.4.2 Content

There's a possibility that the message catalog which AdLint using in internal is broken. Please reinstall AdLint. If you still cannot solve this issue, please report it to AdLint development team.

6.4.3 Sample code

None.

6.4.4 Related message

None.

6.4.5 Since

1.0.0


Next: , Previous: X0004, Up: Messages

6.5 E0004

6.5.1 Message body

Corresponding #endif doesn't found.

6.5.2 Content

This error occurred when it cannot find #endif directive correspond to #if, #ifdef, #ifndef directive.

6.5.3 Sample code

#if DEBUG
  int i = 0;
#else
  int i = 1;

6.5.4 Related message

None.

6.5.5 Since

1.0.0


Next: , Previous: E0004, Up: Messages

6.6 E0007

6.6.1 Message body

Syntax error is found in conditional expression token `%s'. Conditional expression evaluate as false.

6.6.2 Content

This message will be output when it find syntax error while evaluating the conditional expression of #if, #elif directive.

6.6.3 Sample code

None.

6.6.4 Related message

None.

6.6.5 Since

1.0.0


Next: , Previous: E0007, Up: Messages

6.7 E0008

6.7.1 Message body

Syntax error is found in token `%s'.

6.7.2 Content

This message will be output when it cannot parse preprocessed source file.

If you use compiler specific extension to build, it can be solve by deleting specific token row in traits file.

6.7.3 Sample code

None.

6.7.4 Related message

None.

6.7.5 Since

1.0.0


Next: , Previous: E0008, Up: Messages

6.8 E0009

6.8.1 Message body

A header file of <%s> doesn't found.

6.8.2 Content

It includes header file in #include <...> directive, but it doesn't exist at the include path specified at traits file.

This error can be solve by reviewing the setting of include path in traits file.

6.8.3 Sample code

None.

6.8.4 Related message

None.

6.8.5 Since

1.0.0


Next: , Previous: E0009, Up: Messages

6.9 E0010

6.9.1 Message body

A header file of \%s\ doesn't found.

6.9.2 Content

It includes header file in #include "..." directive, but it doesn't exist at the include path specified at traits file.

This error can be solve by reviewing the setting of include path in traits file.

6.9.3 Sample code

None.

6.9.4 Related message

None.

6.9.5 Since

1.0.0


Next: , Previous: E0010, Up: Messages

6.10 E0013

6.10.1 Message body

Statement cannot include in syntax.

6.10.2 Content

This message will be output when GCC extension (Statement Exprs) is using.

6.10.3 Sample code

#define maxint(a, b) ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
int i = maxint(1, 2); /* E0013 */

6.10.4 Related message

None.

6.10.5 Since

1.0.0


Next: , Previous: E0013, Up: Messages

6.11 E0014

6.11.1 Message body

'&&' monadic operator to get a label address is GCC original add-on.

6.11.2 Content

This message will be output when GCC extension (Labels as Values) is using.

6.11.3 Sample code

void *label_ptr = &&foo; /* E0014 */
goto *label_ptr; /* E0015 */
foo:;

6.11.4 Related message

  • E0015 'goto' statement with specified label address is GCC original add-on.

6.11.5 Since

1.0.0


Next: , Previous: E0014, Up: Messages

6.12 E0015

6.12.1 Message body

'goto' statement with specified label address is GCC original add-on.

6.12.2 Content

This message will be output when GCC extension (Labels as Values) is using.

6.12.3 Sample code

void *label_ptr = &&foo; /* E0014 */
goto *label_ptr; /* E0015 */
foo:;

6.12.4 Related message

  • E0014 '&&' monadic operator to get a label address is GCC original add-on.

6.12.5 Since

1.0.0


Next: , Previous: E0015, Up: Messages

6.13 E0016

6.13.1 Message body

Unfinished comment block is found.

6.13.2 Content

This message will be output when the block comment begging with /* is not finished by */.

6.13.3 Sample code

None.

6.13.4 Related message

None.

6.13.5 Since

1.0.0


Next: , Previous: E0016, Up: Messages

6.14 W0001

6.14.1 Message body

Nesting depth of round bracket `()' exceed 32. This program doesn't meet the strict ISO C90 standards of the term.

6.14.2 Content

Under construction.

6.14.3 Sample code

int a = 10;
int b = 20;
int c = (((((((((((((((((((((((((((((((((a + b))))))))))))))))))))))))))))))))); /* W0001 */

6.14.4 Related message

None.

6.14.5 Since

1.0.0


Next: , Previous: W0001, Up: Messages

6.15 W0002

6.15.1 Message body

Identifier and declaration of formal argument described separately in the definition of function `%s()' is old style.

6.15.2 Content

Under construction.

6.15.3 Sample code

/* function definition in K&R style */
int func(arg) /* W0002 */
char arg;
{
    return 0;
}

6.15.4 Related message

None.

6.15.5 Since

1.0.0


Next: , Previous: W0002, Up: Messages

6.16 W0003

6.16.1 Message body

This switch statement doesn't have default label.

6.16.2 Content

Under construction.

6.16.3 Sample code

int value;
int number;
switch(number) {
case 1:
    value = 1;
    break;
case 2:
    value = 2;
    break;
case 3:
    value = 3;
    break; /* W0003 */
}

6.16.4 Related message

None.

6.16.5 Since

1.0.0


Next: , Previous: W0003, Up: Messages

6.17 W0007

6.17.1 Message body

'break' or 'return' statement doesn't found in the last 'case' or 'default' section.

6.17.2 Content

Under construction.

6.17.3 Sample code

int value;
int number;
switch (number) {
case 1:
    value = 1;
    break;
case 2:
    value = 2;
case 3: /* W0007 */
    value = 3;
    break;
default:
    value = 0;
    break;
}

6.17.4 Related message

None.

6.17.5 Since

1.0.0


Next: , Previous: W0007, Up: Messages

6.18 W0010

6.18.1 Message body

There is a side-effect in this ternary operator (conditional operator).

6.18.2 Content

Under construction.

6.18.3 Sample code

x = (a > 0) ? b++ : b--; /* W0010 */

6.18.4 Related message

None.

6.18.5 Since

1.0.0


Next: , Previous: W0010, Up: Messages

6.19 W0013

6.19.1 Message body

'continue' statement is used in repetition statement.

6.19.2 Content

Under construction.

6.19.3 Sample code

static void foo(void)
{
    int i;
    int j;

    i++;
    for (i = 1, j = 0; i < 20; i++) {
        j += 2;
        if ((j % i) == 3) {
            continue;  /* W0013 */
        }
    }
}

6.19.4 Related message

None.

6.19.5 Since

1.0.0


Next: , Previous: W0013, Up: Messages

6.20 W0016

6.20.1 Message body

The field width of conversion specifier exceeds 509 characters in 'printf' function.

6.20.2 Content

Under construction.

6.20.3 Sample code

printf("%510d\n", a); /* W0016 */

6.20.4 Related message

  • W0017 The field width of conversion specifier exceeds 509 characters in 'scanf' function.

6.20.5 Since

1.0.0


Next: , Previous: W0016, Up: Messages

6.21 W0017

6.21.1 Message body

The field width of conversion specifier exceeds 509 characters in 'scanf' function.

6.21.2 Content

Under construction.

6.21.3 Sample code

scanf("%510d", &a); /* W0017 */

6.21.4 Related message

  • W0016 The field width of conversion specifier exceeds 509 characters in 'printf' function.

6.21.5 Since

1.0.0


Next: , Previous: W0017, Up: Messages

6.22 W0018

6.22.1 Message body

This accuracy width of conversion specifier exceeds 509 characters.

6.22.2 Content

Under construction.

6.22.3 Sample code

printf("%.510f\n", a); /* W0018 */

6.22.4 Related message

None.

6.22.5 Since

1.0.0


Next: , Previous: W0018, Up: Messages

6.23 W0019

6.23.1 Message body

This pointer cast is danger because it delete const qualifier.

6.23.2 Content

Under construction.

6.23.3 Sample code

int *pa;
const int *pb;
pa = (int *) pb; /* W0019 */

6.23.4 Related message

None.

6.23.5 Since

1.0.0


Next: , Previous: W0019, Up: Messages

6.24 W0021

6.24.1 Message body

This pointer cast is danger because it delete volatile qualifier.

6.24.2 Content

Under construction.

6.24.3 Sample code

int *pa;
volatile int *pb;
pa = (int *) pb; /* W0021 */

6.24.4 Related message

None.

6.24.5 Since

1.0.0


Next: , Previous: W0021, Up: Messages

6.25 W0023

6.25.1 Message body

Arithmetic operation is being made by pointer variable.

6.25.2 Content

Under construction.

6.25.3 Sample code

int *p;
int *q;
long r = p + r; /* W0023 */

6.25.4 Related message

  • W0024 Increment or decrement is being made by pointer variable.

6.25.5 Since

1.0.0


Next: , Previous: W0023, Up: Messages

6.26 W0024

6.26.1 Message body

Increment or decrement is being made by pointer variable.

6.26.2 Content

Under construction.

6.26.3 Sample code

int *p;
p++; /* W0024 */

6.26.4 Related message

  • W0023 Arithmetic operation is being made by pointer variable.

6.26.5 Since

1.0.0


Next: , Previous: W0024, Up: Messages

6.27 W0025

6.27.1 Message body

`%s' is already included by this file directly.

6.27.2 Content

Under construction.

6.27.3 Sample code

#include "test.h"
#include "test2.h"
#include "test.h" /* W0025 */

6.27.4 Related message

  • W0026 `%s' is already included by this file indirectly.

6.27.5 Since

1.0.0


Next: , Previous: W0025, Up: Messages

6.28 W0026

6.28.1 Message body

`%s' is already included by this file indirectly.

6.28.2 Content

Under construction.

6.28.3 Sample code

test.h

#include "test2.h"

test.c

#include "test.h"
#include "test2.h" /* W0026 */

6.28.4 Related message

  • W0025 `%s' is already included by this file directly.

6.28.5 Since

1.0.0


Next: , Previous: W0026, Up: Messages

6.29 W0027

6.29.1 Message body

Comparison operation is being made by pointer variable.

6.29.2 Content

Under construction.

6.29.3 Sample code

int *p;
int *q;
if (p < q) { /* W0027 */

6.29.4 Related message

None.

6.29.5 Since

1.0.0


Next: , Previous: W0027, Up: Messages

6.30 W0028

6.30.1 Message body

Dereferencing a pointer constant of NULL.

6.30.2 Content

Under construction.

6.30.3 Sample code

int i = *(int *) NULL; /* W0028 */

6.30.4 Related message

None.

6.30.5 Since

1.0.0


Next: , Previous: W0028, Up: Messages

6.31 W0030

6.31.1 Message body

Arithmetic operation is being made by NULL pointer.

6.31.2 Content

Under construction.

6.31.3 Sample code

int *p;
p = (int *) NULL + 1; /* W0030 */

6.31.4 Related message

None.

6.31.5 Since

1.0.0


Next: , Previous: W0030, Up: Messages

6.32 W0031

6.32.1 Message body

A formal argument `%s' is not used in this function.

6.32.2 Content

Under construction.

6.32.3 Sample code

int func(int num) /* W0031 */
{
    return 0;
}

6.32.4 Related message

None.

6.32.5 Since

1.0.0


Next: , Previous: W0031, Up: Messages

6.33 W0033

6.33.1 Message body

A label of `%s:' is not used in this function. It might be removed.

6.33.2 Content

Under construction.

6.33.3 Sample code

void func(void)
{
    int num = 0;
    for (int i =0; i < 10; i++) {
        num++;
    }
ERROR: /* W0033 */
    num = 0;
}

6.33.4 Related message

None.

6.33.5 Since

1.0.0


Next: , Previous: W0033, Up: Messages

6.34 W0035

6.34.1 Message body

Right operand of “&&' or `||' must arithmetic type or pointer type.

6.34.2 Content

Under construction.

6.34.3 Sample code

struct STR {
    int x;
    int y;
};

extern struct STR str;

void func(void)
{
    int x;
    int y;
    x = y && str; /* W0035 */
}

6.34.4 Related message

None.

6.34.5 Since

1.0.0


Next: , Previous: W0035, Up: Messages

6.35 W0036

6.35.1 Message body

The number of qualification operator exceeds 12.This program doesn't meet the strict ISO C90 standards of the term.

6.35.2 Content

Under construction.

6.35.3 Sample code

int num[1][2][3][4][5][6][7][8][9][10][11][12][13]; /* W0036 */

6.35.4 Related message

None.

6.35.5 Since

1.0.0


Next: , Previous: W0036, Up: Messages

6.36 W0037

6.36.1 Message body

Nest of structure or union exceeds 15. This program doesn't meet the strict ISO C90 standards of the term.

6.36.2 Content

Under construction.

6.36.3 Sample code

struct st1 {
  struct st2 {
    struct st3 {
      struct st4 {
        struct st5 {
          struct st6 {
            struct st7 {
              struct st8 {
                struct st9 {
                  struct st10 {
                    struct st11 {
                      struct st12 {
                        struct st13 {
                          struct st14 {
                            struct st15 {
                              struct st16 { /* W0037 */
                                int i;
                              } st16;
                            } st15;
                          } st14;
                        } st13;
                      } st12;
                    } st11;
                  } st10;
                } st9;
              } st8;
            } st7;
          } st6;
        } st5;
      } st5;
    } st3;
  } st2;
};

6.36.4 Related message

None.

6.36.5 Since

1.0.0


Next: , Previous: W0037, Up: Messages

6.37 W0038

6.37.1 Message body

The size of object `%s' exceeds 32767 bytes. This program doesn't meet the strict ISO C90 standards of the term.

6.37.2 Content

Under construction.

6.37.3 Sample code

int num[100][330]; /* W0038 */

6.37.4 Related message

None.

6.37.5 Since

1.0.0


Next: , Previous: W0038, Up: Messages

6.38 W0039

6.38.1 Message body

The number of local identifier in the block exceeds 127. This program doesn't meet the strict ISO C90 standards of the term.

6.38.2 Content

Under construction.

6.38.3 Sample code

void func(void)
{
    int num1,  num2,  num3,  num4,  num5,  num6,  num7,  num8,  num9,  num10;
    int num11, num12, num13, num14, num15, num16, num17, num18, num19, num20;

    ...snip...

    int num111, num112, num113, num114, num115, num116, num117, num118, num119, num120;
    int num121, num122, num123, num124, num125, num126, num127, num128; /* W0039 */
}

6.38.4 Related message

None.

6.38.5 Since

1.0.0


Next: , Previous: W0039, Up: Messages

6.39 W0040

6.39.1 Message body

A bit field is declared without 'signed' or 'unsigned'.

6.39.2 Content

Under construction.

6.39.3 Sample code

struct STR { /* W0040 */
    int a:5;
};

6.39.4 Related message

None.

6.39.5 Since

1.0.0


Next: , Previous: W0040, Up: Messages

6.40 W0041

6.40.1 Message body

The number of member of structure or union exceeds 127.This program doesn't meet the strict ISO C90 standards of the term.

6.40.2 Content

Under construction.

6.40.3 Sample code

struct STR {
    int num1;
    int num2;
    int num3;
    int num4;
    int num5;

    ...snip...

    int num125;
    int num126;
    int num127;
    int num128; /* W0041 */
};

6.40.4 Related message

None.

6.40.5 Since

1.0.0


Next: , Previous: W0041, Up: Messages

6.41 W0042

6.41.1 Message body

The number of enumeration literal exceeds 127. This program doesn't meet the strict ISO C90 standards of the term.

6.41.2 Content

Under construction.

6.41.3 Sample code

enum ENM {
    e1,  e2,  e3,  e4,  e5,  e6,  e7,  e8,  e9,  e10,
    e11, e12, e13, e14, e15, e16, e17, e18, e19, e20,

    ...snip...

    e111, e112, e113, e114, e115, e116, e117, e118, e119, e120,
    e121, e122, e123, e124, e125, e126, e127, e128 /* W0042 */
};

6.41.4 Related message

None.

6.41.5 Since

1.0.0


Next: , Previous: W0042, Up: Messages

6.42 W0043

6.42.1 Message body

The initial value of the array is short of declared array's size. The residual array will be initialized by zero.

6.42.2 Content

Under construction.

6.42.3 Sample code

int array[5] = { 1, 2, 3 }; /* W0043 */

6.42.4 Related message

None.

6.42.5 Since

1.0.0


Next: , Previous: W0043, Up: Messages

6.43 W0049

6.43.1 Message body

Nest of control structure exceeds 15. This program doesn't meet the strict ISO C90 standards of the term.

6.43.2 Content

Under construction.

6.43.3 Sample code

if(x > 0) {
  if(x > 0) {
    if(x > 0) {
      if(x > 0) {
        if(x > 0) {
          if(x > 0) {
            if(x > 0) {
              if(x > 0) {
                if(x > 0) {
                  if(x > 0) {
                    if(x > 0) {
                      if(x > 0) {
                        if(x > 0) {
                          if(x > 0) {
                            if (x > 0) {
                              if(x > 0) { /* W0049 */
                                ;
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

6.43.4 Related message

None.

6.43.5 Since

1.0.0


Next: , Previous: W0049, Up: Messages

6.44 W0050

6.44.1 Message body

The number of 'case' label exceeds 257. This program doesn't meet the strict ISO C90 standards of the term.

6.44.2 Content

Under construction.

6.44.3 Sample code

switch (num) {
case 1:
    break;
case 2:
    break;
case 3:
    break;

  ...snip...

case 257:
    break;
case 258: /* W0050 */
    break;
}

6.44.4 Related message

None.

6.44.5 Since

1.0.0


Next: , Previous: W0050, Up: Messages

6.45 W0051

6.45.1 Message body

An external identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in linker property.

6.45.2 Content

Under construction.

6.45.3 Sample code

extern int very_long_long_long_ ...snip... _long_external_symbol; /* W0051 */

6.45.4 Related message

  • C0001 A warning is detected as a pair of this identifier `%s'.

6.45.5 Since

1.0.0


Next: , Previous: W0051, Up: Messages

6.46 W0052

6.46.1 Message body

An identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in compile property.

6.46.2 Content

Under construction.

6.46.3 Sample code

void func(void)
{
    int very_long_long_long_long_long_ ...snip... _long_symbol; /* W0052 */
}

6.46.4 Related message

  • C0001 A warning is detected as a pair of this identifier `%s'.

6.46.5 Since

1.0.0


Next: , Previous: W0052, Up: Messages

6.47 W0053

6.47.1 Message body

Nest of `#include \%s\' exceeds 8.This program doesn't meet the strict ISO C90 standards of the term.

6.47.2 Content

Under construction.

6.47.3 Sample code

test.c

#include "test1.h"

test1.h

#include "test2.h"

test2.h

#include "test3.h"

test3.h

#include "test4.h"

test4.h

#include "test5.h"

test5.h

#include "test6.h"

test6.h

#include "test7.h"

test7.h

#include "test8.h"

test8.h

#include "test9.h"

test9.h

#include "test10.h" /* W0053 */

6.47.4 Related message

None.

6.47.5 Since

1.0.0


Next: , Previous: W0053, Up: Messages

6.48 W0054

6.48.1 Message body

The maximum number of `#if...' nest exceeds 8. This program doesn't meet the strict ISO C90 standards of the term.

6.48.2 Content

Under construction.

6.48.3 Sample code

#if N > 1
#if N > 2
#if N > 3
#if N > 4
#if N > 5
#if N > 6
#if N > 7
#if N > 8 /* W0054 */
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif

6.48.4 Related message

None.

6.48.5 Since

1.0.0


Next: , Previous: W0054, Up: Messages

6.49 W0055

6.49.1 Message body

The number of macro definition exceeds 1024. This program doesn't meet the strict ISO C90 standards of the term.

6.49.2 Content

Under construction.

6.49.3 Sample code

#define MACRO_1
#define MACRO_2
#define MACRO_3

...snip...

#define MACRO_1023
#define MACRO_1024
#define MACRO_1025 /* W0055 */

6.49.4 Related message

None.

6.49.5 Since

1.0.0


Next: , Previous: W0055, Up: Messages

6.50 W0056

6.50.1 Message body

The number of formal argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term.

6.50.2 Content

Under construction.

6.50.3 Sample code

#define MACRO(a1, a2, a3, ...snip... a30, a31, a32) /* W0056 */

6.50.4 Related message

None.

6.50.5 Since

1.0.0


Next: , Previous: W0056, Up: Messages

6.51 W0057

6.51.1 Message body

The number of actual argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term.

6.51.2 Content

Under construction.

6.51.3 Sample code

int i = MACRO(1, 2, 3 ...snip... 30, 31, 32); /* W0057 */

6.51.4 Related message

None.

6.51.5 Since

1.0.0


Next: , Previous: W0057, Up: Messages

6.52 W0058

6.52.1 Message body

The number of characters of string literal exceeds 509.This program doesn't meet the strict ISO C90 standards of the term.

6.52.2 Content

Under construction.

6.52.3 Sample code

char buf[] = "very long long long ...snip... long string literal"; /* W0058 */

6.52.4 Related message

None.

6.52.5 Since

1.0.0


Next: , Previous: W0058, Up: Messages

6.53 W0059

6.53.1 Message body

Ctrl-M(^M) control character is found at the end of line.

6.53.2 Content

Under construction.

6.53.3 Sample code

None.

6.53.4 Related message

  • W0060 Ctrl-Z(^Z) control character is found in this file.

6.53.5 Since

1.0.0


Next: , Previous: W0059, Up: Messages

6.54 W0060

6.54.1 Message body

Ctrl-Z(^Z) control character is found in this file.

6.54.2 Content

Under construction.

6.54.3 Sample code

None.

6.54.4 Related message

  • W0059 Ctrl-M(^M) control character is found at the end of line.

6.54.5 Since

1.0.0


Next: , Previous: W0060, Up: Messages

6.55 W0061

6.55.1 Message body

`%s' is not actual reserved keyword. It will be considered as language extension and ignored.

6.55.2 Content

Under construction.

6.55.3 Sample code

extern int func(void) __attribute__ ((__const__)); /* W0061 */

6.55.4 Related message

  • W0062 `__typeof__' is not supported ISO C standards. It will be considered as language extension.
  • W0063 `__alignof__'is not supported ISO C standards. It will be considered as language extension..

6.55.5 Since

1.0.0


Next: , Previous: W0061, Up: Messages

6.56 W0062

6.56.1 Message body

`__typeof__' is not supported ISO C standards. It will be considered as language extension.

6.56.2 Content

Under construction.

6.56.3 Sample code

#define DEF_FUNPTR(func) __typeof__(func) *ptr_##func = 0
DEF_FUNPTR(main); /* W0062 */

6.56.4 Related message

  • W0061 `%s' is not actual reserved keyword. It will be considered as language extension and ignored.
  • W0063 `__alignof__'is not supported ISO C standards. It will be considered as language extension..

6.56.5 Since

1.0.0


Next: , Previous: W0062, Up: Messages

6.57 W0063

6.57.1 Message body

`__alignof__'is not supported ISO C standards. It will be considered as language extension..

6.57.2 Content

Under construction.

6.57.3 Sample code

int a = __alignof__(struct sockaddr *) /* W0063 */

6.57.4 Related message

  • W0061 `%s' is not actual reserved keyword. It will be considered as language extension and ignored.
  • W0062 `__typeof__' is not supported ISO C standards. It will be considered as language extension.

6.57.5 Since

1.0.0


Next: , Previous: W0063, Up: Messages

6.58 W0064

6.58.1 Message body

A binary integer literal is used. This is the language extension.

6.58.2 Content

Under construction.

6.58.3 Sample code

unsigned char c = 0b00000001; /* W0064 */

6.58.4 Related message

None.

6.58.5 Since

1.0.0


Next: , Previous: W0064, Up: Messages

6.59 W0065

6.59.1 Message body

Must not cast left operand of assignment operator.

6.59.2 Content

Under construction.

6.59.3 Sample code

void func(int num)
{
    (unsigned short) num = 100U; /* W0065 */
}

6.59.4 Related message

None.

6.59.5 Since

1.0.0


Next: , Previous: W0065, Up: Messages

6.60 W0066

6.60.1 Message body

`main()' function must `int (void)' or `int (int, char *[])'.

6.60.2 Content

Under construction.

6.60.3 Sample code

void main(void) {} /* W0066 */

6.60.4 Related message

None.

6.60.5 Since

1.0.0


Next: , Previous: W0066, Up: Messages

6.61 W0067

6.61.1 Message body

Directly access to the member of nested structure. This is the language extension.

6.61.2 Content

Under construction.

6.61.3 Sample code

struct BBB {
    int mb;
    struct AAA {
        int ma;
    };
} bbb;

bbb.ma = 1; /* W0067 */

6.61.4 Related message

  • W0068 `.' is used to get access to bit. This is the language extension.

6.61.5 Since

1.0.0


Next: , Previous: W0067, Up: Messages

6.62 W0068

6.62.1 Message body

`.' is used to get access to bit. This is the language extension.

6.62.2 Content

Under construction.

6.62.3 Sample code

unsigned short a;

a.2 = 0; /* W0068 */

6.62.4 Related message

  • W0067 Directly access to the member of nested structure. This is the language extension.

6.62.5 Since

1.0.0


Next: , Previous: W0068, Up: Messages

6.63 W0069

6.63.1 Message body

`/*' is found in the beginning with `/*' comments. Nested comment doesn't allowed in ISO C standards.

6.63.2 Content

Under construction.

6.63.3 Sample code

/* /* W0069 */ */

6.63.4 Related message

None.

6.63.5 Since

1.0.0


Next: , Previous: W0069, Up: Messages

6.64 W0070

6.64.1 Message body

Included <%s> is not referenced in the translation unit. It can be removed.

6.64.2 Content

Under construction.

6.64.3 Sample code

None.

6.64.4 Related message

  • W0071 Included "%s" is not referenced in the translation unit. It can be removed.

6.64.5 Since

1.0.0


Next: , Previous: W0070, Up: Messages

6.65 W0071

6.65.1 Message body

Included \%s\ is not referenced in the translation unit. It can be removed.

6.65.2 Content

Under construction.

6.65.3 Sample code

None.

6.65.4 Related message

  • W0070 Included <%s> is not referenced in the translation unit. It can be removed.

6.65.5 Since

1.0.0


Next: , Previous: W0071, Up: Messages

6.66 W0072

6.66.1 Message body

A character except for basic source character is used in header file name.

6.66.2 Content

Under construction.

6.66.3 Sample code

#include <test$.h> /* W0072 */

6.66.4 Related message

None.

6.66.5 Since

1.0.0


Next: , Previous: W0072, Up: Messages

6.67 W0073

6.67.1 Message body

No include guard in this include file.

6.67.2 Content

Under construction.

6.67.3 Sample code

None.

6.67.4 Related message

None.

6.67.5 Since

1.0.0


Next: , Previous: W0073, Up: Messages

6.68 W0076

6.68.1 Message body

Hexadecimal constant without `U' or `u' suffix.

6.68.2 Content

Under construction.

6.68.3 Sample code

unsigned int num = 0x1234; /* W0076 */

6.68.4 Related message

None.

6.68.5 Since

1.0.0


Next: , Previous: W0076, Up: Messages

6.69 W0077

6.69.1 Message body

Lower case `l' is added to integer or floating-point number.

6.69.2 Content

Under construction.

6.69.3 Sample code

long a = 0x1000l; /* W0077 */
long b = 0x1000L; /* OK */

6.69.4 Related message

None.

6.69.5 Since

1.0.0


Next: , Previous: W0077, Up: Messages

6.70 W0078

6.70.1 Message body

A function is declared without list of formal argument.

6.70.2 Content

Under construction.

6.70.3 Sample code

int sample() /* W0078 */
{
    return 0;
}

6.70.4 Related message

None.

6.70.5 Since

1.0.0


Next: , Previous: W0078, Up: Messages

6.71 W0079

6.71.1 Message body

This array cannot keep final character `\0' which initial value of string literal.

6.71.2 Content

Under construction.

6.71.3 Sample code

char text[3] = "ABC"; /* W0079 */

6.71.4 Related message

None.

6.71.5 Since

1.0.0


Next: , Previous: W0079, Up: Messages

6.72 W0080

6.72.1 Message body

A global object which const qualified is defined without explicitly initialized.

6.72.2 Content

Under construction.

6.72.3 Sample code

const int num; /* W0080 */

6.72.4 Related message

None.

6.72.5 Since

1.0.0


Next: , Previous: W0080, Up: Messages

6.73 W0081

6.73.1 Message body

A monadic operator `-' becomes unsigned type if it use 'unsigned int' type, 'unsigned long' type or 'unsigned long' type operand.

6.73.2 Content

Under construction.

6.73.3 Sample code

unsigned long num = 0;
long val = -num; /* W0081 */

6.73.4 Related message

None.

6.73.5 Since

1.0.0


Next: , Previous: W0081, Up: Messages

6.74 W0082

6.74.1 Message body

Unary operator `-' is applied to an operand whose underlying type `%s' is unsigned.

6.74.2 Content

Under construction.

6.74.3 Sample code

unsigned short num = 20;
int val = -num; /* W0082 */

6.74.4 Related message

None.

6.74.5 Since

1.0.0


Next: , Previous: W0082, Up: Messages

6.75 W0084

6.75.1 Message body

Left operand of this comma operator `,' doesn't described the statement which has side-effects.

6.75.2 Content

Under construction.

6.75.3 Sample code

int a = 0;
int b = 1;

a, b++; /* W0084 */

6.75.4 Related message

  • W0085 This statement doesn't have side-effects. It is highly possible that it having error.
  • W0086 Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator).
  • W0087 The right side statement of comma operator is verbose statement which doesn't have side-effects.
  • W0088 The right side statement of logical operator is verbose statement which doesn't have side-effects.

6.75.5 Since

1.0.0


Next: , Previous: W0084, Up: Messages

6.76 W0085

6.76.1 Message body

This statement doesn't have side-effects. It is highly possible that it having error.

6.76.2 Content

Under construction.

6.76.3 Sample code

a; /* W0085 */

6.76.4 Related message

  • W0084 Left operand of this comma operator `,' doesn't described the statement which has side-effects.
  • W0086 Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator).
  • W0087 The right side statement of comma operator is verbose statement which doesn't have side-effects.
  • W0088 The right side statement of logical operator is verbose statement which doesn't have side-effects.

6.76.5 Since

1.0.0


Next: , Previous: W0085, Up: Messages

6.77 W0086

6.77.1 Message body

Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator).

6.77.2 Content

Under construction.

6.77.3 Sample code

int a;
int b;

(a < 0) ? b : b++; /* W0086 */

6.77.4 Related message

  • W0084 Left operand of this comma operator `,' doesn't described the statement which has side-effects.
  • W0085 This statement doesn't have side-effects. It is highly possible that it having error.
  • W0087 The right side statement of comma operator is verbose statement which doesn't have side-effects.
  • W0088 The right side statement of logical operator is verbose statement which doesn't have side-effects.

6.77.5 Since

1.0.0


Next: , Previous: W0086, Up: Messages

6.78 W0087

6.78.1 Message body

The right side statement of comma operator is verbose statement which doesn't have side-effects.

6.78.2 Content

Under construction.

6.78.3 Sample code

int a = 0;
int b = 1;

a++, b; /* W0087 */

6.78.4 Related message

  • W0084 Left operand of this comma operator `,' doesn't described the statement which has side-effects.
  • W0085 This statement doesn't have side-effects. It is highly possible that it having error.
  • W0086 Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator).
  • W0088 The right side statement of logical operator is verbose statement which doesn't have side-effects.

6.78.5 Since

1.0.0


Next: , Previous: W0087, Up: Messages

6.79 W0088

6.79.1 Message body

The right side statement of logical operator is verbose statement which doesn't have side-effects.

6.79.2 Content

Under construction.

6.79.3 Sample code

(a < 0) && func(a) && func(b) && c; /* W0088 */

6.79.4 Related message

  • W0084 Left operand of this comma operator `,' doesn't described the statement which has side-effects.
  • W0085 This statement doesn't have side-effects. It is highly possible that it having error.
  • W0086 Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator).
  • W0087 The right side statement of comma operator is verbose statement which doesn't have side-effects.

6.79.5 Since

1.0.0


Next: , Previous: W0088, Up: Messages

6.80 W0093

6.80.1 Message body

This expression may cause division-by-zero.

6.80.2 Content

Under construction.

6.80.3 Sample code

int func(int a, int b)
{
    if (b > 0) {
        return a / b; /* OK */
    }
    return a / b; /* W0093 */
}

6.80.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.80.5 Since

1.0.0


Next: , Previous: W0093, Up: Messages

6.81 W0096

6.81.1 Message body

It divided by a constant expression which definitely zero.

6.81.2 Content

Under construction.

6.81.3 Sample code

#define A (0)

int b = 10 / A; /* W0096 */

6.81.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.81.5 Since

1.0.0


Next: , Previous: W0096, Up: Messages

6.82 W0097

6.82.1 Message body

This expression may cause division-by-zero.

6.82.2 Content

Under construction.

6.82.3 Sample code

int func(int a, int b)
{
    if (a < 0) {
        ...snip...
    }
    else {
        ...snip...
        if (a < 1) {
            return b / a; /* W0097 */
        }
    }
}

6.82.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.82.5 Since

1.0.0


Next: , Previous: W0097, Up: Messages

6.83 W0100

6.83.1 Message body

The variable `%s' has not been reassigned since the initial value is assigned. It may be able to be defined as `const' with an initial value.

6.83.2 Content

Under construction.

6.83.3 Sample code

int func(int a)
{
    int b = a; /* W0100 */
    return b;
}

6.83.4 Related message

None.

6.83.5 Since

1.0.0


Next: , Previous: W0100, Up: Messages

6.84 W0101

6.84.1 Message body

An address of auto variable is substituted for a pointer which has a longer life. This program is danger.

6.84.2 Content

Under construction.

6.84.3 Sample code

extern long *ptr;

void func()
{
    long value = 0;
    ptr = &value; /* W0101 */
}

6.84.4 Related message

None.

6.84.5 Since

1.0.0


Next: , Previous: W0101, Up: Messages

6.85 W0102

6.85.1 Message body

An address of auto variable is returned via formal argument to functions. This program is danger.

6.85.2 Content

Under construction.

6.85.3 Sample code

void func(int **ptr)
{
    int num;
    *ptr = &num; /* W0102 */
}

6.85.4 Related message

  • W0103 An address of auto variable is returned as return value from a function. This program is danger.

6.85.5 Since

1.0.0


Next: , Previous: W0102, Up: Messages

6.86 W0103

6.86.1 Message body

An address of auto variable is returned as return value from a function. This program is danger.

6.86.2 Content

Under construction.

6.86.3 Sample code

char *foo1(void)
{
    char a[3];
    return a; /* W0103 */
}

6.86.4 Related message

  • W0102 An address of auto variable is returned via formal argument to functions. This program is danger.

6.86.5 Since

1.0.0


Next: , Previous: W0103, Up: Messages

6.87 W0104

6.87.1 Message body

The value of formal argument `%s' is not change. It can be declarable with 'const'.

6.87.2 Content

Under construction.

6.87.3 Sample code

void func(int val) /* W0104 */
{
    const int num = val + 1;
}

6.87.4 Related message

  • W0105 The object which points the formal argument `%s' is not change. It can be declaring as pointer type which points const object.

6.87.5 Since

1.0.0


Next: , Previous: W0104, Up: Messages

6.88 W0105

6.88.1 Message body

The object which points the formal argument `%s' is not change. It can be declaring as pointer type which points const object.

6.88.2 Content

Under construction.

6.88.3 Sample code

void func(int *val) /* W0105 */
{
    const int num = *val;
}

6.88.4 Related message

  • W0104 The value of formal argument `%s' is not change. It can be declarable with 'const'.

6.88.5 Since

1.0.0


Next: , Previous: W0105, Up: Messages

6.89 W0107

6.89.1 Message body

An address of auto variable is substituted for local pointer with 'static' option. This program is danger.

6.89.2 Content

Under construction.

6.89.3 Sample code

void foo()
{
    static int *p;
    int b = 100;

    p = &b; /* W0107 */
}

6.89.4 Related message

None.

6.89.5 Since

1.0.0


Next: , Previous: W0107, Up: Messages

6.90 W0108

6.90.1 Message body

An assignment-expression appears in the logical expression.

6.90.2 Content

Under construction.

6.90.3 Sample code

int a;
int b;

if (a = b) { /* W0108 */
}

6.90.4 Related message

None.

6.90.5 Since

1.0.0


Next: , Previous: W0108, Up: Messages

6.91 W0109

6.91.1 Message body

The definition of this function doesn't found. It consider it was omitted, and insert `extern int %s()'.

6.91.2 Content

Under construction.

6.91.3 Sample code

void func()
{
    foo(); /* W0109 */
}

6.91.4 Related message

None.

6.91.5 Since

1.0.0


Next: , Previous: W0109, Up: Messages

6.92 W0110

6.92.1 Message body

A variable number with floating-point type is used by loop counter in for statement.

6.92.2 Content

Under construction.

6.92.3 Sample code

double d;

for (d = 0.0; d != 1.0; d += 0.1) { /* W0110 */
}

6.92.4 Related message

None.

6.92.5 Since

1.0.0


Next: , Previous: W0110, Up: Messages

6.93 W0112

6.93.1 Message body

The statement of floating-point compares by equivalent operator.

6.93.2 Content

Under construction.

6.93.3 Sample code

double a = 0.1;
a = (a + 0.1) * 5.0;
if (a == 1.0) { /* W0112 */
}

6.93.4 Related message

None.

6.93.5 Since

1.0.0


Next: , Previous: W0112, Up: Messages

6.94 W0114

6.94.1 Message body

This control expression is not explicit logical operation.

6.94.2 Content

Under construction.

6.94.3 Sample code

int a;

if (a != 0) { /* OK */
}

if (a) { /* W0114 */
}

6.94.4 Related message

None.

6.94.5 Since

1.0.0


Next: , Previous: W0114, Up: Messages

6.95 W0115

6.95.1 Message body

Unsigned left shift operator `<<' drop the high-order bit.

6.95.2 Content

Under construction.

6.95.3 Sample code

unsigned int func(unsigned int a)
{
    if (a > 0x40000000U) {
        return a << 2; /* W0115 */
    }
}

6.95.4 Related message

  • W0116 Unsigned left shift operator `<<' can be drop high-order bit.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.95.5 Since

1.0.0


Next: , Previous: W0115, Up: Messages

6.96 W0116

6.96.1 Message body

Unsigned left shift operator `<<' can be drop high-order bit.

6.96.2 Content

Under construction.

6.96.3 Sample code

unsigned int func(unsigned int a)
{
    if (a > 0x40000000U) {
        return a << 1; /* W0116 */
    }
}

6.96.4 Related message

  • W0115 Unsigned left shift operator `<<' drop the high-order bit.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.96.5 Since

1.0.0


Next: , Previous: W0116, Up: Messages

6.97 W0117

6.97.1 Message body

`%s' has external-linkage without any prototype declarations.

6.97.2 Content

Under construction.

6.97.3 Sample code

void func(void) /* W0117 */
{
    ...snip...
}

6.97.4 Related message

  • W0118 `%s' has external-linkage, but no prototype declaration is in header files.

6.97.5 Since

1.0.0


Next: , Previous: W0117, Up: Messages

6.98 W0118

6.98.1 Message body

`%s' has external-linkage, but no prototype declaration is in header files.

6.98.2 Content

Under construction.

6.98.3 Sample code

test.c

extern int val; /* W0118 */

6.98.4 Related message

  • W0117 `%s' has external-linkage without any prototype declarations.

6.98.5 Since

1.0.0


Next: , Previous: W0118, Up: Messages

6.99 W0119

6.99.1 Message body

An implicit type conversion from char to signed char.

6.99.2 Content

Under construction.

6.99.3 Sample code

extern void foo(signed char a);

void bar(char a)
{
    signed char b = a; /* W0119 */
    foo(a); /* W0119 */
}

6.99.4 Related message

  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.99.5 Since

1.0.0


Next: , Previous: W0119, Up: Messages

6.100 W0120

6.100.1 Message body

An implicit type conversion from char to unsigned char.

6.100.2 Content

Under construction.

6.100.3 Sample code

extern void foo(unsigned char a);

void bar(char a)
{
    unsigned char b = a; /* W0120 */
    foo(a); /* W0120 */
}

6.100.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.100.5 Since

1.0.0


Next: , Previous: W0120, Up: Messages

6.101 W0121

6.101.1 Message body

An implicit type conversion from char to signed short.

6.101.2 Content

Under construction.

6.101.3 Sample code

extern void foo(short a);

void bar(char a)
{
    short b = a; /* W0121 */
    foo(a); /* W0121 */
}

6.101.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.101.5 Since

1.0.0


Next: , Previous: W0121, Up: Messages

6.102 W0122

6.102.1 Message body

An implicit type conversion from char to unsigned short.

6.102.2 Content

Under construction.

6.102.3 Sample code

extern void foo(unsigned short a);

void bar(char a)
{
    unsigned short b = a; /* W0122 */
    foo(a); /* W0122 */
}

6.102.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.102.5 Since

1.0.0


Next: , Previous: W0122, Up: Messages

6.103 W0123

6.103.1 Message body

An implicit type conversion from char to signed int.

6.103.2 Content

Under construction.

6.103.3 Sample code

extern void foo(int a);

void bar(char a)
{
    int b = a; /* W0123 */
    foo(a); /* W0123 */
}

6.103.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.103.5 Since

1.0.0


Next: , Previous: W0123, Up: Messages

6.104 W0124

6.104.1 Message body

An implicit type conversion from char to unsigned int.

6.104.2 Content

Under construction.

6.104.3 Sample code

extern void foo(unsigned int a);

void bar(char a)
{
    unsigned int b = a; /* W0124 */
    foo(a); /* W0124 */
}

6.104.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.104.5 Since

1.0.0


Next: , Previous: W0124, Up: Messages

6.105 W0125

6.105.1 Message body

An implicit type conversion from char to signed long.

6.105.2 Content

Under construction.

6.105.3 Sample code

extern void foo(long a);

void bar(char a)
{
    long b = a; /* W0125 */
    foo(a); /* W0125 */
}

6.105.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.105.5 Since

1.0.0


Next: , Previous: W0125, Up: Messages

6.106 W0126

6.106.1 Message body

An implicit type conversion from char to unsigned long.

6.106.2 Content

Under construction.

6.106.3 Sample code

extern void foo(unsigned long a);

void bar(char a)
{
    unsigned long b = a; /* W0126 */
    foo(a); /* W0126 */
}

6.106.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.106.5 Since

1.0.0


Next: , Previous: W0126, Up: Messages

6.107 W0127

6.107.1 Message body

An implicit type conversion from char to float.

6.107.2 Content

Under construction.

6.107.3 Sample code

extern void foo(float a);

void bar(char a)
{
    float b = a; /* W0127 */
    foo(a); /* W0127 */
}

6.107.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.107.5 Since

1.0.0


Next: , Previous: W0127, Up: Messages

6.108 W0128

6.108.1 Message body

An implicit type conversion from char to double.

6.108.2 Content

Under construction.

6.108.3 Sample code

extern void foo(double a);

void bar(char a)
{
    double b = a; /* W0128 */
    foo(a); /* W0128 */
}

6.108.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

6.108.5 Since

1.0.0


Next: , Previous: W0128, Up: Messages

6.109 W0129

6.109.1 Message body

An implicit type conversion from char to long double.

6.109.2 Content

Under construction.

6.109.3 Sample code

extern void foo(long double a);

void bar(char a)
{
    long double b = a; /* W0129 */
    foo(a); /* W0129 */
}

6.109.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0130 An implicit type conversion from char to signed long long.
  • W0131 An implicit type conversion from char to unsigned long long.

Under construction.

6.109.5 Since

1.0.0


Next: , Previous: W0129, Up: Messages

6.110 W0130

6.110.1 Message body

An implicit type conversion from char to signed long long.

6.110.2 Content

Under construction.

6.110.3 Sample code

extern void foo(long long a);

void bar(char a)
{
    long long b = a; /* W0130 */
    foo(a); /* W0130 */
}

6.110.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0131 An implicit type conversion from char to unsigned long long.

6.110.5 Since

1.0.0


Next: , Previous: W0130, Up: Messages

6.111 W0131

6.111.1 Message body

An implicit type conversion from char to unsigned long long.

6.111.2 Content

Under construction.

6.111.3 Sample code

extern void foo(unsigned long long a);

void bar(char a)
{
    unsigned long long b = a; /* W0131 */
    foo(a); /* W0131 */
}

6.111.4 Related message

  • W0119 An implicit type conversion from char to signed char.
  • W0120 An implicit type conversion from char to unsigned char.
  • W0121 An implicit type conversion from char to signed short.
  • W0122 An implicit type conversion from char to unsigned short.
  • W0123 An implicit type conversion from char to signed int.
  • W0124 An implicit type conversion from char to unsigned int.
  • W0125 An implicit type conversion from char to signed long.
  • W0126 An implicit type conversion from char to unsigned long.
  • W0127 An implicit type conversion from char to float.
  • W0128 An implicit type conversion from char to double.
  • W0129 An implicit type conversion from char to long double.
  • W0130 An implicit type conversion from char to signed long long.

6.111.5 Since

1.0.0


Next: , Previous: W0131, Up: Messages

6.112 W0132

6.112.1 Message body

An implicit type conversion from unsigned char to char.

6.112.2 Content

Under construction.

6.112.3 Sample code

extern void foo(char a);

void bar(unsigned char a)
{
    char b = a; /* W0132 */
    foo(a); /* W0132 */
}

6.112.4 Related message

  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.112.5 Since

1.0.0


Next: , Previous: W0132, Up: Messages

6.113 W0133

6.113.1 Message body

An implicit type conversion from signed char to char.

6.113.2 Content

Under construction.

6.113.3 Sample code

extern void foo(char a);

void bar(signed char a)
{
    char b = a; /* W0133 */
    foo(a); /* W0133 */
}

6.113.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.113.5 Since

1.0.0


Next: , Previous: W0133, Up: Messages

6.114 W0134

6.114.1 Message body

An implicit type conversion from signed short to char.

6.114.2 Content

Under construction.

6.114.3 Sample code

extern void foo(char a);

void bar(short a)
{
    char b = a; /* W0134 */
    foo(a); /* W0134 */
}

6.114.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.114.5 Since

1.0.0


Next: , Previous: W0134, Up: Messages

6.115 W0135

6.115.1 Message body

An implicit type conversion from unsigned short to char.

6.115.2 Content

Under construction.

6.115.3 Sample code

extern void foo(char a);

void bar(unsigned short a)
{
    char b = a; /* W0135 */
    foo(a); /* W0135 */
}

6.115.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.115.5 Since

1.0.0


Next: , Previous: W0135, Up: Messages

6.116 W0136

6.116.1 Message body

An implicit type conversion from signed int to char.

6.116.2 Content

Under construction.

6.116.3 Sample code

extern void foo(char a);

void bar(int a)
{
    char b = a; /* W0136 */
    foo(a); /* W0136 */
}

6.116.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.116.5 Since

1.0.0


Next: , Previous: W0136, Up: Messages

6.117 W0137

6.117.1 Message body

An implicit type conversion from unsigned int to char.

6.117.2 Content

Under construction.

6.117.3 Sample code

extern void foo(char a);

void bar(unsigned int a)
{
    char b = a; /* W0137 */
    foo(a); /* W0137 */
}

6.117.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.117.5 Since

1.0.0


Next: , Previous: W0137, Up: Messages

6.118 W0138

6.118.1 Message body

An implicit type conversion from signed long to char.

6.118.2 Content

Under construction.

6.118.3 Sample code

extern void foo(char a);

void bar(long a)
{
    char b = a; /* W0138 */
    foo(a); /* W0138 */
}

6.118.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.118.5 Since

1.0.0


Next: , Previous: W0138, Up: Messages

6.119 W0139

6.119.1 Message body

An implicit type conversion from unsigned long to char.

6.119.2 Content

Under construction.

6.119.3 Sample code

extern void foo(char a);

void bar(unsigned long a)
{
    char b = a; /* W0139 */
    foo(a); /* W0139 */
}

6.119.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0140 An implicit type conversion from signed long long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.119.5 Since

1.0.0


Next: , Previous: W0139, Up: Messages

6.120 W0140

6.120.1 Message body

An implicit type conversion from signed long long to char.

6.120.2 Content

Under construction.

6.120.3 Sample code

extern void foo(char a);

void bar(long long a)
{
    char b = a; /* W0140 */
    foo(a); /* W0140 */
}

6.120.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0141 An implicit type conversion from unsigned long long to char.

6.120.5 Since

1.0.0


Next: , Previous: W0140, Up: Messages

6.121 W0141

6.121.1 Message body

An implicit type conversion from unsigned long long to char.

6.121.2 Content

Under construction.

6.121.3 Sample code

extern void foo(char a);

void bar(unsigned long long a)
{
    char b = a; /* W0141 */
    foo(a); /* W0141 */
}

6.121.4 Related message

  • W0132 An implicit type conversion from unsigned char to char.
  • W0133 An implicit type conversion from signed char to char.
  • W0134 An implicit type conversion from signed short to char.
  • W0135 An implicit type conversion from unsigned short to char.
  • W0136 An implicit type conversion from signed int to char.
  • W0137 An implicit type conversion from unsigned int to char.
  • W0138 An implicit type conversion from signed long to char.
  • W0139 An implicit type conversion from unsigned long to char.
  • W0140 An implicit type conversion from signed long long to char.

6.121.5 Since

1.0.0


Next: , Previous: W0141, Up: Messages

6.122 W0142

6.122.1 Message body

An implicit type conversion from unsigned char to signed char.

6.122.2 Content

Under construction.

6.122.3 Sample code

extern void foo(signed char a);

void bar(unsigned char a)
{
    signed char b = a; /* W0142 */
    foo(a); /* W0142 */
}

6.122.4 Related message

  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.122.5 Since

1.0.0


Next: , Previous: W0142, Up: Messages

6.123 W0143

6.123.1 Message body

An implicit type conversion from unsigned short to signed char.

6.123.2 Content

Under construction.

6.123.3 Sample code

extern void foo(signed char a);

void bar(unsigned short a)
{
    signed char b = a; /* W0143 */
    foo(a); /* W0143 */
}

6.123.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.123.5 Since

1.0.0


Next: , Previous: W0143, Up: Messages

6.124 W0144

6.124.1 Message body

An implicit type conversion from unsigned short to signed short.

6.124.2 Content

Under construction.

6.124.3 Sample code

extern void foo(short a);

void bar(unsigned short a)
{
    short b = a; /* W0144 */
    foo(a); /* W0144 */
}

6.124.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.124.5 Since

1.0.0


Next: , Previous: W0144, Up: Messages

6.125 W0145

6.125.1 Message body

An implicit type conversion from unsigned int to signed char.

6.125.2 Content

Under construction.

6.125.3 Sample code

extern void foo(signed char a);

void bar(unsigned int a)
{
    signed char b = a; /* W0145 */
    foo(a); /* W0145 */
}

6.125.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.125.5 Since

1.0.0


Next: , Previous: W0145, Up: Messages

6.126 W0146

6.126.1 Message body

An implicit type conversion from unsigned int to signed short.

6.126.2 Content

Under construction.

6.126.3 Sample code

extern void foo(short a);

void bar(unsigned int a)
{
    short b = a; /* W0146 */
    foo(a); /* W0146 */
}

6.126.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.126.5 Since

1.0.0


Next: , Previous: W0146, Up: Messages

6.127 W0147

6.127.1 Message body

An implicit type conversion from unsigned int to signed int.

6.127.2 Content

Under construction.

6.127.3 Sample code

extern void foo(int a);

void bar(unsigned int a)
{
    int b = a; /* W0147 */
    foo(a); /* W0147 */
}

6.127.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.127.5 Since

1.0.0


Next: , Previous: W0147, Up: Messages

6.128 W0148

6.128.1 Message body

An implicit type conversion from unsigned long to signed char.

6.128.2 Content

Under construction.

6.128.3 Sample code

extern void foo(signed char a);

void bar(unsigned long a)
{
    signed char b = a; /* W0148 */
    foo(a); /* W0148 */
}

6.128.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.128.5 Since

1.0.0


Next: , Previous: W0148, Up: Messages

6.129 W0149

6.129.1 Message body

An implicit type conversion from unsigned long to signed short.

6.129.2 Content

Under construction.

6.129.3 Sample code

extern void foo(short a);

void bar(unsigned long a)
{
    short b = a; /* W0149 */
    foo(a); /* W0149 */
}

6.129.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.129.5 Since

1.0.0


Next: , Previous: W0149, Up: Messages

6.130 W0150

6.130.1 Message body

An implicit type conversion from unsigned long to signed int.

6.130.2 Content

Under construction.

6.130.3 Sample code

extern void foo(int a);

void bar(unsigned long a)
{
    int b = a; /* W0150 */
    foo(a); /* W0150 */
}

6.130.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.130.5 Since

1.0.0


Next: , Previous: W0150, Up: Messages

6.131 W0151

6.131.1 Message body

An implicit type conversion from unsigned long to signed long.

6.131.2 Content

Under construction.

6.131.3 Sample code

extern void foo(long a);

void bar(unsigned long a)
{
    long b = a; /* W0151 */
    foo(a); /* W0151 */
}

6.131.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.131.5 Since

1.0.0


Next: , Previous: W0151, Up: Messages

6.132 W0152

6.132.1 Message body

An implicit type conversion from unsigned long long to signed char.

6.132.2 Content

Under construction.

6.132.3 Sample code

extern void foo(signed char a);

void bar(unsigned long long a)
{
    signed char b = a; /* W0152 */
    foo(a); /* W0152 */
}
.

6.132.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.132.5 Since

1.0.0


Next: , Previous: W0152, Up: Messages

6.133 W0153

6.133.1 Message body

An implicit type conversion from unsigned long long to signed short.

6.133.2 Content

Under construction.

6.133.3 Sample code

extern void foo(short a);

void bar(unsigned long long a)
{
    short b = a; /* W0153 */
    foo(a); /* W0153 */
}

6.133.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.133.5 Since

1.0.0


Next: , Previous: W0153, Up: Messages

6.134 W0154

6.134.1 Message body

An implicit type conversion from unsigned long long to signed int.

6.134.2 Content

Under construction.

6.134.3 Sample code

extern void foo(int a);

void bar(unsigned long long a)
{
    int b = a; /* W0154 */
    foo(a); /* W0154 */
}

6.134.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0155 An implicit type conversion from unsigned long long to signed long.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.134.5 Since

1.0.0


Next: , Previous: W0154, Up: Messages

6.135 W0155

6.135.1 Message body

An implicit type conversion from unsigned long long to signed long.

6.135.2 Content

Under construction.

6.135.3 Sample code

extern void foo(long a);

void bar(unsigned long long a)
{
    long b = a; /* W0155 */
    foo(a); /* W0155 */
}

6.135.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0156 An implicit type conversion from unsigned long long to signed long long.

6.135.5 Since

1.0.0


Next: , Previous: W0155, Up: Messages

6.136 W0156

6.136.1 Message body

An implicit type conversion from unsigned long long to signed long long.

6.136.2 Content

Under construction.

6.136.3 Sample code

extern void foo(long long a);

void bar(unsigned long long a)
{
    long long b = a; /* W0156 */
    foo(a); /* W0156 */
}

6.136.4 Related message

  • W0142 An implicit type conversion from unsigned char to signed char.
  • W0143 An implicit type conversion from unsigned short to signed char.
  • W0144 An implicit type conversion from unsigned short to signed short.
  • W0145 An implicit type conversion from unsigned int to signed char.
  • W0146 An implicit type conversion from unsigned int to signed short.
  • W0147 An implicit type conversion from unsigned int to signed int.
  • W0148 An implicit type conversion from unsigned long to signed char.
  • W0149 An implicit type conversion from unsigned long to signed short.
  • W0150 An implicit type conversion from unsigned long to signed int.
  • W0151 An implicit type conversion from unsigned long to signed long.
  • W0152 An implicit type conversion from unsigned long long to signed char.
  • W0153 An implicit type conversion from unsigned long long to signed short.
  • W0154 An implicit type conversion from unsigned long long to signed int.
  • W0155 An implicit type conversion from unsigned long long to signed long.

6.136.5 Since

1.0.0


Next: , Previous: W0156, Up: Messages

6.137 W0157

6.137.1 Message body

An implicit type conversion from signed char to unsigned char.

6.137.2 Content

Under construction.

6.137.3 Sample code

extern void foo(unsigned char a);

void bar(signed char a)
{
    unsigned char b = a; /* W0157 */
    foo(a); /* W0157 */
}

6.137.4 Related message

  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.137.5 Since

1.0.0


Next: , Previous: W0157, Up: Messages

6.138 W0158

6.138.1 Message body

An implicit type conversion from signed char to unsigned short.

6.138.2 Content

Under construction.

6.138.3 Sample code

extern void foo(unsigned short a);

void bar(signed char a)
{
    unsigned short b = a; /* W0158 */
    foo(a); /* W0158 */
}

6.138.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

Under construction.

6.138.5 Since

1.0.0


Next: , Previous: W0158, Up: Messages

6.139 W0159

6.139.1 Message body

An implicit type conversion from signed char to unsigned int.

6.139.2 Content

Under construction.

6.139.3 Sample code

extern void foo(unsigned int a);

void bar(signed char a)
{
    unsigned int b = a; /* W0159 */
    foo(a); /* W0159 */
}

6.139.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.139.5 Since

1.0.0


Next: , Previous: W0159, Up: Messages

6.140 W0160

6.140.1 Message body

An implicit type conversion from signed char to unsigned long.

6.140.2 Content

Under construction.

6.140.3 Sample code

extern void foo(unsigned long a);

void bar(signed char a)
{
    unsigned long b = a; /* W0160 */
    foo(a); /* W0160 */
}

6.140.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.140.5 Since

1.0.0


Next: , Previous: W0160, Up: Messages

6.141 W0161

6.141.1 Message body

An implicit type conversion from signed short to unsigned char.

6.141.2 Content

Under construction.

6.141.3 Sample code

extern void foo(unsigned char a);

void bar(short a)
{
    unsigned char b = a; /* W0161 */
    foo(a); /* W0161 */
}

6.141.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.141.5 Since

1.0.0


Next: , Previous: W0161, Up: Messages

6.142 W0162

6.142.1 Message body

An implicit type conversion from signed short to unsigned short.

6.142.2 Content

Under construction.

6.142.3 Sample code

extern void foo(unsigned short a);

void bar(short a)
{
    unsigned short b = a; /* W0162 */
    foo(a); /* W0162 */
}

6.142.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.142.5 Since

1.0.0


Next: , Previous: W0162, Up: Messages

6.143 W0163

6.143.1 Message body

An implicit type conversion from signed short to unsigned int.

6.143.2 Content

Under construction.

6.143.3 Sample code

extern void foo(unsigned int a);

void bar(short a)
{
    unsigned int b = a; /* W0163 */
    foo(a); /* W0163 */
}

6.143.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.143.5 Since

1.0.0


Next: , Previous: W0163, Up: Messages

6.144 W0164

6.144.1 Message body

An implicit type conversion from signed short to unsigned long.

6.144.2 Content

Under construction.

6.144.3 Sample code

extern void foo(unsigned long a);

void bar(short a)
{
    unsigned long b = a; /* W0164 */
    foo(a); /* W0164 */
}

6.144.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.144.5 Since

1.0.0


Next: , Previous: W0164, Up: Messages

6.145 W0165

6.145.1 Message body

Implicit conversion from `signed int' to `unsigned char'.

6.145.2 Content

Under construction.

6.145.3 Sample code

extern void foo(unsigned char a);

void bar(int a)
{
    unsigned char b = a; /* W0165 */
    foo(a); /* W0165 */
}

6.145.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.145.5 Since

1.0.0


Next: , Previous: W0165, Up: Messages

6.146 W0166

6.146.1 Message body

An implicit type conversion from signed int to unsigned short.

6.146.2 Content

Under construction.

6.146.3 Sample code

extern void foo(unsigned short a);

void bar(int a)
{
    unsigned short b = a; /* W0166 */
    foo(a); /* W0166 */
}

6.146.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.146.5 Since

1.0.0


Next: , Previous: W0166, Up: Messages

6.147 W0167

6.147.1 Message body

Implicit conversion from `signed int' to `unsigned int'.

6.147.2 Content

Under construction.

6.147.3 Sample code

extern void foo(unsigned int a);

void bar(int a)
{
    unsigned int b = a; /* W0167 */
    foo(a); /* W0167 */
}

6.147.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.147.5 Since

1.0.0


Next: , Previous: W0167, Up: Messages

6.148 W0168

6.148.1 Message body

An implicit type conversion from signed int to unsigned long.

6.148.2 Content

Under construction.

6.148.3 Sample code

extern void foo(unsigned long a);

void bar(int a)
{
    unsigned long b = a; /* W0168 */
    foo(a); /* W0168 */
}

6.148.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.148.5 Since

1.0.0


Next: , Previous: W0168, Up: Messages

6.149 W0169

6.149.1 Message body

An implicit type conversion from signed long to unsigned char.

6.149.2 Content

Under construction.

6.149.3 Sample code

extern void foo(unsigned char a);

void bar(long a)
{
    unsigned char b = a; /* W0169 */
    foo(a); /* W0169 */
}

6.149.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.149.5 Since

1.0.0


Next: , Previous: W0169, Up: Messages

6.150 W0170

6.150.1 Message body

An implicit type conversion from signed long to unsigned short.

6.150.2 Content

Under construction.

6.150.3 Sample code

extern void foo(unsigned short a);

void bar(long a)
{
    unsigned short b = a; /* W0170 */
    foo(a); /* W0170 */
}

6.150.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.150.5 Since

1.0.0


Next: , Previous: W0170, Up: Messages

6.151 W0171

6.151.1 Message body

An implicit type conversion from signed long to unsigned int.

6.151.2 Content

Under construction.

6.151.3 Sample code

extern void foo(unsigned int a);

void bar(long a)
{
    unsigned int b = a; /* W0171 */
    foo(a); /* W0171 */
}

6.151.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.151.5 Since

1.0.0


Next: , Previous: W0171, Up: Messages

6.152 W0172

6.152.1 Message body

An implicit type conversion from signed long to unsigned long.

6.152.2 Content

Under construction.

6.152.3 Sample code

extern void foo(unsigned long a);

void bar(long a)
{
    unsigned long b = a; /* W0172 */
    foo(a); /* W0172 */
}

6.152.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.152.5 Since

1.0.0


Next: , Previous: W0172, Up: Messages

6.153 W0173

6.153.1 Message body

An implicit type conversion from signed char to unsigned long long.

6.153.2 Content

Under construction.

6.153.3 Sample code

extern void foo(unsigned long long a);

void bar(signed char a)
{
    unsigned long long b = a; /* W0173 */
    foo(a); /* W0173 */
}

6.153.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.153.5 Since

1.0.0


Next: , Previous: W0173, Up: Messages

6.154 W0174

6.154.1 Message body

An implicit type conversion from signed short to unsigned long long.

6.154.2 Content

Under construction.

6.154.3 Sample code

extern void foo(unsigned long long a);

void bar(short a)
{
    unsigned long long b = a; /* W0174 */
    foo(a); /* W0174 */
}

6.154.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.154.5 Since

1.0.0


Next: , Previous: W0174, Up: Messages

6.155 W0175

6.155.1 Message body

An implicit type conversion from signed int to unsigned long long.

6.155.2 Content

Under construction.

6.155.3 Sample code

extern void foo(unsigned long long a);

void bar(int a)
{
    unsigned long long b = a; /* W0175 */
    foo(a); /* W0175 */
}

6.155.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.155.5 Since

1.0.0


Next: , Previous: W0175, Up: Messages

6.156 W0176

6.156.1 Message body

An implicit type conversion from signed long to unsigned long long.

6.156.2 Content

Under construction.

6.156.3 Sample code

extern void foo(unsigned long long a);

void bar(long a)
{
    unsigned long long b = a; /* W0176 */
    foo(a); /* W0176 */
}

6.156.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.156.5 Since

1.0.0


Next: , Previous: W0176, Up: Messages

6.157 W0177

6.157.1 Message body

An implicit type conversion from signed long long to unsigned char.

6.157.2 Content

Under construction.

6.157.3 Sample code

extern void foo(unsigned char a);

void bar(long long a)
{
    unsigned char b = a; /* W0177 */
    foo(a); /* W0177 */
}

6.157.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.157.5 Since

1.0.0


Next: , Previous: W0177, Up: Messages

6.158 W0178

6.158.1 Message body

An implicit type conversion from signed long long to unsigned short.

6.158.2 Content

Under construction.

6.158.3 Sample code

extern void foo(unsigned short a);

void bar(long long a)
{
    unsigned short b = a; /* W0178 */
    foo(a); /* W0178 */
}

6.158.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.158.5 Since

1.0.0


Next: , Previous: W0178, Up: Messages

6.159 W0179

6.159.1 Message body

An implicit type conversion from signed long long to unsigned int.

6.159.2 Content

Under construction.

6.159.3 Sample code

extern void foo(unsigned int a);

void bar(long long a)
{
    unsigned int b = a; /* W0179 */
    foo(a); /* W0179 */
}

6.159.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0180 An implicit type conversion from signed long long to unsigned long.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.159.5 Since

1.0.0


Next: , Previous: W0179, Up: Messages

6.160 W0180

6.160.1 Message body

An implicit type conversion from signed long long to unsigned long.

6.160.2 Content

Under construction.

6.160.3 Sample code

extern void foo(unsigned long a);

void bar(long long a)
{
    unsigned long b = a; /* W0180 */
    foo(a); /* W0180 */
}

6.160.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0181 An implicit type conversion from signed long long to unsigned long long.

6.160.5 Since

1.0.0


Next: , Previous: W0180, Up: Messages

6.161 W0181

6.161.1 Message body

An implicit type conversion from signed long long to unsigned long long.

6.161.2 Content

Under construction.

6.161.3 Sample code

extern void foo(unsigned long long a);

void bar(long long a)
{
    unsigned long long b = a; /* W0181 */
    foo(a); /* W0181 */
}

6.161.4 Related message

  • W0157 An implicit type conversion from signed char to unsigned char.
  • W0158 An implicit type conversion from signed char to unsigned short.
  • W0159 An implicit type conversion from signed char to unsigned int.
  • W0160 An implicit type conversion from signed char to unsigned long.
  • W0161 An implicit type conversion from signed short to unsigned char.
  • W0162 An implicit type conversion from signed short to unsigned short.
  • W0163 An implicit type conversion from signed short to unsigned int.
  • W0164 An implicit type conversion from signed short to unsigned long.
  • W0165 Implicit conversion from `signed int' to `unsigned char'.
  • W0166 An implicit type conversion from signed int to unsigned short.
  • W0167 Implicit conversion from `signed int' to `unsigned int'.
  • W0168 An implicit type conversion from signed int to unsigned long.
  • W0169 An implicit type conversion from signed long to unsigned char.
  • W0170 An implicit type conversion from signed long to unsigned short.
  • W0171 An implicit type conversion from signed long to unsigned int.
  • W0172 An implicit type conversion from signed long to unsigned long.
  • W0173 An implicit type conversion from signed char to unsigned long long.
  • W0174 An implicit type conversion from signed short to unsigned long long.
  • W0175 An implicit type conversion from signed int to unsigned long long.
  • W0176 An implicit type conversion from signed long to unsigned long long.
  • W0177 An implicit type conversion from signed long long to unsigned char.
  • W0178 An implicit type conversion from signed long long to unsigned short.
  • W0179 An implicit type conversion from signed long long to unsigned int.
  • W0180 An implicit type conversion from signed long long to unsigned long.

6.161.5 Since

1.0.0


Next: , Previous: W0181, Up: Messages

6.162 W0182

6.162.1 Message body

An implicit type conversion from unsigned char to float.

6.162.2 Content

Under construction.

6.162.3 Sample code

extern void foo(float a);

void bar(unsigned char a)
{
    float b = a; /* W0182 */
    foo(a); /* W0182 */
}

6.162.4 Related message

  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.162.5 Since

1.0.0


Next: , Previous: W0182, Up: Messages

6.163 W0183

6.163.1 Message body

An implicit type conversion from unsigned char to double.

6.163.2 Content

Under construction.

6.163.3 Sample code

extern void foo(double a);

void bar(unsigned char a)
{
    double b = a; /* W0183 */
    foo(a); /* W0183 */
}

6.163.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.163.5 Since

1.0.0


Next: , Previous: W0183, Up: Messages

6.164 W0184

6.164.1 Message body

An implicit type conversion from unsigned char to long double.

6.164.2 Content

Under construction.

6.164.3 Sample code

extern void foo(long double a);

void bar(unsigned char a)
{
    long double b = a; /* W0184 */
    foo(a); /* W0184 */
}

6.164.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.164.5 Since

1.0.0


Next: , Previous: W0184, Up: Messages

6.165 W0185

6.165.1 Message body

An implicit type conversion from signed char to float.

6.165.2 Content

Under construction.

6.165.3 Sample code

extern void foo(float a);

void bar(signed char a)
{
    float b = a; /* W0185 */
    foo(a); /* W0185 */
}

6.165.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.165.5 Since

1.0.0


Next: , Previous: W0185, Up: Messages

6.166 W0186

6.166.1 Message body

An implicit type conversion from signed char to double.

6.166.2 Content

Under construction.

6.166.3 Sample code

extern void foo(double a);

void bar(signed char a)
{
    double b = a; /* W0186 */
    foo(a); /* W0186 */
}

6.166.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.166.5 Since

1.0.0


Next: , Previous: W0186, Up: Messages

6.167 W0187

6.167.1 Message body

An implicit type conversion from signed char to long double.

6.167.2 Content

Under construction.

6.167.3 Sample code

extern void foo(long double a);

void bar(signed char a)
{
    long double b = a; /* W0187 */
    foo(a); /* W0187 */
}

6.167.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.167.5 Since

1.0.0


Next: , Previous: W0187, Up: Messages

6.168 W0188

6.168.1 Message body

An implicit type conversion from signed short to float.

6.168.2 Content

Under construction.

6.168.3 Sample code

extern void foo(float a);

void bar(short a)
{
    float b = a; /* W0188 */
    foo(a); /* W0188 */
}

6.168.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.168.5 Since

1.0.0


Next: , Previous: W0188, Up: Messages

6.169 W0189

6.169.1 Message body

An implicit type conversion from signed short to double.

6.169.2 Content

Under construction.

6.169.3 Sample code

extern void foo(double a);

void bar(short a)
{
    double b = a; /* W0189 */
    foo(a); /* W0189 */
}

6.169.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.169.5 Since

1.0.0


Next: , Previous: W0189, Up: Messages

6.170 W0190

6.170.1 Message body

An implicit type conversion from signed short to long double.

6.170.2 Content

Under construction.

6.170.3 Sample code

extern void foo(long double a);

void bar(short a)
{
    long double b = a; /* W0190 */
    foo(a); /* W0190 */
}

6.170.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.170.5 Since

1.0.0


Next: , Previous: W0190, Up: Messages

6.171 W0191

6.171.1 Message body

An implicit type conversion from unsigned short to float.

6.171.2 Content

Under construction.

6.171.3 Sample code

extern void foo(float a);

void bar(unsigned short a)
{
    float b = a; /* W0191 */
    foo(a); /* W0191 */
}

6.171.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.171.5 Since

1.0.0


Next: , Previous: W0191, Up: Messages

6.172 W0192

6.172.1 Message body

An implicit type conversion from unsigned short to double.

6.172.2 Content

Under construction.

6.172.3 Sample code

extern void foo(double a);

void bar(unsigned short a)
{
    double b = a; /* W0192 */
    foo(a); /* W0192 */
}

6.172.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.172.5 Since

1.0.0


Next: , Previous: W0192, Up: Messages

6.173 W0193

6.173.1 Message body

An implicit type conversion from unsigned short to long double.

6.173.2 Content

Under construction.

6.173.3 Sample code

extern void foo(long double a);

void bar(unsigned short a)
{
    long double b = a; /* W0193 */
    foo(a); /* W0193 */
}

6.173.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.173.5 Since

1.0.0


Next: , Previous: W0193, Up: Messages

6.174 W0194

6.174.1 Message body

An implicit type conversion from signed int to float.

6.174.2 Content

Under construction.

6.174.3 Sample code

extern void foo(float a);

void bar(int a)
{
    float b = a; /* W0194 */
    foo(a); /* W0194 */
}

6.174.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.174.5 Since

1.0.0


Next: , Previous: W0194, Up: Messages

6.175 W0195

6.175.1 Message body

An implicit type conversion from signed int to double.

6.175.2 Content

Under construction.

6.175.3 Sample code

extern void foo(double a);

void bar(int a)
{
    double b = a; /* W0195 */
    foo(a); /* W0195 */
}

6.175.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.175.5 Since

1.0.0


Next: , Previous: W0195, Up: Messages

6.176 W0196

6.176.1 Message body

An implicit type conversion from signed int to long double.

6.176.2 Content

Under construction.

6.176.3 Sample code

extern void foo(long double a);

void bar(int a)
{
    long double b = a; /* W0196 */
    foo(a); /* W0196 */
}

6.176.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.176.5 Since

1.0.0


Next: , Previous: W0196, Up: Messages

6.177 W0197

6.177.1 Message body

An implicit type conversion from unsigned int to float.

6.177.2 Content

Under construction.

6.177.3 Sample code

extern void foo(float a);

void bar(unsigned int a)
{
    float b = a; /* W0197 */
    foo(a); /* W0197 */
}

6.177.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.177.5 Since

1.0.0


Next: , Previous: W0197, Up: Messages

6.178 W0198

6.178.1 Message body

An implicit type conversion from unsigned int to double.

6.178.2 Content

Under construction.

6.178.3 Sample code

extern void foo(double a);

void bar(unsigned int a)
{
    double b = a; /* W0198 */
    foo(a); /* W0198 */
}

6.178.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.178.5 Since

1.0.0


Next: , Previous: W0198, Up: Messages

6.179 W0199

6.179.1 Message body

An implicit type conversion from unsigned int to long double.

6.179.2 Content

Under construction.

6.179.3 Sample code

extern void foo(long double a);

void bar(unsigned int a)
{
    long double b = a; /* W0199 */
    foo(a); /* W0199 */
}

6.179.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.179.5 Since

1.0.0


Next: , Previous: W0199, Up: Messages

6.180 W0200

6.180.1 Message body

An implicit type conversion from signed long to float.

6.180.2 Content

Under construction.

6.180.3 Sample code

extern void foo(float a);

void bar(long a)
{
    float b = a; /* W0200 */
    foo(a); /* W0200 */
}

6.180.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.180.5 Since

1.0.0


Next: , Previous: W0200, Up: Messages

6.181 W0201

6.181.1 Message body

An implicit type conversion from signed long to double.

6.181.2 Content

Under construction.

6.181.3 Sample code

extern void foo(double a);

void bar(long a)
{
    double b = a; /* W0201 */
    foo(a); /* W0201 */
}

6.181.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.181.5 Since

1.0.0


Next: , Previous: W0201, Up: Messages

6.182 W0202

6.182.1 Message body

An implicit type conversion from signed long to long double.

6.182.2 Content

Under construction.

6.182.3 Sample code

extern void foo(long double a);

void bar(long a)
{
    long double b = a; /* W0202 */
    foo(a); /* W0202 */
}

6.182.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.182.5 Since

1.0.0


Next: , Previous: W0202, Up: Messages

6.183 W0203

6.183.1 Message body

An implicit type conversion from unsigned long to float.

6.183.2 Content

Under construction.

6.183.3 Sample code

extern void foo(float a);

void bar(unsigned long a)
{
    float b = a; /* W0203 */
    foo(a); /* W0203 */
}

6.183.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.183.5 Since

1.0.0


Next: , Previous: W0203, Up: Messages

6.184 W0204

6.184.1 Message body

An implicit type conversion from unsigned long to double.

6.184.2 Content

Under construction.

6.184.3 Sample code

extern void foo(double a);

void bar(unsigned long a)
{
    double b = a; /* W0204 */
    foo(a); /* W0204 */
}

6.184.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.184.5 Since

1.0.0


Next: , Previous: W0204, Up: Messages

6.185 W0205

6.185.1 Message body

An implicit type conversion from unsigned long to long double.

6.185.2 Content

Under construction.

6.185.3 Sample code

extern void foo(long double a);

void bar(unsigned long a)
{
    long double b = a; /* W0205 */
    foo(a); /* W0205 */
}

6.185.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.185.5 Since

1.0.0


Next: , Previous: W0205, Up: Messages

6.186 W0206

6.186.1 Message body

An implicit type conversion from signed long long to float.

6.186.2 Content

Under construction.

6.186.3 Sample code

extern void foo(float a);

void bar(long long a)
{
    float b = a; /* W0206 */
    foo(a); /* W0206 */
}

6.186.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.186.5 Since

1.0.0


Next: , Previous: W0206, Up: Messages

6.187 W0207

6.187.1 Message body

An implicit type conversion from signed long long to double.

6.187.2 Content

Under construction.

6.187.3 Sample code

extern void foo(double a);

void bar(long long a)
{
    double b = a; /* W0207 */
    foo(a); /* W0207 */
}

6.187.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.187.5 Since

1.0.0


Next: , Previous: W0207, Up: Messages

6.188 W0208

6.188.1 Message body

An implicit type conversion from signed long long to long double.

6.188.2 Content

Under construction.

6.188.3 Sample code

extern void foo(long double a);

void bar(long long a)
{
    long double b = a; /* W0208 */
    foo(a); /* W0208 */
}

6.188.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.188.5 Since

1.0.0


Next: , Previous: W0208, Up: Messages

6.189 W0209

6.189.1 Message body

An implicit type conversion from unsigned long long to float.

6.189.2 Content

Under construction.

6.189.3 Sample code

extern void foo(float a);

void bar(unsigned long long a)
{
    float b = a; /* W0209 */
    foo(a); /* W0209 */
}

6.189.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0210 An implicit type conversion from unsigned long long to double.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.189.5 Since

1.0.0


Next: , Previous: W0209, Up: Messages

6.190 W0210

6.190.1 Message body

An implicit type conversion from unsigned long long to double.

6.190.2 Content

Under construction.

6.190.3 Sample code

extern void foo(double a);

void bar(unsigned long long a)
{
    double b = a; /* W0210 */
    foo(a); /* W0210 */
}

6.190.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0211 An implicit type conversion from unsigned long long to long double.

6.190.5 Since

1.0.0


Next: , Previous: W0210, Up: Messages

6.191 W0211

6.191.1 Message body

An implicit type conversion from unsigned long long to long double.

6.191.2 Content

Under construction.

6.191.3 Sample code

extern void foo(long double a);

void bar(unsigned long long a)
{
    long double b = a; /* W0211 */
    foo(a); /* W0211 */
}

6.191.4 Related message

  • W0182 An implicit type conversion from unsigned char to float.
  • W0183 An implicit type conversion from unsigned char to double.
  • W0184 An implicit type conversion from unsigned char to long double.
  • W0185 An implicit type conversion from signed char to float.
  • W0186 An implicit type conversion from signed char to double.
  • W0187 An implicit type conversion from signed char to long double.
  • W0188 An implicit type conversion from signed short to float.
  • W0189 An implicit type conversion from signed short to double.
  • W0190 An implicit type conversion from signed short to long double.
  • W0191 An implicit type conversion from unsigned short to float.
  • W0192 An implicit type conversion from unsigned short to double.
  • W0193 An implicit type conversion from unsigned short to long double.
  • W0194 An implicit type conversion from signed int to float.
  • W0195 An implicit type conversion from signed int to double.
  • W0196 An implicit type conversion from signed int to long double.
  • W0197 An implicit type conversion from unsigned int to float.
  • W0198 An implicit type conversion from unsigned int to double.
  • W0199 An implicit type conversion from unsigned int to long double.
  • W0200 An implicit type conversion from signed long to float.
  • W0201 An implicit type conversion from signed long to double.
  • W0202 An implicit type conversion from signed long to long double.
  • W0203 An implicit type conversion from unsigned long to float.
  • W0204 An implicit type conversion from unsigned long to double.
  • W0205 An implicit type conversion from unsigned long to long double.
  • W0206 An implicit type conversion from signed long long to float.
  • W0207 An implicit type conversion from signed long long to double.
  • W0208 An implicit type conversion from signed long long to long double.
  • W0209 An implicit type conversion from unsigned long long to float.
  • W0210 An implicit type conversion from unsigned long long to double.

6.191.5 Since

1.0.0


Next: , Previous: W0211, Up: Messages

6.192 W0212

6.192.1 Message body

An implicit type conversion from unsigned long long to long double.

6.192.2 Content

Under construction.

6.192.3 Sample code

extern void foo(char a);

void bar(float a)
{
    char b = a; /* W0212 */
    foo(a); /* W0212 */
}

6.192.4 Related message

  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.192.5 Since

1.0.0


Next: , Previous: W0212, Up: Messages

6.193 W0213

6.193.1 Message body

An implicit type conversion from float to signed char.

6.193.2 Content

Under construction.

6.193.3 Sample code

extern void foo(signed char a);

void bar(float a)
{
    signed char b = a; /* W0213 */
    foo(a); /* W0213 */
}

6.193.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.193.5 Since

1.0.0


Next: , Previous: W0213, Up: Messages

6.194 W0214

6.194.1 Message body

An implicit type conversion from float to unsigned char.

6.194.2 Content

Under construction.

6.194.3 Sample code

extern void foo(unsigned char a);

void bar(float a)
{
    unsigned char b = a; /* W0214 */
    foo(a); /* W0214 */
}

6.194.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.194.5 Since

1.0.0


Next: , Previous: W0214, Up: Messages

6.195 W0215

6.195.1 Message body

An implicit type conversion from float to signed short.

6.195.2 Content

Under construction.

6.195.3 Sample code

extern void foo(short a);

void bar(float a)
{
    short b = a; /* W0215 */
    foo(a); /* W0215 */
}

6.195.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.195.5 Since

1.0.0


Next: , Previous: W0215, Up: Messages

6.196 W0216

6.196.1 Message body

An implicit type conversion from float to unsigned short.

6.196.2 Content

Under construction.

6.196.3 Sample code

extern void foo(unsigned short a);

void bar(float a)
{
    unsigned short b = a; /* W0216 */
    foo(a); /* W0216 */
}

6.196.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.196.5 Since

1.0.0


Next: , Previous: W0216, Up: Messages

6.197 W0217

6.197.1 Message body

An implicit type conversion from float to signed int.

6.197.2 Content

Under construction.

6.197.3 Sample code

extern void foo(int a);

void bar(float a)
{
    int b = a; /* W0217 */
    foo(a); /* W0217 */
}

6.197.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.197.5 Since

1.0.0


Next: , Previous: W0217, Up: Messages

6.198 W0218

6.198.1 Message body

An implicit type conversion from float to unsigned int.

6.198.2 Content

Under construction.

6.198.3 Sample code

extern void foo(unsigned int a);

void bar(float a)
{
    unsigned int b = a; /* W0218 */
    foo(a); /* W0218 */
}

6.198.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.198.5 Since

1.0.0


Next: , Previous: W0218, Up: Messages

6.199 W0219

6.199.1 Message body

An implicit type conversion from float to signed long.

6.199.2 Content

Under construction.

6.199.3 Sample code

extern void foo(long a);

void bar(float a)
{
    long b = a; /* W0219 */
    foo(a); /* W0219 */
}

6.199.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.199.5 Since

1.0.0


Next: , Previous: W0219, Up: Messages

6.200 W0220

6.200.1 Message body

An implicit type conversion from float to unsigned long.

6.200.2 Content

Under construction.

6.200.3 Sample code

extern void foo(unsigned long a);

void bar(float a)
{
    unsigned long b = a; /* W0220 */
    foo(a); /* W0220 */
}

6.200.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.200.5 Since

1.0.0


Next: , Previous: W0220, Up: Messages

6.201 W0221

6.201.1 Message body

An implicit type conversion from double to char.

6.201.2 Content

Under construction.

6.201.3 Sample code

extern void foo(char a);

void bar(double a)
{
    char b = a; /* W0221 */
    foo(a); /* W0221 */
}

6.201.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.201.5 Since

1.0.0


Next: , Previous: W0221, Up: Messages

6.202 W0222

6.202.1 Message body

An implicit type conversion from double to signed char.

6.202.2 Content

Under construction.

6.202.3 Sample code

extern void foo(signed char a);

void bar(double a)
{
    signed char b = a; /* W0222 */
    foo(a); /* W0222 */
}

6.202.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.202.5 Since

1.0.0


Next: , Previous: W0222, Up: Messages

6.203 W0223

6.203.1 Message body

An implicit type conversion from double to unsigned char.

6.203.2 Content

Under construction.

6.203.3 Sample code

extern void foo(unsigned char a);

void bar(double a)
{
    unsigned char b = a; /* W0223 */
    foo(a); /* W0223 */
}

6.203.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.203.5 Since

1.0.0


Next: , Previous: W0223, Up: Messages

6.204 W0224

6.204.1 Message body

An implicit type conversion from double to signed short.

6.204.2 Content

Under construction.

6.204.3 Sample code

extern void foo(short a);

void bar(double a)
{
    short b = a; /* W0224 */
    foo(a); /* W0224 */
}

6.204.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.204.5 Since

1.0.0


Next: , Previous: W0224, Up: Messages

6.205 W0225

6.205.1 Message body

An implicit type conversion from double to unsigned short.

6.205.2 Content

Under construction.

6.205.3 Sample code

extern void foo(unsigned short a);

void bar(double a)
{
    unsigned short b = a; /* W0225 */
    foo(a); /* W0225 */
}

6.205.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.205.5 Since

1.0.0


Next: , Previous: W0225, Up: Messages

6.206 W0226

6.206.1 Message body

An implicit type conversion from double to signed int.

6.206.2 Content

Under construction.

6.206.3 Sample code

extern void foo(int a);

void bar(double a)
{
    int b = a; /* W0226 */
    foo(a); /* W0226 */
}

6.206.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.206.5 Since

1.0.0


Next: , Previous: W0226, Up: Messages

6.207 W0227

6.207.1 Message body

An implicit type conversion from double to unsigned int.

6.207.2 Content

Under construction.

6.207.3 Sample code

extern void foo(unsigned int a);

void bar(double a)
{
    unsigned int b = a; /* W0227 */
    foo(a); /* W0227 */
}

6.207.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.207.5 Since

1.0.0


Next: , Previous: W0227, Up: Messages

6.208 W0228

6.208.1 Message body

An implicit type conversion from double to signed long.

6.208.2 Content

Under construction.

6.208.3 Sample code

extern void foo(long a);

void bar(double a)
{
    long b = a; /* W0228 */
    foo(a); /* W0228 */
}

6.208.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.208.5 Since

1.0.0


Next: , Previous: W0228, Up: Messages

6.209 W0229

6.209.1 Message body

An implicit type conversion from double to unsigned long.

6.209.2 Content

Under construction.

6.209.3 Sample code

extern void foo(unsigned long a);

void bar(double a)
{
    unsigned long b = a; /* W0229 */
    foo(a); /* W0229 */
}

6.209.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.209.5 Since

1.0.0


Next: , Previous: W0229, Up: Messages

6.210 W0230

6.210.1 Message body

An implicit type conversion from long double to char.

6.210.2 Content

Under construction.

6.210.3 Sample code

extern void foo(char a);

void bar(long double a)
{
    char b = a; /* W0230 */
    foo(a); /* W0230 */
}

6.210.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.210.5 Since

1.0.0


Next: , Previous: W0230, Up: Messages

6.211 W0231

6.211.1 Message body

An implicit type conversion from long double to signed char.

6.211.2 Content

Under construction.

6.211.3 Sample code

extern void foo(signed char a);

void bar(long double a)
{
    signed char b = a; /* W0231 */
    foo(a); /* W0231 */
}

6.211.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.211.5 Since

1.0.0


Next: , Previous: W0231, Up: Messages

6.212 W0232

6.212.1 Message body

An implicit type conversion from long double to unsigned char.

6.212.2 Content

Under construction.

6.212.3 Sample code

extern void foo(unsigned char a);

void bar(long double a)
{
    unsigned char b = a; /* W0232 */
    foo(a); /* W0232 */
}

6.212.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.212.5 Since

1.0.0


Next: , Previous: W0232, Up: Messages

6.213 W0233

6.213.1 Message body

An implicit type conversion from long double to signed short.

6.213.2 Content

Under construction.

6.213.3 Sample code

extern void foo(short a);

void bar(long double a)
{
    short b = a; /* W0233 */
    foo(a); /* W0233 */
}

6.213.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.213.5 Since

1.0.0


Next: , Previous: W0233, Up: Messages

6.214 W0234

6.214.1 Message body

An implicit type conversion from long double to unsigned short.

6.214.2 Content

Under construction.

6.214.3 Sample code

extern void foo(unsigned short a);

void bar(long double a)
{
    unsigned short b = a; /* W0234 */
    foo(a); /* W0234 */
}

6.214.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.214.5 Since

1.0.0


Next: , Previous: W0234, Up: Messages

6.215 W0235

6.215.1 Message body

An implicit type conversion from long double to signed int.

6.215.2 Content

Under construction.

6.215.3 Sample code

extern void foo(int a);

void bar(long double a)
{
    int b = a; /* W0235 */
    foo(a); /* W0235 */
}

6.215.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.215.5 Since

1.0.0


Next: , Previous: W0235, Up: Messages

6.216 W0236

6.216.1 Message body

An implicit type conversion from long double to unsigned int.

6.216.2 Content

Under construction.

6.216.3 Sample code

extern void foo(unsigned int a);

void bar(long double a)
{
    unsigned int b = a; /* W0236 */
    foo(a); /* W0236 */
}

6.216.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.216.5 Since

1.0.0


Next: , Previous: W0236, Up: Messages

6.217 W0237

6.217.1 Message body

An implicit type conversion from long double to signed long.

6.217.2 Content

Under construction.

6.217.3 Sample code

extern void foo(long a);

void bar(long double a)
{
    long b = a; /* W0237 */
    foo(a); /* W0237 */
}

6.217.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.217.5 Since

1.0.0


Next: , Previous: W0237, Up: Messages

6.218 W0238

6.218.1 Message body

An implicit type conversion from long double to unsigned long.

6.218.2 Content

Under construction.

6.218.3 Sample code

extern void foo(unsigned long a);

void bar(long double a)
{
    unsigned long b = a; /* W0238 */
    foo(a); /* W0238 */
}

6.218.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.218.5 Since

1.0.0


Next: , Previous: W0238, Up: Messages

6.219 W0239

6.219.1 Message body

An implicit type conversion from float to signed long long.

6.219.2 Content

Under construction.

6.219.3 Sample code

extern void foo(long long a);

void bar(float a)
{
    long long b = a; /* W0239 */
    foo(a); /* W0239 */
}

6.219.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.219.5 Since

1.0.0


Next: , Previous: W0239, Up: Messages

6.220 W0240

6.220.1 Message body

An implicit type conversion from float to unsigned long long.

6.220.2 Content

Under construction.

6.220.3 Sample code

extern void foo(unsigned long long a);

void bar(float a)
{
    unsigned long long b = a; /* W0240 */
    foo(a); /* W0240 */
}

6.220.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.220.5 Since

1.0.0


Next: , Previous: W0240, Up: Messages

6.221 W0241

6.221.1 Message body

An implicit type conversion from double to signed long long.

6.221.2 Content

Under construction.

6.221.3 Sample code

extern void foo(long long a);

void bar(double a)
{
    long long b = a; /* W0241 */
    foo(a); /* W0241 */
}

6.221.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.221.5 Since

1.0.0


Next: , Previous: W0241, Up: Messages

6.222 W0242

6.222.1 Message body

An implicit type conversion from double to unsigned long long.

6.222.2 Content

Under construction.

6.222.3 Sample code

extern void foo(unsigned long long a);

void bar(double a)
{
    unsigned long long b = a; /* W0242 */
    foo(a); /* W0242 */
}

6.222.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0243 An implicit type conversion from long double to signed long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.222.5 Since

1.0.0


Next: , Previous: W0242, Up: Messages

6.223 W0243

6.223.1 Message body

An implicit type conversion from long double to signed long long.

6.223.2 Content

Under construction.

6.223.3 Sample code

extern void foo(long long a);

void bar(long double a)
{
    long long b = a; /* W0243 */
    foo(a); /* W0243 */
}

6.223.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0244 An implicit type conversion from long double to unsigned long long.

6.223.5 Since

1.0.0


Next: , Previous: W0243, Up: Messages

6.224 W0244

6.224.1 Message body

An implicit type conversion from long double to unsigned long long.

6.224.2 Content

Under construction.

6.224.3 Sample code

extern void foo(unsigned long long a);

void bar(long double a)
{
    unsigned long long b = a; /* W0244 */
    foo(a); /* W0244 */
}

6.224.4 Related message

  • W0212 An implicit type conversion from float to char.
  • W0213 An implicit type conversion from float to signed char.
  • W0214 An implicit type conversion from float to unsigned char.
  • W0215 An implicit type conversion from float to signed short.
  • W0216 An implicit type conversion from float to unsigned short.
  • W0217 An implicit type conversion from float to signed int.
  • W0218 An implicit type conversion from float to unsigned int.
  • W0219 An implicit type conversion from float to signed long.
  • W0220 An implicit type conversion from float to unsigned long.
  • W0221 An implicit type conversion from double to char.
  • W0222 An implicit type conversion from double to signed char.
  • W0223 An implicit type conversion from double to unsigned char.
  • W0224 An implicit type conversion from double to signed short.
  • W0225 An implicit type conversion from double to unsigned short.
  • W0226 An implicit type conversion from double to signed int.
  • W0227 An implicit type conversion from double to unsigned int.
  • W0228 An implicit type conversion from double to signed long.
  • W0229 An implicit type conversion from double to unsigned long.
  • W0230 An implicit type conversion from long double to char.
  • W0231 An implicit type conversion from long double to signed char.
  • W0232 An implicit type conversion from long double to unsigned char.
  • W0233 An implicit type conversion from long double to signed short.
  • W0234 An implicit type conversion from long double to unsigned short.
  • W0235 An implicit type conversion from long double to signed int.
  • W0236 An implicit type conversion from long double to unsigned int.
  • W0237 An implicit type conversion from long double to signed long.
  • W0238 An implicit type conversion from long double to unsigned long.
  • W0239 An implicit type conversion from float to signed long long.
  • W0240 An implicit type conversion from float to unsigned long long.
  • W0241 An implicit type conversion from double to signed long long.
  • W0242 An implicit type conversion from double to unsigned long long.
  • W0243 An implicit type conversion from long double to signed long long.

6.224.5 Since

1.0.0


Next: , Previous: W0244, Up: Messages

6.225 W0245

6.225.1 Message body

An implicit type conversion from unsigned char to signed short.

6.225.2 Content

Under construction.

6.225.3 Sample code

extern void foo(short a);

void bar(unsigned char a)
{
    short b = a; /* W0245 */
    foo(a); /* W0245 */
}

6.225.4 Related message

  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.225.5 Since

1.0.0


Next: , Previous: W0245, Up: Messages

6.226 W0246

6.226.1 Message body

Implicit conversion from `unsigned char' to `signed int'.

6.226.2 Content

Under construction.

6.226.3 Sample code

extern void foo(int a);

void bar(unsigned char a)
{
    int b = a; /* W0246 */
    foo(a); /* W0246 */
}

6.226.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.226.5 Since

1.0.0


Next: , Previous: W0246, Up: Messages

6.227 W0247

6.227.1 Message body

An implicit type conversion from unsigned char to signed long.

6.227.2 Content

Under construction.

6.227.3 Sample code

extern void foo(long a);

void bar(unsigned char a)
{
    long b = a; /* W0247 */
    foo(a); /* W0247 */
}

6.227.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.227.5 Since

1.0.0


Next: , Previous: W0247, Up: Messages

6.228 W0248

6.228.1 Message body

An implicit type conversion from unsigned short to signed int.

6.228.2 Content

Under construction.

6.228.3 Sample code

extern void foo(int a);

void bar(unsigned short a)
{
    int b = a; /* W0248 */
    foo(a); /* W0248 */
}

6.228.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.228.5 Since

1.0.0


Next: , Previous: W0248, Up: Messages

6.229 W0249

6.229.1 Message body

An implicit type conversion from unsigned short to signed long.

6.229.2 Content

Under construction.

6.229.3 Sample code

extern void foo(long a);

void bar(unsigned short a)
{
    long b = a; /* W0249 */
    foo(a); /* W0249 */
}

6.229.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.229.5 Since

1.0.0


Next: , Previous: W0249, Up: Messages

6.230 W0250

6.230.1 Message body

An implicit type conversion from unsigned int to signed long.

6.230.2 Content

Under construction.

6.230.3 Sample code

extern void foo(long a);

void bar(unsigned int a)
{
    long b = a; /* W0250 */
    foo(a); /* W0250 */
}

6.230.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.230.5 Since

1.0.0


Next: , Previous: W0250, Up: Messages

6.231 W0251

6.231.1 Message body

An implicit type conversion from unsigned char to signed long long.

6.231.2 Content

Under construction.

6.231.3 Sample code

extern void foo(long long a);

void bar(unsigned char a)
{
    long long b = a; /* W0251 */
    foo(a); /* W0251 */
}

6.231.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.231.5 Since

1.0.0


Next: , Previous: W0251, Up: Messages

6.232 W0252

6.232.1 Message body

An implicit type conversion from unsigned short to signed long long.

6.232.2 Content

Under construction.

6.232.3 Sample code

extern void foo(long long a);

void bar(unsigned short a)
{
    long long b = a; /* W0252 */
    foo(a); /* W0252 */
}

6.232.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.232.5 Since

1.0.0


Next: , Previous: W0252, Up: Messages

6.233 W0253

6.233.1 Message body

An implicit type conversion from unsigned int to signed long long.

6.233.2 Content

Under construction.

6.233.3 Sample code

extern void foo(long long a);

void bar(unsigned int a)
{
    long long b = a; /* W0253 */
    foo(a); /* W0253 */
}

6.233.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0254 An implicit type conversion from unsigned long to signed long long.

6.233.5 Since

1.0.0


Next: , Previous: W0253, Up: Messages

6.234 W0254

6.234.1 Message body

An implicit type conversion from unsigned long to signed long long.

6.234.2 Content

Under construction.

6.234.3 Sample code

extern void foo(long long a);

void bar(unsigned long a)
{
    long long b = a; /* W0254 */
    foo(a); /* W0254 */
}

6.234.4 Related message

  • W0245 An implicit type conversion from unsigned char to signed short.
  • W0246 Implicit conversion from `unsigned char' to `signed int'.
  • W0247 An implicit type conversion from unsigned char to signed long.
  • W0248 An implicit type conversion from unsigned short to signed int.
  • W0249 An implicit type conversion from unsigned short to signed long.
  • W0250 An implicit type conversion from unsigned int to signed long.
  • W0251 An implicit type conversion from unsigned char to signed long long.
  • W0252 An implicit type conversion from unsigned short to signed long long.
  • W0253 An implicit type conversion from unsigned int to signed long long.

6.234.5 Since

1.0.0


Next: , Previous: W0254, Up: Messages

6.235 W0255

6.235.1 Message body

A value of char type is returned from `signed char %s()' function.

6.235.2 Content

Under construction.

6.235.3 Sample code

signed char func(void)
{
    char a = 0;
    return a; /* W0255 */
}

6.235.4 Related message

  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.235.5 Since

1.0.0


Next: , Previous: W0255, Up: Messages

6.236 W0256

6.236.1 Message body

A value of char type is returned from `unsigned char %s()' function.

6.236.2 Content

Under construction.

6.236.3 Sample code

unsigned char func(void)
{
    char a = 0;
    return a; /* W0256 */
}

6.236.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.236.5 Since

1.0.0


Next: , Previous: W0256, Up: Messages

6.237 W0257

6.237.1 Message body

A value of char type is returned from `signed short %s()' function.

6.237.2 Content

Under construction.

6.237.3 Sample code

short func(void)
{
    char a = 0;
    return a; /* W0257 */
}

6.237.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.237.5 Since

1.0.0


Next: , Previous: W0257, Up: Messages

6.238 W0258

6.238.1 Message body

A value of char type is returned from `unsigned short %s()' function.

6.238.2 Content

Under construction.

6.238.3 Sample code

unsigned short func(void)
{
    char a = 0;
    return a; /* W0258 */
}

6.238.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.238.5 Since

1.0.0


Next: , Previous: W0258, Up: Messages

6.239 W0259

6.239.1 Message body

A value of char type is returned from `signed int %s()' function.

6.239.2 Content

Under construction.

6.239.3 Sample code

int func(void)
{
    char a = 0;
    return a; /* W0259 */
}

6.239.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.239.5 Since

1.0.0


Next: , Previous: W0259, Up: Messages

6.240 W0260

6.240.1 Message body

A value of char type is returned from `unsigned int %s()' function.

6.240.2 Content

Under construction.

6.240.3 Sample code

unsigned int func(void)
{
    char a = 0;
    return a; /* W0260 */
}

6.240.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.240.5 Since

1.0.0


Next: , Previous: W0260, Up: Messages

6.241 W0261

6.241.1 Message body

A value of char type is returned from `signed long %s()' function.

6.241.2 Content

Under construction.

6.241.3 Sample code

long func(void)
{
    char a = 0;
    return a; /* W0261 */
}

6.241.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.241.5 Since

1.0.0


Next: , Previous: W0261, Up: Messages

6.242 W0262

6.242.1 Message body

A value of char type is returned from `unsigned long %s()' function.

6.242.2 Content

Under construction.

6.242.3 Sample code

unsigned long func(void)
{
    char a = 0;
    return a; /* W0262 */
}

6.242.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.242.5 Since

1.0.0


Next: , Previous: W0262, Up: Messages

6.243 W0263

6.243.1 Message body

A value of char type is returned from `float %s()' function.

6.243.2 Content

Under construction.

6.243.3 Sample code

float func(void)
{
    char a = 0;
    return a; /* W0263 */
}

6.243.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.243.5 Since

1.0.0


Next: , Previous: W0263, Up: Messages

6.244 W0264

6.244.1 Message body

A value of char type is returned from `double %s()' function.

6.244.2 Content

Under construction.

6.244.3 Sample code

double func(void)
{
    char a = 0;
    return a; /* W0264 */
}

6.244.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.244.5 Since

1.0.0


Next: , Previous: W0264, Up: Messages

6.245 W0265

6.245.1 Message body

A value of char type is returned from `long double %s()' function.

6.245.2 Content

Under construction.

6.245.3 Sample code

long double func(void)
{
    char a = 0;
    return a; /* W0265 */
}

6.245.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.245.5 Since

1.0.0


Next: , Previous: W0265, Up: Messages

6.246 W0266

6.246.1 Message body

A value of char type is returned from `signed long long %s()' function.

6.246.2 Content

Under construction.

6.246.3 Sample code

long long func(void)
{
    char a = 0;
    return a; /* W0266 */
}

6.246.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0267 A value of char type is returned from `unsigned long long %s()' function.

6.246.5 Since

1.0.0


Next: , Previous: W0266, Up: Messages

6.247 W0267

6.247.1 Message body

A value of char type is returned from `unsigned long long %s()' function.

6.247.2 Content

Under construction.

6.247.3 Sample code

unsigned long long func(void)
{
    char a = 0;
    return a; /* W0267 */
}

6.247.4 Related message

  • W0255 A value of char type is returned from `signed char %s()' function.
  • W0256 A value of char type is returned from `unsigned char %s()' function.
  • W0257 A value of char type is returned from `signed short %s()' function.
  • W0258 A value of char type is returned from `unsigned short %s()' function.
  • W0259 A value of char type is returned from `signed int %s()' function.
  • W0260 A value of char type is returned from `unsigned int %s()' function.
  • W0261 A value of char type is returned from `signed long %s()' function.
  • W0262 A value of char type is returned from `unsigned long %s()' function.
  • W0263 A value of char type is returned from `float %s()' function.
  • W0264 A value of char type is returned from `double %s()' function.
  • W0265 A value of char type is returned from `long double %s()' function.
  • W0266 A value of char type is returned from `signed long long %s()' function.

6.247.5 Since

1.0.0


Next: , Previous: W0267, Up: Messages

6.248 W0268

6.248.1 Message body

A value of unsigned char type is returned from `char %s()' function.

6.248.2 Content

Under construction.

6.248.3 Sample code

char func(void)
{
    unsigned char a = 0;
    return a; /* W0268 */
}

6.248.4 Related message

  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.248.5 Since

1.0.0


Next: , Previous: W0268, Up: Messages

6.249 W0269

6.249.1 Message body

A value of signed char type is returned from `char %s()' function.

6.249.2 Content

Under construction.

6.249.3 Sample code

char func(void)
{
    signed char a = 0;
    return a; /* W0269 */
}

6.249.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.249.5 Since

1.0.0


Next: , Previous: W0269, Up: Messages

6.250 W0270

6.250.1 Message body

A value of signed short type is returned from `char %s()' function.

6.250.2 Content

Under construction.

6.250.3 Sample code

char func(void)
{
    short a = 0;
    return a; /* W0270 */
}

6.250.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.250.5 Since

1.0.0


Next: , Previous: W0270, Up: Messages

6.251 W0271

6.251.1 Message body

A value of unsigned short type is returned from `char %s()' function.

6.251.2 Content

Under construction.

6.251.3 Sample code

char func(void)
{
    unsigned short a = 0;
    return a; /* W0271 */
}

6.251.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.251.5 Since

1.0.0


Next: , Previous: W0271, Up: Messages

6.252 W0272

6.252.1 Message body

A value of signed int type is returned from `char %s()' function.

6.252.2 Content

Under construction.

6.252.3 Sample code

char func(void)
{
    int a = 0;
    return a; /* W0272 */
}

6.252.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.252.5 Since

1.0.0


Next: , Previous: W0272, Up: Messages

6.253 W0273

6.253.1 Message body

A value of unsigned int type is returned from `char %s()' function.

6.253.2 Content

Under construction.

6.253.3 Sample code

char func(void)
{
    unsigned int a = 0;
    return a; /* W0273 */
}

6.253.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.253.5 Since

1.0.0


Next: , Previous: W0273, Up: Messages

6.254 W0274

6.254.1 Message body

A value of signed long type is returned from `char %s()' function.

6.254.2 Content

6.254.3 Sample code

char func(void)
{
    long a = 0;
    return a; /* W0274 */
}

6.254.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.254.5 Since

1.0.0


Next: , Previous: W0274, Up: Messages

6.255 W0275

6.255.1 Message body

A value of unsigned long type is returned from `char %s()' function.

6.255.2 Content

Under construction.

6.255.3 Sample code

char func(void)
{
    unsigned long a = 0;
    return a; /* W0275 */
}

6.255.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.255.5 Since

1.0.0


Next: , Previous: W0275, Up: Messages

6.256 W0276

6.256.1 Message body

A value of signed long long type is returned from `char %s()' function.

6.256.2 Content

Under construction.

6.256.3 Sample code

char func(void)
{
    long long a = 0;
    return a; /* W0276 */
}

6.256.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0277 A value of unsigned long long type is returned from `char %s()' function.

6.256.5 Since

1.0.0


Next: , Previous: W0276, Up: Messages

6.257 W0277

6.257.1 Message body

A value of unsigned long long type is returned from `char %s()' function.

6.257.2 Content

Under construction.

6.257.3 Sample code

char func(void)
{
    unsigned long long a = 0;
    return a; /* W0277 */
}

6.257.4 Related message

  • W0268 A value of unsigned char type is returned from `char %s()' function.
  • W0269 A value of signed char type is returned from `char %s()' function.
  • W0270 A value of signed short type is returned from `char %s()' function.
  • W0271 A value of unsigned short type is returned from `char %s()' function.
  • W0272 A value of signed int type is returned from `char %s()' function.
  • W0273 A value of unsigned int type is returned from `char %s()' function.
  • W0274 A value of signed long type is returned from `char %s()' function.
  • W0275 A value of unsigned long type is returned from `char %s()' function.
  • W0276 A value of signed long long type is returned from `char %s()' function.

6.257.5 Since

1.0.0


Next: , Previous: W0277, Up: Messages

6.258 W0278

6.258.1 Message body

A value of unsigned char type is returned from `signed char %s()' function.

6.258.2 Content

Under construction.

6.258.3 Sample code

signed char func(void)
{
    unsigned char a = 0;
    return a; /* W0278 */
}

6.258.4 Related message

  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.258.5 Since

1.0.0


Next: , Previous: W0278, Up: Messages

6.259 W0279

6.259.1 Message body

A value of unsigned short type is returned from `signed char %s()' function.

6.259.2 Content

Under construction.

6.259.3 Sample code

signed char func(void)
{
    unsigned short a = 0;
    return a; /* W0279 */
}

6.259.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.259.5 Since

1.0.0


Next: , Previous: W0279, Up: Messages

6.260 W0280

6.260.1 Message body

A value of unsigned short type is returned from `signed short %s()' function.

6.260.2 Content

Under construction.

6.260.3 Sample code

short func(void)
{
    unsigned short a = 0;
    return a; /* W0280 */
}

6.260.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.260.5 Since

1.0.0


Next: , Previous: W0280, Up: Messages

6.261 W0281

6.261.1 Message body

A value of unsigned int type is returned from `signed char %s()' function.

6.261.2 Content

Under construction.

6.261.3 Sample code

signed char func(void)
{
    unsigned int a = 0;
    return a; /* W0281 */
}

6.261.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.261.5 Since

1.0.0


Next: , Previous: W0281, Up: Messages

6.262 W0282

6.262.1 Message body

A value of unsigned int type is returned from `signed short %s()' function.

6.262.2 Content

Under construction.

6.262.3 Sample code

short func(void)
{
    unsigned int a = 0;
    return a; /* W0282 */
}

6.262.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.262.5 Since

1.0.0


Next: , Previous: W0282, Up: Messages

6.263 W0283

6.263.1 Message body

A value of unsigned int type is returned from `signed int %s()' function.

6.263.2 Content

Under construction.

6.263.3 Sample code

int func(void)
{
    unsigned int a = 0;
    return a; /* W0283 */
}

6.263.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.263.5 Since

1.0.0


Next: , Previous: W0283, Up: Messages

6.264 W0284

6.264.1 Message body

A value of unsigned long type is returned from `signed char %s()' function.

6.264.2 Content

Under construction.

6.264.3 Sample code

signed char func(void)
{
    unsigned long a = 0;
    return a; /* W0284 */
}

6.264.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.264.5 Since

1.0.0


Next: , Previous: W0284, Up: Messages

6.265 W0285

6.265.1 Message body

A value of unsigned long type is returned from `signed short %s()' function.

6.265.2 Content

Under construction.

6.265.3 Sample code

short func(void)
{
    unsigned long a = 0;
    return a; /* W0285 */
}

6.265.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.265.5 Since

1.0.0


Next: , Previous: W0285, Up: Messages

6.266 W0286

6.266.1 Message body

A value of unsigned long type is returned from `signed int %s()' function.

6.266.2 Content

Under construction.

6.266.3 Sample code

int func(void)
{
    unsigned long a = 0;
    return a; /* W0286 */
}

6.266.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.266.5 Since

1.0.0


Next: , Previous: W0286, Up: Messages

6.267 W0287

6.267.1 Message body

A value of unsigned long type is returned from `signed long %s()' function.

6.267.2 Content

Under construction.

6.267.3 Sample code

long func(void)
{
    unsigned long a = 0;
    return a; /* W0287 */
}

6.267.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.267.5 Since

1.0.0


Next: , Previous: W0287, Up: Messages

6.268 W0288

6.268.1 Message body

A value of unsigned long long type is returned from `signed char %s()' function.

6.268.2 Content

Under construction.

6.268.3 Sample code

signed char func(void)
{
    unsigned long long a = 0;
    return a; /* W0288 */
}

6.268.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.268.5 Since

1.0.0


Next: , Previous: W0288, Up: Messages

6.269 W0289

6.269.1 Message body

A value of unsigned long long type is returned from `short %s()' function.

6.269.2 Content

Under construction.

6.269.3 Sample code

short func(void)
{
    unsigned long long a = 0;
    return a; /* W0289 */
}

6.269.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.269.5 Since

1.0.0


Next: , Previous: W0289, Up: Messages

6.270 W0290

6.270.1 Message body

A value of unsigned long long type is returned from `signed int %s()' function.

6.270.2 Content

Under construction.

6.270.3 Sample code

int func(void)
{
    unsigned long long a = 0;
    return a; /* W0290 */
}

6.270.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.270.5 Since

1.0.0


Next: , Previous: W0290, Up: Messages

6.271 W0291

6.271.1 Message body

A value of unsigned long long type is returned from `signed long %s()' function.

6.271.2 Content

Under construction.

6.271.3 Sample code

long func(void)
{
    unsigned long long a = 0;
    return a; /* W0291 */
}

6.271.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0292 A value of unsigned long long type is returned from `signed long long %s()' function.

6.271.5 Since

1.0.0


Next: , Previous: W0291, Up: Messages

6.272 W0292

6.272.1 Message body

A value of unsigned long long type is returned from `signed long long %s()' function.

6.272.2 Content

Under construction.

6.272.3 Sample code

long long func(void)
{
    unsigned long long a = 0;
    return a; /* W0292 */
}

6.272.4 Related message

  • W0278 A value of unsigned char type is returned from `signed char %s()' function.
  • W0279 A value of unsigned short type is returned from `signed char %s()' function.
  • W0280 A value of unsigned short type is returned from `signed short %s()' function.
  • W0281 A value of unsigned int type is returned from `signed char %s()' function.
  • W0282 A value of unsigned int type is returned from `signed short %s()' function.
  • W0283 A value of unsigned int type is returned from `signed int %s()' function.
  • W0284 A value of unsigned long type is returned from `signed char %s()' function.
  • W0285 A value of unsigned long type is returned from `signed short %s()' function.
  • W0286 A value of unsigned long type is returned from `signed int %s()' function.
  • W0287 A value of unsigned long type is returned from `signed long %s()' function.
  • W0288 A value of unsigned long long type is returned from `signed char %s()' function.
  • W0289 A value of unsigned long long type is returned from `signed short %s()' function.
  • W0290 A value of unsigned long long type is returned from `signed int %s()' function.
  • W0291 A value of unsigned long long type is returned from `signed long %s()' function.

6.272.5 Since

1.0.0


Next: , Previous: W0292, Up: Messages

6.273 W0293

6.273.1 Message body

A value of signed char type is returned from `unsigned char %s()' function.

6.273.2 Content

Under construction.

6.273.3 Sample code

unsigned char func(void)
{
    signed char a = 0;
    return a; /* W0293 */
}

6.273.4 Related message

  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.273.5 Since

1.0.0


Next: , Previous: W0293, Up: Messages

6.274 W0294

6.274.1 Message body

A value of signed char type is returned from `unsigned short %s()' function.

6.274.2 Content

Under construction.

6.274.3 Sample code

unsigned short func(void)
{
    signed char a = 0;
    return a; /* W0294 */
}

6.274.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.274.5 Since

1.0.0


Next: , Previous: W0294, Up: Messages

6.275 W0295

6.275.1 Message body

A value of signed char type is returned from `unsigned int %s()' function.

6.275.2 Content

Under construction.

6.275.3 Sample code

unsigned int func(void)
{
    signed char a = 0;
    return a; /* W0295 */
}

6.275.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.275.5 Since

1.0.0


Next: , Previous: W0295, Up: Messages

6.276 W0296

6.276.1 Message body

A value of signed char type is returned from `unsigned long %s()' function.

6.276.2 Content

Under construction.

6.276.3 Sample code

unsigned long func(void)
{
    signed char a = 0;
    return a; /* W0296 */
}

6.276.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.276.5 Since

1.0.0


Next: , Previous: W0296, Up: Messages

6.277 W0297

6.277.1 Message body

A value of signed short type is returned from `unsigned char %s()' function.

6.277.2 Content

Under construction.

6.277.3 Sample code

unsigned char func(void)
{
    short a = 0;
    return a; /* W0297 */
}

6.277.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.277.5 Since

1.0.0


Next: , Previous: W0297, Up: Messages

6.278 W0298

6.278.1 Message body

A value of short type is returned from `unsigned short %s()' function.

6.278.2 Content

Under construction.

6.278.3 Sample code

unsigned short func(void)
{
    short a = 0;
    return a; /* W0298 */
}

6.278.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.278.5 Since

1.0.0


Next: , Previous: W0298, Up: Messages

6.279 W0299

6.279.1 Message body

A value of signed short type is returned from `unsigned int %s()' function.

6.279.2 Content

Under construction.

6.279.3 Sample code

unsigned int func(void)
{
    short a = 0;
    return a; /* W0299 */
}

6.279.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.279.5 Since

1.0.0


Next: , Previous: W0299, Up: Messages

6.280 W0300

6.280.1 Message body

A value of signed short type is returned from `unsigned long %s()' function.

6.280.2 Content

Under construction.

6.280.3 Sample code

unsigned long func(void)
{
    short a = 0;
    return a; /* W0300 */
}

6.280.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.280.5 Since

1.0.0


Next: , Previous: W0300, Up: Messages

6.281 W0301

6.281.1 Message body

A value of signed int type is returned from `unsigned char %s()' function.

6.281.2 Content

Under construction.

6.281.3 Sample code

unsigned char func(void)
{
    int a = 0;
    return a; /* W0301 */
}

6.281.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.281.5 Since

1.0.0


Next: , Previous: W0301, Up: Messages

6.282 W0302

6.282.1 Message body

A value of signed int type is returned from `unsigned short %s()' function.

6.282.2 Content

Under construction.

6.282.3 Sample code

unsigned short func(void)
{
    int a = 0;
    return a; /* W0302 */
}

6.282.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.282.5 Since

1.0.0


Next: , Previous: W0302, Up: Messages

6.283 W0303

6.283.1 Message body

A value of signed int type is returned from `unsigned int %s()' function.

6.283.2 Content

Under construction.

6.283.3 Sample code

unsigned int func(void)
{
    int a = 0;
    return a; /* W0303 */
}

6.283.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.283.5 Since

1.0.0


Next: , Previous: W0303, Up: Messages

6.284 W0304

6.284.1 Message body

A value of signed int type is returned from `unsigned long %s()' function.

6.284.2 Content

Under construction.

6.284.3 Sample code

unsigned long func(void)
{
    int a = 0;
    return a; /* W0304 */
}

6.284.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.284.5 Since

1.0.0


Next: , Previous: W0304, Up: Messages

6.285 W0305

6.285.1 Message body

A value of signed long type is returned from `unsigned char %s()' function.

6.285.2 Content

Under construction.

6.285.3 Sample code

unsigned char func(void)
{
    long a = 0;
    return a; /* W0305 */
}

6.285.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.285.5 Since

1.0.0


Next: , Previous: W0305, Up: Messages

6.286 W0306

6.286.1 Message body

A value of signed long type is returned from `unsigned short %s()' function.

6.286.2 Content

Under construction.

6.286.3 Sample code

unsigned short func(void)
{
    long a = 0;
    return a; /* W0306 */
}

6.286.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.286.5 Since

1.0.0


Next: , Previous: W0306, Up: Messages

6.287 W0307

6.287.1 Message body

A value of signed long type is returned from `unsigned int %s()' function.

6.287.2 Content

Under construction.

6.287.3 Sample code

unsigned int func(void)
{
    long a = 0;
    return a; /* W0307 */
}

6.287.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.287.5 Since

1.0.0


Next: , Previous: W0307, Up: Messages

6.288 W0308

6.288.1 Message body

A value of signed long type is returned from `unsigned long %s()' function.

6.288.2 Content

Under construction.

6.288.3 Sample code

unsigned long func(void)
{
    long a = 0;
    return a; /* W0308 */
}

6.288.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.288.5 Since

1.0.0


Next: , Previous: W0308, Up: Messages

6.289 W0309

6.289.1 Message body

A value of signed char type is returned from `unsigned long long %s()' function.

6.289.2 Content

Under construction.

6.289.3 Sample code

unsigned long long func(void)
{
    signed char a = 0;
    return a; /* W0309 */
}

6.289.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.289.5 Since

1.0.0


Next: , Previous: W0309, Up: Messages

6.290 W0310

6.290.1 Message body

A value of signed short type is returned from `unsigned long long %s()' function.

6.290.2 Content

Under construction.

6.290.3 Sample code

unsigned long long func(void)
{
    short a = 0;
    return a; /* W0310 */
}

6.290.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.290.5 Since

1.0.0


Next: , Previous: W0310, Up: Messages

6.291 W0311

6.291.1 Message body

A value of signed int type is returned from `unsigned long long %s()' function.

6.291.2 Content

Under construction.

6.291.3 Sample code

unsigned long long func(void)
{
    int a = 0;
    return a; /* W0311 */
}

6.291.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.291.5 Since

1.0.0


Next: , Previous: W0311, Up: Messages

6.292 W0312

6.292.1 Message body

A value of signed long type is returned from `unsigned long long %s()' function.

6.292.2 Content

Under construction.

6.292.3 Sample code

unsigned long long func(void)
{
    long a = 0;
    return a; /* W0312 */
}

6.292.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.292.5 Since

1.0.0


Next: , Previous: W0312, Up: Messages

6.293 W0313

6.293.1 Message body

A value of signed long long type is returned from `unsigned char %s()' function.

6.293.2 Content

Under construction.

6.293.3 Sample code

unsigned char func(void)
{
    long long a = 0;
    return a; /* W0313 */
}

6.293.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.293.5 Since

1.0.0


Next: , Previous: W0313, Up: Messages

6.294 W0314

6.294.1 Message body

A value of signed long long type is returned from `unsigned short %s()' function.

6.294.2 Content

Under construction.

6.294.3 Sample code

unsigned short func(void)
{
    long long a = 0;
    return a; /* W0314 */
}

6.294.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.294.5 Since

1.0.0


Next: , Previous: W0314, Up: Messages

6.295 W0315

6.295.1 Message body

A value of signed long long type is returned from `unsigned int %s()' function.

6.295.2 Content

Under construction.

6.295.3 Sample code

unsigned int func(void)
{
    long long a = 0;
    return a; /* W0315 */
}

6.295.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.295.5 Since

1.0.0


Next: , Previous: W0315, Up: Messages

6.296 W0316

6.296.1 Message body

A value of signed long long type is returned from `unsigned long %s()' function.

6.296.2 Content

Under construction.

6.296.3 Sample code

unsigned long func(void)
{
    long long a = 0;
    return a; /* W0316 */
}

6.296.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0317 A value of signed long long type is returned from `unsigned long long %s()' function.

6.296.5 Since

1.0.0


Next: , Previous: W0316, Up: Messages

6.297 W0317

6.297.1 Message body

A value of signed long long type is returned from `unsigned long long %s()' function.

6.297.2 Content

Under construction.

6.297.3 Sample code

unsigned long long func(void)
{
    long long a = 0;
    return a; /* W0317 */
}

6.297.4 Related message

  • W0293 A value of signed char type is returned from `unsigned char %s()' function.
  • W0294 A value of signed char type is returned from `unsigned short %s()' function.
  • W0295 A value of signed char type is returned from `unsigned int %s()' function.
  • W0296 A value of signed char type is returned from `unsigned long %s()' function.
  • W0297 A value of signed short type is returned from `unsigned char %s()' function.
  • W0298 A value of signed short type is returned from `unsigned short %s()' function.
  • W0299 A value of signed short type is returned from `unsigned int %s()' function.
  • W0300 A value of signed short type is returned from `unsigned long %s()' function.
  • W0301 A value of signed int type is returned from `unsigned char %s()' function.
  • W0302 A value of signed int type is returned from `unsigned short %s()' function.
  • W0303 A value of signed int type is returned from `unsigned int %s()' function.
  • W0304 A value of signed int type is returned from `unsigned long %s()' function.
  • W0305 A value of signed long type is returned from `unsigned char %s()' function.
  • W0306 A value of signed long type is returned from `unsigned short %s()' function.
  • W0307 A value of signed long type is returned from `unsigned int %s()' function.
  • W0308 A value of signed long type is returned from `unsigned long %s()' function.
  • W0309 A value of signed char type is returned from `unsigned long long %s()' function.
  • W0310 A value of signed short type is returned from `unsigned long long %s()' function.
  • W0311 A value of signed int type is returned from `unsigned long long %s()' function.
  • W0312 A value of signed long type is returned from `unsigned long long %s()' function.
  • W0313 A value of signed long long type is returned from `unsigned char %s()' function.
  • W0314 A value of signed long long type is returned from `unsigned short %s()' function.
  • W0315 A value of signed long long type is returned from `unsigned int %s()' function.
  • W0316 A value of signed long long type is returned from `unsigned long %s()' function.

6.297.5 Since

1.0.0


Next: , Previous: W0317, Up: Messages

6.298 W0318

6.298.1 Message body

A value of unsigned char type is returned from `float %s()' function.

6.298.2 Content

Under construction.

6.298.3 Sample code

float func(void)
{
    unsigned char a = 0;
    return a; /* W0318 */
}

6.298.4 Related message

  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.298.5 Since

1.0.0


Next: , Previous: W0318, Up: Messages

6.299 W0319

6.299.1 Message body

A value of unsigned char type is returned from `double %s()' function.

6.299.2 Content

Under construction.

6.299.3 Sample code

double func(void)
{
    unsigned char a = 0;
    return a; /* W0319 */
}

6.299.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.299.5 Since

1.0.0


Next: , Previous: W0319, Up: Messages

6.300 W0320

6.300.1 Message body

A value of unsigned char type is returned from `long double %s()' function.

6.300.2 Content

Under construction.

6.300.3 Sample code

long double func(void)
{
    unsigned char a = 0;
    return a; /* W0320 */
}

6.300.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.300.5 Since

1.0.0


Next: , Previous: W0320, Up: Messages

6.301 W0321

6.301.1 Message body

A value of signed char type is returned from `float %s()' function.

6.301.2 Content

Under construction.

6.301.3 Sample code

float func(void)
{
    unsigned char a = 0;
    return a; /* W0321 */
}

6.301.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.301.5 Since

1.0.0


Next: , Previous: W0321, Up: Messages

6.302 W0322

6.302.1 Message body

A value of signed char type is returned from `double %s()' function.

6.302.2 Content

Under construction.

6.302.3 Sample code

double func(void)
{
    unsigned char a = 0;
    return a; /* W0322 */
}

6.302.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.302.5 Since

1.0.0


Next: , Previous: W0322, Up: Messages

6.303 W0323

6.303.1 Message body

A value of signed char type is returned from `long double %s()' function.

6.303.2 Content

Under construction.

6.303.3 Sample code

long double func(void)
{
    unsigned char a = 0;
    return a; /* W0323 */
}

6.303.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.303.5 Since

1.0.0


Next: , Previous: W0323, Up: Messages

6.304 W0324

6.304.1 Message body

A value of signed short type is returned from `float %s()' function.

6.304.2 Content

Under construction.

6.304.3 Sample code

float func(void)
{
    short a = 0;
    return a; /* W0324 */
}

6.304.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.304.5 Since

1.0.0


Next: , Previous: W0324, Up: Messages

6.305 W0325

6.305.1 Message body

A value of signed short type is returned from `double %s()' function.

6.305.2 Content

Under construction.

6.305.3 Sample code

double func(void)
{
    short a = 0;
    return a; /* W0325 */
}

6.305.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.305.5 Since

1.0.0


Next: , Previous: W0325, Up: Messages

6.306 W0326

6.306.1 Message body

A value of signed short type is returned from `long double %s()' function.

6.306.2 Content

Under construction.

6.306.3 Sample code

long double func(void)
{
    short a = 0;
    return a; /* W0326 */
}

6.306.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.306.5 Since

1.0.0


Next: , Previous: W0326, Up: Messages

6.307 W0327

6.307.1 Message body

A value of unsigned short type is returned from `float %s()' function.

6.307.2 Content

Under construction.

6.307.3 Sample code

float func(void)
{
    unsigned short a = 0;
    return a; /* W0327 */
}

6.307.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.307.5 Since

1.0.0


Next: , Previous: W0327, Up: Messages

6.308 W0328

6.308.1 Message body

A value of unsigned short type is returned from `double %s()' function.

6.308.2 Content

Under construction.

6.308.3 Sample code

double func(void)
{
    unsigned short a = 0;
    return a; /* W0328 */
}

6.308.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.308.5 Since

1.0.0


Next: , Previous: W0328, Up: Messages

6.309 W0329

6.309.1 Message body

A value of unsigned short type is returned from `long double %s()' function.

6.309.2 Content

Under construction.

6.309.3 Sample code

long double func(void)
{
    unsigned short a = 0;
    return a; /* W0329 */
}

6.309.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.309.5 Since

1.0.0


Next: , Previous: W0329, Up: Messages

6.310 W0330

6.310.1 Message body

A value of signed int type is returned from `float %s()' function.

6.310.2 Content

Under construction.

6.310.3 Sample code

float func(void)
{
    int a = 0;
    return a; /* W0330 */
}

6.310.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.310.5 Since

1.0.0


Next: , Previous: W0330, Up: Messages

6.311 W0331

6.311.1 Message body

A value of signed int type is returned from `double %s()' function.

6.311.2 Content

Under construction.

6.311.3 Sample code

double func(void)
{
    int a = 0;
    return a; /* W0331 */
}

6.311.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.311.5 Since

1.0.0


Next: , Previous: W0331, Up: Messages

6.312 W0332

6.312.1 Message body

A value of signed int type is returned from `long double %s()' function.

6.312.2 Content

Under construction.

6.312.3 Sample code

long double func(void)
{
    int a = 0;
    return a; /* W0332 */
}

6.312.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.312.5 Since

1.0.0


Next: , Previous: W0332, Up: Messages

6.313 W0333

6.313.1 Message body

A value of unsigned int type is returned from `float %s()' function.

6.313.2 Content

Under construction.

6.313.3 Sample code

float func(void)
{
    unsigned int a = 0;
    return a; /* W0333 */
}

6.313.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.313.5 Since

1.0.0


Next: , Previous: W0333, Up: Messages

6.314 W0334

6.314.1 Message body

A value of unsigned int type is returned from `double %s()' function.

6.314.2 Content

Under construction.

6.314.3 Sample code

double func(void)
{
    unsigned int a = 0;
    return a; /* W0334 */
}

6.314.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.314.5 Since

1.0.0


Next: , Previous: W0334, Up: Messages

6.315 W0335

6.315.1 Message body

A value of unsigned int type is returned from `long double %s()' function.

6.315.2 Content

Under construction.

6.315.3 Sample code

long double func(void)
{
    unsigned int a = 0;
    return a; /* W0335 */
}

6.315.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.315.5 Since

1.0.0


Next: , Previous: W0335, Up: Messages

6.316 W0336

6.316.1 Message body

A value of signed long type is returned from `float %s()' function.

6.316.2 Content

Under construction.

6.316.3 Sample code

float func(void)
{
    long a = 0;
    return a; /* W0336 */
}

6.316.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.316.5 Since

1.0.0


Next: , Previous: W0336, Up: Messages

6.317 W0337

6.317.1 Message body

A value of signed long type is returned from `double %s()' function.

6.317.2 Content

Under construction.

6.317.3 Sample code

double func(void)
{
    long a = 0;
    return a; /* W0337 */
}

6.317.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.317.5 Since

1.0.0


Next: , Previous: W0337, Up: Messages

6.318 W0338

6.318.1 Message body

A value of signed long type is returned from `long double %s()' function.

6.318.2 Content

Under construction.

6.318.3 Sample code

long double func(void)
{
    long a = 0;
    return a; /* W0338 */
}

6.318.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.318.5 Since

1.0.0


Next: , Previous: W0338, Up: Messages

6.319 W0339

6.319.1 Message body

A value of unsigned long type is returned from `float %s()' function.

6.319.2 Content

Under construction.

6.319.3 Sample code

float func(void)
{
    unsigned long a = 0;
    return a; /* W0339 */
}

6.319.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.319.5 Since

1.0.0


Next: , Previous: W0339, Up: Messages

6.320 W0340

6.320.1 Message body

A value of unsigned long type is returned from `double %s()' function.

6.320.2 Content

Under construction.

6.320.3 Sample code

double func(void)
{
    unsigned long a = 0;
    return a; /* W0340 */
}

6.320.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.320.5 Since

1.0.0


Next: , Previous: W0340, Up: Messages

6.321 W0341

6.321.1 Message body

A value of unsigned long type is returned from `long double %s()' function.

6.321.2 Content

Under construction.

6.321.3 Sample code

long double func(void)
{
    unsigned long a = 0;
    return a; /* W0341 */
}

6.321.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.321.5 Since

1.0.0


Next: , Previous: W0341, Up: Messages

6.322 W0342

6.322.1 Message body

A value of signed long long type is returned from `float %s()' function.

6.322.2 Content

Under construction.

6.322.3 Sample code

float func(void)
{
    long long a = 0;
    return a; /* W0342 */
}

6.322.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.322.5 Since

1.0.0


Next: , Previous: W0342, Up: Messages

6.323 W0343

6.323.1 Message body

A value of signed long long type is returned from `double %s()' function.

6.323.2 Content

Under construction.

6.323.3 Sample code

double func(void)
{
    long long a = 0;
    return a; /* W0343 */
}

6.323.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.323.5 Since

1.0.0


Next: , Previous: W0343, Up: Messages

6.324 W0344

6.324.1 Message body

A value of signed long long type is returned from `long double %s()' function.

6.324.2 Content

Under construction.

6.324.3 Sample code

long double func(void)
{
    long long a = 0;
    return a; /* W0344 */
}

6.324.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.324.5 Since

1.0.0


Next: , Previous: W0344, Up: Messages

6.325 W0345

6.325.1 Message body

A value of unsigned long long type is returned from `float %s()' function.

6.325.2 Content

Under construction.

6.325.3 Sample code

float func(void)
{
    unsigned long long a = 0;
    return a; /* W0345 */
}

6.325.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.325.5 Since

1.0.0


Next: , Previous: W0345, Up: Messages

6.326 W0346

6.326.1 Message body

A value of unsigned long long type is returned from `double %s()' function.

6.326.2 Content

Under construction.

6.326.3 Sample code

double func(void)
{
    unsigned long long a = 0;
    return a; /* W0346 */
}

6.326.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0347 A value of unsigned long long type is returned from `long double %s()' function.

6.326.5 Since

1.0.0


Next: , Previous: W0346, Up: Messages

6.327 W0347

6.327.1 Message body

A value of unsigned long long type is returned from `long double %s()' function.

6.327.2 Content

Under construction.

6.327.3 Sample code

long double func(void)
{
    unsigned long long a = 0;
    return a; /* W0347 */
}

6.327.4 Related message

  • W0318 A value of unsigned char type is returned from `float %s()' function.
  • W0319 A value of unsigned char type is returned from `double %s()' function.
  • W0320 A value of unsigned char type is returned from `long double %s()' function.
  • W0321 A value of signed char type is returned from `float %s()' function.
  • W0322 A value of signed char type is returned from `double %s()' function.
  • W0323 A value of signed char type is returned from `long double %s()' function.
  • W0324 A value of signed short type is returned from `float %s()' function.
  • W0325 A value of signed short type is returned from `double %s()' function.
  • W0326 A value of signed short type is returned from `long double %s()' function.
  • W0327 A value of unsigned short type is returned from `float %s()' function.
  • W0328 A value of unsigned short type is returned from `double %s()' function.
  • W0329 A value of unsigned short type is returned from `long double %s()' function.
  • W0330 A value of signed int type is returned from `float %s()' function.
  • W0331 A value of signed int type is returned from `double %s()' function.
  • W0332 A value of signed int type is returned from `long double %s()' function.
  • W0333 A value of unsigned int type is returned from `float %s()' function.
  • W0334 A value of unsigned int type is returned from `double %s()' function.
  • W0335 A value of unsigned int type is returned from `long double %s()' function.
  • W0336 A value of signed long type is returned from `float %s()' function.
  • W0337 A value of signed long type is returned from `double %s()' function.
  • W0338 A value of signed long type is returned from `long double %s()' function.
  • W0339 A value of unsigned long type is returned from `float %s()' function.
  • W0340 A value of unsigned long type is returned from `double %s()' function.
  • W0341 A value of unsigned long type is returned from `long double %s()' function.
  • W0342 A value of signed long long type is returned from `float %s()' function.
  • W0343 A value of signed long long type is returned from `double %s()' function.
  • W0344 A value of signed long long type is returned from `long double %s()' function.
  • W0345 A value of unsigned long long type is returned from `float %s()' function.
  • W0346 A value of unsigned long long type is returned from `double %s()' function.

6.327.5 Since

1.0.0


Next: , Previous: W0347, Up: Messages

6.328 W0348

6.328.1 Message body

A value of float type is returned from `char %s()' function.

6.328.2 Content

Under construction.

6.328.3 Sample code

char func(void)
{
    float a = 0;
    return a; /* W0348 */
}

6.328.4 Related message

  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.328.5 Since

1.0.0


Next: , Previous: W0348, Up: Messages

6.329 W0349

6.329.1 Message body

A value of float type is returned from `signed char %s()' function.

6.329.2 Content

Under construction.

6.329.3 Sample code

signed char func(void)
{
    float a = 0;
    return a; /* W0349 */
}

6.329.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.329.5 Since

1.0.0


Next: , Previous: W0349, Up: Messages

6.330 W0350

6.330.1 Message body

A value of float type is returned from `unsigned char %s()' function.

6.330.2 Content

Under construction.

6.330.3 Sample code

unsigned char func(void)
{
    float a = 0;
    return a; /* W0350 */
}

6.330.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.330.5 Since

1.0.0


Next: , Previous: W0350, Up: Messages

6.331 W0351

6.331.1 Message body

A value of float type is returned from `signed short %s()' function.

6.331.2 Content

Under construction.

6.331.3 Sample code

short func(void)
{
    float a = 0;
    return a; /* W0351 */
}

6.331.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.331.5 Since

1.0.0


Next: , Previous: W0351, Up: Messages

6.332 W0352

6.332.1 Message body

A value of float type is returned from `unsigned short %s()' function.

6.332.2 Content

Under construction.

6.332.3 Sample code

unsigned short func(void)
{
    float a = 0;
    return a; /* W0352 */
}

6.332.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.332.5 Since

1.0.0


Next: , Previous: W0352, Up: Messages

6.333 W0353

6.333.1 Message body

A value of float type is returned from `signed int %s()' function.

6.333.2 Content

Under construction.

6.333.3 Sample code

int func(void)
{
    float a = 0;
    return a; /* W0353 */
}

6.333.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.333.5 Since

1.0.0


Next: , Previous: W0353, Up: Messages

6.334 W0354

6.334.1 Message body

A value of float type is returned from `unsigned int %s()' function.

6.334.2 Content

Under construction.

6.334.3 Sample code

unsigned int func(void)
{
    float a = 0;
    return a; /* W0354 */
}

6.334.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.334.5 Since

1.0.0


Next: , Previous: W0354, Up: Messages

6.335 W0355

6.335.1 Message body

A value of float type is returned from `signed long %s()' function.

6.335.2 Content

Under construction.

6.335.3 Sample code

long func(void)
{
    float a = 0;
    return a; /* W0355 */
}

6.335.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.335.5 Since

1.0.0


Next: , Previous: W0355, Up: Messages

6.336 W0356

6.336.1 Message body

A value of float type is returned from `unsigned long %s()' function.

6.336.2 Content

Under construction.

6.336.3 Sample code

unsigned long func(void)
{
    float a = 0;
    return a; /* W0356 */
}

6.336.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.336.5 Since

1.0.0


Next: , Previous: W0356, Up: Messages

6.337 W0357

6.337.1 Message body

A value of double type is returned from `char %s()' function.

6.337.2 Content

Under construction.

6.337.3 Sample code

char func(void)
{
    double a = 0;
    return a; /* W0357 */
}

6.337.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.337.5 Since

1.0.0


Next: , Previous: W0357, Up: Messages

6.338 W0358

6.338.1 Message body

A value of double type is returned from `signed char %s()' function.

6.338.2 Content

Under construction.

6.338.3 Sample code

signed char func(void)
{
    double a = 0;
    return a; /* W0358 */
}

6.338.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.338.5 Since

1.0.0


Next: , Previous: W0358, Up: Messages

6.339 W0359

6.339.1 Message body

A value of double type is returned from `unsigned char %s()' function.

6.339.2 Content

Under construction.

6.339.3 Sample code

unsigned char func(void)
{
    double a = 0;
    return a; /* W0359 */
}

6.339.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.339.5 Since

1.0.0


Next: , Previous: W0359, Up: Messages

6.340 W0360

6.340.1 Message body

A value of double type is returned from `short %s()' function.

6.340.2 Content

Under construction.

6.340.3 Sample code

short func(void)
{
    double a = 0;
    return a; /* W0360 */
}

6.340.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.340.5 Since

1.0.0


Next: , Previous: W0360, Up: Messages

6.341 W0361

6.341.1 Message body

A value of double type is returned from `unsigned short %s()' function.

6.341.2 Content

Under construction.

6.341.3 Sample code

unsigned short func(void)
{
    double a = 0;
    return a; /* W0361 */
}

6.341.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.341.5 Since

1.0.0


Next: , Previous: W0361, Up: Messages

6.342 W0362

6.342.1 Message body

A value of double type is returned from `signed int %s()' function.

6.342.2 Content

Under construction.

6.342.3 Sample code

int func(void)
{
    double a = 0;
    return a; /* W0362 */
}

6.342.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.342.5 Since

1.0.0


Next: , Previous: W0362, Up: Messages

6.343 W0363

6.343.1 Message body

A value of double type is returned from `unsigned int %s()' function.

6.343.2 Content

Under construction.

6.343.3 Sample code

unsigned int func(void)
{
    double a = 0;
    return a; /* W0363 */
}

6.343.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.343.5 Since

1.0.0


Next: , Previous: W0363, Up: Messages

6.344 W0364

6.344.1 Message body

A value of double type is returned from `signed long %s()' function.

6.344.2 Content

Under construction.

6.344.3 Sample code

long func(void)
{
    double a = 0;
    return a; /* W0364 */
}

6.344.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.344.5 Since

1.0.0


Next: , Previous: W0364, Up: Messages

6.345 W0365

6.345.1 Message body

A value of double type is returned from `unsigned long %s()' function.

6.345.2 Content

Under construction.

6.345.3 Sample code

unsigned long func(void)
{
    double a = 0;
    return a; /* W0365 */
}

6.345.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.345.5 Since

1.0.0


Next: , Previous: W0365, Up: Messages

6.346 W0366

6.346.1 Message body

A value of long double type is returned from `char %s()' function.

6.346.2 Content

Under construction.

6.346.3 Sample code

char func(void)
{
    long double a = 0;
    return a; /* W0366 */
}

6.346.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.346.5 Since

1.0.0


Next: , Previous: W0366, Up: Messages

6.347 W0367

6.347.1 Message body

A value of long double type is returned from `signed char %s()' function.

6.347.2 Content

Under construction.

6.347.3 Sample code

signed char func(void)
{
    long double a = 0;
    return a; /* W0367 */
}

6.347.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.347.5 Since

1.0.0


Next: , Previous: W0367, Up: Messages

6.348 W0368

6.348.1 Message body

A value of long double type is returned from `signed char %s()' function.

6.348.2 Content

Under construction.

6.348.3 Sample code

unsigned char func(void)
{
    long double a = 0;
    return a; /* W0368 */
}

6.348.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.348.5 Since

1.0.0


Next: , Previous: W0368, Up: Messages

6.349 W0369

6.349.1 Message body

A value of long double type is returned from `signed short %s()' function.

6.349.2 Content

Under construction.

6.349.3 Sample code

short func(void)
{
    long double a = 0;
    return a; /* W0369 */
}

6.349.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.349.5 Since

1.0.0


Next: , Previous: W0369, Up: Messages

6.350 W0370

6.350.1 Message body

A value of long double type is returned from `unsigned short %s()' function.

6.350.2 Content

Under construction.

6.350.3 Sample code

unsigned short func(void)
{
    long double a = 0;
    return a; /* W0370 */
}

6.350.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.350.5 Since

1.0.0


Next: , Previous: W0370, Up: Messages

6.351 W0371

6.351.1 Message body

A value of long double type is returned from `signed int %s()' function.

6.351.2 Content

Under construction.

6.351.3 Sample code

int func(void)
{
    long double a = 0;
    return a; /* W0371 */
}

6.351.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.351.5 Since

1.0.0


Next: , Previous: W0371, Up: Messages

6.352 W0372

6.352.1 Message body

A value of long double type is returned from `unsigned int %s()' function.

6.352.2 Content

Under construction.

6.352.3 Sample code

unsigned int func(void)
{
    long double a = 0;
    return a; /* W0372 */
}

6.352.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.352.5 Since

1.0.0


Next: , Previous: W0372, Up: Messages

6.353 W0373

6.353.1 Message body

A value of long double type is returned from `signed long %s()' function.

6.353.2 Content

Under construction.

6.353.3 Sample code

long func(void)
{
    long double a = 0;
    return a; /* W0373 */
}

6.353.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.353.5 Since

1.0.0


Next: , Previous: W0373, Up: Messages

6.354 W0374

6.354.1 Message body

A value of long double type is returned from `unsigned long %s()' function.

6.354.2 Content

Under construction.

6.354.3 Sample code

unsigned long func(void)
{
    long double a = 0;
    return a; /* W0374 */
}

6.354.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.354.5 Since

1.0.0


Next: , Previous: W0374, Up: Messages

6.355 W0375

6.355.1 Message body

A value of float type is returned from `signed long long %s()' function.

6.355.2 Content

Under construction.

6.355.3 Sample code

long long func(void)
{
    float a = 0;
    return a; /* W0375 */
}

6.355.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.355.5 Since

1.0.0


Next: , Previous: W0375, Up: Messages

6.356 W0376

6.356.1 Message body

A value of float type is returned from `unsigned long long %s()' function.

6.356.2 Content

Under construction.

6.356.3 Sample code

unsigned long long func(void)
{
    float a = 0;
    return a; /* W0376 */
}

6.356.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.356.5 Since

1.0.0


Next: , Previous: W0376, Up: Messages

6.357 W0377

6.357.1 Message body

A value of double type is returned from `signed long long %s()' function.

6.357.2 Content

Under construction.

6.357.3 Sample code

long long func(void)
{
    double a = 0;
    return a; /* W0377 */
}

6.357.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.357.5 Since

1.0.0


Next: , Previous: W0377, Up: Messages

6.358 W0378

6.358.1 Message body

A value of double type is returned from `unsigned long long %s()' function.

6.358.2 Content

Under construction.

6.358.3 Sample code

unsigned long long func(void)
{
    double a = 0;
    return a; /* W0378 */
}

6.358.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.358.5 Since

1.0.0


Next: , Previous: W0378, Up: Messages

6.359 W0379

6.359.1 Message body

A value of long double type is returned from `signed long long %s()' function.

6.359.2 Content

Under construction.

6.359.3 Sample code

long long func(void)
{
    long double a = 0;
    return a; /* W0379 */
}

6.359.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0380 A value of long double type is returned from `unsigned long long %s()' function.

6.359.5 Since

1.0.0


Next: , Previous: W0379, Up: Messages

6.360 W0380

6.360.1 Message body

A value of long double type is returned from `unsigned long long %s()' function.

6.360.2 Content

Under construction.

6.360.3 Sample code

unsigned long long func(void)
{
    long double a = 0;
    return a; /* W0380 */
}

6.360.4 Related message

  • W0348 A value of float type is returned from `char %s()' function.
  • W0349 A value of float type is returned from `signed char %s()' function.
  • W0350 A value of float type is returned from `unsigned char %s()' function.
  • W0351 A value of float type is returned from `signed short %s()' function.
  • W0352 A value of float type is returned from `unsigned short %s()' function.
  • W0353 A value of float type is returned from `signed int %s()' function.
  • W0354 A value of float type is returned from `unsigned int %s()' function.
  • W0355 A value of float type is returned from `signed long %s()' function.
  • W0356 A value of float type is returned from `unsigned long %s()' function.
  • W0357 A value of double type is returned from `char %s()' function.
  • W0358 A value of double type is returned from `signed char %s()' function.
  • W0359 A value of double type is returned from `unsigned char %s()' function.
  • W0360 A value of double type is returned from `signed short %s()' function.
  • W0361 A value of double type is returned from `unsigned short %s()' function.
  • W0362 A value of double type is returned from `signed int %s()' function.
  • W0363 A value of double type is returned from `unsigned int %s()' function.
  • W0364 A value of double type is returned from `signed long %s()' function.
  • W0365 A value of double type is returned from `unsigned long %s()' function.
  • W0366 A value of long double type is returned from `char %s()' function.
  • W0367 A value of long double type is returned from `signed char %s()' function.
  • W0368 A value of long double type is returned from `unsigned char %s()' function.
  • W0369 A value of long double type is returned from `signed short %s()' function.
  • W0370 A value of long double type is returned from `unsigned short %s()' function.
  • W0371 A value of long double type is returned from `signed int %s()' function.
  • W0372 A value of long double type is returned from `unsigned int %s()' function.
  • W0373 A value of long double type is returned from `signed long %s()' function.
  • W0374 A value of long double type is returned from `unsigned long %s()' function.
  • W0375 A value of float type is returned from `signed long long %s()' function.
  • W0376 A value of float type is returned from `unsigned long long %s()' function.
  • W0377 A value of double type is returned from `signed long long %s()' function.
  • W0378 A value of double type is returned from `unsigned long long %s()' function.
  • W0379 A value of long double type is returned from `signed long long %s()' function.

6.360.5 Since

1.0.0


Next: , Previous: W0380, Up: Messages

6.361 W0381

6.361.1 Message body

A value of signed short type is returned from `signed char %s()' function.

6.361.2 Content

Under construction.

6.361.3 Sample code

signed char func(void)
{
    short a = 0;
    return a; /* W0381 */
}

6.361.4 Related message

  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.361.5 Since

1.0.0


Next: , Previous: W0381, Up: Messages

6.362 W0382

6.362.1 Message body

A value of unsigned short type is returned from `unsigned char %s()' function.

6.362.2 Content

Under construction.

6.362.3 Sample code

unsigned char func(void)
{
    unsigned short a = 0;
    return a; /* W0382 */
}

6.362.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.362.5 Since

1.0.0


Next: , Previous: W0382, Up: Messages

6.363 W0383

6.363.1 Message body

A value of signed int type is returned from `signed char %s()' function.

6.363.2 Content

Under construction.

6.363.3 Sample code

signed char func(void)
{
    int a = 0;
    return a; /* W0383 */
}

6.363.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.363.5 Since

1.0.0


Next: , Previous: W0383, Up: Messages

6.364 W0384

6.364.1 Message body

A value of signed int type is returned from `signed short %s()' function.

6.364.2 Content

Under construction.

6.364.3 Sample code

short func(void)
{
    int a = 0;
    return a; /* W0384 */
}

6.364.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.364.5 Since

1.0.0


Next: , Previous: W0384, Up: Messages

6.365 W0385

6.365.1 Message body

A value of unsigned int type is returned from `unsigned char %s()' function.

6.365.2 Content

Under construction.

6.365.3 Sample code

unsigned char func(void)
{
    unsigned int a = 0;
    return a; /* W0385 */
}

6.365.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.365.5 Since

1.0.0


Next: , Previous: W0385, Up: Messages

6.366 W0386

6.366.1 Message body

A value of unsigned int type is returned from `unsigned short %s()' function.

6.366.2 Content

Under construction.

6.366.3 Sample code

unsigned short func(void)
{
    unsigned int a = 0;
    return a; /* W0386 */
}

6.366.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.366.5 Since

1.0.0


Next: , Previous: W0386, Up: Messages

6.367 W0387

6.367.1 Message body

A value of signed long type is returned from `signed char %s()' function.

6.367.2 Content

Under construction.

6.367.3 Sample code

signed char func(void)
{
    long a = 0;
    return a; /* W0387 */
}

6.367.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.367.5 Since

1.0.0


Next: , Previous: W0387, Up: Messages

6.368 W0388

6.368.1 Message body

A value of signed long type is returned from `signed short %s()' function.

6.368.2 Content

Under construction.

6.368.3 Sample code

short func(void)
{
    long a = 0;
    return a; /* W0388 */
}

6.368.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.368.5 Since

1.0.0


Next: , Previous: W0388, Up: Messages

6.369 W0389

6.369.1 Message body

A value of signed long type is returned from `signed int %s()' function.

6.369.2 Content

Under construction.

6.369.3 Sample code

int func(void)
{
    long a = 0;
    return a; /* W0389 */
}

6.369.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.369.5 Since

1.0.0


Next: , Previous: W0389, Up: Messages

6.370 W0390

6.370.1 Message body

A value of unsigned long type is returned from `unsigned char %s()' function.

6.370.2 Content

Under construction.

6.370.3 Sample code

unsigned char func(void)
{
    unsigned long a = 0;
    return a; /* W0390 */
}

6.370.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.370.5 Since

1.0.0


Next: , Previous: W0390, Up: Messages

6.371 W0391

6.371.1 Message body

A value of unsigned long type is returned from `unsigned short %s()' function.

6.371.2 Content

Under construction.

6.371.3 Sample code

unsigned short func(void)
{
    unsigned long a = 0;
    return a; /* W0391 */
}

6.371.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.371.5 Since

1.0.0


Next: , Previous: W0391, Up: Messages

6.372 W0392

6.372.1 Message body

A value of unsigned long type is returned from `unsigned int %s()' function.

6.372.2 Content

Under construction.

6.372.3 Sample code

unsigned int func(void)
{
    unsigned long a = 0;
    return a; /* W0392 */
}

6.372.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.372.5 Since

1.0.0


Next: , Previous: W0392, Up: Messages

6.373 W0393

6.373.1 Message body

A value of signed long long type is returned from `signed char %s()' function.

6.373.2 Content

Under construction.

6.373.3 Sample code

signed char func(void)
{
    long long a = 0;
    return a; /* W0393 */
}

6.373.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.373.5 Since

1.0.0


Next: , Previous: W0393, Up: Messages

6.374 W0394

6.374.1 Message body

A value of signed long long type is returned from `signed short %s()' function.

6.374.2 Content

Under construction.

6.374.3 Sample code

short func(void)
{
    long long a = 0;
    return a; /* W0394 */
}

6.374.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.374.5 Since

1.0.0


Next: , Previous: W0394, Up: Messages

6.375 W0395

6.375.1 Message body

A value of signed long long type is returned from `signed int %s()' function.

6.375.2 Content

Under construction.

6.375.3 Sample code

int func(void)
{
    long long a = 0;
    return a; /* W0395 */
}

6.375.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.375.5 Since

1.0.0


Next: , Previous: W0395, Up: Messages

6.376 W0396

6.376.1 Message body

A value of signed long long type is returned from `signed long %s()' function.

6.376.2 Content

Under construction.

6.376.3 Sample code

long func(void)
{
    long long a = 0;
    return a; /* W0396 */
}

6.376.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.376.5 Since

1.0.0


Next: , Previous: W0396, Up: Messages

6.377 W0397

6.377.1 Message body

A value of unsigned long long type is returned from `unsigned char %s()' function.

6.377.2 Content

Under construction.

6.377.3 Sample code

unsigned char func(void)
{
    unsigned long long a = 0;
    return a; /* W0397 */
}

6.377.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.377.5 Since

1.0.0


Next: , Previous: W0397, Up: Messages

6.378 W0398

6.378.1 Message body

A value of unsigned long long type is returned from `unsigned short %s()' function.

6.378.2 Content

Under construction.

6.378.3 Sample code

unsigned short func(void)
{
    unsigned long long a = 0;
    return a; /* W0398 */
}

6.378.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.378.5 Since

1.0.0


Next: , Previous: W0398, Up: Messages

6.379 W0399

6.379.1 Message body

A value of unsigned long long type is returned from `unsigned int %s()' function.

6.379.2 Content

Under construction.

6.379.3 Sample code

unsigned int func(void)
{
    unsigned long long a = 0;
    return a; /* W0399 */
}

6.379.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0400 A value of unsigned long long type is returned from `unsigned long %s()' function.

6.379.5 Since

1.0.0


Next: , Previous: W0399, Up: Messages

6.380 W0400

6.380.1 Message body

A value of unsigned long long type is returned from `unsigned long %s()' function.

6.380.2 Content

Under construction.

6.380.3 Sample code

unsigned long func(void)
{
    unsigned long long a = 0;
    return a; /* W0400 */
}

6.380.4 Related message

  • W0381 A value of signed short type is returned from `signed char %s()' function.
  • W0382 A value of unsigned short type is returned from `unsigned char %s()' function.
  • W0383 A value of signed int type is returned from `signed char %s()' function.
  • W0384 A value of signed int type is returned from `signed short %s()' function.
  • W0385 A value of unsigned int type is returned from `unsigned char %s()' function.
  • W0386 A value of unsigned int type is returned from `unsigned short %s()' function.
  • W0387 A value of signed long type is returned from `signed char %s()' function.
  • W0388 A value of signed long type is returned from `signed short %s()' function.
  • W0389 A value of signed long type is returned from `signed int %s()' function.
  • W0390 A value of unsigned long type is returned from `unsigned char %s()' function.
  • W0391 A value of unsigned long type is returned from `unsigned short %s()' function.
  • W0392 A value of unsigned long type is returned from `unsigned int %s()' function.
  • W0393 A value of signed long long type is returned from `signed char %s()' function.
  • W0394 A value of signed long long type is returned from `signed short %s()' function.
  • W0395 A value of signed long long type is returned from `signed int %s()' function.
  • W0396 A value of signed long long type is returned from `signed long %s()' function.
  • W0397 A value of unsigned long long type is returned from `unsigned char %s()' function.
  • W0398 A value of unsigned long long type is returned from `unsigned short %s()' function.
  • W0399 A value of unsigned long long type is returned from `unsigned int %s()' function.

6.380.5 Since

1.0.0


Next: , Previous: W0400, Up: Messages

6.381 W0401

6.381.1 Message body

A value of unsigned char type is returned from `signed short %s()' function.

6.381.2 Content

Under construction.

6.381.3 Sample code

short func(void)
{
    unsigned char a = 0;
    return a; /* W0401 */
}

6.381.4 Related message

  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.381.5 Since

1.0.0


Next: , Previous: W0401, Up: Messages

6.382 W0402

6.382.1 Message body

A value of unsigned char type is returned from `signed int %s()' function.

6.382.2 Content

Under construction.

6.382.3 Sample code

int func(void)
{
    unsigned char a = 0;
    return a; /* W0402 */
}

6.382.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.382.5 Since

1.0.0


Next: , Previous: W0402, Up: Messages

6.383 W0403

6.383.1 Message body

A value of unsigned char type is returned from `signed long %s()' function.

6.383.2 Content

Under construction.

6.383.3 Sample code

long func(void)
{
    unsigned char a = 0;
    return a; /* W0403 */
}

6.383.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.383.5 Since

1.0.0


Next: , Previous: W0403, Up: Messages

6.384 W0404

6.384.1 Message body

A value of unsigned short type is returned from `signed int %s()' function.

6.384.2 Content

Under construction.

6.384.3 Sample code

int func(void)
{
    unsigned short a = 0;
    return a; /* W0404 */
}

6.384.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.384.5 Since

1.0.0


Next: , Previous: W0404, Up: Messages

6.385 W0405

6.385.1 Message body

A value of unsigned short type is returned from `signed long %s()' function.

6.385.2 Content

Under construction.

6.385.3 Sample code

long func(void)
{
    unsigned short a = 0;
    return a; /* W0405 */
}

6.385.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.385.5 Since

1.0.0


Next: , Previous: W0405, Up: Messages

6.386 W0406

6.386.1 Message body

A value of unsigned int type is returned from `signed long %s()' function.

6.386.2 Content

Under construction.

6.386.3 Sample code

long func(void)
{
    unsigned int a = 0;
    return a; /* W0406 */
}

6.386.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.386.5 Since

1.0.0


Next: , Previous: W0406, Up: Messages

6.387 W0407

6.387.1 Message body

A value of unsigned char type is returned from `signed long long %s()' function.

6.387.2 Content

Under construction.

6.387.3 Sample code

long long func(void)
{
    unsigned char a = 0;
    return a; /* W0407 */
}

6.387.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.387.5 Since

1.0.0


Next: , Previous: W0407, Up: Messages

6.388 W0408

6.388.1 Message body

A value of unsigned short type is returned from `signed long long %s()' function.

6.388.2 Content

Under construction.

6.388.3 Sample code

long long func(void)
{
    unsigned short a = 0;
    return a; /* W0408 */
}

6.388.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.388.5 Since

1.0.0


Next: , Previous: W0408, Up: Messages

6.389 W0409

6.389.1 Message body

A value of unsigned int type is returned from `signed long long %s()' function.

6.389.2 Content

Under construction.

6.389.3 Sample code

long long func(void)
{
    unsigned int a = 0;
    return a; /* W0409 */
}

6.389.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0410 A value of unsigned long type is returned from `signed long long %s()' function.

6.389.5 Since

1.0.0


Next: , Previous: W0409, Up: Messages

6.390 W0410

6.390.1 Message body

A value of unsigned long type is returned from `signed long long %s()' function.

6.390.2 Content

Under construction.

6.390.3 Sample code

long long func(void)
{
    unsigned long a = 0;
    return a; /* W0410 */
}

6.390.4 Related message

  • W0401 A value of unsigned char type is returned from `signed short %s()' function.
  • W0402 A value of unsigned char type is returned from `signed int %s()' function.
  • W0403 A value of unsigned char type is returned from `signed long %s()' function.
  • W0404 A value of unsigned short type is returned from `signed int %s()' function.
  • W0405 A value of unsigned short type is returned from `signed long %s()' function.
  • W0406 A value of unsigned int type is returned from `signed long %s()' function.
  • W0407 A value of unsigned char type is returned from `signed long long %s()' function.
  • W0408 A value of unsigned short type is returned from `signed long long %s()' function.
  • W0409 A value of unsigned int type is returned from `signed long long %s()' function.

6.390.5 Since

1.0.0


Next: , Previous: W0410, Up: Messages

6.391 W0411

6.391.1 Message body

The initialization of enumeration should be only the starting, whole or not at all.

6.391.2 Content

Under construction.

6.391.3 Sample code

enum SEASON1 { /* W0411 */
    SPRING,
    SUMMER = 4,
    AUTUMN = 8,
    WINTER
};

enum SEASON2 { /* OK */
    SPRING,
    SUMMER,
    AUTUMN,
    WINTER
};

enum SEASON3 { /* OK */
    SPRING = 0,
    SUMMER = 1,
    AUTUMN = 2,
    WINTER = 3
};

enum SEASON4 { /* OK */
    SPRING = 1,
    SUMMER,
    AUTUMN,
    WINTER
};

6.391.4 Related message

None.

6.391.5 Since

1.0.0


Next: , Previous: W0411, Up: Messages

6.392 W0413

6.392.1 Message body

The body of control statement is unenclosed by curly brace `{}' block.

6.392.2 Content

Under construction.

6.392.3 Sample code

if (x > 0)
    x++; /* W0413 */

6.392.4 Related message

  • W0414 Body of the controlling statement in a line is not enclosed by `{}'.

6.392.5 Since

1.0.0


Next: , Previous: W0413, Up: Messages

6.393 W0414

6.393.1 Message body

Body of the controlling statement in a line is not enclosed by `{}'.

6.393.2 Content

Under construction.

6.393.3 Sample code

if (x > 0) x++; /* W0414 */

6.393.4 Related message

  • W0413 The body of control statement is unenclosed by curly brace `{}' block.

6.393.5 Since

1.0.0


Next: , Previous: W0414, Up: Messages

6.394 W0421

6.394.1 Message body

Value of the dereferencing pointer must be NULL.

6.394.2 Content

Under construction.

6.394.3 Sample code

void func(int a, int *p)
{
    int b;

    if (p) {
        b = *p; /* OK */
    }
    else {
        b = *p; /* W0421 */
    }
}

6.394.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1004 NULL value is assigned to the the problematic variable.
  • C1005 A value possibly be NULL is assigned to the problematic variable.

6.394.5 Since

1.0.0


Next: , Previous: W0421, Up: Messages

6.395 W0422

6.395.1 Message body

Value of the dereferencing pointer may be NULL.

6.395.2 Content

Under construction.

6.395.3 Sample code

void func(int a, int *p)
{
    int b;

    if (p) {
        b = *p; /* OK */
    }

    b = *p; /* W0422 */
}

6.395.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1004 NULL value is assigned to the the problematic variable.
  • C1005 A value possibly be NULL is assigned to the problematic variable.

6.395.5 Since

1.0.0


Next: , Previous: W0422, Up: Messages

6.396 W0423

6.396.1 Message body

Arithmetic operation is being made to the pointer which its value will be NULL.

6.396.2 Content

Under construction.

6.396.3 Sample code

int *func(int *p)
{
    if (p) {
        return p + 1; /* OK */
    }
    else {
        return p + 1; /* W0423 */
    }
}

6.396.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1004 NULL value is assigned to the the problematic variable.
  • C1005 A value possibly be NULL is assigned to the problematic variable.

6.396.5 Since

1.0.0


Next: , Previous: W0423, Up: Messages

6.397 W0424

6.397.1 Message body

Arithmetic operation is being made to the pointer which its value might be NULL.

6.397.2 Content

Under construction.

6.397.3 Sample code

int *func(int *p)
{
    int a;

    if (p) {
        a = *(p + 1); /* OK */
    }

    return p + 1; /* W0424 */
}

6.397.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1004 NULL value is assigned to the the problematic variable.
  • C1005 A value possibly be NULL is assigned to the problematic variable.

6.397.5 Since

1.0.0


Next: , Previous: W0424, Up: Messages

6.398 W0425

6.398.1 Message body

There are several definitions or statements in a line.

6.398.2 Content

Under construction.

6.398.3 Sample code

int a, b; /* W0425 */
int a; int b; /* W0425 */
struct C { int i; } c = { 0 }; c.i = a; /* W0425 */

6.398.4 Related message

None.

6.398.5 Since

1.0.0


Next: , Previous: W0425, Up: Messages

6.399 W0431

6.399.1 Message body

This line begins at more left than previous lines of the same indentation level.

6.399.2 Content

Under construction.

6.399.3 Sample code

void func()
{
    int a;
int b; /* W0431 */
    a = var();
}

6.399.4 Related message

  • W0432 Indentation of this line does not comply with the project's indent style.

6.399.5 Since

1.0.0


Next: , Previous: W0431, Up: Messages

6.400 W0432

6.400.1 Message body

Indentation of this line does not comply with the project's indent style.

6.400.2 Content

Under construction.

6.400.3 Sample code

void func()
{
    int a;
      int b; /* W0432 */
    a = var();
}

6.400.4 Related message

  • W0431 This line begins at more left than previous lines of the same indentation level.

6.400.5 Since

1.0.0


Next: , Previous: W0432, Up: Messages

6.401 W0440

6.401.1 Message body

An indent of this close bracket `}' is not correspond to the open bracket `{'.

6.401.2 Content

Under construction.

6.401.3 Sample code

void func()
{
    if (x == 0)
    {
        if (y == 0)
        {
            ...snip...
    } /* W0440 */
        } /* W0440 */
}

6.401.4 Related message

None.

6.401.5 Since

1.0.0


Next: , Previous: W0440, Up: Messages

6.402 W0441

6.402.1 Message body

The type of integer literal which doesn't have a suffix is not int type.

6.402.2 Content

Under construction.

6.402.3 Sample code

int i = 0x1234; /* W0441 */

6.402.4 Related message

None.

6.402.5 Since

1.0.0


Next: , Previous: W0441, Up: Messages

6.403 W0442

6.403.1 Message body

A function-like macro is defined.

6.403.2 Content

Under construction.

6.403.3 Sample code

#define MAX(a, b) (a < b ? b : a) /* W0442 */

6.403.4 Related message

  • W0443 This function-like macro might be replaced with a function.

6.403.5 Since

1.0.0


Next: , Previous: W0442, Up: Messages

6.404 W0443

6.404.1 Message body

This function-like macro might be replaced with a function.

6.404.2 Content

Under construction.

6.404.3 Sample code

#define MACRO(a, b) (a * b) /* W0443 */

6.404.4 Related message

  • W0442 A function-like macro is defined.

6.404.5 Since

1.0.0


Next: , Previous: W0443, Up: Messages

6.405 W0444

6.405.1 Message body

`#'operator and `##'operator is used in a macro definition.

6.405.2 Content

Under construction.

6.405.3 Sample code

#define MACRO(a) L ## #a /* W0444 */

6.405.4 Related message

  • W0445 Multiple `##'operator is used in a macro definition.

6.405.5 Since

1.0.0


Next: , Previous: W0444, Up: Messages

6.406 W0445

6.406.1 Message body

Multiple `##'operator is used in a macro definition.

6.406.2 Content

Under construction.

6.406.3 Sample code

#define MACRO(prefix, name, suffix) int i = prefix##name##suffix /* W0445 */

6.406.4 Related message

  • W0444 `#'operator and `##'operator is used in a macro definition.

6.406.5 Since

1.0.0


Next: , Previous: W0445, Up: Messages

6.407 W0446

6.407.1 Message body

The result value of assignment operation is used.

6.407.2 Content

Under construction.

6.407.3 Sample code

void func(void)
{
    int a;
    int b;

    a = b += 3; /* W0446 */
}

6.407.4 Related message

None.

6.407.5 Since

1.0.0


Next: , Previous: W0446, Up: Messages

6.408 W0447

6.408.1 Message body

A comma operator is used except 'for' statement.

6.408.2 Content

Under construction.

6.408.3 Sample code

int a = 1;
int b = 0;

int c = (b = a, a); /* W0447 */

6.408.4 Related message

None.

6.408.5 Since

1.0.0


Next: , Previous: W0447, Up: Messages

6.409 W0456

6.409.1 Message body

An object or a function `%s which has external coupling is defined in a header file.

6.409.2 Content

Under construction.

6.409.3 Sample code

test.h

int num = 1; /* W0456 */

int func(void) /* W0456 */
{
    return num;
}

test.c

#include "test.h"

6.409.4 Related message

None.

6.409.5 Since

1.0.0


Next: , Previous: W0456, Up: Messages

6.410 W0457

6.410.1 Message body

The return value doesn't define explicitly in the function declaration or definition. It defined as 'int' implicitly.

6.410.2 Content

Under construction.

6.410.3 Sample code

func1(void); /* W0457 */

func2(void) /* W0457 */
{
    return 0;
}

6.410.4 Related message

None.

6.410.5 Since

1.0.0


Next: , Previous: W0457, Up: Messages

6.411 W0458

6.411.1 Message body

The type doesn't define explicitly in the object declaration or definition. It defined as 'int' implicitly.

6.411.2 Content

Under construction.

6.411.3 Sample code

a; /* W0458 */
b = 0; /* W0458 */
extern c; /* W0458 */
static d; /* W0458 */

int func(e) /* W0458 */
{
    const f = e; /* W0458 */
    return f;
}

6.411.4 Related message

None.

6.411.5 Since

1.0.0


Next: , Previous: W0458, Up: Messages

6.412 W0459

6.412.1 Message body

A value of variable `%s' doesn't set when this expression is evaluated. This program is danger.

6.412.2 Content

Under construction.

6.412.3 Sample code

int a;

if(a > 0) { /* W0459 */
}

6.412.4 Related message

  • W0460 A value of variable `%s' wouldn't set when this expression is evaluated.
  • W0461 A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger.
  • W0462 A pointer which the value will probably not set is used for the actual argument of the function.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1003 The problematic variable is defined here without initializer.

6.412.5 Since

1.0.0


Next: , Previous: W0459, Up: Messages

6.413 W0460

6.413.1 Message body

A value of variable `%s' wouldn't set when this expression is evaluated.

6.413.2 Content

Under construction.

6.413.3 Sample code

void func(int a)
{
    int b;

    if (a == 0) {
        b = 1;
    }

    if (b > 0) { /* W0460 */
    }
}

6.413.4 Related message

  • W0459 A value of variable `%s' doesn't set when this expression is evaluated. This program is danger.
  • W0461 A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger.
  • W0462 A pointer which the value will probably not set is used for the actual argument of the function.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1003 The problematic variable is defined here without initializer.

6.413.5 Since

1.0.0


Next: , Previous: W0460, Up: Messages

6.414 W0461

6.414.1 Message body

A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger.

6.414.2 Content

Under construction.

6.414.3 Sample code

extern int func1(const int *);

void func2(int a)
{
  int b;

  func1(&a); /* OK */
  func1(&b); /* W0461 */
}

6.414.4 Related message

  • W0459 A value of variable `%s' doesn't set when this expression is evaluated. This program is danger.
  • W0460 A value of variable `%s' wouldn't set when this expression is evaluated.
  • W0462 A pointer which the value will probably not set is used for the actual argument of the function.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1003 The problematic variable is defined here without initializer.

6.414.5 Since

1.0.0


Next: , Previous: W0461, Up: Messages

6.415 W0462

6.415.1 Message body

A pointer which the value will probably not set is used for the actual argument of the function.

6.415.2 Content

Under construction.

6.415.3 Sample code

extern int func1(const int *);

int func2(int a)
{
    int b;

    if (a > 10) {
        b = a + 10;
    }

    func1(&b); /* W0462 */
}

6.415.4 Related message

  • W0459 A value of variable `%s' doesn't set when this expression is evaluated. This program is danger.
  • W0460 A value of variable `%s' wouldn't set when this expression is evaluated.
  • W0461 A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1003 The problematic variable is defined here without initializer.

6.415.5 Since

1.0.0


Next: , Previous: W0462, Up: Messages

6.416 W0477

6.416.1 Message body

There are unpaired `[]',`()',`{}' in macro definition.

6.416.2 Content

Under construction.

6.416.3 Sample code

#define BEGIN { /* W0477 */
#define END } /* W0477 */

void func()
BEGIN
    ...snip...
END

6.416.4 Related message

  • W0478 This macro defines scraps of unrecognized codes.
  • W0479 This macro definition might be replaced with 'typedef' declaration.
  • W0480 This macro defines keyword of control statement or punctuator.
  • W0481 This macro defines the block around by `{}'.
  • W0482 This macro defines either type specifier.
  • W0483 This macro defines the pair of storage class specifier and type specifier.

6.416.5 Since

1.0.0


Next: , Previous: W0477, Up: Messages

6.417 W0478

6.417.1 Message body

This macro defines scraps of unrecognized codes.

6.417.2 Content

Under construction.

6.417.3 Sample code

#define MALLOC_OR_DIE(ptr, size) ptr = malloc(size); if (!ptr) exit(1); /* W0478 */

6.417.4 Related message

  • W0477 There are unpaired `[]',`()',`{}' in macro definition.
  • W0479 This macro definition might be replaced with 'typedef' declaration.
  • W0480 This macro defines keyword of control statement or punctuator.
  • W0481 This macro defines the block around by `{}'.
  • W0482 This macro defines either type specifier.
  • W0483 This macro defines the pair of storage class specifier and type specifier.

6.417.5 Since

1.0.0


Next: , Previous: W0478, Up: Messages

6.418 W0479

6.418.1 Message body

This macro definition might be replaced with 'typedef' declaration.

6.418.2 Content

Under construction.

6.418.3 Sample code

#define foo unsigned int /* W0479 */

6.418.4 Related message

  • W0477 There are unpaired `[]',`()',`{}' in macro definition.
  • W0478 This macro defines scraps of unrecognized codes.
  • W0480 This macro defines keyword of control statement or punctuator.
  • W0481 This macro defines the block around by `{}'.
  • W0482 This macro defines either type specifier.
  • W0483 This macro defines the pair of storage class specifier and type specifier.

6.418.5 Since

1.0.0


Next: , Previous: W0479, Up: Messages

6.419 W0480

6.419.1 Message body

This macro defines keyword of control statement or punctuator.

6.419.2 Content

Under construction.

6.419.3 Sample code

#define PLUS + /* W0480 */
#define LOOP while /* W0480 */

6.419.4 Related message

  • W0477 There are unpaired `[]',`()',`{}' in macro definition.
  • W0478 This macro defines scraps of unrecognized codes.
  • W0479 This macro definition might be replaced with 'typedef' declaration.
  • W0481 This macro defines the block around by `{}'.
  • W0482 This macro defines either type specifier.
  • W0483 This macro defines the pair of storage class specifier and type specifier.

6.419.5 Since

1.0.0


Next: , Previous: W0480, Up: Messages

6.420 W0481

6.420.1 Message body

This macro defines the block around by `{}'.

6.420.2 Content

Under construction.

6.420.3 Sample code

#define SETUP(a, b) /* W0481 */ \
    { \
        if (a) \
            b = 0; \
        else \
            b = 1; \
    }

6.420.4 Related message

  • W0477 There are unpaired `[]',`()',`{}' in macro definition.
  • W0478 This macro defines scraps of unrecognized codes.
  • W0479 This macro definition might be replaced with 'typedef' declaration.
  • W0480 This macro defines keyword of control statement or punctuator.
  • W0482 This macro defines either type specifier.
  • W0483 This macro defines the pair of storage class specifier and type specifier.

6.420.5 Since

1.0.0


Next: , Previous: W0481, Up: Messages

6.421 W0482

6.421.1 Message body

This macro defines either type specifier.

6.421.2 Content

Under construction.

6.421.3 Sample code

#define COMPOSITE struct /* W0482 */

6.421.4 Related message

  • W0477 There are unpaired `[]',`()',`{}' in macro definition.
  • W0478 This macro defines scraps of unrecognized codes.
  • W0479 This macro definition might be replaced with 'typedef' declaration.
  • W0480 This macro defines keyword of control statement or punctuator.
  • W0481 This macro defines the block around by `{}'.
  • W0483 This macro defines the pair of storage class specifier and type specifier.

6.421.5 Since

1.0.0


Next: , Previous: W0482, Up: Messages

6.422 W0483

6.422.1 Message body

This macro defines the pair of storage class specifier and type specifier.

6.422.2 Content

Under construction.

6.422.3 Sample code

#define PRIVATE_FINAL static const /* W0483 */

6.422.4 Related message

  • W0477 There are unpaired `[]',`()',`{}' in macro definition.
  • W0478 This macro defines scraps of unrecognized codes.
  • W0479 This macro definition might be replaced with 'typedef' declaration.
  • W0480 This macro defines keyword of control statement or punctuator.
  • W0481 This macro defines the block around by `{}'.
  • W0482 This macro defines either type specifier.

6.422.5 Since

1.0.0


Next: , Previous: W0483, Up: Messages

6.423 W0488

6.423.1 Message body

A function call `()', array's index operation `[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'.

6.423.2 Content

Under construction.

6.423.3 Sample code

while (func(&a, &b) < 0 && i > 0) { /* W0488 */
    ...snip...
}

6.423.4 Related message

  • W0489 A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'.
  • W0490 A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'.

6.423.5 Since

1.0.0


Next: , Previous: W0488, Up: Messages

6.424 W0489

6.424.1 Message body

A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'.

6.424.2 Content

Under construction.

6.424.3 Sample code

void func(unsigned int a, unsigned int b)
{
    unsigned int c = !a && b; /* W0489 */
}

6.424.4 Related message

  • W0488 A function call `()', array's index operation `[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'.
  • W0490 A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'.

6.424.5 Since

1.0.0


Next: , Previous: W0489, Up: Messages

6.425 W0490

6.425.1 Message body

A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'.

6.425.2 Content

Under construction.

6.425.3 Sample code

void func(unsigned int a, unsigned int b, unsigned int c)
{
    unsigned int d = a && b || c; /* W0490 */
}

6.425.4 Related message

  • W0488 A function call `()', array's index operation `[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'.
  • W0489 A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'.

6.425.5 Since

1.0.0


Next: , Previous: W0490, Up: Messages

6.426 W0491

6.426.1 Message body

The same identifier name `%s' is also used in the declaration of other namespace.

6.426.2 Content

Under construction.

6.426.3 Sample code

extern int foo;

struct foo { /* W0491 */
    int a;
    int b;
};

6.426.4 Related message

  • W0492 The same identifier name `%s' is also used in the member of structure/union, label, tag or normal identifier.

6.426.5 Since

1.0.0


Next: , Previous: W0491, Up: Messages

6.427 W0492

6.427.1 Message body

The same identifier name `%s' is also used in the member of structure/union, label, tag or normal identifier.

6.427.2 Content

Under construction.

6.427.3 Sample code

extern int foo;

struct a {
    int foo; /* W0492 */
    int b;
};

void func(void)
{
    struct a a;
    int b; /* W0492 */
}

6.427.4 Related message

  • W0491 The same identifier name `%s' is also used in the declaration of other namespace.

6.427.5 Since

1.0.0


Next: , Previous: W0492, Up: Messages

6.428 W0493

6.428.1 Message body

The value of structure or union is passed as the actual argument of the function.

6.428.2 Content

Under construction.

6.428.3 Sample code

struct STR {
    long a;
    long b;
};

extern int foo(struct STR s);

void func(void)
{
    struct STR s = { 0 };

    foo(s); /* W0493 */
}

6.428.4 Related message

None.

6.428.5 Since

1.0.0


Next: , Previous: W0493, Up: Messages

6.429 W0495

6.429.1 Message body

operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.

6.429.2 Content

Under construction.

6.429.3 Sample code

void func(int a, int b, int c)
{
    int x = a % b  * c; /* W0495 */
}

6.429.4 Related message

  • W0496 A ternary operator is used several times. It had better clear the coupling by using `()'.
  • W0497 Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.
  • W0498 The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0499 The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0500 The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.
  • W0501 A ternary operator is used with binary operator. It had better clear the coupling by using `()'.
  • W0502 A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.429.5 Since

1.0.0


Next: , Previous: W0495, Up: Messages

6.430 W0496

6.430.1 Message body

A ternary operator is used several times. It had better clear the coupling by using `()'.

6.430.2 Content

Under construction.

6.430.3 Sample code

void func(int a, int b, int c, int d, int e)
{
    int f = a ? b : c ? d : e; /* W0496 */
}

6.430.4 Related message

  • W0495 operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.
  • W0497 Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.
  • W0498 The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0499 The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0500 The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.
  • W0501 A ternary operator is used with binary operator. It had better clear the coupling by using `()'.
  • W0502 A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.430.5 Since

1.0.0


Next: , Previous: W0496, Up: Messages

6.431 W0497

6.431.1 Message body

Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.

6.431.2 Content

Under construction.

6.431.3 Sample code

void func(int a, int b, int c)
{
    int d = a << b << c; /* W0497 */
}

6.431.4 Related message

  • W0495 operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.
  • W0496 A ternary operator is used several times. It had better clear the coupling by using `()'.
  • W0498 The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0499 The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0500 The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.
  • W0501 A ternary operator is used with binary operator. It had better clear the coupling by using `()'.
  • W0502 A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.431.5 Since

1.0.0


Next: , Previous: W0497, Up: Messages

6.432 W0498

6.432.1 Message body

The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.

6.432.2 Content

Under construction.

6.432.3 Sample code

void func(int a, int b, int c)
{
    int d = a - b + c; /* W0498 */
}

6.432.4 Related message

  • W0495 operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.
  • W0496 A ternary operator is used several times. It had better clear the coupling by using `()'.
  • W0497 Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.
  • W0499 The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0500 The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.
  • W0501 A ternary operator is used with binary operator. It had better clear the coupling by using `()'.
  • W0502 A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.432.5 Since

1.0.0


Next: , Previous: W0498, Up: Messages

6.433 W0499

6.433.1 Message body

The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.

6.433.2 Content

Under construction.

6.433.3 Sample code

void func(int a, int b, int c)
{
    int d = a << b >> c; /* W0499 */
}

6.433.4 Related message

  • W0495 operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.
  • W0496 A ternary operator is used several times. It had better clear the coupling by using `()'.
  • W0497 Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.
  • W0498 The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0500 The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.
  • W0501 A ternary operator is used with binary operator. It had better clear the coupling by using `()'.
  • W0502 A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.433.5 Since

1.0.0


Next: , Previous: W0499, Up: Messages

6.434 W0500

6.434.1 Message body

The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.

6.434.2 Content

Under construction.

6.434.3 Sample code

void func(int a, int b, int c)
{
    int d = a * b + c;  /* W0500 */
}

6.434.4 Related message

  • W0495 operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.
  • W0496 A ternary operator is used several times. It had better clear the coupling by using `()'.
  • W0497 Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.
  • W0498 The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0499 The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0501 A ternary operator is used with binary operator. It had better clear the coupling by using `()'.
  • W0502 A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.434.5 Since

1.0.0


Next: , Previous: W0500, Up: Messages

6.435 W0501

6.435.1 Message body

A ternary operator is used with binary operator. It had better clear the coupling by using `()'.

6.435.2 Content

Under construction.

6.435.3 Sample code

void func(int a, int b, int c)
{
    int d = a ? a : a + c; /* W0501 */
}

6.435.4 Related message

  • W0495 operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.
  • W0496 A ternary operator is used several times. It had better clear the coupling by using `()'.
  • W0497 Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.
  • W0498 The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0499 The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0500 The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.
  • W0502 A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.435.5 Since

1.0.0


Next: , Previous: W0501, Up: Messages

6.436 W0502

6.436.1 Message body

A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping.

6.436.2 Content

Under construction.

6.436.3 Sample code

void func(int a, int b, int c)
{
    int d = a != b << c; /* W0502 */
}

6.436.4 Related message

  • W0495 operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'.
  • W0496 A ternary operator is used several times. It had better clear the coupling by using `()'.
  • W0497 Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'.
  • W0498 The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0499 The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'.
  • W0500 The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'.
  • W0501 A ternary operator is used with binary operator. It had better clear the coupling by using `()'.

6.436.5 Since

1.0.0


Next: , Previous: W0502, Up: Messages

6.437 W0508

6.437.1 Message body

There's a side effect at the right operand of `&&' or `||'operator.

6.437.2 Content

Under construction.

6.437.3 Sample code

if ((a == b) && ((c = func()) == d)) /* W0508 */

if a==b is true, the return value of func() is substituted for the c.

6.437.4 Related message

None.

6.437.5 Since

1.0.0


Next: , Previous: W0508, Up: Messages

6.438 W0511

6.438.1 Message body

C++ style comment of `//' is used.

6.438.2 Content

Under construction.

6.438.3 Sample code

// W0511

6.438.4 Related message

None.

6.438.5 Since

1.0.0


Next: , Previous: W0511, Up: Messages

6.439 W0512

6.439.1 Message body

The result of `++' or `–' operator is used in the statement.

6.439.2 Content

Under construction.

6.439.3 Sample code

a = b++ + --c + d++; /* W0512 */

6.439.4 Related message

None.

6.439.5 Since

1.0.0


Next: , Previous: W0512, Up: Messages

6.440 W0525

6.440.1 Message body

A field named 1bit is declared by signed type.

6.440.2 Content

Under construction.

6.440.3 Sample code

struct ST {
    int bit:1; /* W0525 */
};

6.440.4 Related message

None.

6.440.5 Since

1.0.0


Next: , Previous: W0525, Up: Messages

6.441 W0528

6.441.1 Message body

This macro defines octal constant value.

6.441.2 Content

Under construction.

6.441.3 Sample code

#define MACRO 0123 /* W0528 */

6.441.4 Related message

  • W0529 An octal literal is used.
  • W0530 An octal escape sequence is used in a character constant or a string literal.

6.441.5 Since

1.0.0


Next: , Previous: W0528, Up: Messages

6.442 W0529

6.442.1 Message body

An octal literal is used.

6.442.2 Content

Under construction.

6.442.3 Sample code

#define MACRO 0123

int a = 0123; /* W0529 */
int b = MACRO; /* W0529 */

6.442.4 Related message

  • W0528 This macro defines octal constant value.
  • W0530 An octal escape sequence is used in a character constant or a string literal.

6.442.5 Since

1.0.0


Next: , Previous: W0529, Up: Messages

6.443 W0530

6.443.1 Message body

An octal escape sequence is used in a character constant or a string literal.

6.443.2 Content

Under construction.

6.443.3 Sample code

char *s = "\012"; /* W0530 */

6.443.4 Related message

  • W0528 This macro defines octal constant value.
  • W0529 An octal literal is used.

6.443.5 Since

1.0.0


Next: , Previous: W0530, Up: Messages

6.444 W0532

6.444.1 Message body

'break' statement is used to exits 'case' or 'default' section, but it's not described at the end of 'case' section.

6.444.2 Content

Under construction.

6.444.3 Sample code

switch (x) {
case 1:
    if (y == 0) {
        break; /* W0532 */
    }
    ...snip...
    break;
case 2:
    ...snip...
    break;
}

6.444.4 Related message

None.

6.444.5 Since

1.0.0


Next: , Previous: W0532, Up: Messages

6.445 W0534

6.445.1 Message body

A control variable `%s' is not initialized in this 'for' statement.

6.445.2 Content

Under construction.

6.445.3 Sample code

int i = 0;
int j;

for (; i < 10; i++) { /* W0534 */
}

for (j = 0; i < 20; i++) { /* W0534 */
}

6.445.4 Related message

None.

6.445.5 Since

1.0.0


Next: , Previous: W0534, Up: Messages

6.446 W0535

6.446.1 Message body

A comma operator is used in a 'for' statement.

6.446.2 Content

Under construction.

6.446.3 Sample code

int i, j, k = 0;

for (i = 0, j = 0; i < 10; i++, j++, k--) { /* W0535 */
}

6.446.4 Related message

None.

6.446.5 Since

1.0.0


Next: , Previous: W0535, Up: Messages

6.447 W0538

6.447.1 Message body

This 'default' label is not final label in this 'switch' statement.

6.447.2 Content

Under construction.

6.447.3 Sample code

switch (x) {
default: /* W0538 */
    ...snip...
case 1:
    ...snip...
}

6.447.4 Related message

None.

6.447.5 Since

1.0.0


Next: , Previous: W0538, Up: Messages

6.448 W0540

6.448.1 Message body

A function which the blank formal argument list is declared. `void' is omitted.

6.448.2 Content

Under construction.

6.448.3 Sample code

void func() /* W0540 */
{
    ...snip...
}

6.448.4 Related message

None.

6.448.5 Since

1.0.0


Next: , Previous: W0540, Up: Messages

6.449 W0541

6.449.1 Message body

Inline assembly code should be encapsulated by macro.

6.449.2 Content

Under construction.

6.449.3 Sample code

#define ASM_CODE asm("movl %ecx, %eax")

void foo(int arg1, int *arg2, int arg3)
{
    asm("movl %ecx, %eax"); /* W0541 */
    __asm__("movl %ecx, (%eax)"); /* W0541 */

    asm { /* W0541 */
        xorl eax, eax
    }

    ASM_CODE; /* OK */

    __asm__ volatile ( /* W0541 */
            "int $0x80"
            : "=a" (r)
              "+b" (arg1),
              "+c" (arg2),
              "+d" (arg3)
            : "a" (128)
            : "memory", "cc");
}

6.449.4 Related message

None.

6.449.5 Since

1.6.0


Next: , Previous: W0541, Up: Messages

6.450 W0542

6.450.1 Message body

There are identifiers in the part of formal argument in a function declaration.

6.450.2 Content

Under construction.

6.450.3 Sample code

void func(int i, char, int, char c); /* W0542 */

6.450.4 Related message

None.

6.450.5 Since

1.0.0


Next: , Previous: W0542, Up: Messages

6.451 W0543

6.451.1 Message body

The identifier of formal argument in this function declaration is different from the past declaration of it.

6.451.2 Content

Under construction.

6.451.3 Sample code

void func(int i1, int i2);

void func(int i2, int i1) /* W0543 */
{
    ...snip...
}

6.451.4 Related message

  • W0544 The identifier of formal argument in the function declaration is different from the declaration of function pointer.

6.451.5 Since

1.0.0


Next: , Previous: W0543, Up: Messages

6.452 W0544

6.452.1 Message body

The identifier of formal argument in the function declaration is different from the declaration of function pointer.

6.452.2 Content

Under construction.

6.452.3 Sample code

void func(int i1, int i2);
void (*p)(int i2, int i1) = &func; /* W0544 */

6.452.4 Related message

  • W0543 The identifier of formal argument in this function declaration is different from the past declaration of it.

6.452.5 Since

1.0.0


Next: , Previous: W0544, Up: Messages

6.453 W0546

6.453.1 Message body

There is 'case' or 'default' label of switch statement in a nested block.

6.453.2 Content

Under construction.

6.453.3 Sample code

switch (x) {
case 1:
    if (y > 0) {
    case 2: /* W0546 */
        break;
    }
    ...snip...
    break;
default:
    ...snip...
}

6.453.4 Related message

None.

6.453.5 Since

1.0.0


Next: , Previous: W0546, Up: Messages

6.454 W0549

6.454.1 Message body

A formal argument of macro doesn't enclosed by `()'.

6.454.2 Content

Under construction.

6.454.3 Sample code

#define ADD(a, b) a + b /* W0549 */

int x = 3 * ADD(1, 2);

(3 * 1) + 2 = 5 is substituted for the x instead of 3 * (1 + 2) = 9.

6.454.4 Related message

None.

6.454.5 Since

1.0.0


Next: , Previous: W0549, Up: Messages

6.455 W0551

6.455.1 Message body

An union type specifier is defined.

6.455.2 Content

Under construction.

6.455.3 Sample code

union UNI { /* W0551 */
    int a;
    short b;
    long c;
};

6.455.4 Related message

  • W0552 An union type object is defined.

6.455.5 Since

1.0.0


Next: , Previous: W0551, Up: Messages

6.456 W0552

6.456.1 Message body

An union type object is defined.

6.456.2 Content

Under construction.

6.456.3 Sample code

union UNI {
    int a;
    short b;
    long c;
};

union UNI u; /* W0552 */

6.456.4 Related message

  • W0551 An union type specifier is defined.

6.456.5 Since

1.0.0


Next: , Previous: W0552, Up: Messages

6.457 W0553

6.457.1 Message body

A pointer points to the function cast to other function pointer type.

6.457.2 Content

Under construction.

6.457.3 Sample code

extern int func(void);

void (*p)(int) = (void (*)(int)) &func; /* W0553 */

6.457.4 Related message

None.

6.457.5 Since

1.0.0


Next: , Previous: W0553, Up: Messages

6.458 W0554

6.458.1 Message body

An actual argument `%s' in `#pragma' is unrecognized. This `#pragma' command will be ignored.

6.458.2 Content

Under construction.

6.458.3 Sample code

#pragma SystemSpecificPragmaName 5 /* W0544 */

6.458.4 Related message

None.

6.458.5 Since

1.0.0


Next: , Previous: W0554, Up: Messages

6.459 W0555

6.459.1 Message body

This function is called recursive with indirectly.

6.459.2 Content

Under construction.

6.459.3 Sample code

test1.c

int func1(int i) /* W0555 */
{
    if (i < 10) {
        return i + 1;
    }
    else {
        return func3(i);
    }
}

test2.c

int func2(int i) /* W0555 */
{
    return func1(i) + 2;
}

test3.c

int func3(int i) /* W0555 */
{
    return func2(i) + 3;
}

6.459.4 Related message

  • W0556 The function which includes this call is called recursively.

6.459.5 Since

1.0.0


Next: , Previous: W0555, Up: Messages

6.460 W0556

6.460.1 Message body

The function which includes this call is called recursively.

6.460.2 Content

Under construction.

6.460.3 Sample code

int func(int i)
{
    if (i == 0) {
        return 0;
    }
    else {
        return func(i - 1); /* W0556 */
    }
}

6.460.4 Related message

  • W0555 This function is called recursive with indirectly.

6.460.5 Since

1.0.0


Next: , Previous: W0556, Up: Messages

6.461 W0559

6.461.1 Message body

The operand of `!' operator is the expression of bit operation or arithmetic operation.

6.461.2 Content

Under construction.

6.461.3 Sample code

int func(int a, int b)
{
    if (!(a || b)) {
        return 0;
    }
    else {
        return !(a & b); /* W0559 */
    }
}

6.461.4 Related message

  • W0559 The operand of `!' operator is the expression of bit operation or arithmetic operation.

6.461.5 Since

1.0.0


Next: , Previous: W0559, Up: Messages

6.462 W0560

6.462.1 Message body

The operand of `~' operator is boolean type expression.

6.462.2 Content

Under construction.

6.462.3 Sample code

int func(int a, int b)
{
    return ~((a < b) && (b > 0)); /* W0560 */
}

6.462.4 Related message

  • W0560 The operand of `~' operator is boolean type expression.

6.462.5 Since

1.0.0


Next: , Previous: W0560, Up: Messages

6.463 W0561

6.463.1 Message body

The meaning of `*p++' is `*(p++)'. It is not `(*p)++'. `*' operator is verbose.

6.463.2 Content

Under construction.

6.463.3 Sample code

*p++; /* W0561 */

6.463.4 Related message

None.

6.463.5 Since

1.0.0


Next: , Previous: W0561, Up: Messages

6.464 W0562

6.464.1 Message body

There are verbose `{}' in the initializer.

6.464.2 Content

Under construction.

6.464.3 Sample code

int ng[3][2] = { { {1, 2}, { 3, 4}, { 5, 6 } } }; /* W0562 */

int ok[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* OK */

6.464.4 Related message

None.

6.464.5 Since

1.0.0


Next: , Previous: W0562, Up: Messages

6.465 W0563

6.465.1 Message body

If it jumps from outside of this block to `%s' label,the local variable will not be initialized.

6.465.2 Content

Under construction.

6.465.3 Sample code

void func(int a, int b)
{
    if (a == 0) {
        if (b != 0) {
            goto ERR;
        }
    }
    else {
        int c = 0;
    ERR:  /* W0563 */
        b = c;
    }
}

6.465.4 Related message

  • W0564 If this 'goto' statement jumps to `%s' label,local variable will not be initialized.

6.465.5 Since

1.0.0


Next: , Previous: W0563, Up: Messages

6.466 W0564

6.466.1 Message body

If this 'goto' statement jumps to `%s' label,local variable will not be initialized.

6.466.2 Content

Under construction.

6.466.3 Sample code

void func(int a, int b)
{
    if (a == 0) {
        int c = 0;
    RETRY:
        b = c;
    }

    if (b != 0) {
        goto RETRY; /* W0564 */
    }
}

6.466.4 Related message

  • W0563 If it jumps from outside of this block to `%s' label,the local variable will not be initialized.

6.466.5 Since

1.0.0


Next: , Previous: W0564, Up: Messages

6.467 W0565

6.467.1 Message body

A volatile integer type cast to volatile pointer type and vice versa.

6.467.2 Content

Under construction.

6.467.3 Sample code

unsigned int a = 0xFFFFU;
volatile unsigned int *b = (volatile unsigned int *) a; /* W0565 */
unsigned int c = (unsigned int) b; /* W0565 */

6.467.4 Related message

  • W0566 A volatile integer type cast to function pointer type and vice versa.
  • W0567 A volatile integer type cast to pointer to object and vice versa.

6.467.5 Since

1.0.0


Next: , Previous: W0565, Up: Messages

6.468 W0566

6.468.1 Message body

A volatile integer type cast to function pointer type and vice versa.

6.468.2 Content

Under construction.

6.468.3 Sample code

unsigned int addr = 0xFFFFFFFFU;
void (*p)(int, long) = (void (*)(int, long)) addr; /* W0566 */
int i = (int) p; /* W0566 */

6.468.4 Related message

  • W0565 A volatile integer type cast to volatile pointer type and vice versa.
  • W0567 A volatile integer type cast to pointer to object and vice versa.

6.468.5 Since

1.0.0


Next: , Previous: W0566, Up: Messages

6.469 W0567

6.469.1 Message body

A volatile integer type cast to pointer to object and vice versa.

6.469.2 Content

Under construction.

6.469.3 Sample code

unsigned int addr = 0xFFFFFFFFU;
void (*p)(int, long) = (void (*)(int, long)) addr; /* W0567 */
int i = (int) p; /* W0567 */

6.469.4 Related message

  • W0565 A volatile integer type cast to volatile pointer type and vice versa.
  • W0566 A volatile integer type cast to function pointer type and vice versa.

6.469.5 Since

1.0.0


Next: , Previous: W0567, Up: Messages

6.470 W0568

6.470.1 Message body

The result of left shift operation against the signed constant expression value is undefined.

6.470.2 Content

Under construction.

6.470.3 Sample code

int a = 0x7FFFFFFF << 1; /* W0568 */
int b = -5 << 1; /* W0568 */

6.470.4 Related message

  • W0569 The result of left shift operation against the signed expression value is undefined.
  • W0570 This signed left shift operation may make undefined value.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.470.5 Since

1.0.0


Next: , Previous: W0568, Up: Messages

6.471 W0569

6.471.1 Message body

The result of left shift operation against the signed expression value is undefined.

6.471.2 Content

Under construction.

6.471.3 Sample code

int func(int a)
{
    if (a >= 0x40000000) {
        return a << 1; /* W0569 */
    }

    if (a < 0) {
        return a << 1; /* W0569 */
    }

    return a << 1;
}

6.471.4 Related message

  • W0568 The result of left shift operation against the signed constant expression value is undefined.
  • W0570 This signed left shift operation may make undefined value.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.471.5 Since

1.0.0


Next: , Previous: W0569, Up: Messages

6.472 W0570

6.472.1 Message body

This signed left shift operation may make undefined value.

6.472.2 Content

Under construction.

6.472.3 Sample code

int func(int a)
{
    if (a >= 0x10000000) {
        return a << 1; /* W0570 */
    }

    if (a < 10) {
        return a << 1; /* W0570 */
    }

    return a << 1;
}

6.472.4 Related message

  • W0568 The result of left shift operation against the signed constant expression value is undefined.
  • W0569 The result of left shift operation against the signed expression value is undefined.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.472.5 Since

1.0.0


Next: , Previous: W0570, Up: Messages

6.473 W0571

6.473.1 Message body

The result of right shift operation against the signed data is a possibility the both logical shift and arithmetic shift by implementation.

6.473.2 Content

Under construction.

6.473.3 Sample code

int func(int a)
{
    return a >> 3; /* W0571 */
}

6.473.4 Related message

  • W0572 Bitwise operation of signed value causes implementation-defined behavior.

6.473.5 Since

1.0.0


Next: , Previous: W0571, Up: Messages

6.474 W0572

6.474.1 Message body

Bitwise operation of signed value causes implementation-defined behavior.

6.474.2 Content

Under construction.

6.474.3 Sample code

void func(short a)
{
    short b;

    b = a >> 8; /* W0572 */
    b <<= 1; /* W0572 */
    b = a & 15; /* W0572 */
    b = a | 15; /* W0572 */
    b = a ^ 15; /* W0572 */
    b = ~a; /* W0572 */
}

6.474.4 Related message

  • W0571 The result of right shift operation against the signed data is a possibility the both logical shift and arithmetic shift by implementation.

6.474.5 Since

1.0.0


Next: , Previous: W0572, Up: Messages

6.475 W0573

6.475.1 Message body

A `-' character in scanset in `[]' is implementation defined.

6.475.2 Content

Under construction.

6.475.3 Sample code

char c;
scanf("%[a-z]", &c); /* W0573 */

6.475.4 Related message

None.

6.475.5 Since

1.6.0


Next: , Previous: W0573, Up: Messages

6.476 W0574

6.476.1 Message body

The character except for basic source character is used in the character constant.

6.476.2 Content

Under construction.

6.476.3 Sample code

const char c = '$'; /* W0574 */

6.476.4 Related message

  • W0575 The character except for basic source character is used in the string literal.
  • W0576 The character except for basic source character is used in the comment of source file `%s'.
  • W0577 The character except for basic source character is used in preprocessing directive of source file `%s'.

6.476.5 Since

1.0.0


Next: , Previous: W0574, Up: Messages

6.477 W0575

6.477.1 Message body

The character except for basic source character is used in the string literal.

6.477.2 Content

Under construction.

6.477.3 Sample code

const char *str = "@$"; /* W0575 */

6.477.4 Related message

  • W0574 The character except for basic source character is used in the character constant.
  • W0576 The character except for basic source character is used in the comment of source file `%s'.
  • W0577 The character except for basic source character is used in preprocessing directive of source file `%s'.

6.477.5 Since

1.0.0


Next: , Previous: W0575, Up: Messages

6.478 W0576

6.478.1 Message body

The character except for basic source character is used in the comment of source file `%s'.

6.478.2 Content

Under construction.

6.478.3 Sample code

/* $ W0576 */

6.478.4 Related message

  • W0574 The character except for basic source character is used in the character constant.
  • W0575 The character except for basic source character is used in the string literal.
  • W0577 The character except for basic source character is used in preprocessing directive of source file `%s'.

6.478.5 Since

1.0.0


Next: , Previous: W0576, Up: Messages

6.479 W0577

6.479.1 Message body

The character except for basic source character is used in preprocessing directive of source file `%s'.

6.479.2 Content

Under construction.

6.479.3 Sample code

#define MACRO $ /* W0577 */

6.479.4 Related message

  • W0574 The character except for basic source character is used in the character constant.
  • W0575 The character except for basic source character is used in the string literal.
  • W0576 The character except for basic source character is used in the comment of source file `%s'.

6.479.5 Since

1.0.0


Next: , Previous: W0577, Up: Messages

6.480 W0578

6.480.1 Message body

A generic integer value of the compound expression typed `%s' is implicitly converted into a new value of bigger type `%s'.

6.480.2 Content

Under construction.

6.480.3 Sample code

void func(int a)
{
    long b = a * a; /* W0578 */
}

6.480.4 Related message

None.

6.480.5 Since

1.0.0


Next: , Previous: W0578, Up: Messages

6.481 W0579

6.481.1 Message body

A generic integer value of the compound expression typed `%s' is explicitly converted into a new value of bigger type `%s'.

6.481.2 Content

Under construction.

6.481.3 Sample code

void func(int a)
{
    long b = (long) (a * a); /* W0579 */
}

6.481.4 Related message

None.

6.481.5 Since

1.6.0


Next: , Previous: W0579, Up: Messages

6.482 W0580

6.482.1 Message body

An address of local static variable is substituted for a pointer which has a wider scope.

6.482.2 Content

Under construction.

6.482.3 Sample code

int *p;

void func(void)
{
    static int i = 0;

    p = &i; /* W0580 */
}

6.482.4 Related message

None.

6.482.5 Since

1.0.0


Next: , Previous: W0580, Up: Messages

6.483 W0581

6.483.1 Message body

The number or type of actual argument is different from the past.

6.483.2 Content

Under construction.

6.483.3 Sample code

int func(int a, short b, long c)
{
    switch (a) {
    case 0:
        return foo(a, b, c);
    case 1:
        return foo(a, c, b); /* W0581 */
    default:
        return foo(b, c); /* W0581 */
    }
}

6.483.4 Related message

  • W0582 The number or type of actual argument is different from the function prototype declaration at the following.
  • W0583 The number or type of actual argument is different from the function declaration at the following.
  • W0584 The type of %s actual argument is different from the type of formal argument in function definition.

6.483.5 Since

1.0.0


Next: , Previous: W0581, Up: Messages

6.484 W0582

6.484.1 Message body

The number or type of actual argument is different from the function prototype declaration at the following.

6.484.2 Content

Under construction.

6.484.3 Sample code

int func(int a, short b, long c)
{
    switch (a) {
    case 0:
        return foo(a, b, c);
    case 1:
        return foo(a, c, b); /* W0582 */
    default:
        return foo(b, c); /* W0582 */
    }
}

extern int foo(int, short, long);

6.484.4 Related message

  • W0581 The number or type of actual argument is different from the past.
  • W0583 The number or type of actual argument is different from the function declaration at the following.
  • W0584 The type of %s actual argument is different from the type of formal argument in function definition.

6.484.5 Since

1.0.0


Next: , Previous: W0582, Up: Messages

6.485 W0583

6.485.1 Message body

The number or type of actual argument is different from the function declaration at the following.

6.485.2 Content

Under construction.

6.485.3 Sample code

int func(int a, short b, long c)
{
    switch (a) {
    case 0:
        return foo(a, b, c);
    case 1:
        return foo(a, c, b); /* W0583 */
    default:
        return foo(b, c); /* W0583 */
    }
}

int foo(int a, short b, long c)
{
    return a + b + c;
}

6.485.4 Related message

  • W0581 The number or type of actual argument is different from the past.
  • W0582 The number or type of actual argument is different from the function prototype declaration at the following.
  • W0584 The type of %s actual argument is different from the type of formal argument in function definition.

6.485.5 Since

1.0.0


Next: , Previous: W0583, Up: Messages

6.486 W0584

6.486.1 Message body

The type of %s actual argument is different from the type of formal argument in function definition.

6.486.2 Content

Under construction.

6.486.3 Sample code

extern void func1(a, b)
long a;
double b;
{
    ...snip...
}

void func2(void)
{
    int a = 0;
    long b = 0;

    func1(a, b); /* W0584 */
}

6.486.4 Related message

  • W0581 The number or type of actual argument is different from the past.
  • W0582 The number or type of actual argument is different from the function prototype declaration at the following.
  • W0583 The number or type of actual argument is different from the function declaration at the following.

6.486.5 Since

1.0.0


Next: , Previous: W0584, Up: Messages

6.487 W0585

6.487.1 Message body

A control variable `%s' doesn't appear increment expression.

6.487.2 Content

Under construction.

6.487.3 Sample code

int i, j;

for (i = j = 0; i < 10; j++) { /* W0585 */
    i++;
}

6.487.4 Related message

None.

6.487.5 Since

1.0.0


Next: , Previous: W0585, Up: Messages

6.488 W0586

6.488.1 Message body

A typedef `%s' is declared in more than one place.

6.488.2 Content

Under construction.

6.488.3 Sample code

test1.c

typedef int *INT_PTR; /* W0586 */

void func1(INT_PTR)
{
    ...snip...
}

test2.c

typedef int *INT_PTR; /* W0586 */

void func2(INT_PTR)
{
    ...snip...
}

6.488.4 Related message

None.

6.488.5 Since

1.0.0


Next: , Previous: W0586, Up: Messages

6.489 W0589

6.489.1 Message body

An object `%s' is only referenced by function `%s' in the defined translation unit.

6.489.2 Content

Under construction.

6.489.3 Sample code

test1.c

void func1(void) /* W0589 & W0591 */
{
    ...snip...
}

void func2(void)
{
    func1();
}

test2.c

extern void func2(void);

void func3(void)
{
    func2();
}

6.489.4 Related message

None.

6.489.5 Since

1.0.0


Next: , Previous: W0589, Up: Messages

6.490 W0591

6.490.1 Message body

A function `%s' is only referenced by the defined translation unit.

6.490.2 Content

Under construction.

6.490.3 Sample code

test1.c

void func1(void) /* W0589 & W0591 */
{
    ...snip...
}

void func2(void)
{
    func1();
}

test2.c

extern void func2(void);

void func3(void)
{
    func2();
}

6.490.4 Related message

None.

6.490.5 Since

1.0.0


Next: , Previous: W0591, Up: Messages

6.491 W0593

6.491.1 Message body

An object `%s' is only referenced by the defined translation unit.

6.491.2 Content

Under construction.

6.491.3 Sample code

test1.c

int a = 100; /* W0593 */

void func1(void)
{
    a += 1;
}

void func2(void)
{
    func1();
    a += 2;
}

test2.c

extern void func2(void);

void func3(void)
{
    func2();
}

6.491.4 Related message

None.

6.491.5 Since

1.0.0


Next: , Previous: W0593, Up: Messages

6.492 W0597

6.492.1 Message body

`%s' is modified more than once between the side-effects completion point. The evaluation order is undefined.

6.492.2 Content

Under construction.

6.492.3 Sample code

extern int bar(int *);
extern int baz(const int *);

void foo(int a, int b)
{
    a = b * a++; /* W0597 */
    a = bar(&a) * a++; /* W0597 */
    b = bar(&a) * (a++ + --a); /* W0597, W0599 */
}

6.492.4 Related message

  • W0598 `%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined.
  • W0599 `%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined.
  • W0600 `%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined.

6.492.5 Since

1.2.0


Next: , Previous: W0597, Up: Messages

6.493 W0598

6.493.1 Message body

`%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined.

6.493.2 Content

Under construction.

6.493.3 Sample code

extern int bar(int *);
extern int baz(const int *);

void foo(int a, int b)
{
    b = bar(&a) * a++; /* W0598 */
    b = bar(&a) + bar(&a); /* W0598 */
    b = bar(&a) + baz(&a); /* W0600 */
    b = baz(&a) + baz(&a);
}

6.493.4 Related message

  • W0597 `%s' is modified more than once between the side-effects completion point. The evaluation order is undefined.
  • W0599 `%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined.
  • W0600 `%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined.

6.493.5 Since

1.2.0


Next: , Previous: W0598, Up: Messages

6.494 W0599

6.494.1 Message body

`%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined.

6.494.2 Content

Under construction.

6.494.3 Sample code

extern void bar(int, int, int);

void foo(int a, int b, int *c)
{
    b = (a + 1) + a++; /* W0599 */
    b = c[a] + c[++a]; /* W0599 */
    bar(a, a++, c[a]); /* W0599 */
    bar(a, a, c[a++]); /* W0599 */
    a = a + b;
    c[a] = a++ + b; /* W0599 */
}

6.494.4 Related message

  • W0597 `%s' is modified more than once between the side-effects completion point. The evaluation order is undefined.
  • W0598 `%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined.
  • W0600 `%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined.

6.494.5 Since

1.2.0


Next: , Previous: W0599, Up: Messages

6.495 W0600

6.495.1 Message body

`%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined.

6.495.2 Content

Under construction.

6.495.3 Sample code

extern int bar(int *);
extern int baz(const int *);

void foo(int a, int b)
{
    b = bar(&a) * a; /* W0600 */
    b = baz(&a) * a;
}

6.495.4 Related message

  • W0597 `%s' is modified more than once between the side-effects completion point. The evaluation order is undefined.
  • W0598 `%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined.
  • W0599 `%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined.

6.495.5 Since

1.2.0


Next: , Previous: W0600, Up: Messages

6.496 W0605

6.496.1 Message body

Multiple break-statements appear to break the same iteration.

6.496.2 Content

Under construction.

6.496.3 Sample code

while (n > 0) {
    if (n == 1) {
        break;
    }

    if (n == 2) {
        break; /* W0605 */
    }
}

6.496.4 Related message

None.

6.496.5 Since

1.0.0


Next: , Previous: W0605, Up: Messages

6.497 W0606

6.497.1 Message body

An union has a member which type is floating-point.

6.497.2 Content

Under construction.

6.497.3 Sample code

union UNI { /* W0606 */
    float a;
    int b;
};

6.497.4 Related message

None.

6.497.5 Since

1.4.0


Next: , Previous: W0606, Up: Messages

6.498 W0607

6.498.1 Message body

An integer expression which the value which the value is minus converted to unsigned type.

6.498.2 Content

Under construction.

6.498.3 Sample code

void func(int a)
{
    if (a < 0) {
        unsigned int b = (unsigned int) a; /* W0607 */
    }
}

6.498.4 Related message

  • W0608 An integer expression which the value might be minus converted to unsigned type.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.498.5 Since

1.8.0


Next: , Previous: W0607, Up: Messages

6.499 W0608

6.499.1 Message body

An integer expression which the value might be minus converted to unsigned type.

6.499.2 Content

Under construction.

6.499.3 Sample code

void fuu(int a)
{
    unsigned char b;

    if (a < 256) {
        b = (unsigned char) a; /* W0608 */
    }
}

6.499.4 Related message

  • W0607 An integer expression which the value which the value is minus converted to unsigned type.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.499.5 Since

1.8.0


Next: , Previous: W0608, Up: Messages

6.500 W0609

6.500.1 Message body

This logical expression always makes true.

6.500.2 Content

Under construction.

6.500.3 Sample code

void func(int a)
{
    if (a < 0) {
        if (a != 0) { /* W0609 */
            ...snip...
        }
    }
}

6.500.4 Related message

  • W0610 This logical expression always makes false.
  • W0611 The value of this 'for' control expression is always true.
  • W0612 The value of this 'if' conditional expression is always true.
  • W0613 This controlling expression always makes false.
  • W0614 The value of this "do-while" control expression is always false. The body of repetition statement executed only once.

6.500.5 Since

1.0.0


Next: , Previous: W0609, Up: Messages

6.501 W0610

6.501.1 Message body

This logical expression always makes false.

6.501.2 Content

Under construction.

6.501.3 Sample code

void func(int a)
{
    if (a < 0) {
        if (a == 0) { /* W0610 */
        }
    }
}

6.501.4 Related message

  • W0609 This logical expression always makes true.
  • W0611 The value of this 'for' control expression is always true.
  • W0612 The value of this 'if' conditional expression is always true.
  • W0613 This controlling expression always makes false.
  • W0614 The value of this "do-while" control expression is always false. The body of repetition statement executed only once.

6.501.5 Since

1.0.0


Next: , Previous: W0610, Up: Messages

6.502 W0611

6.502.1 Message body

The value of this 'for' control expression is always true.

6.502.2 Content

Under construction.

6.502.3 Sample code

void func(int a)
{
    if ( a > 0 ) {
        while (a != 0) { /* W0611 */
            ...snip...
        }
    }
}

6.502.4 Related message

  • W0609 This logical expression always makes true.
  • W0610 This logical expression always makes false.
  • W0612 The value of this 'if' conditional expression is always true.
  • W0613 This controlling expression always makes false.
  • W0614 The value of this "do-while" control expression is always false. The body of repetition statement executed only once.

6.502.5 Since

1.0.0


Next: , Previous: W0611, Up: Messages

6.503 W0612

6.503.1 Message body

The value of this 'if' conditional expression is always true.

6.503.2 Content

Under construction.

6.503.3 Sample code

int i;

for (i = 0; i < 10; i++) {
    if (i < 20) { /* W0612 */
        ...snip...
    }
}

6.503.4 Related message

  • W0609 This logical expression always makes true.
  • W0610 This logical expression always makes false.
  • W0611 The value of this 'for' control expression is always true.
  • W0613 This controlling expression always makes false.
  • W0614 The value of this "do-while" control expression is always false. The body of repetition statement executed only once.

6.503.5 Since

1.0.0


Next: , Previous: W0612, Up: Messages

6.504 W0613

6.504.1 Message body

This controlling expression always makes false.

6.504.2 Content

Under construction.

6.504.3 Sample code

int i;

for (i = 0; i < 10; i++) {
    if (i > 10) { /* W0613 */
        ...snip...
    }
}

6.504.4 Related message

  • W0609 This logical expression always makes true.
  • W0610 This logical expression always makes false.
  • W0611 The value of this 'for' control expression is always true.
  • W0612 The value of this 'if' conditional expression is always true.
  • W0614 The value of this "do-while" control expression is always false. The body of repetition statement executed only once.

6.504.5 Since

1.0.0


Next: , Previous: W0613, Up: Messages

6.505 W0614

6.505.1 Message body

The value of this \"do-while\" control expression is always false. The body of repetition statement executed only once.

6.505.2 Content

Under construction.

6.505.3 Sample code

void func(int a)
{
    if (a == 0) {
        do {
        } while (a > 0); /* W0614 */
    }
}

6.505.4 Related message

  • W0609 This logical expression always makes true.
  • W0610 This logical expression always makes false.
  • W0611 The value of this 'for' control expression is always true.
  • W0612 The value of this 'if' conditional expression is always true.
  • W0613 This controlling expression always makes false.

6.505.5 Since

1.0.0


Next: , Previous: W0614, Up: Messages

6.506 W0622

6.506.1 Message body

A function is declared in the block scope.

6.506.2 Content

Under construction.

6.506.3 Sample code

int func1(void)
{
    extern int func2(void); /* W0622 */
}

6.506.4 Related message

None.

6.506.5 Since

1.0.0


Next: , Previous: W0622, Up: Messages

6.507 W0623

6.507.1 Message body

An external coupling object is declared in the block scope.

6.507.2 Content

Under construction.

6.507.3 Sample code

int func(void)
{
    extern int i; /* W0623 */
}

6.507.4 Related message

None.

6.507.5 Since

1.0.0


Next: , Previous: W0623, Up: Messages

6.508 W0624

6.508.1 Message body

There is '#define' or '#undef' in a block.

6.508.2 Content

Under construction.

6.508.3 Sample code

#define MACRO 0

int foo(void)
{
#if defined(MACRO)
#undef MACRO    /* W0624 */
#define MACRO 1 /* W0624 */
#endif

    return MACRO;
}

6.508.4 Related message

None.

6.508.5 Since

1.0.0


Next: , Previous: W0624, Up: Messages

6.509 W0625

6.509.1 Message body

`%s' is using in the declaration or definition of external coupling. But its 'typedef' doesn't declare in the header file.

6.509.2 Content

Under construction.

6.509.3 Sample code

typedef int *INT_PTR; /* W0625 */

extern INT_PTR func(void);

INT_PTR func(void)
{
    return 0;
}

6.509.4 Related message

None.

6.509.5 Since

1.8.0


Next: , Previous: W0625, Up: Messages

6.510 W0626

6.510.1 Message body

A wide character or wide string literal is used.

6.510.2 Content

Under construction.

6.510.3 Sample code

const wchar_t a = L'あ'; /* W0626 */

6.510.4 Related message

None.

6.510.5 Since

1.0.0


Next: , Previous: W0626, Up: Messages

6.511 W0627

6.511.1 Message body

There is a dead letter (only `;') in the following other code.

6.511.2 Content

Under construction.

6.511.3 Sample code

if (0); /* W0627 */
{
    ...snip...
}

6.511.4 Related message

None.

6.511.5 Since

1.0.0


Next: , Previous: W0627, Up: Messages

6.512 W0628

6.512.1 Message body

A function `%s' is defined, but this is not used in this project.

6.512.2 Content

Under construction.

6.512.3 Sample code

test1.c

int func1(void)
{
    return 0;
}

void func2(void) /* W0628 */
{
    ...snip...
}

test2.c

extern int func1(void);

int main(void)
{
    return func1();
}

6.512.4 Related message

  • W0629 `%s()' has internal-linkage, but it is never called in this translation-unit.

6.512.5 Since

1.0.0


Next: , Previous: W0628, Up: Messages

6.513 W0629

6.513.1 Message body

`%s()' has internal-linkage, but it is never called in this translation-unit.

6.513.2 Content

Under construction.

6.513.3 Sample code

static int func1(void) /* W0629 */
{
    return 1;
}

int func2(void)
{
    return 1;
}

6.513.4 Related message

  • W0628 A function `%s' is defined, but this is not used in this project.

6.513.5 Since

1.0.0


Next: , Previous: W0629, Up: Messages

6.514 W0632

6.514.1 Message body

Using ' or " characters in `#include <%s>' directive makes undefined behavior.

6.514.2 Content

Under construction.

6.514.3 Sample code

#include <NG'_header.h> /* W0632 */

6.514.4 Related message

  • W0633 Using ' character in `#include "%s"' directive makes undefined behavior.
  • W0634 `\' is used in `#include' line. `/' is recommended for the path delimiter.

6.514.5 Since

1.8.0


Next: , Previous: W0632, Up: Messages

6.515 W0633

6.515.1 Message body

Using ' character in `#include "%s"' directive makes undefined behavior.

6.515.2 Content

Under construction.

6.515.3 Sample code

#include "NG'_header.h" /* W0633 */

6.515.4 Related message

  • W0632 Using ' or " characters in `#include <%s>' directive makes undefined behavior.
  • W0634 `\' is used in `#include' line. `/' is recommended for the path delimiter.

6.515.5 Since

1.8.0


Next: , Previous: W0633, Up: Messages

6.516 W0634

6.516.1 Message body

`\' is used in `#include' line. `/' is recommended for the path delimiter.

6.516.2 Content

Under construction.

6.516.3 Sample code

#include "..\ng\header.h" /* W0634 */
#include "..\\ng\\header.h" /* W0634 */

6.516.4 Related message

  • W0632 Using ' or " characters in `#include <%s>' directive makes undefined behavior.
  • W0633 Using ' character in `#include "%s"' directive makes undefined behavior.

6.516.5 Since

1.8.0


Next: , Previous: W0634, Up: Messages

6.517 W0635

6.517.1 Message body

The type doesn't match with %sth conversion specifier and the corresponding actual argument.

6.517.2 Content

Under construction.

6.517.3 Sample code

void func(int a)
{
    printf("Apple %f\n", a); /* W0635 */
}

6.517.4 Related message

  • W0636 An actual argument doesn't exist correspond to %sth conversion specifier.
  • W0637 There is more actual argument than the number of conversion specifier in function call.
  • W0638 This function call requiring at least one actual argument.
  • W0639 %sth conversion specifier doesn't match with corresponding type of actual argument.
  • W0640 The actual argument of scanf function have to pass the object pointer to store the data.

6.517.5 Since

1.0.0


Next: , Previous: W0635, Up: Messages

6.518 W0636

6.518.1 Message body

An actual argument doesn't exist correspond to %sth conversion specifier.

6.518.2 Content

Under construction.

6.518.3 Sample code

void func(int a, int b, int c)
{
    printf("Banana %d, %d, %d\n", a, b); /* W0636 */
}

6.518.4 Related message

  • W0635 The type doesn't match with %sth conversion specifier and the corresponding actual argument.
  • W0637 There is more actual argument than the number of conversion specifier in function call.
  • W0638 This function call requiring at least one actual argument.
  • W0639 %sth conversion specifier doesn't match with corresponding type of actual argument.
  • W0640 The actual argument of scanf function have to pass the object pointer to store the data.

6.518.5 Since

1.0.0


Next: , Previous: W0636, Up: Messages

6.519 W0637

6.519.1 Message body

There is more actual argument than the number of conversion specifier in function call.

6.519.2 Content

Under construction.

6.519.3 Sample code

void func(int a, int b)
{
    printf("Orange %d\n", a, b); /* W0637 */
}

6.519.4 Related message

  • W0635 The type doesn't match with %sth conversion specifier and the corresponding actual argument.
  • W0636 An actual argument doesn't exist correspond to %sth conversion specifier.
  • W0638 This function call requiring at least one actual argument.
  • W0639 %sth conversion specifier doesn't match with corresponding type of actual argument.
  • W0640 The actual argument of scanf function have to pass the object pointer to store the data.

6.519.5 Since

1.0.0


Next: , Previous: W0637, Up: Messages

6.520 W0638

6.520.1 Message body

This function call requiring at least one actual argument.

6.520.2 Content

Under construction.

6.520.3 Sample code

printf(); /* W0638 */

6.520.4 Related message

  • W0635 The type doesn't match with %sth conversion specifier and the corresponding actual argument.
  • W0636 An actual argument doesn't exist correspond to %sth conversion specifier.
  • W0637 There is more actual argument than the number of conversion specifier in function call.
  • W0639 %sth conversion specifier doesn't match with corresponding type of actual argument.
  • W0640 The actual argument of scanf function have to pass the object pointer to store the data.

6.520.5 Since

1.0.0


Next: , Previous: W0638, Up: Messages

6.521 W0639

6.521.1 Message body

%sth conversion specifier doesn't match with corresponding type of actual argument.

6.521.2 Content

Under construction.

6.521.3 Sample code

int a;

scanf("%f",  &a); /* W0639 */

6.521.4 Related message

  • W0635 The type doesn't match with %sth conversion specifier and the corresponding actual argument.
  • W0636 An actual argument doesn't exist correspond to %sth conversion specifier.
  • W0637 There is more actual argument than the number of conversion specifier in function call.
  • W0638 This function call requiring at least one actual argument.
  • W0640 The actual argument of scanf function have to pass the object pointer to store the data.

6.521.5 Since

1.0.0


Next: , Previous: W0639, Up: Messages

6.522 W0640

6.522.1 Message body

%sth conversion specifier doesn't match with corresponding type of actual argument.

6.522.2 Content

Under construction.

6.522.3 Sample code

int a;

fscanf(stdin, "%d", a); /* W0640 */

6.522.4 Related message

  • W0635 The type doesn't match with %sth conversion specifier and the corresponding actual argument.
  • W0636 An actual argument doesn't exist correspond to %sth conversion specifier.
  • W0637 There is more actual argument than the number of conversion specifier in function call.
  • W0638 This function call requiring at least one actual argument.
  • W0639 %sth conversion specifier doesn't match with corresponding type of actual argument.

6.522.5 Since

1.0.0


Next: , Previous: W0640, Up: Messages

6.523 W0641

6.523.1 Message body

Floating-point number type cast to pointer to object and vice versa.

6.523.2 Content

Under construction.

6.523.3 Sample code

int *foo(const float f)
{
    return (int *) f; /* W0641 */
}

6.523.4 Related message

None.

6.523.5 Since

1.18.0


Next: , Previous: W0641, Up: Messages

6.524 W0642

6.524.1 Message body

Address derivation from the object declared as `register' is prohibited.

6.524.2 Content

Under construction.

6.524.3 Sample code

void func(void)
{
    register int a[3];

    int *p1 = a; /* W0642 */
    int *p2 = &a[1]; /* W0642 */
}

6.524.4 Related message

  • W0643 This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
  • W0644 A value in void statement is going to use. 'void' statement doesn't have a value.
  • W0645 'void' type cannot use in the type of formal argument.
  • W0646 A normal string literal and a wide string literal are contiguous.

6.524.5 Since

1.8.0


Next: , Previous: W0642, Up: Messages

6.525 W0643

6.525.1 Message body

This string literal constituted by a macro is illegal form unenclosed by `\"'. `#'operator may apply to actual argument which has '\' at the end.

6.525.2 Content

Under construction.

6.525.3 Sample code

#define MACRO(x) #x
const char *str = MACRO(foo\); /* W0643 */

6.525.4 Related message

  • W0642 Address derivation from the object declared as `register' is prohibited.
  • W0644 A value in void statement is going to use. 'void' statement doesn't have a value.
  • W0645 'void' type cannot use in the type of formal argument.
  • W0646 A normal string literal and a wide string literal are contiguous.

6.525.5 Since

1.16.0


Next: , Previous: W0643, Up: Messages

6.526 W0644

6.526.1 Message body

A value in void statement is going to use. 'void' statement doesn't have a value.

6.526.2 Content

Under construction.

6.526.3 Sample code

extern void foo(void);

int bar(void)
{
    return (int) foo(); /* W0644 */
}

6.526.4 Related message

  • W0642 Address derivation from the object declared as `register' is prohibited.
  • W0643 This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
  • W0645 'void' type cannot use in the type of formal argument.
  • W0646 A normal string literal and a wide string literal are contiguous.

6.526.5 Since

1.18.0


Next: , Previous: W0644, Up: Messages

6.527 W0645

6.527.1 Message body

`void' cannot be used as the parameter type.

6.527.2 Content

Under construction.

6.527.3 Sample code

extern void func(a) /* W0645 */
void a;
{
}

6.527.4 Related message

  • W0642 Address derivation from the object declared as `register' is prohibited.
  • W0643 This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
  • W0644 A value in void statement is going to use. 'void' statement doesn't have a value.
  • W0646 A normal string literal and a wide string literal are contiguous.

6.527.5 Since

1.14.0


Next: , Previous: W0645, Up: Messages

6.528 W0646

6.528.1 Message body

A normal string literal and a wide string literal are contiguous.

6.528.2 Content

Under construction.

6.528.3 Sample code

static const char *str = "foo" L"bar"; /* W0646 */

6.528.4 Related message

  • W0642 Address derivation from the object declared as `register' is prohibited.
  • W0643 This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
  • W0644 A value in void statement is going to use. 'void' statement doesn't have a value.
  • W0645 'void' type cannot use in the type of formal argument.

6.528.5 Since

1.16.0


Next: , Previous: W0646, Up: Messages

6.529 W0649

6.529.1 Message body

A right operand value of shift operand is negative constant value. This result is undefined.

6.529.2 Content

Under construction.

6.529.3 Sample code

int foo(int i)
{
    return i << -1; /* W0649 */
}

6.529.4 Related message

  • W0650 A value of the right operand in a shift expression is bigger than the bit size of the left operand type `%s'. This result is undefined.

6.529.5 Since

1.18.0


Next: , Previous: W0649, Up: Messages

6.530 W0650

6.530.1 Message body

A value of the right operand in a shift expression is bigger than the bit size of the left operand type `%s'. This result is undefined.

6.530.2 Content

Under construction.

6.530.3 Sample code

unsigned int foo(unsigned int i)
{
    return i << 32; /* W0650 */
}

6.530.4 Related message

  • W0649 A right operand value of shift operand is negative constant value. This result is undefined.

6.530.5 Since

1.18.0


Next: , Previous: W0650, Up: Messages

6.531 W0653

6.531.1 Message body

The initial value of an array, structure or union is not enclosed by `{}'.

6.531.2 Content

Under construction.

6.531.3 Sample code

struct ST {
    int i;
};

int a[3] = 0; /* W0653 */
struct ST s = 0; /* W0653 */

6.531.4 Related message

  • W0654 The initializer of structure or union must the value of the same structure type or union type.

6.531.5 Since

1.0.0


Next: , Previous: W0653, Up: Messages

6.532 W0654

6.532.1 Message body

The initializer of structure or union must the value of the same structure type or union type.

6.532.2 Content

Under construction.

6.532.3 Sample code

struct A {
    int i;
};

struct B {
    int j;
};

struct A a = { 0 };
struct B b = a; /* W0654 */

6.532.4 Related message

  • W0653 The initial value of an array, structure or union is not enclosed by `{}'.

6.532.5 Since

1.0.0


Next: , Previous: W0654, Up: Messages

6.533 W0655

6.533.1 Message body

This is bit field statement which the size is undefined.

6.533.2 Content

Under construction.

6.533.3 Sample code

struct ST {
    unsigned int a:2;
    unsigned int b:4;
};

void func(void)
{
    struct ST s = { 0 };
    int i = sizeof(s.a); /* W0655 */
}

6.533.4 Related message

  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.533.5 Since

1.0.0


Next: , Previous: W0655, Up: Messages

6.534 W0656

6.534.1 Message body

%sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.

6.534.2 Content

Under construction.

6.534.3 Sample code

void func(int count)
{
    printf("There are %Ld apples\n", count); /* W0656 */
}

6.534.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.534.5 Since

1.0.0


Next: , Previous: W0656, Up: Messages

6.535 W0657

6.535.1 Message body

An invalid flag is used in %sth conversion specifier of `i' or 'd'.

6.535.2 Content

Under construction.

6.535.3 Sample code

void func(int count)
{
    printf("There are %Ld apples\n", count); /* W0657 */
}

6.535.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.535.5 Since

1.0.0


Next: , Previous: W0657, Up: Messages

6.536 W0658

6.536.1 Message body

An invalid flag is used in %sth conversion specifier of `o'.

6.536.2 Content

Under construction.

6.536.3 Sample code

void func(unsigned int count)
{
    printf("There are %Lo apples\n", count); /* W0658 */
}

6.536.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.536.5 Since

1.0.0


Next: , Previous: W0658, Up: Messages

6.537 W0659

6.537.1 Message body

An invalid flag is used in %sth conversion specifier of `u'.

6.537.2 Content

Under construction.

6.537.3 Sample code

void func(unsigned int count)
{
    printf("There are %Lu apples\n", count); /* W0659 */
}

6.537.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.537.5 Since

1.0.0


Next: , Previous: W0659, Up: Messages

6.538 W0660

6.538.1 Message body

An invalid flag is used in %sth conversion specifier of `x'.

6.538.2 Content

Under construction.

6.538.3 Sample code

void func(unsigned int count)
{
    printf("There are %Lx apples\n", count); /* W0660 */
}

6.538.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.538.5 Since

1.0.0


Next: , Previous: W0660, Up: Messages

6.539 W0661

6.539.1 Message body

An invalid flag is used in %sth conversion specifier of `X'.

6.539.2 Content

Under construction.

6.539.3 Sample code

void func(unsigned int count)
{
    printf("There are %LX apples\n", count); /* W0661 */
}

6.539.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.539.5 Since

1.0.0


Next: , Previous: W0661, Up: Messages

6.540 W0662

6.540.1 Message body

An invalid flag is used in %sth conversion specifier of `f'.

6.540.2 Content

Under construction.

6.540.3 Sample code

void func(double count)
{
    printf("There are %lf apples\n", count); /* W0662 */
}

6.540.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.540.5 Since

1.0.0


Next: , Previous: W0662, Up: Messages

6.541 W0663

6.541.1 Message body

An invalid flag is used in %sth conversion specifier of `e'.

6.541.2 Content

Under construction.

6.541.3 Sample code

void func(double count)
{
    printf("There are %le apples\n", count); /* W0663 */
}

6.541.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.541.5 Since

1.0.0


Next: , Previous: W0663, Up: Messages

6.542 W0664

6.542.1 Message body

An invalid flag is used in %sth conversion specifier of `E'.

6.542.2 Content

Under construction.

6.542.3 Sample code

void func(double count)
{
    printf("There are %lE apples\n", count); /* W0664 */
}

6.542.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.542.5 Since

1.0.0


Next: , Previous: W0664, Up: Messages

6.543 W0665

6.543.1 Message body

An invalid flag is used in %sth conversion specifier of `g'.

6.543.2 Content

Under construction.

6.543.3 Sample code

void func(double count)
{
    printf("There are %lg apples\n", count); /* W0665 */
}

6.543.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.543.5 Since

1.0.0


Next: , Previous: W0665, Up: Messages

6.544 W0666

6.544.1 Message body

An invalid flag is used in %sth conversion specifier of `G'.

6.544.2 Content

Under construction.

6.544.3 Sample code

void func(double count)
{
    printf("There are %lG apples\n", count); /* W0666 */
}

6.544.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.544.5 Since

1.0.0


Next: , Previous: W0666, Up: Messages

6.545 W0667

6.545.1 Message body

An invalid flag is used in %sth conversion specifier of `c'.

6.545.2 Content

Under construction.

6.545.3 Sample code

void func(char count)
{
    printf("There are %hc apples\n", count); /* W0667 */
}

6.545.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.545.5 Since

1.0.0


Next: , Previous: W0667, Up: Messages

6.546 W0668

6.546.1 Message body

An invalid flag is used in %sth conversion specifier of `%%'.

6.546.2 Content

Under construction.

6.546.3 Sample code

void func(double percent)
{
    printf("There is %f%l% apple juice\n", percent); /* W0668 */
}

6.546.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.546.5 Since

1.0.0


Next: , Previous: W0668, Up: Messages

6.547 W0669

6.547.1 Message body

An invalid flag is used in %sth conversion specifier of `s'.

6.547.2 Content

Under construction.

6.547.3 Sample code

void func(char *s)
{
    printf("There are %hs apples\n", s); /* W0669 */
}

6.547.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.547.5 Since

1.0.0


Next: , Previous: W0669, Up: Messages

6.548 W0670

6.548.1 Message body

An invalid flag is used in %sth conversion specifier of `n'.

6.548.2 Content

Under construction.

6.548.3 Sample code

void func(void)
{
    int n;

    printf("There are %Ln apples\n", &n); /* W0670 */
}

6.548.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.548.5 Since

1.0.0


Next: , Previous: W0670, Up: Messages

6.549 W0671

6.549.1 Message body

An invalid flag is used in %sth conversion specifier of `p'.

6.549.2 Content

Under construction.

6.549.3 Sample code

void func(char *p)
{
    printf("p points to %lp\n", p); /* W0671 */
}

6.549.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.549.5 Since

1.0.0


Next: , Previous: W0671, Up: Messages

6.550 W0672

6.550.1 Message body

An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.

6.550.2 Content

Under construction.

6.550.3 Sample code

void func(void)
{
    int a;

    printf("%0", &a); /* W0672 */
}

6.550.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.550.5 Since

1.0.0


Next: , Previous: W0672, Up: Messages

6.551 W0673

6.551.1 Message body

%sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.

6.551.2 Content

Under construction.

6.551.3 Sample code

void func(void)
{
    int a;

    scanf("%y", &a); /* W0673 */
}

6.551.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.551.5 Since

1.0.0


Next: , Previous: W0673, Up: Messages

6.552 W0674

6.552.1 Message body

An invalid flag is used in %sth conversion specifier of `d/i/n'.

6.552.2 Content

Under construction.

6.552.3 Sample code

void func(void)
{
    int a;

    scanf("%Ld", &a); /* W0674 */
}

6.552.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.552.5 Since

1.0.0


Next: , Previous: W0674, Up: Messages

6.553 W0675

6.553.1 Message body

An invalid flag is used in %sth conversion specifier of `o'.

6.553.2 Content

Under construction.

6.553.3 Sample code

void func(void)
{
    int a;

    scanf("%Lo", &a); /* W0675 */
}

6.553.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.553.5 Since

1.0.0


Next: , Previous: W0675, Up: Messages

6.554 W0676

6.554.1 Message body

An invalid flag is used in %sth conversion specifier of `u'.

6.554.2 Content

Under construction.

6.554.3 Sample code

void func(void)
{
    int a;

    scanf("%Lu", &a); /* W0676 */
}

6.554.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.554.5 Since

1.0.0


Next: , Previous: W0676, Up: Messages

6.555 W0677

6.555.1 Message body

An invalid flag is used in %sth conversion specifier of `x/X.'

6.555.2 Content

Under construction.

6.555.3 Sample code

void func(void)
{
    int a;

    scanf("%Lx", &a); /* W0677 */
}

6.555.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.555.5 Since

1.0.0


Next: , Previous: W0677, Up: Messages

6.556 W0678

6.556.1 Message body

An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.

6.556.2 Content

Under construction.

6.556.3 Sample code

void func(void)
{
    double a;

    scanf("%lle", &a); /* W0678 */
}

6.556.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.556.5 Since

1.0.0


Next: , Previous: W0678, Up: Messages

6.557 W0679

6.557.1 Message body

An invalid flag is used in %sth conversion specifier of `s'.

6.557.2 Content

Under construction.

6.557.3 Sample code

void func(void)
{
    char a[256];

    scanf("%lls", a); /* W0679 */
}

6.557.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.557.5 Since

1.0.0


Next: , Previous: W0679, Up: Messages

6.558 W0680

6.558.1 Message body

An invalid flag is used in %sth conversion specifier of `p'.

6.558.2 Content

Under construction.

6.558.3 Sample code

void func(void)
{
    void *a;

    scanf("%lp", &a); /* W0680 */
}

6.558.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.558.5 Since

1.0.0


Next: , Previous: W0680, Up: Messages

6.559 W0681

6.559.1 Message body

An invalid flag is used in %sth conversion specifier of `%%'.

6.559.2 Content

Under construction.

6.559.3 Sample code

void func(void)
{
    int a;

    scanf("%d%l%", &a); /* W0681 */
}

6.559.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.559.5 Since

1.0.0


Next: , Previous: W0681, Up: Messages

6.560 W0682

6.560.1 Message body

An invalid flag is used in %sth conversion specifier of `['.

6.560.2 Content

Under construction.

6.560.3 Sample code

void func(void)
{
    char buf[256];

    scanf("%L[0-9]", buf); /* W0682 */
}

6.560.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.560.5 Since

1.0.0


Next: , Previous: W0682, Up: Messages

6.561 W0683

6.561.1 Message body

An invalid flag is used in %sth conversion specifier of `c'.

6.561.2 Content

Under construction.

6.561.3 Sample code

void func(void)
{
    char a;

    scanf("%Lc", &a); /* W0683 */
}

6.561.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.561.5 Since

1.0.0


Next: , Previous: W0683, Up: Messages

6.562 W0684

6.562.1 Message body

An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.

6.562.2 Content

Under construction.

6.562.3 Sample code

void func(void)
{
    long a;

    scanf("%l", &a); /* W0684 */
}

6.562.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.562.5 Since

1.0.0


Next: , Previous: W0684, Up: Messages

6.563 W0685

6.563.1 Message body

A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.

6.563.2 Content

Under construction.

6.563.3 Sample code

char c;
scanf("%[z-a]", &c); /* W0685 */

6.563.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0686 The same characters are described in scanset (characters enclosed by `[]').

6.563.5 Since

1.6.0


Next: , Previous: W0685, Up: Messages

6.564 W0686

6.564.1 Message body

The same characters are described in scanset (characters enclosed by `[]').

6.564.2 Content

Under construction.

6.564.3 Sample code

char c;
scanf("%[abcda]", &c); /* W0686 */

6.564.4 Related message

  • W0655 This is bit field statement which the size is undefined.
  • W0656 %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards.
  • W0657 An invalid flag is used in %sth conversion specifier of `i' or 'd'.
  • W0658 An invalid flag is used in %sth conversion specifier of `o'.
  • W0659 An invalid flag is used in %sth conversion specifier of `u'.
  • W0660 An invalid flag is used in %sth conversion specifier of `x'.
  • W0661 An invalid flag is used in %sth conversion specifier of `X'.
  • W0662 An invalid flag is used in %sth conversion specifier of `f'.
  • W0663 An invalid flag is used in %sth conversion specifier of `e'.
  • W0664 An invalid flag is used in %sth conversion specifier of `E'.
  • W0665 An invalid flag is used in %sth conversion specifier of `g'.
  • W0666 An invalid flag is used in %sth conversion specifier of `G'.
  • W0667 An invalid flag is used in %sth conversion specifier of `c'.
  • W0668 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0669 An invalid flag is used in %sth conversion specifier of `s'.
  • W0670 An invalid flag is used in %sth conversion specifier of `n'.
  • W0671 An invalid flag is used in %sth conversion specifier of `p'.
  • W0672 An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf.
  • W0673 %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards.
  • W0674 An invalid flag is used in %sth conversion specifier of `d/i/n'.
  • W0675 An invalid flag is used in %sth conversion specifier of `o'.
  • W0676 An invalid flag is used in %sth conversion specifier of `u'.
  • W0677 An invalid flag is used in %sth conversion specifier of `x/X'.
  • W0678 An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'.
  • W0679 An invalid flag is used in %sth conversion specifier of `s'.
  • W0680 An invalid flag is used in %sth conversion specifier of `p'.
  • W0681 An invalid flag is used in %sth conversion specifier of `%%'.
  • W0682 An invalid flag is used in %sth conversion specifier of `['.
  • W0683 An invalid flag is used in %sth conversion specifier of `c'.
  • W0684 An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf.
  • W0685 A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.

6.564.5 Since

1.6.0


Next: , Previous: W0686, Up: Messages

6.565 W0687

6.565.1 Message body

#undef is using to delete #defined operator.

6.565.2 Content

Under construction.

6.565.3 Sample code

#undef defined /* W0687 */

6.565.4 Related message

  • W0688 There is no line number in 1 to 32767 ranges after #line directive.
  • W0689 #line directive syntax doesn't match `#line integer constant \"string\"'.
  • W0690 No line number after #line directive.
  • W0691 The result of `##' operator is not valid preprocessing token.

6.565.5 Since

1.4.0


Next: , Previous: W0687, Up: Messages

6.566 W0688

6.566.1 Message body

There is no line number in 1 to 32767 ranges after #line directive.

6.566.2 Content

Under construction.

6.566.3 Sample code

#line 35000 "test.c" /* W0688 */

6.566.4 Related message

  • W0687 #undef is using to delete #defined operator.
  • W0689 #line directive syntax doesn't match `#line integer constant \"string\"'.
  • W0690 No line number after #line directive.
  • W0691 The result of `##' operator is not valid preprocessing token.

6.566.5 Since

1.2.0


Next: , Previous: W0688, Up: Messages

6.567 W0689

6.567.1 Message body

#line directive syntax doesn't match `#line integer constant \"string\"'.

6.567.2 Content

Under construction.

6.567.3 Sample code

#line 35 * 100 /* W0689 */
#line 35 * 100 "test.c" /* W0689 */
#line 35 L"あいう.c" /* W0689 */
#line __FILE__ 35 /* W0689 */

6.567.4 Related message

  • W0687 #undef is using to delete #defined operator.
  • W0688 There is no line number in 1 to 32767 ranges after #line directive.
  • W0690 No line number after #line directive.
  • W0691 The result of `##' operator is not valid preprocessing token.

6.567.5 Since

1.2.0


Next: , Previous: W0689, Up: Messages

6.568 W0690

6.568.1 Message body

No line number after #line directive.

6.568.2 Content

Under construction.

6.568.3 Sample code

#line LINE1000 /* W0690 */
#line __FILE__ 35 /* W0690 */

6.568.4 Related message

  • W0687 #undef is using to delete #defined operator.
  • W0688 There is no line number in 1 to 32767 ranges after #line directive.
  • W0689 #line directive syntax doesn't match `#line integer constant \"string\"'.
  • W0691 The result of `##' operator is not valid preprocessing token.

6.568.5 Since

1.2.0


Next: , Previous: W0690, Up: Messages

6.569 W0691

6.569.1 Message body

The result of `##' operator is not valid preprocessing token.

6.569.2 Content

Under construction.

6.569.3 Sample code

#define MACRO(a, b) a ## b

double d = (double) MACRO(-, 123); /* W0691 */

6.569.4 Related message

  • W0687 #undef is using to delete #defined operator.
  • W0688 There is no line number in 1 to 32767 ranges after #line directive.
  • W0689 #line directive syntax doesn't match `#line integer constant \"string\"'.
  • W0690 No line number after #line directive.

6.569.5 Since

1.16.0


Next: , Previous: W0691, Up: Messages

6.570 W0692

6.570.1 Message body

A function-like macro `%s' doesn't given an actual argument.

6.570.2 Content

Under construction.

6.570.3 Sample code

#define MACRO(a) #a

const char *s = (char *) MACRO(); /* W0692 */

6.570.4 Related message

  • W0693 A function-like macro is called by actual argument which its definition is smaller.

6.570.5 Since

1.16.0


Next: , Previous: W0692, Up: Messages

6.571 W0693

6.571.1 Message body

A function-like macro is called by actual argument which its definition is smaller.

6.571.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.571.3 Sample code

/* will be added */

6.571.4 Related message

  • W0692 A function-like macro `%s' doesn't given an actual argument.

6.571.5 Since

After 2.0.0 (planned)


Next: , Previous: W0693, Up: Messages

6.572 W0694

6.572.1 Message body

'assert' macro is inhibited to call the function named `assert'. This result is undefined.

6.572.2 Content

Under construction.

6.572.3 Sample code

#undef assert
extern void assert(int);

void foo(void)
{
    assert("should not be reached" == ""); /* W0694 */
}

6.572.4 Related message

None.

6.572.5 Since

1.16.0


Next: , Previous: W0694, Up: Messages

6.573 W0695

6.573.1 Message body

If #undef the 'assert' macro, and enable to call its name function, the result is undefined.

6.573.2 Content

Under construction.

6.573.3 Sample code

#undef assert /* W0695 */
extern void assert(int a);

6.573.4 Related message

None.

6.573.5 Since

1.4.0


Next: , Previous: W0695, Up: Messages

6.574 W0696

6.574.1 Message body

This macro using in `#if...' is undefined.

6.574.2 Content

Under construction.

6.574.3 Sample code

#define MACRO (1)

#if MACRO == 1
    ...snip...
#endif

#undef MACRO

#if MACRO == 2 /* W0696 */
    ...snip...
#endif

6.574.4 Related message

None.

6.574.5 Since

1.0.0


Next: , Previous: W0696, Up: Messages

6.575 W0697

6.575.1 Message body

There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value.

6.575.2 Content

Under construction.

6.575.3 Sample code

int func(int value) /* W0697 */
{
    if (value == 0) {
        return 0;
    }
    /* No return statement at the end of this function. */
}

6.575.4 Related message

  • W0698 A `return;' statement is found in a function `%s' which has a return value.
  • W0699 The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement.
  • W0700 The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value.

6.575.5 Since

1.14.0


Next: , Previous: W0697, Up: Messages

6.576 W0698

6.576.1 Message body

A `return;' statement is found in a function `%s' which has a return value.

6.576.2 Content

Under construction.

6.576.3 Sample code

int func(void)
{
    return; /* W0698 */
}

6.576.4 Related message

  • W0698 A `return;' statement is found in a function `%s' which has a return value.
  • W0699 The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement.
  • W0700 The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value.

6.576.5 Since

1.4.0


Next: , Previous: W0698, Up: Messages

6.577 W0699

6.577.1 Message body

The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement.

6.577.2 Content

Under construction.

6.577.3 Sample code

extern func(void)
{
    return; /* W0699 */
}

6.577.4 Related message

  • W0697 There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value.
  • W0698 A `return;' statement is found in a function `%s' which has a return value.
  • W0700 The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value.

6.577.5 Since

1.4.0


Next: , Previous: W0699, Up: Messages

6.578 W0700

6.578.1 Message body

The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value.

6.578.2 Content

Under construction.

6.578.3 Sample code

extern func(void) /* W0700 */
{
}

6.578.4 Related message

  • W0697 There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value.
  • W0698 A `return;' statement is found in a function `%s' which has a return value.
  • W0699 The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement.

6.578.5 Since

1.14.0


Next: , Previous: W0700, Up: Messages

6.579 W0703

6.579.1 Message body

The tag `%s' hides the declaration of same identifier which has wider scope.

6.579.2 Content

Under construction.

6.579.3 Sample code

union FOO {
    ...snip...
};

void func(void)
{
    struct FOO { /* W0703 */
        ...snip...
    };
}

6.579.4 Related message

  • W0704 This `%s' declaration hides the declaration of same identifier which has wider scope.

6.579.5 Since

1.0.0


Next: , Previous: W0703, Up: Messages

6.580 W0704

6.580.1 Message body

This `%s' declaration hides the declaration of same identifier which has wider scope.

6.580.2 Content

Under construction.

6.580.3 Sample code

int a;

void func(void)
{
    double a; /* W0704 */
}

6.580.4 Related message

  • W0703 The tag `%s' hides the declaration of same identifier which has wider scope.

6.580.5 Since

1.0.0


Next: , Previous: W0704, Up: Messages

6.581 W0705

6.581.1 Message body

This non-constant array subscript may cause out-of-range access.

6.581.2 Content

Under construction.

6.581.3 Sample code

void func(unsigned int a)
{
    int buf[10];

    if (a < 10) {
        buf[a] = 0;
    }

    ...snip...

    buf[a] = 5; /* W0705 */
}

6.581.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.581.5 Since

1.0.0


Next: , Previous: W0705, Up: Messages

6.582 W0707

6.582.1 Message body

This constant array subscript must cause out-of-range access.

6.582.2 Content

Under construction.

6.582.3 Sample code

extern int a[5];

int foo(void)
{
    int i = a[5]; /* W0707 */
    return i;
}

6.582.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.582.5 Since

1.18.0


Next: , Previous: W0707, Up: Messages

6.583 W0708

6.583.1 Message body

A value of control variable `%s' in 'for' statement is changed in the body of repetition.

6.583.2 Content

Under construction.

6.583.3 Sample code

int i, j;

for (i = j = 0; i < 10; j++) {
    i++; /* W0708 */
}

6.583.4 Related message

None.

6.583.5 Since

1.0.0


Next: , Previous: W0708, Up: Messages

6.584 W0711

6.584.1 Message body

Right operand of relational operator is a substantive 'boolean' expression.

6.584.2 Content

Under construction.

6.584.3 Sample code

int func(int a, int b, int c, int d)
{
    return (a + b) > (c > d); /* W0711 */
}

6.584.4 Related message

  • W0712 Left operand of relational operator is a substantive 'boolean' expression.
  • W0713 Both sides of relational operator is substantive 'boolean' expressions.

6.584.5 Since

1.8.0


Next: , Previous: W0711, Up: Messages

6.585 W0712

6.585.1 Message body

Left operand of relational operator is a substantive 'boolean' expression.

6.585.2 Content

Under construction.

6.585.3 Sample code

int func(int a, int b, int c, int d)
{
    return (a > b) > (c + d); /* W0712 */
}

6.585.4 Related message

  • W0711 Right operand of relational operator is a substantive 'boolean' expression.
  • W0713 Both sides of relational operator is substantive 'boolean' expressions.

6.585.5 Since

1.8.0


Next: , Previous: W0712, Up: Messages

6.586 W0713

6.586.1 Message body

Both sides of relational operator is substantive 'boolean' expressions.

6.586.2 Content

Under construction.

6.586.3 Sample code

int func(int a, int b, int c, int d)
{
    return (a > b) > (c > d); /* W0713 */
}

6.586.4 Related message

  • W0711 Right operand of relational operator is a substantive 'boolean' expression.
  • W0712 Left operand of relational operator is a substantive 'boolean' expression.

6.586.5 Since

1.8.0


Next: , Previous: W0713, Up: Messages

6.587 W0714

6.587.1 Message body

Both sides of `&' operator is substantive 'boolean' expressions.

6.587.2 Content

Under construction.

6.587.3 Sample code

int func(int a, int b, int c, int d)
{
    return (a > b) & (c > d); /* W0714 */
}

6.587.4 Related message

  • W0715 Both sides of `|' operator is substantive 'boolean' expressions.
  • W0716 A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression.
  • W0717 A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression.
  • W0718 A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression.

6.587.5 Since

1.8.0


Next: , Previous: W0714, Up: Messages

6.588 W0715

6.588.1 Message body

Both sides of `|' operator is substantive 'boolean' expressions.

6.588.2 Content

Under construction.

6.588.3 Sample code

int func(int a, int b, int c, int d)
{
    return (a > b) | (c > d); /* W0715 */
}

6.588.4 Related message

  • W0714 Both sides of `&' operator is substantive 'boolean' expressions.
  • W0716 A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression.
  • W0717 A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression.
  • W0718 A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression.

6.588.5 Since

1.8.0


Next: , Previous: W0715, Up: Messages

6.589 W0716

6.589.1 Message body

A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression.

6.589.2 Content

Under construction.

6.589.3 Sample code

int func(int a, int b, int c, int d)
{
    return (a > b) + (c > d); /* W0716 */
}

6.589.4 Related message

  • W0714 Both sides of `&' operator is substantive 'boolean' expressions.
  • W0715 Both sides of `|' operator is substantive 'boolean' expressions.
  • W0717 A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression.
  • W0718 A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression.

6.589.5 Since

1.10.0


Next: , Previous: W0716, Up: Messages

6.590 W0717

6.590.1 Message body

A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression.

6.590.2 Content

Under construction.

6.590.3 Sample code

int func(int a, int b, int c)
{
    return (a > b) + c; /* W0717 */
}

6.590.4 Related message

  • W0714 Both sides of `&' operator is substantive 'boolean' expressions.
  • W0715 Both sides of `|' operator is substantive 'boolean' expressions.
  • W0716 A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression.
  • W0717 A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression.

6.590.5 Since

1.10.0


Next: , Previous: W0717, Up: Messages

6.591 W0718

6.591.1 Message body

A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression.

6.591.2 Content

Under construction.

6.591.3 Sample code

int func(int a, int b, int c)
{
    return a + (b > c);  /* W0718 */
}

6.591.4 Related message

  • W0714 Both sides of `&' operator is substantive 'boolean' expressions.
  • W0715 Both sides of `|' operator is substantive 'boolean' expressions.
  • W0716 A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression.
  • W0717 A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression.

6.591.5 Since

1.10.0


Next: , Previous: W0718, Up: Messages

6.592 W0719

6.592.1 Message body

A value of the right operand in a shift expression is bigger than the bit size of the left operand underlying type `%s'.

6.592.2 Content

Under construction.

6.592.3 Sample code

int foo(char c)
{
    return c << 31; /* W0719 */
}

6.592.4 Related message

None.

6.592.5 Since

1.18.0


Next: , Previous: W0719, Up: Messages

6.593 W0720

6.593.1 Message body

The value with floating-point type doesn't fit in the range of converted type.

6.593.2 Content

Under construction.

6.593.3 Sample code

signed char sc1 = (signed char) 127.5; /* OK */
signed char sc2 = (signed char) 128.5; /* W0720 */

signed char sc3 = (signed char) -128.5; /* OK */
signed char sc4 = (signed char) -129.5; /* W0720 */

6.593.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.593.5 Since

1.4.0


Next: , Previous: W0720, Up: Messages

6.594 W0721

6.594.1 Message body

This volatile integer type doesn't have enough size to keep pointer value.

6.594.2 Content

Under construction.

6.594.3 Sample code

void func(int *p)
{
    /* when short is 16 bit long and pointer is 32 bit long */
    unsigned short us = (unsigned short) p; /* W0721 */
}

6.594.4 Related message

None.

6.594.5 Since

1.4.0


Next: , Previous: W0721, Up: Messages

6.595 W0722

6.595.1 Message body

A value of signed statement is overflow.

6.595.2 Content

Under construction.

6.595.3 Sample code

int func(int a)
{
    /* when int is 32 bit long */
    if (a < 0) {
        return a + 1; /* OK */
    }
    else if (a < 2147483647) {
        return a + 1; /* OK */
    }

    return a + 1; /* W0722 */
}

6.595.4 Related message

  • W0723 A value of signed statement might be overflow.

6.595.5 Since

1.4.0


Next: , Previous: W0722, Up: Messages

6.596 W0723

6.596.1 Message body

A value of signed statement might be overflow.

6.596.2 Content

Under construction.

6.596.3 Sample code

int func(int a)
{
    /* when int is 32 bit long */
    if (a < 0) {
        return a + 1; /* OK */
    }
    else if (a < 2000000000) {
        return a + 1; /* OK */
    }

    return a + 1; /* W0723 */
}

6.596.4 Related message

  • W0722 A value of signed statement is overflow.

6.596.5 Since

1.4.0


Next: , Previous: W0723, Up: Messages

6.597 W0724

6.597.1 Message body

An unrecognized preprocessing directive is ignored by conditional include directive.

6.597.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.597.3 Sample code

/* will be added */

6.597.4 Related message

None.

6.597.5 Since

After 2.0.0 (planned)


Next: , Previous: W0724, Up: Messages

6.598 W0726

6.598.1 Message body

A function `%s()' which return value is declared as qualified void type, `return expression;' is found.

6.598.2 Content

Under construction.

6.598.3 Sample code

const void func(int a)
{
    if (a == 0) {
        return 0; /* W0726 */
    }
}

6.598.4 Related message

None.

6.598.5 Since

1.4.0


Next: , Previous: W0726, Up: Messages

6.599 W0727

6.599.1 Message body

The value not part of the enumeration type is used.

6.599.2 Content

Under construction.

6.599.3 Sample code

enum Fruits {
    APPLE = 1,
    BANANA,
    ORANGE
};

enum Fruits fruit = 5; /* W0727 */

6.599.4 Related message

  • W0728 Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument.
  • W0729 An enumeration literal of the other enumeration type is substituted for enumeration type object.
  • W0730 A function declared return value to enumeration type returned an enumeration literal of the other enumeration type.
  • W0731 The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement.

6.599.5 Since

1.4.0


Next: , Previous: W0727, Up: Messages

6.600 W0728

6.600.1 Message body

Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument.

6.600.2 Content

Under construction.

6.600.3 Sample code

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE };

extern void func1(enum Color);

void func2(void)
{
    func1(ORANGE); /* W0728 */
}

6.600.4 Related message

  • W0727 The value not part of the enumeration type is used.
  • W0729 An enumeration literal of the other enumeration type is substituted for enumeration type object.
  • W0730 A function declared return value to enumeration type returned an enumeration literal of the other enumeration type.
  • W0731 The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement.

6.600.5 Since

1.4.0


Next: , Previous: W0728, Up: Messages

6.601 W0729

6.601.1 Message body

An enumeration literal of the other enumeration type is substituted for enumeration type object.

6.601.2 Content

Under construction.

6.601.3 Sample code

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE };

void func(void)
{
    enum Color c;

    c = ORANGE; /* W0729 */
}

6.601.4 Related message

  • W0727 The value not part of the enumeration type is used.
  • W0728 Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument.
  • W0730 A function declared return value to enumeration type returned an enumeration literal of the other enumeration type.
  • W0731 The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement.

6.601.5 Since

1.4.0


Next: , Previous: W0729, Up: Messages

6.602 W0730

6.602.1 Message body

A function declared return value to enumeration type returned an enumeration literal of the other enumeration type.

6.602.2 Content

Under construction.

6.602.3 Sample code

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE };

enum Color func(void)
{
    return ORANGE; /* W0730 */
}

6.602.4 Related message

  • W0727 The value not part of the enumeration type is used.
  • W0728 Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument.
  • W0729 An enumeration literal of the other enumeration type is substituted for enumeration type object.
  • W0731 The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement.

6.602.5 Since

1.4.0


Next: , Previous: W0730, Up: Messages

6.603 W0731

6.603.1 Message body

The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement.

6.603.2 Content

Under construction.

6.603.3 Sample code

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE, GRAPE };

int func(enum Color c)
{
    switch (c) {
    case RED:
        return 1;
    case GRAPE: /* W0731 */
        return 2;
    }

    return 0;
}

6.603.4 Related message

  • W0727 The value not part of the enumeration type is used.
  • W0728 Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument.
  • W0729 An enumeration literal of the other enumeration type is substituted for enumeration type object.
  • W0730 A function declared return value to enumeration type returned an enumeration literal of the other enumeration type.

6.603.5 Since

1.4.0


Next: , Previous: W0731, Up: Messages

6.604 W0732

6.604.1 Message body

Both operand of `&&'operator is bit operator or arithmetic operator.

6.604.2 Content

Under construction.

6.604.3 Sample code

extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d)
{
    int r;
    r = (a + b) && (c - d); /* W0732 */
    r = (a * b) && (c / d); /* W0732 */

    r = (a << b) && (c << d); /* W0732 */
    r = (a >> b) && (c >> d); /* W0732 */
}

6.604.4 Related message

  • W0733 Both operand of `||'operator is bit operator or arithmetic operator.
  • W0734 A left operand of logical operator is bit operator or arithmetic operator.
  • W0735 A right operand of logical operator is the expression of bit operator or arithmetic operator.

6.604.5 Since

1.12.0


Next: , Previous: W0732, Up: Messages

6.605 W0733

6.605.1 Message body

Both operand of `||'operator is bit operator or arithmetic operator.

6.605.2 Content

Under construction.

6.605.3 Sample code

extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d)
{
    int r;
    r = (a + b) || (c - d); /* W0733 */
    r = (a * b) || (c / d); /* W0733 */

    r = (a << b) || (c << d); /* W0733 */
    r = (a >> b) || (c >> d); /* W0733 */
}

6.605.4 Related message

  • W0732 Both operand of `&&'operator is bit operator or arithmetic operator.
  • W0734 A left operand of logical operator is bit operator or arithmetic operator.
  • W0735 A right operand of logical operator is the expression of bit operator or arithmetic operator.

6.605.5 Since

1.12.0


Next: , Previous: W0733, Up: Messages

6.606 W0734

6.606.1 Message body

A left operand of logical operator is bit operator or arithmetic operator.

6.606.2 Content

Under construction.

6.606.3 Sample code

extern void func(unsigned int a, unsigned int b, unsigned int c)
{
    int r;
    r = (a + b) && c; /* W0734 */
    r = (a - b) && c; /* W0734 */

    r = (a << b) || c; /* W0734 */
    r = (a >> b) || c; /* W0734 */
}

6.606.4 Related message

  • W0732 Both operand of `&&'operator is bit operator or arithmetic operator.
  • W0733 Both operand of `||'operator is bit operator or arithmetic operator.
  • W0735 A right operand of logical operator is the expression of bit operator or arithmetic operator.

6.606.5 Since

1.12.0


Next: , Previous: W0734, Up: Messages

6.607 W0735

6.607.1 Message body

A right operand of logical operator is the expression of bit operator or arithmetic operator.

6.607.2 Content

Under construction.

6.607.3 Sample code

extern void func(unsigned int a, unsigned int b, unsigned int c)
{
    int r;
    r = a && (b + c); /* W0735 */
    r = a && (b - c); /* W0735 */

    r = a || (b >> c); /* W0735 */
    r = a || (b << c); /* W0735 */
}

6.607.4 Related message

  • W0732 Both operand of `&&'operator is bit operator or arithmetic operator.
  • W0733 Both operand of `||'operator is bit operator or arithmetic operator.
  • W0734 A left operand of logical operator is bit operator or arithmetic operator.

6.607.5 Since

1.12.0


Next: , Previous: W0735, Up: Messages

6.608 W0736

6.608.1 Message body

A static variable `%s' which declared in file scope is read and write in one function only.

6.608.2 Content

Under construction.

6.608.3 Sample code

static int a = 10; /* W0736 */

int func1(void)
{
    return 0;
}

int func2(void)
{
    return ++a;
}

6.608.4 Related message

None.

6.608.5 Since

1.0.0


Next: , Previous: W0736, Up: Messages

6.609 W0737

6.609.1 Message body

The content of `enum %s' is unknown. The enumeration tag is declared without define the content.

6.609.2 Content

Under construction.

6.609.3 Sample code

extern enum Foo foo; /* W0737 */

6.609.4 Related message

None.

6.609.5 Since

1.4.0


Next: , Previous: W0737, Up: Messages

6.610 W0738

6.610.1 Message body

An implicit type conversion from positive integer constant expression to smaller unsigned type. The value is rounded.

6.610.2 Content

Under construction.

6.610.3 Sample code

/* when char is 8 bit long */
const unsigned char uc1 = 255; /* OK */
const unsigned char uc2 = 256; /* W0738 */

/* when int is 32 bit long */
const unsigned int ui1 = 4294967295; /* OK */
const unsigned int ui2 = 4294967296; /* W0738 */

6.610.4 Related message

None.

6.610.5 Since

1.4.0


Next: , Previous: W0738, Up: Messages

6.611 W0739

6.611.1 Message body

The result of unsigned subtraction in constant expression is minus.

6.611.2 Content

Under construction.

6.611.3 Sample code

const unsigned int ui1 = 3U - 3U; /* OK */
const unsigned int ui2 = 3U - 5U; /* W0739 */

6.611.4 Related message

  • W0740 The result of unsigned addition in constant expression beyond the maximum.
  • W0741 The result of unsigned multiplication in constant expression beyond the maximum.

6.611.5 Since

1.4.0


Next: , Previous: W0739, Up: Messages

6.612 W0740

6.612.1 Message body

The result of unsigned addition in constant expression beyond the maximum.

6.612.2 Content

Under construction.

6.612.3 Sample code

/* when int is 32 bit long */
const unsigned int ui1 = 4294967294U + 1U; /* OK */
const unsigned int ui2 = 4294967295U + 1U; /* W0740 */

6.612.4 Related message

  • W0739 The result of unsigned subtraction in constant expression is minus.
  • W0741 The result of unsigned multiplication in constant expression beyond the maximum.

6.612.5 Since

1.4.0


Next: , Previous: W0740, Up: Messages

6.613 W0741

6.613.1 Message body

The result of unsigned multiplication in constant expression beyond the maximum.

6.613.2 Content

Under construction.

6.613.3 Sample code

/* when int is 32 bit long */
const unsigned int ui1 = 2000000000U * 2U; /* OK */
const unsigned int ui2 = 3000000000U * 2U; /* W0741 */

6.613.4 Related message

  • W0739 The result of unsigned subtraction in constant expression is minus.
  • W0740 The result of unsigned addition in constant expression beyond the maximum.

6.613.5 Since

1.4.0


Next: , Previous: W0741, Up: Messages

6.614 W0742

6.614.1 Message body

A negative integer constant expression converted to unsigned type.

6.614.2 Content

Under construction.

6.614.3 Sample code

#define MACRO (50)

unsigned int ui;

ui = MACRO - 100; /* W0742 */

6.614.4 Related message

None.

6.614.5 Since

1.0.0


Next: , Previous: W0742, Up: Messages

6.615 W0743

6.615.1 Message body

The value of integer constant expression beyond the range of might be expressed with converted signed type.

6.615.2 Content

Under construction.

6.615.3 Sample code

/* when char is 8 bit long */
const signed char sc1 = 127; /* OK */
const signed char sc2 = 128; /* W0743 */

/* when int is 32 bit long */
const int si1 = 2147483647; /* OK */
const int si2 = 2147483648; /* W0743 */

6.615.4 Related message

None.

6.615.5 Since

1.4.0


Next: , Previous: W0743, Up: Messages

6.616 W0744

6.616.1 Message body

The value of this control expression is constant value to be false. This control statement is not run.

6.616.2 Content

Under construction.

6.616.3 Sample code

#define MACRO1 (0)
#define MACRO2 (1)

if (MACRO1 == MACRO2) { /* W0744 */
    ...snip...
}

6.616.4 Related message

None.

6.616.5 Since

1.0.0


Next: , Previous: W0744, Up: Messages

6.617 W0745

6.617.1 Message body

This non-constant array subscript may cause out-of-range access.

6.617.2 Content

Under construction.

6.617.3 Sample code

void func(unsigned int a)
{
    int buf[10];

    if (a > 5 && a < 10) {
        buf[a + 5] = 0; /* W0745 */
    }
}

6.617.4 Related message

  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.617.5 Since

1.0.0


Next: , Previous: W0745, Up: Messages

6.618 W0747

6.618.1 Message body

An implicit type conversion from signed short to signed char.

6.618.2 Content

Under construction.

6.618.3 Sample code

extern void foo(signed char a);

void bar(short a)
{
    signed char b = a; /* W0747 */
    foo(a); /* W0747 */
}

6.618.4 Related message

  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.618.5 Since

1.0.0


Next: , Previous: W0747, Up: Messages

6.619 W0748

6.619.1 Message body

An implicit type conversion from unsigned short to unsigned char.

6.619.2 Content

Under construction.

6.619.3 Sample code

extern void foo(unsigned char a);

void bar(unsigned short a)
{
      unsigned char b = a; /* W0748 */
      foo(a); /* W0748 */
}

6.619.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.619.5 Since

1.0.0


Next: , Previous: W0748, Up: Messages

6.620 W0749

6.620.1 Message body

An implicit type conversion from signed int to signed char.

6.620.2 Content

Under construction.

6.620.3 Sample code

extern void foo(signed char a);

void bar(int a)
{
    signed char b = a; /* W0749 */
    foo(a); /* W0749 */
}

6.620.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.620.5 Since

1.0.0


Next: , Previous: W0749, Up: Messages

6.621 W0750

6.621.1 Message body

An implicit type conversion from signed int to signed short.

6.621.2 Content

Under construction.

6.621.3 Sample code

extern void foo(short a);

void bar(int a)
{
    short b = a; /* W0750 */
    foo(a); /* W0750 */
}

6.621.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.621.5 Since

1.0.0


Next: , Previous: W0750, Up: Messages

6.622 W0751

6.622.1 Message body

An implicit type conversion from unsigned int to unsigned char.

6.622.2 Content

Under construction.

6.622.3 Sample code

extern void foo(unsigned char a);

void bar(unsigned int a)
{
    unsigned char b = a; /* W0751 */
    foo(a); /* W0751 */
}

6.622.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.622.5 Since

1.0.0


Next: , Previous: W0751, Up: Messages

6.623 W0752

6.623.1 Message body

An implicit type conversion from unsigned int to unsigned short.

6.623.2 Content

Under construction.

6.623.3 Sample code

extern void foo(unsigned short a);

void bar(unsigned int a)
{
    unsigned short b = a; /* W0752 */
    foo(a); /* W0752 */
}

6.623.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.623.5 Since

1.0.0


Next: , Previous: W0752, Up: Messages

6.624 W0753

6.624.1 Message body

An implicit type conversion from signed long to signed char.

6.624.2 Content

Under construction.

6.624.3 Sample code

extern void foo(signed char a);

void bar(long a)
{
    signed char b = a; /* W0753 */
    foo(a); /* W0753 */
}

6.624.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.624.5 Since

1.0.0


Next: , Previous: W0753, Up: Messages

6.625 W0754

6.625.1 Message body

An implicit type conversion from signed long to signed short.

6.625.2 Content

Under construction.

6.625.3 Sample code

extern void foo(short a);

void bar(long a)
{
    short b = a; /* W0754 */
    foo(a); /* W0754 */
}

6.625.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.625.5 Since

1.0.0


Next: , Previous: W0754, Up: Messages

6.626 W0755

6.626.1 Message body

An implicit type conversion from signed long to signed int.

6.626.2 Content

Under construction.

6.626.3 Sample code

extern void foo(int a);

void bar(long a)
{
    int b = a; /* W0755 */
    foo(a); /* W0755 */
}

6.626.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.626.5 Since

1.0.0


Next: , Previous: W0755, Up: Messages

6.627 W0756

6.627.1 Message body

An implicit type conversion from unsigned long to unsigned char.

6.627.2 Content

Under construction.

6.627.3 Sample code

extern void foo(unsigned char a);

void bar(unsigned long a)
{
    unsigned char b = a; /* W0756 */
    foo(a); /* W0756 */
}

6.627.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.627.5 Since

1.0.0


Next: , Previous: W0756, Up: Messages

6.628 W0757

6.628.1 Message body

An implicit type conversion from unsigned long to unsigned short.

6.628.2 Content

Under construction.

6.628.3 Sample code

extern void foo(unsigned short a);

void bar(unsigned long a)
{
    unsigned short b = a; /* W0757 */
    foo(a); /* W0757 */
}

6.628.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.628.5 Since

1.0.0


Next: , Previous: W0757, Up: Messages

6.629 W0758

6.629.1 Message body

An implicit type conversion from unsigned long to unsigned int.

6.629.2 Content

Under construction.

6.629.3 Sample code

extern void foo(unsigned int a);

void bar(unsigned long a)
{
    unsigned int b = a; /* W0758 */
    foo(a); /* W0758 */
}

6.629.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.629.5 Since

1.0.0


Next: , Previous: W0758, Up: Messages

6.630 W0759

6.630.1 Message body

An implicit type conversion from signed long long to signed char.

6.630.2 Content

Under construction.

6.630.3 Sample code

extern void foo(signed char a);

void bar(long long a)
{
    signed char b = a; /* W0759 */
    foo(a); /* W0759 */
}

6.630.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.630.5 Since

1.0.0


Next: , Previous: W0759, Up: Messages

6.631 W0760

6.631.1 Message body

An implicit type conversion from signed long long to signed short.

6.631.2 Content

Under construction.

6.631.3 Sample code

extern void foo(short a);

void bar(long long a)
{
    short b = a; /* W0760 */
    foo(a); /* W0760 */
}

6.631.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.631.5 Since

1.0.0


Next: , Previous: W0760, Up: Messages

6.632 W0761

6.632.1 Message body

An implicit type conversion from signed long long to singed int.

6.632.2 Content

Under construction.

6.632.3 Sample code

extern void foo(int a);

void bar(long long a)
{
    int b = a; /* W0761 */
    foo(a); /* W0761 */
}

6.632.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.632.5 Since

1.0.0


Next: , Previous: W0761, Up: Messages

6.633 W0762

6.633.1 Message body

An implicit type conversion from signed long long to signed long.

6.633.2 Content

Under construction.

6.633.3 Sample code

extern void foo(long a);

void bar(long long a)
{
    long b = a; /* W0762 */
    foo(a); /* W0762 */
}

6.633.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.633.5 Since

1.0.0


Next: , Previous: W0762, Up: Messages

6.634 W0763

6.634.1 Message body

An implicit type conversion from unsigned long long to unsigned char.

6.634.2 Content

Under construction.

6.634.3 Sample code

extern void foo(unsigned char a);

void bar(unsigned long long a)
{
    unsigned char b = a; /* W0763 */
    foo(a); /* W0763 */
}

6.634.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.634.5 Since

1.0.0


Next: , Previous: W0763, Up: Messages

6.635 W0764

6.635.1 Message body

An implicit type conversion from unsigned long long to unsigned short.

6.635.2 Content

Under construction.

6.635.3 Sample code

extern void foo(unsigned short a);

void bar(unsigned long long a)
{
    unsigned short b = a; /* W0764 */
    foo(a); /* W0764 */
}

6.635.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.635.5 Since

1.0.0


Next: , Previous: W0764, Up: Messages

6.636 W0765

6.636.1 Message body

An implicit type conversion from unsigned long long to unsigned int.

6.636.2 Content

Under construction.

6.636.3 Sample code

extern void foo(unsigned int a);

void bar(unsigned long long a)
{
    unsigned int b = a; /* W0765 */
    foo(a); /* W0765 */
}

6.636.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0766 An implicit type conversion from unsigned long long to unsigned long.

6.636.5 Since

1.0.0


Next: , Previous: W0765, Up: Messages

6.637 W0766

6.637.1 Message body

An implicit type conversion from unsigned long long to unsigned long.

6.637.2 Content

Under construction.

6.637.3 Sample code

extern void foo(unsigned long a);

void bar(unsigned long long a)
{
    unsigned long b = a; /* W0766 */
    foo(a); /* W0766 */
}

6.637.4 Related message

  • W0747 An implicit type conversion from signed short to signed char.
  • W0748 An implicit type conversion from unsigned short to unsigned char.
  • W0749 An implicit type conversion from signed int to signed char.
  • W0750 An implicit type conversion from signed int to signed short.
  • W0751 An implicit type conversion from unsigned int to unsigned char.
  • W0752 An implicit type conversion from unsigned int to unsigned short.
  • W0753 An implicit type conversion from signed long to signed char.
  • W0754 An implicit type conversion from signed long to signed short.
  • W0755 An implicit type conversion from signed long to signed int.
  • W0756 An implicit type conversion from unsigned long to unsigned char.
  • W0757 An implicit type conversion from unsigned long to unsigned short.
  • W0758 An implicit type conversion from unsigned long to unsigned int.
  • W0759 An implicit type conversion from signed long long to signed char.
  • W0760 An implicit type conversion from signed long long to signed short.
  • W0761 An implicit type conversion from signed long long to singed int.
  • W0762 An implicit type conversion from signed long long to signed long.
  • W0763 An implicit type conversion from unsigned long long to unsigned char.
  • W0764 An implicit type conversion from unsigned long long to unsigned short.
  • W0765 An implicit type conversion from unsigned long long to unsigned int.

6.637.5 Since

1.0.0


Next: , Previous: W0766, Up: Messages

6.638 W0767

6.638.1 Message body

An implicit type conversion from double to float.

6.638.2 Content

Under construction.

6.638.3 Sample code

extern void foo(float a);

void bar(double a)
{
    float b = a; /* W0767 */
    foo(a); /* W0767 */
}

6.638.4 Related message

  • W0768 An implicit type conversion from long double to float.
  • W0769 An implicit type conversion from long double to double.

6.638.5 Since

1.0.0


Next: , Previous: W0767, Up: Messages

6.639 W0768

6.639.1 Message body

An implicit type conversion from long double to float.

6.639.2 Content

Under construction.

6.639.3 Sample code

extern void foo(float a);

void bar(long double a)
{
    float b = a; /* W0768 */
    foo(a); /* W0768 */
}

6.639.4 Related message

  • W0767 An implicit type conversion from double to float.
  • W0769 An implicit type conversion from long double to double.

6.639.5 Since

1.0.0


Next: , Previous: W0768, Up: Messages

6.640 W0769

6.640.1 Message body

An implicit type conversion from long double to double.

6.640.2 Content

Under construction.

6.640.3 Sample code

extern void foo(double a);

void bar(long double a)
{
    double b = a; /* W0769 */
    foo(a); /* W0769 */
}

6.640.4 Related message

  • W0767 An implicit type conversion from double to float.
  • W0768 An implicit type conversion from long double to float.

6.640.5 Since

1.0.0


Next: , Previous: W0769, Up: Messages

6.641 W0770

6.641.1 Message body

A declaration of identifier `%s' which has external coupling exists more than one.

6.641.2 Content

Under construction.

6.641.3 Sample code

test1.h

extern int func(void); /* W0770 */

test2.h

extern int func(void); /* W0770 */

test.c

#include "test1.h"
#include "test2.h"

int func(void)
{
    return 0;
}

6.641.4 Related message

  • W0771 A global identifier `%s' is declared in more than one file.

6.641.5 Since

1.0.0


Next: , Previous: W0770, Up: Messages

6.642 W0771

6.642.1 Message body

A global identifier `%s' is declared in more than one file.

6.642.2 Content

Under construction.

6.642.3 Sample code

test1.h

extern int func(void); /* W0771 */
extern int a; /* W0771 */

test2.h

extern int func(void); /* W0771 */
extern int a; /* W0771 */

test.c

#include "test1.h"
#include "test2.h"

6.642.4 Related message

  • W0770 A declaration of identifier `%s' which has external coupling exists more than one.

6.642.5 Since

1.0.0


Next: , Previous: W0771, Up: Messages

6.643 W0774

6.643.1 Message body

A value of double type is returned from `float %s()'function.

6.643.2 Content

Under construction.

6.643.3 Sample code

extern double foo(void);

float bar(void)
{
    return foo(); /* W0774 */
}

6.643.4 Related message

  • W0775 A value of long double type is returned from `float %s()' function.
  • W0776 A value of long double type is returned from `double %s()'function.

6.643.5 Since

1.0.0


Next: , Previous: W0774, Up: Messages

6.644 W0775

6.644.1 Message body

A value of long double type is returned from `float %s()' function.

6.644.2 Content

Under construction.

6.644.3 Sample code

extern long double foo(void);

float bar(void)
{
    return foo(); /* W0775 */
}

6.644.4 Related message

  • W0774 A value of double type is returned from `float %s()'function.
  • W0776 A value of long double type is returned from `double %s()'function.

6.644.5 Since

1.0.0


Next: , Previous: W0775, Up: Messages

6.645 W0776

6.645.1 Message body

A value of long double type is returned from `double %s()'function.

6.645.2 Content

Under construction.

6.645.3 Sample code

extern long double foo(void);

double bar(void)
{
    return foo(); /* W0776 */
}

6.645.4 Related message

  • W0774 A value of double type is returned from `float %s()'function.
  • W0775 A value of long double type is returned from `float %s()' function.

6.645.5 Since

1.0.0


Next: , Previous: W0776, Up: Messages

6.646 W0777

6.646.1 Message body

An implicit type conversion from compound expression of float to double.

6.646.2 Content

Under construction.

6.646.3 Sample code

void func(float a, float b)
{
    double c = a + b; /* W0777 */
}

6.646.4 Related message

  • W0778 An implicit type conversion from compound expression of float to long double.
  • W0779 An implicit type conversion from compound expression of to long double.

6.646.5 Since

1.0.0


Next: , Previous: W0777, Up: Messages

6.647 W0778

6.647.1 Message body

An implicit type conversion from compound expression of float to long double.

6.647.2 Content

Under construction.

6.647.3 Sample code

void func(float a, float b)
{
    long double c = a + b; /* W0778 */
}

6.647.4 Related message

  • W0777 An implicit type conversion from compound expression of float to double.
  • W0779 An implicit type conversion from compound expression of to long double.

6.647.5 Since

1.0.0


Next: , Previous: W0778, Up: Messages

6.648 W0779

6.648.1 Message body

An implicit type conversion from compound expression of to long double.

6.648.2 Content

Under construction.

6.648.3 Sample code

void func(double a, double b)
{
    long double c = a + b; /* W0779 */
}

6.648.4 Related message

  • W0777 An implicit type conversion from compound expression of float to double.
  • W0778 An implicit type conversion from compound expression of float to long double.

6.648.5 Since

1.0.0


Next: , Previous: W0779, Up: Messages

6.649 W0780

6.649.1 Message body

Unsigned left shift operator `<<' in constant expression truncate non-zero high-order bit.

6.649.2 Content

Under construction.

6.649.3 Sample code

unsigned int foo(void)
{
    return 0x08000000U << 5; /* W0780 */
}

6.649.4 Related message

None.

6.649.5 Since

1.18.0


Next: , Previous: W0780, Up: Messages

6.650 W0781

6.650.1 Message body

This 'switch' statement have only one path. It's verbose.

6.650.2 Content

Under construction.

6.650.3 Sample code

int foo(const int i)
{
    if (i > 5) {
        switch (i) { /* W0781 */
        case 0:
            return 1;
        case 5:
            return 2;
        default:
            return 3;
        }
    }

    switch (i) { /* OK */
    case 0:
        return 4;
    default:
        switch (i) { /* W0781 */
        case 10:
            return 5;
        default:
            return 6;
        }
    }
}

6.650.4 Related message

None.

6.650.5 Since

1.6.0


Next: , Previous: W0781, Up: Messages

6.651 W0783

6.651.1 Message body

Cast is being made including the pointer point to incomplete type. This program is not portable.

6.651.2 Content

Under construction.

6.651.3 Sample code

extern struct Foo *gp;

void foo(int *p)
{
    gp = (struct Foo *) p; /* W0783 */
}

6.651.4 Related message

None.

6.651.5 Since

1.18.0


Next: , Previous: W0783, Up: Messages

6.652 W0784

6.652.1 Message body

The nonstandard escape sequence is used.

6.652.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.652.3 Sample code

/* will be added */

6.652.4 Related message

None.

6.652.5 Since

After 2.0.0 (planned)


Next: , Previous: W0784, Up: Messages

6.653 W0785

6.653.1 Message body

This declaration of `%s' is different from a former declaration

6.653.2 Content

Under construction.

6.653.3 Sample code

struct AAA {
    int a;
};

union AAA { /* W0785 */
    long a;
    int b;
};

6.653.4 Related message

None.

6.653.5 Since

1.0.0


Next: , Previous: W0785, Up: Messages

6.654 W0786

6.654.1 Message body

A bit field which having the type of except 'int', 'signed int' or 'unsigned int' doesn't support in ISO C standards

6.654.2 Content

Under construction.

6.654.3 Sample code

struct ST { /* W0786 */
    unsigned int a:3;
    unsigned long b:1;
};

6.654.4 Related message

None.

6.654.5 Since

1.0.0


Next: , Previous: W0786, Up: Messages

6.655 W0787

6.655.1 Message body

A type of `%s' is different from the past declaration in the different scope.

6.655.2 Content

Under construction.

6.655.3 Sample code

void func1(void)
{
    extern int num;
    extern void func3(void);
}

void func2(void)
{
    extern double num; /* W0787 */
    extern void func3(int); /* W0787 */
}

6.655.4 Related message

  • W0788 A type of `%s' is different from the past declaration in the same scope.
  • W0789 A type of `%s' is different from the past declaration in the wider scope.

6.655.5 Since

1.6.0


Next: , Previous: W0787, Up: Messages

6.656 W0788

6.656.1 Message body

A type of `%s' is different from the past declaration in the same scope.

6.656.2 Content

Under construction.

6.656.3 Sample code

extern int func(void);

void func(void) /* W0788 */
{
    typedef int num;
    double num; /* W0788 */
}

6.656.4 Related message

  • W0787 A type of `%s' is different from the past declaration in the different scope.
  • W0789 A type of `%s' is different from the past declaration in the wider scope.

6.656.5 Since

1.6.0


Next: , Previous: W0788, Up: Messages

6.657 W0789

6.657.1 Message body

A type of `%s' is different from the past declaration in the wider scope.

6.657.2 Content

Under construction.

6.657.3 Sample code

int num = 0;
extern int func1(void);

void func2(void)
{
    extern double num; /* W0789 */
    extern void func1(void); /* W0789 */
}

6.657.4 Related message

  • W0788 A type of `%s' is different from the past declaration in the same scope.
  • W0789 A type of `%s' is different from the past declaration in the wider scope.

6.657.5 Since

1.6.0


Next: , Previous: W0789, Up: Messages

6.658 W0790

6.658.1 Message body

An global object or a function `%s' is declared in more than one file.

6.658.2 Content

Under construction.

6.658.3 Sample code

int func(void)
{
    return 0;
}

int a = 0;

int func(void) /* W0790 */
{
    return 1;
}

int a = 1; /* W0790 */

6.658.4 Related message

  • W0791 An global object or a function `%s' is declared in more than one file.

6.658.5 Since

1.0.0


Next: , Previous: W0790, Up: Messages

6.659 W0791

6.659.1 Message body

An global object or a function `%s' is declared in more than one file.

6.659.2 Content

Under construction.

6.659.3 Sample code

test1.c

int func(void) /* W0791 */
{
    return 0;
}

int a = 0; /* W0791 */

test2.c

int func(void) /* W0791 */
{
    return 1;
}

int a = 1; /* W0791 */

6.659.4 Related message

  • W0790 An global object or a function `%s' is declared in more than one file.

6.659.5 Since

1.0.0


Next: , Previous: W0791, Up: Messages

6.660 W0792

6.660.1 Message body

A floating point type object cast to function pointer and vice versa.

6.660.2 Content

Under construction.

6.660.3 Sample code

int (*foo(const float f))(void)
{
    return (int (*)(void)) f; /* W0792 */
}

6.660.4 Related message

None.

6.660.5 Since

1.18.0


Next: , Previous: W0792, Up: Messages

6.661 W0793

6.661.1 Message body

A function pointer cast to pointer to point an object and vice versa.

6.661.2 Content

Under construction.

6.661.3 Sample code

typedef int (*funptr_t)(void);

funptr_t foo(float *p)
{
    return (funptr_t) p; /* W0793 */
}

6.661.4 Related message

None.

6.661.5 Since

1.18.0


Next: , Previous: W0793, Up: Messages

6.662 W0794

6.662.1 Message body

Left shift operation of signed value causes implementation-defined behavior.

6.662.2 Content

Under construction.

6.662.3 Sample code

int func(int i)
{
    return i << 1; /* W0794 */
}

6.662.4 Related message

None.

6.662.5 Since

1.18.0


Next: , Previous: W0794, Up: Messages

6.663 W0795

6.663.1 Message body

The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration.

6.663.2 Content

Under construction.

6.663.3 Sample code

extern void foo(int, int, int);

static void bar(void)
{
    foo(1, 2); /* W0795 */
}

6.663.4 Related message

  • W0796 The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration.
  • W0797 The number of an actual argument in function call is different from the number of a formal argument in the function declaration.

6.663.5 Since

1.0.0


Next: , Previous: W0795, Up: Messages

6.664 W0796

6.664.1 Message body

The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration.

6.664.2 Content

Under construction.

6.664.3 Sample code

extern void foo(int, int);

static void bar(void)
{
    foo(1, 2, 3); /* W0796 */
}

6.664.4 Related message

  • W0795 The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration.
  • W0797 The number of an actual argument in function call is different from the number of a formal argument in the function declaration.

6.664.5 Since

1.0.0


Next: , Previous: W0796, Up: Messages

6.665 W0797

6.665.1 Message body

The number of an actual argument in function call is different from the number of a formal argument in the function declaration.

6.665.2 Content

Under construction.

6.665.3 Sample code

static int foo(int, int);

static int bar(void)
{
    int a = foo(1); /* W0795 */
    int b = foo(1, 2);
    int c = foo(1, 2, 3); /* W0795 */
}

static int foo(int a, int b)
{
    return a + b;
}

6.665.4 Related message

  • W0795 The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration.
  • W0796 The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration.

6.665.5 Since

1.0.0


Next: , Previous: W0797, Up: Messages

6.666 W0798

6.666.1 Message body

Must not use the value with incomplete union object.

6.666.2 Content

Under construction.

6.666.3 Sample code

extern union UN *p;

void func(void)
{
    int i = 0;

    if (p) {
        i = p->i; /* W0798 */
    }
}

6.666.4 Related message

  • W0799 Must not use the value with incomplete structure object.
  • W0800 `%s' is incomplete type which doesn't have a linkage.This is undefined.

6.666.5 Since

1.0.0


Next: , Previous: W0798, Up: Messages

6.667 W0799

6.667.1 Message body

Must not use the value with incomplete structure object.

6.667.2 Content

Under construction.

6.667.3 Sample code

extern struct ST *p;

void func(void)
{
    int i = 0;

    if (p) {
        i = p->i; /* W0799 */
    }
}

6.667.4 Related message

  • W0798 Must not use the value with incomplete union object.
  • W0800 `%s' is incomplete type which doesn't have a linkage.This is undefined.

6.667.5 Since

1.0.0


Next: , Previous: W0799, Up: Messages

6.668 W0800

6.668.1 Message body

`%s' is incomplete type which doesn't have a linkage.This is undefined.

6.668.2 Content

Under construction.

6.668.3 Sample code

int a[]; /* W0800 */
struct ST s = { 0 }; /* W0800 */

6.668.4 Related message

  • W0798 Must not use the value with incomplete union object.
  • W0799 Must not use the value with incomplete structure object.

6.668.5 Since

1.0.0


Next: , Previous: W0800, Up: Messages

6.669 W0801

6.669.1 Message body

This structure or union doesn't have a named member.

6.669.2 Content

Under construction.

6.669.3 Sample code

struct foo { /* W0801 */
};

struct bar { /* W0801 */
    int;
    int :1;
    long;
    double;
};

6.669.4 Related message

None.

6.669.5 Since

1.4.0


Next: , Previous: W0801, Up: Messages

6.670 W0802

6.670.1 Message body

A form of after `#include' preprocessing directive is not <file name> nor \"file name\".

6.670.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.670.3 Sample code

#include fruits.h /* W0802 */

#define MACRO 1
#include MACRO /* W0802 */

6.670.4 Related message

None.

6.670.5 Since

After 2.0.0 (planned)


Next: , Previous: W0802, Up: Messages

6.671 W0803

6.671.1 Message body

A preprocessing directive is described in actual argument of function-like macro.

6.671.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.671.3 Sample code

/* will be added */

6.671.4 Related message

None.

6.671.5 Since

After 2.0.0 (planned)


Next: , Previous: W0803, Up: Messages

6.672 W0804

6.672.1 Message body

The 'defined' syntax is not `defined (identifier)' nor `defined identifier'.

6.672.2 Content

Under construction.

6.672.3 Sample code

#if defined "MACRO" /* W0804 */
#endif

6.672.4 Related message

  • W0805 An identifier to be actual argument doesn't find in `defined'.

6.672.5 Since

1.0.0


Next: , Previous: W0804, Up: Messages

6.673 W0805

6.673.1 Message body

An identifier to be actual argument doesn't find in `defined'.

6.673.2 Content

Under construction.

6.673.3 Sample code

#if defined "foo" /* W0805 */
int i = 0;
#endif

6.673.4 Related message

  • W0804 The 'defined' syntax is not `defined (identifier)' nor `defined identifier'.

6.673.5 Since

1.16.0


Next: , Previous: W0805, Up: Messages

6.674 W0806

6.674.1 Message body

It is trying to define a macro named `defined'.

6.674.2 Content

Under construction.

6.674.3 Sample code

#define defined !defined /* W0806 */

6.674.4 Related message

  • W0807 It is trying to delete pre-defined macro `%s'.
  • W0808 It is trying to redefine pre-defined macro `%s'.

6.674.5 Since

1.4.0


Next: , Previous: W0806, Up: Messages

6.675 W0807

6.675.1 Message body

It is trying to delete pre-defined macro `%s'.

6.675.2 Content

Under construction.

6.675.3 Sample code

#undef __STDC_VERSION__ /* W0807 */

6.675.4 Related message

  • W0806 It is trying to define a macro named `defined'.
  • W0808 It is trying to redefine pre-defined macro `%s'.

6.675.5 Since

1.6.0


Next: , Previous: W0807, Up: Messages

6.676 W0808

6.676.1 Message body

It is trying to redefine pre-defined macro `%s'.

6.676.2 Content

Under construction.

6.676.3 Sample code

#define __FILE__ "test.c" /* W0808 */

6.676.4 Related message

  • W0806 It is trying to define a macro named `defined'.
  • W0807 It is trying to delete pre-defined macro `%s'.

6.676.5 Since

1.6.0


Next: , Previous: W0808, Up: Messages

6.677 W0809

6.677.1 Message body

An identifier `%s' is reserved by the library.

6.677.2 Content

Under construction.

6.677.3 Sample code

extern int __value; /* W0809 */
int _VAL = 10; /* W0809 */
static void _func(void); /* W0809 */

6.677.4 Related message

None.

6.677.5 Since

1.6.0


Next: , Previous: W0809, Up: Messages

6.678 W0810

6.678.1 Message body

`{}' is required to clarify this structure of `if-if-else' statement.

6.678.2 Content

Under construction.

6.678.3 Sample code

int foo(int i, int j) {
    if (i < 0) /* W0810 */
        if (j > 0) {
            return 0;
        }
    else {
        return 1;
    }

    if (i > 0) /* W0810 */
        if (j < 0) {
            return 2;
        }
        else {
            return 3;
        }

    return 4;
}

6.678.4 Related message

None.

6.678.5 Since

1.0.0


Next: , Previous: W0810, Up: Messages

6.679 W0811

6.679.1 Message body

The `defined' token which the expanded result of this macro doesn't allowed.

6.679.2 Content

Under construction.

6.679.3 Sample code

#define COND defined(FOO)

#if COND /* W0811 */
int i = 0;
#endif

6.679.4 Related message

None.

6.679.5 Since

1.16.0


Next: , Previous: W0811, Up: Messages

6.680 W0827

6.680.1 Message body

An initial value of nested structure's element doesn't enclosed in curly brace `{}'.

6.680.2 Content

Under construction.

6.680.3 Sample code

struct ST {
    int i;
    int j;
};

struct ST a[2] = { 10, 20, 30, 40 }; /* W0827 */

6.680.4 Related message

  • W0828 An initial value of nested array's element doesn't enclosed in curly brace `{ }'.

6.680.5 Since

1.0.0


Next: , Previous: W0827, Up: Messages

6.681 W0828

6.681.1 Message body

An initial value of nested array's element doesn't enclosed in curly brace `{}'.

6.681.2 Content

Under construction.

6.681.3 Sample code

int a[3][2] = { {1, 2}, {3, 4}, {5, 6} };
int b[3][2] = { 1, 2, 3, 4, 5, 6 }; /* W0828 */

6.681.4 Related message

  • W0827 An initial value of nested structure's element doesn't enclosed in curly brace `{ }'.

6.681.5 Since

1.0.0


Next: , Previous: W0828, Up: Messages

6.682 W0830

6.682.1 Message body

There is comma `,' at the end of the enumerator list.

6.682.2 Content

Under construction.

6.682.3 Sample code

enum Color { Red, Green, Blue, }; /* W0830 */

6.682.4 Related message

None.

6.682.5 Since

1.18.0


Next: , Previous: W0830, Up: Messages

6.683 W0831

6.683.1 Message body

This is language extension for inline assembly. It will be ignored between #asm and #endasm.

6.683.2 Content

Under construction.

6.683.3 Sample code

/* will be added */

6.683.4 Related message

  • W0832 An inline assembly syntax is using. This is the language extension. This code will be ignored.

6.683.5 Since

1.0.0


Next: , Previous: W0831, Up: Messages

6.684 W0832

6.684.1 Message body

An inline assembly syntax is using. This is the language extension. This code will be ignored.

6.684.2 Content

Under construction.

6.684.3 Sample code

#define ASM_CODE asm("movl %ecx, %eax")

void foo(int arg1, int *arg2, int arg3)
{
    asm("movl %ecx, %eax"); /* W0832 */
    __asm__("movl %ecx, (%eax)"); /* W0832 */

    asm { /* W0832 */
        xorl eax, eax
    }

    ASM_CODE; /* W0832 */

    __asm__ volatile ( /* W0832 */
            "int $0x80"
            : "=a" (r)
              "+b" (arg1),
              "+c" (arg2),
              "+d" (arg3)
            : "a" (128)
            : "memory", "cc");
}

6.684.4 Related message

  • W0831 This is language extension for inline assembly. It will be ignored between #asm and #endasm.

6.684.5 Since

1.8.0


Next: , Previous: W0832, Up: Messages

6.685 W0833

6.685.1 Message body

A suffix 'LL' is using.

6.685.2 Content

Under construction.

6.685.3 Sample code

long long ll = 123LL; /* W0833 */

6.685.4 Related message

  • W0834 A long long type is using.

6.685.5 Since

1.18.0


Next: , Previous: W0833, Up: Messages

6.686 W0834

6.686.1 Message body

A long long type is using.

6.686.2 Content

Under construction.

6.686.3 Sample code

extern long long ll; /* W0834 */

6.686.4 Related message

  • W0833 A suffix 'LL' is using.

6.686.5 Since

1.18.0


Next: , Previous: W0834, Up: Messages

6.687 W0835

6.687.1 Message body

A macro which receives variable argument is defined.

6.687.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.687.3 Sample code

/* will be added */

6.687.4 Related message

None.

6.687.5 Since

After 2.0.0 (planned)


Next: , Previous: W0835, Up: Messages

6.688 W0947

6.688.1 Message body

String literal is specified directly.

6.688.2 Content

Under construction.

6.688.3 Sample code

func("Apple, Banana, Chocolate"); /* W0947 */

6.688.4 Related message

  • W0948 Character constant %s is specified directly.
  • W0949 A value `%s' is used directly for size definition of bit field.
  • W0950 Integer constant `%s' is specified directly as an array size.

6.688.5 Since

1.0.0


Next: , Previous: W0947, Up: Messages

6.689 W0948

6.689.1 Message body

Character constant %s is specified directly.

6.689.2 Content

Under construction.

6.689.3 Sample code

func('a'); /* W0948 */

6.689.4 Related message

  • W0947 String literal is specified directly.
  • W0949 A value `%s' is used directly for size definition of bit field.
  • W0950 Integer constant `%s' is specified directly as an array size.

6.689.5 Since

1.0.0


Next: , Previous: W0948, Up: Messages

6.690 W0949

6.690.1 Message body

A value `%s' is used directly for size definition of bit field.

6.690.2 Content

Under construction.

6.690.3 Sample code

struct ST {
    unsigned int a:1;
    unsigned int a:2; /* W0949 */
    unsigned int a:3; /* W0949 */
};

6.690.4 Related message

  • W0947 String literal is specified directly.
  • W0948 Character constant %s is specified directly.
  • W0950 Integer constant `%s' is specified directly as an array size.

6.690.5 Since

1.0.0


Next: , Previous: W0949, Up: Messages

6.691 W0950

6.691.1 Message body

Integer constant `%s' is specified directly as an array size.

6.691.2 Content

Under construction.

6.691.3 Sample code

int a[10]; /* W0950 */

6.691.4 Related message

  • W0947 String literal is specified directly.
  • W0948 Character constant %s is specified directly.
  • W0949 A value `%s' is used directly for size definition of bit field.

6.691.5 Since

1.0.0


Next: , Previous: W0950, Up: Messages

6.692 W1026

6.692.1 Message body

%sth actual argument is not object type.

6.692.2 Content

Under construction.

6.692.3 Sample code

extern struct st s;
extern void foo(struct st);

void bar(void)
{
    foo(s); /* W1026 */
}

6.692.4 Related message

None.

6.692.5 Since

1.18.0


Next: , Previous: W1026, Up: Messages

6.693 W1027

6.693.1 Message body

A base type of array is function type. This is meaningless.

6.693.2 Content

Under construction.

6.693.3 Sample code

int (fun_tbl[20])(void); /* W1027 */

6.693.4 Related message

  • W1028 A base type of array is an array with unknown size. Incomplete type of array will not build.
  • W1029 A base type of array is an obscure structure or union. Incomplete type of array will not build.

6.693.5 Since

1.0.0


Next: , Previous: W1027, Up: Messages

6.694 W1028

6.694.1 Message body

A base type of array is an array with unknown size. Incomplete type of array will not build.

6.694.2 Content

Under construction.

6.694.3 Sample code

int a[4][]; /* W1028 */

6.694.4 Related message

  • W1027 A base type of array is function type. This is meaningless.
  • W1029 A base type of array is an obscure structure or union. Incomplete type of array will not build.

6.694.5 Since

1.0.0


Next: , Previous: W1028, Up: Messages

6.695 W1029

6.695.1 Message body

A base type of array is an obscure structure or union. Incomplete type of array will not build.

6.695.2 Content

Under construction.

6.695.3 Sample code

struct ST a[5]; /* W1029 */

6.695.4 Related message

  • W1027 A base type of array is function type. This is meaningless.
  • W1028 A base type of array is an array with unknown size. Incomplete type of array will not build.

6.695.5 Since

1.0.0


Next: , Previous: W1029, Up: Messages

6.696 W1030

6.696.1 Message body

A label `%s' is used more than two times in this function.

6.696.2 Content

Under construction.

6.696.3 Sample code

void func(int a, int b)
{
    if (a == 0) {
        int c = 0;
RETRY:
        b = 10;
    }

    if (b != 0) {
        goto RETRY;
    }
RETRY: /* W1030 */
    b = 1;

    ...snip...
}

6.696.4 Related message

None.

6.696.5 Since

1.6.0


Next: , Previous: W1030, Up: Messages

6.697 W1031

6.697.1 Message body

An Object `%s' is declared both external coupling and internal coupling. This action is undefined.

6.697.2 Content

Under construction.

6.697.3 Sample code

test.h

extern int a;

test.c

#include "test.h"

static int a; /* W1031 */

6.697.4 Related message

None.

6.697.5 Since

1.0.0


Next: , Previous: W1031, Up: Messages

6.698 W1032

6.698.1 Message body

A tentative definition of variable '%s' which has internal linkage must not incomplete type.

6.698.2 Content

Under construction.

6.698.3 Sample code

static struct ST a[3]; /* W1032 */

6.698.4 Related message

None.

6.698.5 Since

1.0.0


Next: , Previous: W1032, Up: Messages

6.699 W1033

6.699.1 Message body

A 'volatile' or 'const' qualifier is used for the type of function return value. This action is undefined.

6.699.2 Content

Under construction.

6.699.3 Sample code

extern const int func1(int); /* W1033 */

const int func2(int i) /* W1033 */
{
    return i + 1;
}

const int *func3(int i) /* OK */
{
    static int j;

    j = i;
    return &j;
}

6.699.4 Related message

None.

6.699.5 Since

1.4.0


Next: , Previous: W1033, Up: Messages

6.700 W1034

6.700.1 Message body

It is declared at function `%s()' with static storage class specifier in block scope. This usage is meaningless.

6.700.2 Content

Under construction.

6.700.3 Sample code

int func(void)
{
    static int func1(void); /* W1034 */
    extern int func2(void);
}

6.700.4 Related message

None.

6.700.5 Since

1.0.0


Next: , Previous: W1034, Up: Messages

6.701 W1035

6.701.1 Message body

`%s' declared typedef. It cannot be redeclared inside an inner scope without using explicit type.

6.701.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.701.3 Sample code

/* will be added */

6.701.4 Related message

  • W1036 `%s' declared typedef. It cannot be redeclared as a member of structure or union without using explicit type.

6.701.5 Since

After 2.0.0 (planned)


Next: , Previous: W1035, Up: Messages

6.702 W1036

6.702.1 Message body

`%s' declared typedef. It cannot be redeclared as a member of structure or union without using explicit type.

6.702.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.702.3 Sample code

/* will be added */

6.702.4 Related message

  • W1035 `%s' declared typedef. It cannot be redeclared inside an inner scope without using explicit type.

6.702.5 Since

After 2.0.0 (planned)


Next: , Previous: W1036, Up: Messages

6.703 W1037

6.703.1 Message body

`%s' which has external coupling is declared more than one, this is incompatible.

6.703.2 Content

Under construction.

6.703.3 Sample code

test1.c

extern void func(void); /* W1037 */
extern int a; /* W1037 */

test2.c

extern int func(int); /* W1037 */
extern long a; /* W1037 */

6.703.4 Related message

None.

6.703.5 Since

1.0.0


Next: , Previous: W1037, Up: Messages

6.704 W1039

6.704.1 Message body

`ll' is used in %sth conversion specifier.

6.704.2 Content

Under construction.

6.704.3 Sample code

extern int printf(const char *, ...);

void foo(long long ll)
{
    printf("%lld", ll); /* W1039 */
}

6.704.4 Related message

None.

6.704.5 Since

1.18.0


Next: , Previous: W1039, Up: Messages

6.705 W1040

6.705.1 Message body

An unrecognizable string is described after preprocessing directive.

6.705.2 Content

Under construction.

6.705.3 Sample code

#define TEST

#ifdef TEST
#if defined(CASE_1)
int i = 1;
#elif defined(CASE_2)
int i = 2;
#endif CASE /* W1040 */
#else
int i = 0;
#endif TEST /* W1040 */

6.705.4 Related message

  • W1041 `%s' is not official preprocessing directive of ISO C standards.
  • W1042 'sizeof' operator is using in preprocessing directive. This is the language extension.

6.705.5 Since

1.16.0


Next: , Previous: W1040, Up: Messages

6.706 W1041

6.706.1 Message body

`%s' is not official preprocessing directive of ISO C standards.

6.706.2 Content

Under construction.

6.706.3 Sample code

#compiler_specific_extension 1 2.3 "4" /* W1041 */

6.706.4 Related message

  • W1040 An unrecognizable string is described after preprocessing directive.
  • W1042 'sizeof' operator is using in preprocessing directive. This is the language extension.

6.706.5 Since

1.16.0


Next: , Previous: W1041, Up: Messages

6.707 W1042

6.707.1 Message body

'sizeof' operator is using in preprocessing directive. This is the language extension.

6.707.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.707.3 Sample code

/* will be added */

6.707.4 Related message

  • W1040 An unrecognizable string is described after preprocessing directive.
  • W1041 `%s' is not official preprocessing directive of ISO C standards.

6.707.5 Since

After 2.0.0 (planned)


Next: , Previous: W1042, Up: Messages

6.708 W1043

6.708.1 Message body

`@ address' is not supported ISO C standards. It will be considered as language extension.

6.708.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.708.3 Sample code

/* will be added */

6.708.4 Related message

  • W1045 This `@ word' syntax will be ignored.

6.708.5 Since

After 2.0.0 (planned)


Next: , Previous: W1043, Up: Messages

6.709 W1045

6.709.1 Message body

This `@ word' syntax will be ignored.

6.709.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.709.3 Sample code

/* will be added */

6.709.4 Related message

  • W1043 `@ address' is not supported ISO C standards. It will be considered as language extension.

6.709.5 Since

After 2.0.0 (planned)


Next: , Previous: W1045, Up: Messages

6.710 W1046

6.710.1 Message body

A space character is ignored between `\' and line feed.

6.710.2 Content

Under construction.

6.710.3 Sample code

#define FOO(a, b)   /* OK */    \
    (               /* W1046 */ \ 
        (a) + (b)   /* W1046 */ \	
    )

6.710.4 Related message

None.

6.710.5 Since

1.16.0


Next: , Previous: W1046, Up: Messages

6.711 W1047

6.711.1 Message body

The struct, union or array's initializer is not literal.

6.711.2 Content

Under construction.

6.711.3 Sample code

int foo(int i, int j)
{
    int a[] = { 0, i, j }; /* W1047 */
    return a[1];
}

6.711.4 Related message

None.

6.711.5 Since

1.18.0


Next: , Previous: W1047, Up: Messages

6.712 W1048

6.712.1 Message body

The multi byte string literal is an implementation defined value.

6.712.2 Content

This message will be supported after AdLint 2.0.0

Under construction.

6.712.3 Sample code

/* will be added */

6.712.4 Related message

None.

6.712.5 Since

After 2.0.0 (planned)


Next: , Previous: W1048, Up: Messages

6.713 W1049

6.713.1 Message body

The result of conversion to signed integer type in integer expression might not be expressed by a signed type.

6.713.2 Content

Under construction.

6.713.3 Sample code

example 1

void func1(signed int si)
{
    signed char sc = (signed char) si + 10; /* W1049 */
}

example 2

void func(unsigned int ui)
{
    unsigned int a = ui * ui;
}

6.713.4 Related message

  • W1050 The result of conversion to signed integer type in integer expression is not express by a signed type.
  • W1051 The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow.
  • W1052 The result of unsigned arithmetic expression typed `%s' can be going around by overflow.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.713.5 Since

1.0.0


Next: , Previous: W1049, Up: Messages

6.714 W1050

6.714.1 Message body

The result of conversion to signed integer type in integer expression is not express by a signed type.

6.714.2 Content

Under construction.

6.714.3 Sample code

example 1

void func(signed int si)
{
    signed char sc = 0;

    if (si > 127) {
        sc = (signed char) si + 1; /* W1050 */
    }
}

example 2

void func(unsigned int ui)
{
    unsigned int a = ui * ui;
}

6.714.4 Related message

  • W1049 The result of conversion to signed integer type in integer expression might not be expressed by a signed type.
  • W1051 The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow.
  • W1052 The result of unsigned arithmetic expression typed `%s' can be going around by overflow.
  • C1000 Warning above is detected in the following context.
  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1006 New value is assigned to the problematic variable.

6.714.5 Since

1.0.0


Next: , Previous: W1050, Up: Messages

6.715 W1051

6.715.1 Message body

The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow.

6.715.2 Content

Under construction.

6.715.3 Sample code

unsigned int func(unsigned int ui)
{
    if (ui > 0xEFFFFFFFU) {
        return ui + 0x10000000U; /* W1051 */
    }

    return 0U;
}

6.715.4 Related message

  • W1049 The result of conversion to signed integer type in integer expression might not be expressed by a signed type.
  • W1050 The result of conversion to signed integer type in integer expression is not express by a signed type.
  • W1052 The result of unsigned arithmetic expression typed `%s' can be going around by overflow.

6.715.5 Since

1.0.0


Next: , Previous: W1051, Up: Messages

6.716 W1052

6.716.1 Message body

The result of unsigned arithmetic expression typed `%s' can be going around by overflow.

6.716.2 Content

Under construction.

6.716.3 Sample code

unsigned int func(unsigned int a, unsigned int b)
{
    if (a > 0xEFFFFFFFU && b < 0x20000000U) {
        return a + b; /* W1052 */
    }

    return 0U;
}

6.716.4 Related message

  • W1049 The result of conversion to signed integer type in integer expression might not be expressed by a signed type.
  • W1050 The result of conversion to signed integer type in integer expression is not express by a signed type.
  • W1051 The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow.

6.716.5 Since

1.0.0


Next: , Previous: W1052, Up: Messages

6.717 W1053

6.717.1 Message body

A numeric constants is passed to an actual argument which formal argument is enumeration type.

6.717.2 Content

Under construction.

6.717.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern void func1(enum Color);

void func2(void)
{
    func1(4); /* W1053 */
}

6.717.4 Related message

  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.717.5 Since

1.6.0


Next: , Previous: W1053, Up: Messages

6.718 W1054

6.718.1 Message body

A non enumeration type expression is substituted for the enumeration type.

6.718.2 Content

Under construction.

6.718.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern enum Color col;

void func2(void)
{
    col = 4; /* W1054 */
}

6.718.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.718.5 Since

1.6.0


Next: , Previous: W1054, Up: Messages

6.719 W1055

6.719.1 Message body

A non enumeration type expression is returned from the function which return value is enumeration type.

6.719.2 Content

Under construction.

6.719.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

enum Color func(void)
{
    return 4; /* W1055 */
}

6.719.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.719.5 Since

1.6.0


Next: , Previous: W1055, Up: Messages

6.720 W1056

6.720.1 Message body

An object of actual argument is different enumeration type which formal argument is enumeration type.

6.720.2 Content

Under construction.

6.720.3 Sample code

enum Color { RED = 1, GREEN= 2, BLUE = 4 };
enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER };

extern void func1(enum Color);

void func2(enum Season ssn)
{
    func1(ssn); /* W1056 */
}

6.720.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.720.5 Since

1.6.0


Next: , Previous: W1056, Up: Messages

6.721 W1057

6.721.1 Message body

An enumeration value is substituted for different enumeration type object.

6.721.2 Content

Under construction.

6.721.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };
enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER };

extern enum Color col;

void func(enum Season ssn)
{
    col = ssn; /* W1057 */
}

6.721.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.721.5 Since

1.6.0


Next: , Previous: W1057, Up: Messages

6.722 W1058

6.722.1 Message body

A different enumeration type of value is returned from a function which return value is enumeration type.

6.722.2 Content

Under construction.

6.722.3 Sample code

enum Color { RED  = 1, GREEN = 2, BLUE = 4 };
enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER };

enum Color func(enum Season ssn)
{
    return ssn; /* W1058 */
}

6.722.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.722.5 Since

1.6.0


Next: , Previous: W1058, Up: Messages

6.723 W1059

6.723.1 Message body

An enumeration value is passed to actual argument which formal argument is not enumeration type.

6.723.2 Content

Under construction.

6.723.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern void func1(int num);

void func2(enum Color col)
{
    func1(col); /* W1059 */
}

6.723.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.723.5 Since

1.6.0


Next: , Previous: W1059, Up: Messages

6.724 W1060

6.724.1 Message body

An enumeration value is returned from a function which return value is not enumeration type .

6.724.2 Content

Under construction.

6.724.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

int func2(enum Color col)
{
    return col; /* W1060 */
}

6.724.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.724.5 Since

1.6.0


Next: , Previous: W1060, Up: Messages

6.725 W1061

6.725.1 Message body

Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.

6.725.2 Content

Under construction.

6.725.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern void func1(enum Color);

void func2(int num)
{
    func1(num); /* W1061 */
}

6.725.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.725.5 Since

1.6.0


Next: , Previous: W1061, Up: Messages

6.726 W1062

6.726.1 Message body

Non constant expression is substituted for the enumeration type object.

6.726.2 Content

Under construction.

6.726.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern enum Color col;

void func(int num)
{
    col = num + 1; /* W1062 */
}

6.726.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.726.5 Since

1.6.0


Next: , Previous: W1062, Up: Messages

6.727 W1063

6.727.1 Message body

The return value returned from enumeration type function to non constant expression.

6.727.2 Content

Under construction.

6.727.3 Sample code

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

enum Color func(int num)
{
    return num / 2; /* W1063 */
}

6.727.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.727.5 Since

1.6.0


Next: , Previous: W1063, Up: Messages

6.728 W1064

6.728.1 Message body

A integer constant is used in switch statement where case label is enumeration type.

6.728.2 Content

Under construction.

6.728.3 Sample code

enum Color { RED, BLUE, GREEN };

int func(enum Color c)
{
    switch (c) {
    case RED: /* OK */
        return 1;
    case 1: /* W1064 */
        return 2;
    }

    return 0;
}

6.728.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1065 A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.728.5 Since

1.4.0


Next: , Previous: W1064, Up: Messages

6.729 W1065

6.729.1 Message body

A value of different enumeration type is used in switch statement where case label is an enumeration type.

6.729.2 Content

Under construction.

6.729.3 Sample code

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE, GRAPE };

int func(enum Color c)
{
    switch (c) {
    case RED: /* OK */
        return 1;
    case ORANGE: /* W1065 */
        return 2;
    }

    return 0;
}

6.729.4 Related message

  • W1053 A numeric constants is passed to an actual argument which formal argument is enumeration type.
  • W1054 A non enumeration type expression is substituted for the enumeration type.
  • W1055 A non enumeration type expression is returned from the function which return value is enumeration type.
  • W1056 An object of actual argument is different enumeration type which formal argument is enumeration type.
  • W1057 An enumeration value is substituted for different enumeration type object.
  • W1058 A different enumeration type of value is returned from a function which return value is enumeration type.
  • W1059 An enumeration value is passed to actual argument which formal argument is not enumeration type.
  • W1060 An enumeration value is returned from a function which return value is not enumeration type .
  • W1061 Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type.
  • W1062 Non constant expression is substituted for the enumeration type object.
  • W1063 The return value returned from enumeration type function to non constant expression.
  • W1064 A integer constant is used in switch statement where case label is enumeration type.

6.729.5 Since

1.4.0


Next: , Previous: W1065, Up: Messages

6.730 W1066

6.730.1 Message body

A value of the `float' typed compound expression is explicitly converted into a `double' value.

6.730.2 Content

Under construction.

6.730.3 Sample code

void func(float a)
{
    double b = (double) (a * a);
}

6.730.4 Related message

  • W1067 A value of the `float' typed compound expression is explicitly converted into a `long double' value.
  • W1068 A value of the `double' typed compound expression is explicitly converted into a `long double' value.

6.730.5 Since

1.14.0


Next: , Previous: W1066, Up: Messages

6.731 W1067

6.731.1 Message body

A value of the `float' typed compound expression is explicitly converted into a `long double' value.

6.731.2 Content

Under construction.

6.731.3 Sample code

void func(float a)
{
    long double b = (long double) (a * a);
}

6.731.4 Related message

  • W1066 A value of the `float' typed compound expression is explicitly converted into a `double' value.
  • W1068 A value of the `double' typed compound expression is explicitly converted into a `long double' value.

6.731.5 Since

1.14.0


Next: , Previous: W1067, Up: Messages

6.732 W1068

6.732.1 Message body

A value of the `double' typed compound expression is explicitly converted into a `long double' value.

6.732.2 Content

Under construction.

6.732.3 Sample code

void func(double a)
{
    long double b = (long double) (a * a);
}

6.732.4 Related message

  • W1066 A value of the `float' typed compound expression is explicitly converted into a `double' value.
  • W1067 A value of the `float' typed compound expression is explicitly converted into a `long double' value.

6.732.5 Since

1.14.0


Next: , Previous: W1068, Up: Messages

6.733 W1069

6.733.1 Message body

No trailing `else' clause is found in this `if-else-if' statements chain.

6.733.2 Content

Under construction.

6.733.3 Sample code

static int func(int i)
{
    if (i == 2) { /* W1069 */
        return 0;
    }
    else if (i == 4) {
        return 1;
    }
    return 2;
}

6.733.4 Related message

None.

6.733.5 Since

1.14.0


Next: , Previous: W1069, Up: Messages

6.734 W1070

6.734.1 Message body

This `switch' statement can be translated into `if-else' statement because there are only 2 execution paths.

6.734.2 Content

Under construction.

6.734.3 Sample code

switch (x) {
case 1:
    ...
    break;
default:
    ...
}

6.734.4 Related message

None.

6.734.5 Since

1.14.0


Next: , Previous: W1070, Up: Messages

6.735 W1071

6.735.1 Message body

Function `%s' has multiple termination points.

6.735.2 Content

Under construction.

6.735.3 Sample code

void foo(int i) /* W1071 */
{
    if (i == 0) {
        return;
    }
}

6.735.4 Related message

None.

6.735.5 Since

1.18.0


Next: , Previous: W1071, Up: Messages

6.736 W1072

6.736.1 Message body

`A `goto' statement is found.

6.736.2 Content

Under construction.

6.736.3 Sample code

static int func(int i)
{
    if (i == 1) {
        goto Label1; /* W1072 */
    }

    goto Label2; /* W1072 */

Label1:
    i = 10;
Label2:
    i = 20;
    return i;
}

6.736.4 Related message

None.

6.736.5 Since

1.14.0


Next: , Previous: W1072, Up: Messages

6.737 W1073

6.737.1 Message body

Return value of the function `%s' is discarded.

6.737.2 Content

Under construction.

6.737.3 Sample code

extern int bar(void);
static void foo(void)
{
    int i;
    int j;
    for (i = 0, bar(); i < 10; i++) { /* W1073 */
        j = bar(); /* OK */
    }
}

6.737.4 Related message

None.

6.737.5 Since

1.16.0


Next: , Previous: W1073, Up: Messages

6.738 W1074

6.738.1 Message body

Side-effects in `sizeof' operand will not be recorded because the operand will not be executed actually.

6.738.2 Content

Under construction.

6.738.3 Sample code

static int foo(void)
{
    int i = 0;

    if (sizeof(i++) == 4) { /* W1074 */
        return 0;
    }
    else {
        return 1;
    }
}

6.738.4 Related message

None.

6.738.5 Since

1.16.0


Next: , Previous: W1074, Up: Messages

6.739 W1075

6.739.1 Message body

This declaration has no `static' storage-class-specifier while the declaring object has internal-linkage.

6.739.2 Content

Under construction.

6.739.3 Sample code

static int func(void);
int func(void) /* W1075 */
{
    ...
}

6.739.4 Related message

None.

6.739.5 Since

1.16.0


Next: , Previous: W1075, Up: Messages

6.740 W1076

6.740.1 Message body

`%s' has internal-linkage without any prototype declarations.

6.740.2 Content

Under construction.

6.740.3 Sample code

static int func(void) /* W1076 */
{
    return 0;
}

6.740.4 Related message

None.

6.740.5 Since

1.16.0


Next: , Previous: W1076, Up: Messages

6.741 W1077

6.741.1 Message body

Declaring array object without a size.

6.741.2 Content

Under construction.

6.741.3 Sample code

extern int a[]; /* W1077 */

6.741.4 Related message

None.

6.741.5 Since

1.16.0


Next: , Previous: W1077, Up: Messages

6.742 W9001

6.742.1 Message body

Control never reaches to this statement.

6.742.2 Content

Under construction.

6.742.3 Sample code

extern int all_possible_values_of_int(void);
extern unsigned int zero_if_succeeded(void);

void func(void)
{
    int i = all_possible_values_of_int();

    if (i < 0) {
        unsigned int ui = zero_if_succeeded();

        if (ui > 0) {
            return;
        }

        /* "ui" is equal to zero at this point */

        /* Always be true?  No, it'll be false all the time */
        if (i < ui) {
            return; /* W9001: Control never reaches here! */
        }
        /*
         * ISO standard says;
         *   Usual Arithmetic Conversion performed before evaluating
         *   the expression "i < ui".
         * Usual Arithmetic Conversion makes "i < ui" into
         * "(unsigned int) i < ui" and then the value of "i" which
         * is less than 0 will be converted into a new value which
         * is greater than 0 because of the wrap-around.
         * So, the expression ("a value greater than 0" < 0) makes
         * always false.
         */
    }
}

6.742.4 Related message

None.

6.742.5 Since

1.0.0


Next: , Previous: W9001, Up: Messages

6.743 W9002

6.743.1 Message body

There is no line feed character at the end of file.

6.743.2 Content

Under construction.

6.743.3 Sample code

Under construction.

6.743.4 Related message

None.

6.743.5 Since

1.0.0


Next: , Previous: W9002, Up: Messages

6.744 W9003

6.744.1 Message body

An object typed `%s' is implicitly converted into an object of type `%s'.

6.744.2 Content

This message indicates that an implicit conversion from or to an object of the non-standard type will occur.

6.744.3 Sample code

enum Color { RED, BLUE, GREEN };
enum Fruit { APPLE, BANANA, ORANGE };

extern void foo(enum Color);

static void bar(void)
{
    int i = RED; /* W9003 */
    foo(ORANGE); /* W9003 */
}

6.744.4 Related message

None.

6.744.5 Since

1.12.0


Next: , Previous: W9003, Up: Messages

6.745 C0001

6.745.1 Message body

A warning is detected as a pair of this identifier `%s'.

6.745.2 Content

Under construction.

6.745.3 Sample code

int very_long_long_long_long_long_long_long_identifier_1 = 0; /* C0001 */
int very_long_long_long_long_long_long_long_identifier_2 = 1; /* W0052 */

6.745.4 Related message

  • W0051 An external identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in linker property.
  • W0052 An identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in compile property.

6.745.5 Since

1.0.0


Next: , Previous: C0001, Up: Messages

6.746 C1000

6.746.1 Message body

Warning above is detected in the following context.

6.746.2 Content

This message indicates that the above W0093, W0096, W0097, W0115, W0116, W0421, W0422, W0423, W0424, W0459, W0460, W0461, W0462, W0568, W0569, W0570, W0607, W0608, W0705, W0707, W0720, W0745, W1049 and W1050 warnings are detected in the context described by the following messages.

6.746.3 Sample code

 1: int foo(int i)
 2: {
 3:     int j; /* C1003 */
 4: 
 5:     if (i < 0) { /* C1001 */
 6:         if (i < -10) { /* C1002 */
 7:             j = 2;
 8:         }
 9:         else if (i < -5) { /* C1002 */
10:             j = 3;
11:         }
12:     }
13:     else {
14:         j = 1;
15:     }
16: 
17:     return j; /* W0460 */
18: }

a.c:17:12:warning:c_builtin:W0460:UNC:X99:A value of variable `j' wouldn't set when this expression is evaluated.
:::context:c_builtin:C1000:INF:X99:Warning above is detected in the following context.
a.c:3:9:context:c_builtin:C1003:INF:X99:The problematic variable is defined here without initializer.
a.c:5:11:context:c_builtin:C1001:INF:X99:This controlling-expression is evaluated to be true.
a.c:6:15:context:c_builtin:C1002:INF:X99:This controlling-expression is evaluated to be false.
a.c:9:20:context:c_builtin:C1002:INF:X99:This controlling-expression is evaluated to be false.

6.746.4 Related message

  • C1001 This controlling-expression is evaluated to be true.
  • C1002 This controlling-expression is evaluated to be false.
  • C1003 The problematic variable is defined here without initializer.
  • C1004 NULL value is assigned to the the problematic variable.
  • C1005 A value possibly be NULL is assigned to the problematic variable.
  • C1006 New value is assigned to the problematic variable.

6.746.5 Since

3.2.0


Next: , Previous: C1000, Up: Messages

6.747 C1001

6.747.1 Message body

This controlling-expression is evaluated to be true.

6.747.2 Content

This message indicates that the controlling-expression was evaluated as true in the context of detecting W0093, W0096, W0097, W0115, W0116, W0421, W0422, W0423, W0424, W0459, W0460, W0461, W0462, W0568, W0569, W0570, W0607, W0608, W0705, W0707, W0720, W0745, W1049 and W1050 warnings.

6.747.3 Sample code

int foo(int i)
{
    int j; /* C1003 */

    if (i < 0) { /* C1001 */
        if (i < -10) { /* C1002 */
            j = 2;
        }
        else if (i < -5) { /* C1002 */
            j = 3;
        }
    }
    else {
        j = 1;
    }

    return j; /* W0460 */
}

6.747.4 Related message

  • W0093 This expression may cause division-by-zero.
  • W0096 It divided by a constant expression which definitely zero.
  • W0097 This expression must cause division-by-zero.
  • W0115 Unsigned left shift operator `<<' drop the high-order bit.
  • W0116 Unsigned left shift operator `<<' can be drop high-order bit.
  • W0421 Value of the dereferencing pointer must be NULL.
  • W0422 Value of the dereferencing pointer may be NULL.
  • W0423 Arithmetic operation is being made to the pointer which its value will be NULL.
  • W0424 Arithmetic operation is being made to the pointer which its value might be NULL.
  • W0459 A value of variable `%s' doesn't set when this expression is evaluated. This program is danger.
  • W0460 A value of variable `%s' wouldn't set when this expression is evaluated.
  • W0461 A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger.
  • W0462 A pointer which the value will probably not set is used for the actual argument of the function.
  • W0568 The result of left shift operation against the signed constant expression value is undefined.
  • W0569 The result of left shift operation against the signed expression value is undefined.
  • W0570 This signed left shift operation may make undefined value.
  • W0607 An integer expression which the value which the value is minus converted to unsigned type.
  • W0608 An integer expression which the value might be minus converted to unsigned type.
  • W0705 This non-constant array subscript may cause out-of-range access.
  • W0707 This constant array subscript must cause out-of-range access.
  • W0720 The value with floating-point type doesn't fit in the range of converted type.
  • W0745 This non-constant array subscript may cause out-of-range access.
  • W1049 The result of conversion to signed integer type in integer expression might not be expressed by a signed type.
  • W1050 The result of conversion to signed integer type in integer expression is not express by a signed type.

6.747.5 Since

3.2.0


Next: , Previous: C1001, Up: Messages

6.748 C1002

6.748.1 Message body

This controlling-expression is evaluated to be false.

6.748.2 Content

This message indicates that the controlling-expression was evaluated as false in the context of detecting W0093, W0096, W0097, W0115, W0116, W0421, W0422, W0423, W0424, W0459, W0460, W0461, W0462, W0568, W0569, W0570, W0607, W0608, W0705, W0707, W0720, W0745, W1049 and W1050 warnings.

6.748.3 Sample code

int foo(int i)
{
    int j; /* C1003 */

    if (i < 0) { /* C1001 */
        if (i < -10) { /* C1002 */
            j = 2;
        }
        else if (i < -5) { /* C1002 */
            j = 3;
        }
    }
    else {
        j = 1;
    }

    return j; /* W0460 */
}

6.748.4 Related message

  • W0093 This expression may cause division-by-zero.
  • W0096 It divided by a constant expression which definitely zero.
  • W0097 This expression must cause division-by-zero.
  • W0115 Unsigned left shift operator `<<' drop the high-order bit.
  • W0116 Unsigned left shift operator `<<' can be drop high-order bit.
  • W0421 Value of the dereferencing pointer must be NULL.
  • W0422 Value of the dereferencing pointer may be NULL.
  • W0423 Arithmetic operation is being made to the pointer which its value will be NULL.
  • W0424 Arithmetic operation is being made to the pointer which its value might be NULL.
  • W0459 A value of variable `%s' doesn't set when this expression is evaluated. This program is danger.
  • W0460 A value of variable `%s' wouldn't set when this expression is evaluated.
  • W0461 A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger.
  • W0462 A pointer which the value will probably not set is used for the actual argument of the function.
  • W0568 The result of left shift operation against the signed constant expression value is undefined.
  • W0569 The result of left shift operation against the signed expression value is undefined.
  • W0570 This signed left shift operation may make undefined value.
  • W0607 An integer expression which the value which the value is minus converted to unsigned type.
  • W0608 An integer expression which the value might be minus converted to unsigned type.
  • W0705 This non-constant array subscript may cause out-of-range access.
  • W0707 This constant array subscript must cause out-of-range access.
  • W0720 The value with floating-point type doesn't fit in the range of converted type.
  • W0745 This non-constant array subscript may cause out-of-range access.
  • W1049 The result of conversion to signed integer type in integer expression might not be expressed by a signed type.
  • W1050 The result of conversion to signed integer type in integer expression is not express by a signed type.

6.748.5 Since

3.2.0


Next: , Previous: C1002, Up: Messages

6.749 C1003

6.749.1 Message body

The problematic variable is defined here without initializer.

6.749.2 Content

This message indicates where the problematic variable is defined in the context of detecting W0459, W0460, W0461 and W0462 warnings.

6.749.3 Sample code

int foo(int i)
{
    int j; /* C1003 */

    if (i < 0) { /* C1001 */
        if (i < -10) { /* C1002 */
            j = 2;
        }
        else if (i < -5) { /* C1002 */
            j = 3;
        }
    }
    else {
        j = 1;
    }

    return j; /* W0460 */
}

6.749.4 Related message

  • W0459 A value of variable `%s' doesn't set when this expression is evaluated. This program is danger.
  • W0460 A value of variable `%s' wouldn't set when this expression is evaluated.
  • W0461 A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger.
  • W0462 A pointer which the value will probably not set is used for the actual argument of the function.

6.749.5 Since

3.2.0


Next: , Previous: C1003, Up: Messages

6.750 C1004

6.750.1 Message body

NULL value is assigned to the the problematic variable.

6.750.2 Content

This message indicates where the NULL value was assigned to the problematic variable in the context of detecting W0421, W0422, W0423 and W0424 warnings.

6.750.3 Sample code

extern int *bar(void);
extern int *baz(void);

void foo(int i)
{
    int *p = NULL; /* C1004 */

    if (i < 0) { /* C1002 */
        p = bar();
        if (!p) {
            return;
        }
    }
    else {
        p = baz(); /* C1005 */
    }

    *p += 2; /* W0422 */
}

6.750.4 Related message

  • W0421 Value of the dereferencing pointer must be NULL.
  • W0422 Value of the dereferencing pointer may be NULL.
  • W0423 Arithmetic operation is being made to the pointer which its value will be NULL.
  • W0424 Arithmetic operation is being made to the pointer which its value might be NULL.

6.750.5 Since

3.2.0


Next: , Previous: C1004, Up: Messages

6.751 C1005

6.751.1 Message body

A value possibly be NULL is assigned to the problematic variable.

6.751.2 Content

This message indicates where the value possibly be NULL was assigned to the problematic variable in the context of detecting W0421, W0422, W0423 and W0424 warnings.

6.751.3 Sample code

extern int *bar(void);
extern int *baz(void);

void foo(int i)
{
    int *p = NULL; /* C1004 */

    if (i < 0) { /* C1002 */
        p = bar();
        if (!p) {
            return;
        }
    }
    else {
        p = baz(); /* C1005 */
    }

    *p += 2; /* W0422 */
}

6.751.4 Related message

  • W0421 Value of the dereferencing pointer must be NULL.
  • W0422 Value of the dereferencing pointer may be NULL.
  • W0423 Arithmetic operation is being made to the pointer which its value will be NULL.
  • W0424 Arithmetic operation is being made to the pointer which its value might be NULL.

6.751.5 Since

3.2.0


Previous: C1005, Up: Messages

6.752 C1006

6.752.1 Message body

New value is assigned to the problematic variable.

6.752.2 Content

This message indicates where a value was assigned to the problematic variable in the context of detecting W0093, W0096, W0097, W0115, W0116, W0568, W0569, W0570, W0607, W0608, W0705, W0707, W0720, W0745, W1049 and W1050 warnings.

6.752.3 Sample code

int foo(int i)
{
    int j = 0; /* C1006 */

    if (i < 0) { /* C1002 */
        j = -i;
    }
    else if (i > 0) { /* C1002 */
        j = i;
    }

    return 5 / j; /* W0093 */
}

6.752.4 Related message

  • W0093 This expression may cause division-by-zero.
  • W0096 It divided by a constant expression which definitely zero.
  • W0097 This expression must cause division-by-zero.
  • W0115 Unsigned left shift operator `<<' drop the high-order bit.
  • W0116 Unsigned left shift operator `<<' can be drop high-order bit.
  • W0568 The result of left shift operation against the signed constant expression value is undefined.
  • W0569 The result of left shift operation against the signed expression value is undefined.
  • W0570 This signed left shift operation may make undefined value.
  • W0607 An integer expression which the value which the value is minus converted to unsigned type.
  • W0608 An integer expression which the value might be minus converted to unsigned type.
  • W0705 This non-constant array subscript may cause out-of-range access.
  • W0707 This constant array subscript must cause out-of-range access.
  • W0720 The value with floating-point type doesn't fit in the range of converted type.
  • W0745 This non-constant array subscript may cause out-of-range access.
  • W1049 The result of conversion to signed integer type in integer expression might not be expressed by a signed type.
  • W1050 The result of conversion to signed integer type in integer expression is not express by a signed type.

6.752.5 Since

3.2.0


Next: , Previous: Messages, Up: Top

7 Metrics List


Next: , Up: Metrics

7.1 FL_STMT

7.1.1 Metric name

Number of statements

7.1.2 Content

The number which it recognized as statements by syntax rule in a file.

7.1.3 Sample code

int foo(int a)
{
    int i = 0;  /* A declaration is not a statement */

    if (a > 0) {  /* An if-else-statement makes FL_STMT += 1 */
        i = a + 1;  /* An expression-statement makes FL_STMT += 1 */
    }
    else {
        ;  /* An empty expression-statement makes FL_STMT += 1 */
    }

    return i;  /* A jump-statement makes FL_STMT += 1 */
}

/* Now, FL_STMT == 4 */

void bar(int a)
{
    struct {  /* A declaration is not a statement */
        int i;
    } s;

    /* A for-statement which has 2 expression-statements (`s.i=0;' and `s.i<a;') makes FL_STMT += 3 */
    for (s.i = 0; s.i < a; s.i++) {
        switch (s.i % 3) {  /* A switch-statement makes FL_STMT += 1 */
        case 0:             /* A label is part of a labeled-statement, but it makes FL_STMT += 1 */
            puts("A\n");    /* A labeled expression-statement makes FL_STMT += 1 */
            break;          /* A jump-statement makes FL_STMT += 1 */
        case 1:             /* A label is part of a labeled-statement, but it makes FL_STMT += 1 */
            puts("B\n");    /* A labeled expression-statement makes FL_STMT += 1 */
            break;          /* A jump-statement makes FL_STMT += 1 */
        case 2:             /* A label is part of a labeled-statement, but it makes FL_STMT += 1 */
            puts("C\n");    /* A labeled expression-statement makes FL_STMT += 1 */
            break;          /* A jump-statement makes FL_STMT += 1 */
        }
    }
}

/* Finally, FL_STMT == 17 */
     MET,FL_STMT,test.c,17

7.1.4 Since

1.0.0


Next: , Previous: FL_STMT, Up: Metrics

7.2 FL_FUNC

7.2.1 Metric name

Number of functions

7.2.2 Content

The number of function which defined in a file.

7.2.3 Sample code

void foo(void) {}  /* A function-definition makes FL_FUNC += 1 */

static void bar(void) {}  /* A function-definition makes FL_FUNC += 1 */

extern void baz(void);  /* A declaration is not a function-definition */

int qux(a, b)  /* An old style function-definition makes FL_FUNC += 1 */
    int a, b;
{
    return a + b;
}

/* FL_FUNC == 3 */
     MET,FL_FUNC,test.c,3

7.2.4 Since

1.0.0


Next: , Previous: FL_FUNC, Up: Metrics

7.3 FN_STMT

7.3.1 Metric name

Number of statements

7.3.2 Content

The number which it recognized as statements by syntax rule in a function.

7.3.3 Sample code

int foo(int a)
{
    int i = 0;  /* A declaration is not a statement */

    if (a > 0) {  /* An if-else-statement makes foo's FN_STMT += 1 */
        i = a + 1;  /* An expression-statement makes foo's FN_STMT += 1 */
    }
    else {
        ;  /* An empty expression-statement makes foo's FN_STMT += 1 */
    }

    return i;  /* A jump-statement makes foo's FN_STMT += 1 */

    /* foo's FN_STMT == 4 */
}

void bar(int a)
{
    struct {  /* A declaration is not a statement */
        int i;
    } s;

    /* A for-statement which has 2 expression-statements (`s.i=0;' and * `s.i<a;') makes bar's FN_STMT += 3 */
    for (s.i = 0; s.i < a; s.i++) {
        switch (s.i % 3) {  /* A switch-statement makes bar's FN_STMT += 1 */
        case 0:             /* A label is part of a labeled-statement, but it makes bar's FN_STMT += 1 */
            puts("A\n");    /* A labeled expression-statement makes bar's FN_STMT += 1 */
            break;          /* A jump-statement makes bar's FN_STMT += 1 */
        case 1:             /* A label is part of a labeled-statement, but it makes bar's FN_STMT += 1 */
            puts("B\n");    /* A labeled expression-statement makes bar's FN_STMT += 1 */
            break;          /* A jump-statement makes bar's FN_STMT += 1 */
        case 2:             /* A label is part of a labeled-statement, but it makes bar's FN_STMT += 1 */
            puts("C\n");    /* A labeled expression-statement makes bar's FN_STMT += 1 */
            break;          /* A jump-statement makes bar's FN_STMT += 1 */
        }
    }

    /* bar's FN_STMT == 13 */
}
     MET,FN_STMT,foo,int foo(int),test.c,1,5,4
     MET,FN_STMT,bar,void bar(int),test.c,14,6,13

7.3.4 Since

1.0.0


Next: , Previous: FN_STMT, Up: Metrics

7.4 FN_UNRC

7.4.1 Metric name

Number of unreached statements

7.4.2 Content

The number of statements which it not run in any condition.

7.4.3 Sample code

#include <stdlib.h>

int foo(int i)
{
    unsigned int ui;

    if (i < 0) {
        switch (i) {
        case -3:
            ui = 0;
            break;
        /* Control never reaches to this "case 3:" clause because "i" is less than 0 at this point */
        case 3:      /* This label is part of an unreachable labeled-statement, but it makes foo's FN_UNRC += 1 */
            ui = 1;  /* An unreachable labeled expression-statement makes FN_UNRC += 1 */
            break;   /* An unreachable jump-statement makes FN_UNRC += 1 */
        default:
            ui = 0;
        }

        /* "ui" is equal to 0 at this point */

        /*
         * The usual-arithmetic-conversion makes "i < ui" into "(unsigned int) i < ui".
         * Then, the value of "i" which is less than 0 will be converted into the new value which is greater than 0
         * because of the wrap-around.
         * So, "(value which is greater than 0) < 0" makes false at all times.
         */
        if (i < ui) {
            exit(0);  /* An unreachable expression-statement makes FN_UNRC += 1 */
        }
    }
    else {
        /* "i" is greater than or equal to 0 at this point */

        abort();  /* The abort() standard function terminates this execution path */
    }

    /* "i" is less than 0 at this point */

    if (i == 3) {   /* "(value which is less than 0) == 3" makes false at all times */
        return -1;  /* An unreachable jump-statement makes FN_UNRC += 1 */
    }

    return 0;

    /* foo's FN_UNRC == 5 */
}
     MET,FN_UNRC,foo,int foo(int),test.c,3,5,5

7.4.4 Since

1.0.0


Next: , Previous: FN_UNRC, Up: Metrics

7.5 FN_LINE

7.5.1 Metric name

Number of lines

7.5.2 Content

Physical lines from the beginning of a line to the end of a line in a function definition.

7.5.3 Sample code

int foo(void)  /* foo's function definition starts here */
{
    return 0;
}  /* foo's function definition ends here */

/* foo's FN_LINE == 3 */

int
bar  /* bar's function definition starts here */
(void)
{
    return 0;
}  /* bar's function definition ends here */

/* bar's FN_LINE == 5 */

int
baz  /* baz's old style function definition starts here */
(a)
int a;
{
    return 0;
}  /* baz's old style function definition ends here */

/* baz's FN_LINE == 6 */
     MET,FN_LINE,foo,int foo(void),test.c,1,5,3
     MET,FN_LINE,bar,int bar(void),test.c,8,1,5
     MET,FN_LINE,baz,int baz(int),test.c,17,1,6

7.5.4 Since

1.0.0


Next: , Previous: FN_LINE, Up: Metrics

7.6 FN_PARA

7.6.1 Metric name

Number of parameters

7.6.2 Content

The number of formal arguments in the argument list of function declaration.

7.6.3 Sample code

int foo(int a, long b, char *p)
{
    return 0;
}
/* foo's FN_PARA == 3 */

int bar(a, b, p)  /* An old style function definition */
    long b;  /* A type-specifier of "a" is omitted */
    char *p;
{
    return 0;
}
/* bar's FN_PARA == 3 */
     MET,FN_PARA,foo,"int foo(int,long,char *)",test.c,1,5,3
     MET,FN_PARA,bar,"int bar(int,long,char *)",test.c,6,5,3

7.6.4 Since

1.0.0


Next: , Previous: FN_PARA, Up: Metrics

7.7 FN_UNUV

7.7.1 Metric name

Number of not use /not reuse variables

7.7.2 Content

The number of not used function and variables which assigned the value.

7.7.3 Sample code

void foo(int i, int j)  /* A useless declaration of "j" makes FN_UNUV += 1 */
{
    int a;
    int b;
    int c = 0;  /* A useless declaration of "c" makes FN_UNUV += 1 */

    if (i < 0) {
        a = -i;
    }
    else {
        a = i;
    }

    b = a * 2;  /* A useless assignment to "b" makes FN_UNUV += 1 */
    printf("%d\n", a);

    /* foo's FN_UNUV == 3 */
}
     MET,FN_UNUV,foo,"void foo(int,int)",test.c,1,6,3

7.7.4 Since

1.0.0


Next: , Previous: FN_UNUV, Up: Metrics

7.8 FN_CSUB

7.8.1 Metric name

Location number of call function

7.8.2 Content

The number of calling other function in a function,

7.8.3 Sample code

extern int foo(int);

static int bar(int);

int baz(int i)
{
    int j = foo(i);  /* A function-call-expression makes baz's FN_CSUB += 1 */

    return foo(bar(j)); /* 2 function-call-expressions makes baz's FN_CSUB += 2 */

    /* baz's FN_CSUB == 3 */
}
     MET,FN_CSUB,baz,int baz(int),test.c,5,5,3

7.8.4 Since

1.0.0


Next: , Previous: FN_CSUB, Up: Metrics

7.9 FN_CALL

7.9.1 Metric name

Location number of called from function

7.9.2 Content

The number of called from other function of the project.

7.9.3 Sample code

test1.c

int foo(int i) { return i + 1; }

int bar(int i)
{
    return foo(i) + 1;  /* A function-call-expression makes foo's FN_CALL += 1 */
}

test2.c

extern int bar(int);

static void baz(void)
{
    int i = bar(0);  /* A function-call-expression makes bar's FN_CALL += 1 and foo's FN_CALL += 1 */
}

project-name.met.csv

     MET,FN_CALL,foo,int foo(int),test1.c,1,5,2
     MET,FN_CALL,bar,int bar(int),test1.c,3,5,1
     MET,FN_CALL,baz,void baz(void),test2.c,3,13,0

7.9.4 Since

1.0.0


Next: , Previous: FN_CALL, Up: Metrics

7.10 FN_GOTO

7.10.1 Metric name

Number of goto statement

7.10.2 Content

The number of goto statement in a function.

7.10.3 Sample code

int foo(int i)
{
    switch (i) {
    case 0:
        goto ZERO;  /* A goto-statement makes foo's FN_GOTO += 1 */
    case 1:
        goto ONE;   /* A goto-statement makes foo's FN_GOTO += 1 */
    default:
        return 0;
    }

ZERO:
    return 1;

ONE:
    return 2;

    /* foo's FN_GOTO == 2 */
}
     MET,FN_GOTO,foo,int foo(int),test.c,1,5,2

7.10.4 Since

1.0.0


Next: , Previous: FN_GOTO, Up: Metrics

7.11 FN_RETN

7.11.1 Metric name

Number of return point in a function

7.11.2 Content

The number of executable return-statements and implicit return-statements at the end of a function.

7.11.3 Sample code

void foo(int i)
{
    if (i < 0) {
        return;  /* A return-statement makes foo's FN_RETN += 1 */
    }

    if (i >= 10) {
        return;  /* A return-statement makes foo's FN_RETN += 1 */
    }
    else {
        for (; i < 10; i++) {
          printf("%d\n", i);
        }
    }

    /* An implicit return from the function whose return type is void makes foo's FN_RETN * += 1 */

    /* foo's FN_RETN == 3 */
}

int bar(int i)
{
    if (i < 0) {
        return -1;  /* A return-statement makes bar's FN_RETN += 1 */
    }

    if (i >= 10) {
        return -1;  /* A return-statement makes bar's FN_RETN += 1 */
    }
    else {
        for (; i < 10; i++) {
          printf("%d\n", i);
        }
    }

    return 0;  /* A return-statement makes bar's FN_RETN += 1 */

    /* bar's FN_RETN == 3 */
}
     MET,FN_RETN,foo,void foo(int),test.c,1,6,3
     MET,FN_RETN,bar,int bar(int),test.c,20,5,3

7.11.4 Since

1.0.0


Next: , Previous: FN_RETN, Up: Metrics

7.12 FN_UELS

7.12.1 Metric name

Number of if-statement without else-clause

7.12.2 Content

The number of if-statements which have no explicit else-clause.

7.12.3 Sample code

int foo(int i)
{
    int j;

    if (i < 0) {
        return -1;
    }
    else {
        j = i + 1;
    }

    if (j % 2) {
        return -1;
    }
    /* A standalone if-statement does nothing to the FN_UELS metric */

    if (i == 2) {
        return 0;
    }
    else if (i == 4) {
        return 1;
    }
    /* An implicit else clause makes foo's FN_UELS += 1 */

    return 5;

    /* foo's FN_UELS == 1 */
}
     MET,FN_UELS,foo,int foo(int),test.c,1,5,1

7.12.4 Since

1.0.0


Next: , Previous: FN_UELS, Up: Metrics

7.13 FN_NEST

7.13.1 Metric name

Maximum number of nest of control flow graph

7.13.2 Content

The deepest nesting of control structure in a function.

7.13.3 Sample code

void foo(int i)
{
    /* Nesting level == 0 */

    if (i < 0) {
        /* Nesting level == 1 */

        switch (i) {
            /* Nesting level == 2 */
        case -1:
            return;
        case -2:
            puts("A\n");
            break;
        }

        /* Nesting level == 1 */
    }
    else {
        /* Nesting level == 1 */
        int j;
        int k;

        for (j = 0; j < i; j++) {
            /* Nesting level == 2 */

            for (k = 0; k < 10; k++) {
                /* Nesting level == 3 */

                if (j == k) {
                    /* Nesting level == 4 */
                    puts("B\n");
                }
            }
        }
    }

    /* foo's FN_NEST == 4 */
}
     MET,FN_NEST,foo,void foo(int),test.c,1,6,4

7.13.4 Since

1.0.0


Next: , Previous: FN_NEST, Up: Metrics

7.14 FN_PATH

7.14.1 Metric name

Presumed number of static path

7.14.2 Content

The number of possible execute paths in a function.

7.14.3 Sample code

static int foo(int i)
{
    /* A */
    if (i == 0) {
        /* B */
        i = 0;
    }
    else {
        /* C */
        i = 1;
    }
    /* D */
    return i;

    /* Possible execute paths A->B->D and A->C->D makes foo's FN_PATH = 2 */
}

static int bar(int i)
{
    /* A */
    if (i == 0) {
        /* B */
        i = 0;
    }
    /* C */
    if (i == 1) {
        /* D */
        i = 1;
    }
    /* E */
    if (i == 2) {
        /* F */
        i = 2;
    }
    /* G */
    return i;

    /* Possible execute paths
         A->B->C->D->E->F->G,
         A->B->C->D->E->G,
         A->B->C->E->F->G,
         A->B->C->E->G,
         A->C->D->E->F->G,
         A->C->D->E->G,
         A->C->E->F->G,
         A->C->E->G
       makes bar's FN_PATH = 8 */
}

static int baz(int i)
{
    /* A */
    switch (i) {
    case 0:
        /* B */
        if (rand()) {
            /* C */
            i = 0;
        }
        else {
            /* D */
            i = 0;
        }
        /* E */
        i = 0;
        break;
    default:
        /* F */
        if (rand()) {
            /* G */
            i = 1;
        }
        else {
            /* H */
            i = 1;
        }
        /* I */
        i = 1;
        break;
    }
    /* J */
    return i;

    /* Possible execute paths
         A->B->C->E->J,
         A->B->D->E->J,
         A->F->G->I->J,
         A->F->H->I->J
       makes baz's FN_PATH = 4 */
}

static int qux(int i)
{
    /* A */
    while (i < 5) {
        /* B */
        if (i == 0) {
            /* C */
            return 0;
        }
        /* D */
        if (i == 1) {
            /* E */
            return 1;
        }
    }
    /* F */
    if (i == 2) {
        /* G */
        return 2;
    }
    /* H */
    return 3;

    /* Possible execute paths
         A->B->C,
         A->B->D->E,
         A->B->D->F->G,
         A->B->D->F->H,
         A->F->G,
         A->F->H
       makes qux's FN_PATH = 6 */
}
     MET,FN_PATH,foo,int foo(int),test.c,1,12,2
     MET,FN_PATH,bar,int bar(int),test.c,18,12,8
     MET,FN_PATH,baz,int baz(int),test.c,42,12,4
     MET,FN_PATH,qux,int qux(int),test.c,80,12,6

7.14.4 Since

1.0.0


Previous: FN_PATH, Up: Metrics

7.15 FN_CYCM

7.15.1 Metric name

Cyclomatic complexity

7.15.2 Content

The number of linearly independent paths through a program's source code. It was developed by McCabe.


calculating formula is (the number of edges of the graph) - (the number of nodes of the graph) + 2. It equals the number of branch in a function + 1.

7.15.3 Sample code

static int foo(int i)
{
    if (i == 0) {  /* Complexity += 1 */
        i = 0;
    }
    else {  /* An else branch does not grow the complexity */
        i = 1;
    }
    return i;

    /* foo's FN_CYCM == 2 */
}

static int bar(int i)
{
    if (i == 0) {  /* Complexity += 1 */
        i = 0;
    }
    if (i == 1) {  /* Complexity += 1 */
        i = 1;
    }
    if (i == 2) {  /* Complexity += 1 */
        i = 2;
    }
    return i;

    /* bar's FN_CYCM == 4 */
}

static int baz(int i)
{
    switch (i) {
    case 0:  /* Complexity += 1 */
        if (rand()) {  /* Complexity += 1 */
            i = 0;
        }
        else {  /* An else branch does not grow the complexity */
            i = 0;
        }
        i = 0;
        break;
    default:  /* A default clause does not grow the complexity */
        if (rand()) {  /* Complexity += 1 */
            i = 1;
        }
        else {  /* An else branch does not grow the complexity */
            i = 1;
        }
        i = 1;
        break;
    }
    return i;

    /* baz's FN_CYCM == 4 */
}

static int qux(int i)
{
    while (i < 5) {  /* An iteration does not grow the complexity */
        if (i == 0) {  /* Complexity += 1 */
            return 0;
        }
        if (i == 1) {  /* Complexity += 1 */
            return 1;
        }
    }
    if (i == 2) {  /* Complexity += 1 */
        return 2;
    }
    return 3;

    /* qux's FN_CYCM == 4 */
}
     MET,FN_CYCM,foo,int foo(int),test.c,1,12,2
     MET,FN_CYCM,bar,int bar(int),test.c,13,12,4
     MET,FN_CYCM,baz,int baz(int),test.c,28,12,4
     MET,FN_CYCM,qux,int qux(int),test.c,54,12,4

7.15.4 Since

1.0.0


Next: , Previous: Metrics, Up: Top

8 Code structure list


Next: , Up: CodeStructures

8.1 VER

8.1.1 Code structure information name

Version Records

8.1.2 Content

Under construction.

8.1.3 Sample code

Refer to output example of Version Records.

8.1.4 Since

1.0.0


Next: , Previous: VER, Up: CodeStructures

8.2 DCL(T)

8.2.1 Code structure information name

Type declaration records

8.2.2 Content

Under construction.

8.2.3 Sample code

Refer to output example of Type declaration records.

8.2.4 Since

1.0.0


Next: , Previous: DCL(T), Up: CodeStructures

8.3 DCL(V)

8.3.1 Code structure information name

Variable declaration records

8.3.2 Content

Under construction.

8.3.3 Sample code

Refer to output example of Variable declaration records.

8.3.4 Since

1.0.0


Next: , Previous: DCL(V), Up: CodeStructures

8.4 DCL(F)

8.4.1 Code structure information name

Function declaration records

8.4.2 Content

Under construction.

8.4.3 Sample code

Refer to output example of Function declaration records.

8.4.4 Since

1.0.0


Next: , Previous: DCL(F), Up: CodeStructures

8.5 DEF(V)

8.5.1 Code structure information name

Variable definition records

8.5.2 Content

Under construction.

8.5.3 Sample code

Refer to output example of Variable definition records.

8.5.4 Since

1.0.0


Next: , Previous: DEF(V), Up: CodeStructures

8.6 DEF(F)

8.6.1 Code structure information name

Function definition records

8.6.2 Content

Under construction.

8.6.3 Sample code

Refer to output example of Function definition records.

8.6.4 Since

1.0.0


Next: , Previous: DEF(F), Up: CodeStructures

8.7 DEF(M)

8.7.1 Code structure information name

Macro definition records

8.7.2 Content

Under construction.

8.7.3 Sample code

Refer to Macro definition records.

8.7.4 Since

1.0.0


Next: , Previous: DEF(M), Up: CodeStructures

8.8 DEF(L)

8.8.1 Code structure information name

Label definition records

8.8.2 Content

Under construction.

8.8.3 Sample code

Refer to output example of Lael definition records.

8.8.4 Since

1.0.0


Next: , Previous: DEF(L), Up: CodeStructures

8.9 INI

8.9.1 Code structure information name

Initialize records

8.9.2 Content

Under construction.

8.9.3 Sample code

Refer to output example of Initialize records.

8.9.4 Since

1.0.0


Next: , Previous: INI, Up: CodeStructures

8.10 ASN

8.10.1 Code structure information name

Assignment records

8.10.2 Content

Under construction.

8.10.3 Sample code

Refer to output example of Assignment records.

8.10.4 Since

1.0.0


Next: , Previous: ASN, Up: CodeStructures

8.11 DEP(I)

8.11.1 Code structure information name

Include record

8.11.2 Content

Under construction.

8.11.3 Sample code

Refer to output example of include records.

8.11.4 Since

1.0.0


Next: , Previous: DEP(I), Up: CodeStructures

8.12 DEP(C)

8.12.1 Code structure information name

Caller function records

8.12.2 Content

Under construction.

8.12.3 Sample code

Refer to output example of caller records.

8.12.4 Since

1.0.0


Next: , Previous: DEP(C), Up: CodeStructures

8.13 DEP(X)

8.13.1 Code structure information name

...

8.13.2 Content

Under construction.

8.13.3 Sample code

Refer to output example of Dependency records.

8.13.4 Since

1.0.0


Next: , Previous: DEP(X), Up: CodeStructures

8.14 LIT

8.14.1 Code structure information name

...

8.14.2 Content

Under construction.

8.14.3 Sample code

Refer to output example of Literal records.

8.14.4 Since

1.0.0


Previous: LIT, Up: CodeStructures

8.15 PRE

8.15.1 Code structure information name

...

8.15.2 Content

Under construction.

8.15.3 Sample code

Refer to output example of preprocessed records.

8.15.4 Since

1.0.0


Next: , Previous: CodeStructures, Up: Top

Appendix A Appendix

A.1 Screen shot

A.1.1 Collaboration with Adqua

Static analysis result of AdLint can use measure the source quality by processing Adqua. (Adqua supports only Japanese)

adlint_on_adqua.png

A.1.2 Collaboration with Vim - text editor

Adlint p

The format of AdLint's warning message is same as the standard compiler, so it's easy to collaborate with text editor. It will be able to check easily the code quality during development.

adlint_on_vim_en.png

A.1.3 Collaborate with Eclipse - integrated development environment

The format of AdLint's warning message is same as the standard compiler, so it's easy to collaborate with integrated development environment. It will be able to check easily the code quality during development.

adlint_on_eclipse_en.png

A.2 Sample of traits file

#     ___    ____  __    ___   _________
#    /   |  / _  |/ /   / / | / /__  __/           Source Code Static Analyzer
#   / /| | / / / / /   / /  |/ /  / /                   AdLint - Advanced Lint
#  / __  |/ /_/ / /___/ / /|  /  / /
# /_/  |_|_____/_____/_/_/ |_/  /_/   Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.
#
# This file is part of AdLint.
#
# AdLint is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# AdLint is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# AdLint.  If not, see <http://www.gnu.org/licenses/>.
#

# Schema version of the traits file.
# DO NOT EDIT MANUALLY!
version: "3.0.0"

# List of names of source code examination packages.
#
# "c_builtin" is a builtin source code examination package for C language.
# You can install optional examination packages and append (or replace) this
# list to specify which examination packages are to be run.
exam_packages:
  - "c_builtin"

#
# Project specific traits section
#
project_traits:

  # Project name.
  project_name: "screen-4.0.3"

  # Project root directory.
  project_root: ".."

  # Analysys target selection.
  # Ex.
  #   target_files:
  #     inclusion_paths:
  #       - "../foo"
  #       - "../bar"
  #     exclusion_paths:
  #       - "../bar/baz"
  target_files:
    inclusion_paths:
      - ".."
    exclusion_paths:

  # Pathname of the project specific initial header file.
  # This header file is automatically included above the first line of the
  # target source file.
  initial_header: "adlint_pinit.h"

  # Project specific additional include paths.
  # Ex.
  #   file_search_paths:
  #     - "include/foo"
  #     - "../include/bar"
  #     - "/opt/baz/include"
  file_search_paths:
    - "../screen-4.0.3"

  #
  # Project specific coding style section
  #
  coding_style:

    # Indent style which is a convention governing the identation of blocks.
    # Select from "K&R", "Allman" and "GNU".
    #
    # The value "K&R" means...
    #   int foo(int i)
    #   {
    #       if (i == 0) {
    #           return 0;
    #       }
    #       return i;
    #   }
    #
    # The value "Allman" means...
    #   int foo(int i)
    #   {
    #       if (i == 0)
    #       {
    #           return 0;
    #       }
    #       return i;
    #   }
    #
    # The value "GNU" means...
    #   int
    #   foo(int i)
    #   {
    #     if (i == 0)
    #       {
    #         return 0;
    #       }
    #     return i;
    #   }
    indent_style: "GNU"

    # Appearance width of a TAB character.
    tab_width: 8

    # Appearance width of 1-level of the indentation.
    indent_width: 2

  # Character encoding of source files.
  file_encoding:

#
# Compiler specific traits section
#
compiler_traits:

  # Pathname of the compiler specific initial header file.
  # This header file is automatically included above the first line of the
  # project specific initial header file.
  initial_header: "adlint_cinit.h"

  # Compiler specific include paths.
  # Ex.
  #   file_search_paths:
  #     - "/usr/include"
  #     - "/usr/local/include"
  file_search_paths:
    - "/usr/local/include"
    - "/usr/include"
    - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include"

  #
  # Compiler specific standard type section
  #
  standard_types:

    # Bit size of the `char' type family.
    char_size: 8
    # Bit size of the alignment of the `char' type family.
    char_alignment: 8

    # Bit size of the `short' type family.
    short_size: 16
    # Bit size of the alignment of the `short' type family.
    short_alignment: 16

    # Bit size of the `int' type family.
    int_size: 32
    # Bit size of the alignment of the `int' type family.
    int_alignment: 32

    # Bit size of the `long int' type family.
    long_size: 32
    # Bit size of the alignment of the `long int' type family.
    long_alignment: 32

    # Bit size of the `long long int' type family.
    long_long_size: 64
    # Bit size of the alignment of the `long long int' type family.
    long_long_alignment: 64

    # Bit size of the `float' type.
    float_size: 32
    # Bit size of the alignment of the `float' type.
    float_alignment: 32

    # Bit size of the `double' type.
    double_size: 64
    # Bit size of the alignment of the `double' type.
    double_alignment: 64

    # Bit size of the `long double' type.
    long_double_size: 96
    # Bit size of the alignment of the `long double' type.
    long_double_alignment: 96

    # Bit size of the pointer to functions.
    code_ptr_size: 32
    # Bit size of the alignment of the pointer to functions.
    code_ptr_alignment: 32

    # Bit size of the pointer to data.
    data_ptr_size: 32
    # Bit size of the alignment of the pointer to data.
    data_ptr_alignment: 32

    # Treat the `char' type as same as the `unsigned char' type?
    char_as_unsigned_char: true

  # Treat the `>>' operator as a logical shift, not an arithmetic shift?
  arithmetic:
    logical_right_shift: true

  # Max length of all symbols can be identified by the compiler.
  identifier_max: 128

  # Token substitution setting to warn the use of compiler specific extensions.
  #
  # If your compiler supports `__attribute__(...)' extension and you want to
  # know the use of this extension, specify as below.
  #   extension_substitutions:
  #     "__attribute__(__adlint__any)": ""
  # The token sequence consists of `__attribute__', `(', any kind of tokens,
  # `)' will be replaced with nothing (erased) after the preprocessing phase.
  # And this substitution will be warned by the message W0061.
  extension_substitutions:
    "__extension__": ""
    "__attribute__(__adlint__any)": ""
    "__inline__": "inline"
    "__asm__ __adlint__any(__adlint__any)": ""

  # Token substitution setting to silently ignore the use of compiler specific
  # extensions.
  #
  # If your compiler supports `__asm__ volatile (...)' extension and you do not
  # mind the use of this extension, specify as below.
  #   arbitrary_substitutions:
  #     "__asm__ __adlint__any(__adlint__any)": ""
  # The token sequence consists of `__asm__', any kind of tokens, `(', any kind
  # of tokens, `)' will be replaced with nothing (erased) silently after the
  # preprocessing phase.
  arbitrary_substitutions:
    "typeof": "__typeof__"
    "__typeof": "__typeof__"
    "alignof": "__alignof__"
    "__alignof": "__alignof__"
    "__signed__": "signed"

#
# Linker specific traits section
#
linker_traits:

  # Max length of external symbols can be identified by the linker.
  identifier_max: 128

  # Are external symbols identified without case by the linker?
  identifier_ignore_case: false

#
# Message traits section
#
message_traits:

  # Language of the message text.
  # Currently, "en_US" and "ja_JP" are supported.
  # Please help to translate the message catalog into your language.
  language: "ja_JP"

  # Enable inline annotation based message suppression?
  individual_suppression: true

  # Project-wide code check exclusion settings.
  # Ex.
  #   exclusion:
  #     categories:
  #       - "REL"
  #       - "PRT"
  #     severities: "[ABC][5-9][0-9]"
  #     messages:
  #       W0001: "c_builtin"
  #       W0002: "c_ansi"
  exclusion:

  # Project-wide code check inclusion settings.
  # Ex.
  #   inclusion:
  #     messages:
  #       W0001: "c_builtin"
  #       W0002: "c_ansi"
  inclusion:

  # Message text replacement.
  # Ex.
  #   change_list:
  #     W9999:
  #       package: "c_builtin"
  #       classes:
  #         - "REL:A10"
  #         - "PRT:B20"
  #       format: "Your custom message for the warning of W9999."
  #     X9999:
  #       package: "core"
  #       classes:
  #         - "ERR:X99"
  #       format: "Your custom message for the warning of X9999."
  #     E9999:
  #       package: "core"
  #       classes:
  #         - "ERR:X99"
  #       format: "Your custom message for the warning of E9999."
  change_list:

A.3 Sample of analysis order of GNUmakefile

#     ___    ____  __    ___   _________
#    /   |  / _  |/ /   / / | / /__  __/           Source Code Static Analyzer
#   / /| | / / / / /   / /  |/ /  / /                   AdLint - Advanced Lint
#  / __  |/ /_/ / /___/ / /|  /  / /
# /_/  |_|_____/_____/_/_/ |_/  /_/   Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.
#
# This file is part of AdLint.
#
# AdLint is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# AdLint is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# AdLint.  If not, see <http://www.gnu.org/licenses/>.
#
# How...
#   - to validate configuration files
#     % make check
#   - to analyze whole project with compiler like messages
#     % make all
#   - to do only single module analyses with compiler like messages
#     % make sma-only
#   - to analyze whole project with progress report
#     % make verbose-all
#   - to do only single module analyses with progress report
#     % make verbose-sma-only
#   - to do only cross module analysis with progress report
#     % make verbose-cma-only
#   - to analyze whole project *FAST* on 4-core processor machine
#     % make -j 4 all
#   - to analyze whole project *FAST* and silently with elapsed time
#     % time make -j 4 all 2>/dev/null
#   - to delete all result files
#     % make clean
#

PROJECT = screen-4.0.3

SOURCES = \
  screen-4.0.3/screen.c \
  screen-4.0.3/ansi.c \
  screen-4.0.3/fileio.c \
  screen-4.0.3/mark.c \
  screen-4.0.3/misc.c \
  screen-4.0.3/resize.c \
  screen-4.0.3/socket.c \
  screen-4.0.3/search.c \
  screen-4.0.3/tty.c \
  screen-4.0.3/term.c \
  screen-4.0.3/window.c \
  screen-4.0.3/utmp.c \
  screen-4.0.3/loadav.c \
  screen-4.0.3/putenv.c \
  screen-4.0.3/help.c \
  screen-4.0.3/termcap.c \
  screen-4.0.3/input.c \
  screen-4.0.3/attacher.c \
  screen-4.0.3/pty.c \
  screen-4.0.3/process.c \
  screen-4.0.3/display.c \
  screen-4.0.3/comm.c \
  screen-4.0.3/kmapdef.c \
  screen-4.0.3/acls.c \
  screen-4.0.3/braille.c \
  screen-4.0.3/braille_tsi.c \
  screen-4.0.3/logfile.c \
  screen-4.0.3/layer.c \
  screen-4.0.3/sched.c \
  screen-4.0.3/teln.c \
  screen-4.0.3/nethack.c \
  screen-4.0.3/encoding.c

VPATH = ..
VPATH_COMPONENTS = 1

RUBY = ruby

ADLINT = adlint
ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS)

ADLINT_SMA = adlint_sma
ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS)

ADLINT_CMA = adlint_cma
ADLINT_CMA_FLAGS = -t adlint_traits.yml -o .

ADLINT_CHK = adlint_chk
ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS)

RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)'

VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES))

SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES))
SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES))
SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES)))
SMA_LOG_FILES = $(addsuffix .log, $(SOURCES))

CMA_MSG_FILE = $(PROJECT).msg.csv
CMA_MET_FILE = $(PROJECT).met.csv
CMA_LOG_FILE = $(PROJECT).log

.SUFFIXES:

%.c.msg.csv %.c.met.csv : %.c
	$(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $<

$(CMA_MET_FILE) : $(SMA_MET_FILES)
	$(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^

.PHONY: adlint_sma-all
adlint_sma-all : $(SMA_MET_FILES)

.PHONY: adlint_cma-all
adlint_cma-all : $(CMA_MET_FILE)

.PHONY: adlint_chk-all
adlint_chk-all :
	$(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES)

.PHONY: adlint_verbose-all
adlint_verbose-all :
	$(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES)

.PHONY: adlint_verbose-sma-only
adlint_verbose-sma-only :
	$(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES)

.PHONY: adlint_verbose-cma-only
adlint_verbose-cma-only : $(SMA_MET_FILES)
	$(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^

.PHONY: adlint_clean
adlint_clean :
	@$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \
	       $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE)

.PHONY: all
all : adlint_cma-all

.PHONY: sma-only
sma-only : adlint_sma-all

.PHONY: verbose-all
verbose-all : adlint_verbose-all

.PHONY: verbose-sma-only
verbose-sma-only : adlint_verbose-sma-only

.PHONY: verbose-cma-only
verbose-cma-only : adlint_verbose-cma-only

.PHONY: check
check : adlint_chk-all

.PHONY: clean
clean : adlint_clean


Previous: Appendix, Up: Top

Index

adlint-3.2.0/share/doc/users_guide_ja.texi0000644000004100000410000571345112224440633020571 0ustar www-datawww-data\input texinfo @setfilename users_guide_ja.info @documentlanguage ja @documentencoding utf-8 @settitle AdLint 3.2.0 利用者ガイド @copying Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. @end copying @titlepage @page @vskip 0pt plus 1filll @insertcopying @end titlepage @ifnottex @node Top @top 導入 @end ifnottex @unnumberedsec AdLint とは AdLint は、オープンソースのソースコード静的解析ツールです。 AdLint は、ソースコード中の安全性や移植性に欠ける部分について警告メッセージを出 力し、また、同時にさまざまな品質メトリクスを測定することができます。 活用事例の一部は、付録の@ref{Screen Shot, スクリーンショット}でご確認いただけま す。 AdLint は、(現時点では) ANSI C89 / ISO C90 / 一部 ISO C99 規格に準拠した C 言語 のソースコードを解析することができます。 AdLint は @uref{http://www.ruby-lang.org/, Ruby} で実装されているため、Windows、 Mac OS X、GNU/Linux、FreeBSD など Ruby がサポートする全てのプラットフォームで利 用することができます。 @unnumberedsec ライセンス Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see <@uref{http://www.gnu.org/licenses/}>. @unnumberedsec 目次 @menu * インストール:Installation. * サンプルセッション:Sample Session. * コマンド仕様:Command. * 入力仕様:Input. * 出力仕様:Output. * メッセージ一覧:Messages. * メトリクス一覧:Metrics. * コード情報一覧:CodeStructures. * 付録:Appendix. * 索引:Index. @end menu @node Installation @chapter インストール @menu * 動作要件:Requirements. * ハードウェア環境:Hardware Environment. * MS Windows 環境へのインストール手順:Install On Windows. * Unix 環境へのインストール手順:Install On Unix. * 動作テストと AdLint の試用:Evaluation. @end menu @node Requirements @section 動作要件 AdLint の使用には、Ruby バージョン 1.9.3-p0 以降のインストールが必要です。 また、@ref{AdLintize Command, @command{adlintize}} コマンドによって作成する解析 自動化 @file{GNUmakefile} を使用するために、GNU Make バージョン 3 以降のインス トールをお勧めします。 @node Hardware Environment @section ハードウェア環境 推奨ハードウェア環境は、解析対象ソフトウェアの規模により一概には規定できません が、参考情報として AdLint のテスト環境と実際に計測した解析時間を紹介します。 @subsection MS Windows MS Windows XP (SP3) 上でのテストは Intel Core i5 3.33GHz (660)、物理メモリ 2 GB の環境で行っています。 この環境で Ruby 1.9.3-p0 (ビルド対象の総物理行数 62 万行) を解析した場合、下記 の解析時間を要しました。 @itemize @item すべてシリアルに解析 --- 約 7.9 時間 @item シングルモジュール解析を 3 並走させて解析 --- 約 3.7 時間 @end itemize @subsection GNU/Linux Fedora 14 上でのテストは Intel Core2 Duo 2.20GHz (E4500)、物理メモリ 3.4 GB の 環境で行っています。 この環境で Ruby 1.9.3-p0 (ビルド対象の総物理行数 62 万行) を解析した場合、下記 の解析時間を要しました。 @itemize @item すべてシリアルに解析 --- 約 6.5 時間 @item シングルモジュール解析を 2 並走させて解析 --- 約 4.2 時間 @end itemize @node Install On Windows @section MS Windows 環境へのインストール手順 @anchor{install_rubyinstaller} @subsection Ruby のインストール @uref{http://rubyinstaller.org/, RubyInstaller for Windows} の @uref{http://rubyinstaller.org/downloads/, ダウンロードページ}から 1.9.3-p0 以 降のバージョンの RubyInstaller を入手します。 RubyInstaller を実行し、インストーラの指示に従い Ruby をインストールします。 @anchor{install_devkit} @subsection DEVELOPMENT KIT (DevKit) のインストール @uref{http://www.gnu.org/software/make/make.html, GNU Make} を含む DEVELOPMENT KIT (DevKit) のインストールを推奨します。 @uref{http://rubyinstaller.org/, RubyInstaller for Windows} で配布されている DEVELOPMENT KIT (DevKit) を@uref{http://rubyinstaller.org/downloads/, ダウンロ ードページ}から入手します。 @file{DevKit-*.exe} を実行すると、DEVELOPMENT KIT が指定したディレクトリに展開 されます。 @subsection @code{PATH} 環境変数の設定 @ref{install_rubyinstaller, Ruby のインストール} でインストールした Ruby ディレ クトリ中の @file{bin}、@ref{install_devkit, DEVELOPMENT KIT (DevKit) のインスト ール} で展開した DevKit ディレクトリ中の @file{bin}、@file{mingw\bin} を @code{PATH} 環境変数に追加してください。 @subsection AdLint のインストール コマンドプロンプトを起動し、下記のコマンドにより AdLint の最新バージョンをダウ ンロードしインストールします。 @verbatim > gem install adlint --no-rdoc --no-ri @end verbatim HTTP プロキシを使用する場合は、下記のように @command{gem} コマンドに @option{--http-proxy http://ユーザ:パスワード@@プロキシホスト:ポート番号} を指 定します。 @verbatim > gem install adlint --no-rdoc --no-ri --http-proxy http://user:passwd@proxy:3128 @end verbatim @node Install On Unix @section Unix 環境へのインストール手順 @uref{http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=Ruby+Install+Guide, Ruby インストールガイド} に従い、Ruby インタプリタをインストールします。 その後、下記のコマンドにより AdLint の最新バージョンをダウンロードしインストー ルします。 @verbatim % gem install adlint @end verbatim または、 @verbatim % sudo gem install adlint @end verbatim HTTP プロキシを使用する場合は、@command{gem} コマンドに @option{--http-proxy http://ユーザ:パスワード@@プロキシホスト:ポート番号} を指定します。 @node Evaluation @section 動作テストと AdLint の試用 AdLint には小さなサンプルの C 言語プロジェクトが付属しています。 下記の手順で、@code{intro_demo} プロジェクトを用いて AdLint の動作テストを行っ てください。 @code{intro_demo} プロジェクトをユーザのワークスペースへコピーします。 @verbatim % cp -r `adlint --prefix`/share/demo/intro_demo . @end verbatim @ref{AdLintize Command, @command{adlintize}} コマンドにより、静的解析のための設 定ファイルを生成します。 @verbatim % cd intro_demo % adlintize @end verbatim 下記のファイルが出力されます。 @itemize @item @file{GNUmakefile} --- 解析手順が記述された GNU Make 用のメイクファイル @item @file{adlint_traits.yml} --- AdLint 解析動作をカスタマイズする特性ファイ ル @item @file{adlint_pinit.h} --- プロジェクト固有のイニシャルヘッダファイル @item @file{adlint_cinit.h} --- コンパイラ固有のイニシャルヘッダファイル @item @file{adlint_all.sh} --- 解析手順が記述されたシェルスクリプト @item @file{adlint_all.bat} --- 解析手順が記述された MS Windows 用バッチファイ ル @item @file{adlint_files.txt} --- シェルスクリプトとバッチファイルで使用する解 析対象ファイルのリスト @end itemize GNU Make バージョン 3 以降がインストール済みの場合、下記のコマンドにより解析す ることができます。 @verbatim % make verbose-all adlint --verbose -t adlint_traits.yml -o . intro_demo.c intro_demo.c [fin] |============================| 0.401s intro_demo [fin] |============================| 0.029s 1.125s user, 0.765s system, 00:00:01.89 total @end verbatim GNU Make をインストールしていない場合は、下記のように直接 @ref{AdLint Command, @command{adlint}} コマンドを使用してください。 @verbatim % adlint -v -t adlint_traits.yml -l adlint_files.txt intro_demo.c [fin] |============================| 0.401s intro_demo [fin] |============================| 0.029s 1.125s user, 0.765s system, 00:00:01.89 total @end verbatim 解析処理が正常に終了すると、下記のファイルが出力されます。 @itemize @item @file{intro_demo.i} --- プリプロセス済みソースファイル @item @file{intro_demo.c.met.csv} --- シングルモジュール解析結果のコード情報と メトリクス情報 @item @file{intro_demo.c.msg.csv} --- シングルモジュール解析結果の警告メッセー ジ @item @file{intro_demo.met.csv} --- クロスモジュール解析結果のメトリクス情報 @item @file{intro_demo.msg.csv} --- クロスモジュール解析結果の警告メッセージ @end itemize @file{intro_demo.c.msg.csv} の内容は、「いくつかの文に制御が到達しないこと」と 「いくつかの文でゼロによる除算が発生すること」などを示しているはずです。 @node Sample Session @chapter サンプルセッション @menu * GNU Screen の解析:Analyzing Screen. * distmake を用いた高速な分散並列解析:Dist Analyzing Screen. @end menu @node Analyzing Screen @section GNU Screen の解析 @subsection プロジェクトの準備 @uref{ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz} をダウンロードし、適当 なディレクトリに展開します。 @verbatim % wget ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz Length: 840602 (821K) [application/x-tar] Saving to: `screen-4.0.3.tar.gz' 100%[======================================>] 840,602 --.-K/s in 0.1s 2011-09-28 11:41:55 (6.18 MB/s) - `screen-4.0.3.tar.gz' saved [840602/840602] % tar xzf screen-4.0.3.tar.gz % ls -F screen-4.0.3/ screen-4.0.3.tar.gz @end verbatim @anchor{screen_exam} @subsection プロジェクトの調査 GNU Screen を実際にビルドすることで、解析を実行する環境でどのようにビルドされる かを確認します。 @verbatim % cd screen-4.0.3 % ./configure this is screen version 4.0.3 checking for prefix by checking for screen... /usr/bin/screen checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes ...snip... configure: creating ./config.status config.status: creating Makefile config.status: creating doc/Makefile config.status: creating config.h config.status: executing default commands Now please check the pathnames in the Makefile and in the user configuration section in config.h. Then type 'make' to make screen. Good luck. % make 2>&1 | tee make.log CPP="gcc -E " srcdir=. sh ./osdef.sh AWK=gawk CC="gcc -g -O2" srcdir=. sh ./comm.sh AWK=gawk srcdir=. sh ./term.sh gcc -c -I. -I. -g -O2 screen.c gcc -c -I. -I. -g -O2 ansi.c gcc -c -I. -I. -g -O2 fileio.c gcc -c -I. -I. -g -O2 mark.c gcc -c -I. -I. -g -O2 misc.c gcc -c -I. -I. -g -O2 resize.c gcc -c -I. -I. -g -O2 socket.c gcc -c -I. -I. -g -O2 search.c sh ./tty.sh tty.c gcc -c -I. -I. -g -O2 tty.c gcc -c -I. -I. -g -O2 term.c gcc -c -I. -I. -g -O2 window.c gcc -c -I. -I. -g -O2 utmp.c gcc -c -I. -I. -g -O2 loadav.c gcc -c -I. -I. -g -O2 putenv.c gcc -c -I. -I. -g -O2 help.c gcc -c -I. -I. -g -O2 termcap.c gcc -c -I. -I. -g -O2 input.c gcc -c -I. -I. -g -O2 attacher.c gcc -c -I. -I. -g -O2 pty.c gcc -c -I. -I. -g -O2 process.c gcc -c -I. -I. -g -O2 display.c gcc -c -I. -I. -g -O2 comm.c gcc -c -I. -I. -g -O2 kmapdef.c gcc -c -I. -I. -g -O2 acls.c gcc -c -I. -I. -g -O2 braille.c gcc -c -I. -I. -g -O2 braille_tsi.c gcc -c -I. -I. -g -O2 logfile.c gcc -c -I. -I. -g -O2 layer.c gcc -c -I. -I. -g -O2 sched.c gcc -c -I. -I. -g -O2 teln.c gcc -c -I. -I. -g -O2 nethack.c gcc -c -I. -I. -g -O2 encoding.c gcc -o screen screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o termcap.o input.o attacher.o pty.o process.o display.o comm.o kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o sched.o teln.o nethack.o encoding.o -lcurses -lcrypt @end verbatim @anchor{screen_prepare} @subsection 静的解析の準備 @ref{AdLintize Command, @command{adlintize}} コマンドを使い、静的解析に必要なフ ァイルの雛形を作成し、対象プロジェクトに応じて設定ファイルを編集します。 プロジェクトのビルドに使用したコンピュータ環境、コンパイラ環境を調査します。 @verbatim % uname -mo i686 GNU/Linux % gcc --version gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @end verbatim @ref{AdLintize Command, @command{adlintize}} コマンドがサポートするプリセットの ビルド環境を表示し、プロジェクトのビルド環境に近いものを選択します。 このセッションでは i686 アーキテクチャ上の GNU/Linux で GCC 4.5.1 を使用してい るので、@code{i686-linux-gcc_4.5.1} を選択することになります。 @verbatim % adlintize -L i686-linux-gcc_4.5.1 i686-cygwin-gcc_4.3.4 i686-mingw-gcc_4.5.2 x86_64-ubuntu_12.04-gcc_4.6.3 @end verbatim @ref{AdLintize Command, @command{adlintize}} コマンドで静的解析に必要なファイル の雛形を生成します。 @verbatim % adlintize -e i686-linux-gcc_4.5.1 -o adlint % cd adlint % ls GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim @ref{screen_exam, プロジェクトの調査}で作成した @file{make.log} ファイルと @ref{AdLintize Command, @command{adlintize}} コマンドが生成した @file{GNUmakefile} 中の @code{SOURCES} 値を比較して、静的解析の対象ソースファイ ルの過不足を修正します。 @verbatim % cp GNUmakefile GNUmakefile.orig % vi GNUmakefile % diff -u GNUmakefile.orig GNUmakefile --- GNUmakefile.orig 2011-09-28 13:36:24.328078206 +0900 +++ GNUmakefile 2011-09-28 13:36:37.573902006 +0900 @@ -29,8 +29,6 @@ putenv.c \ fileio.c \ kmapdef.c \ - terminfo/checktc.c \ - terminfo/tetris.c \ search.c \ input.c \ ansi.c \ @end verbatim 次に、@ref{screen_exam, プロジェクトの調査}で作成した @file{make.log} ファイル 中でコンパイラに指定されたオプションから、プロジェクト固有のインクルードパスを 洗い出し @file{adlint_traits.yml} ファイルに追記します。 @verbatim % cp adlint_traits.yml adlint_traits.yml.orig % vi adlint_traits.yml % diff -u adlint_traits.yml.orig adlint_traits.yml --- adlint_traits.yml.orig 2011-09-28 13:40:10.748222288 +0900 +++ adlint_traits.yml 2011-09-28 13:40:24.105054386 +0900 @@ -25,6 +25,7 @@ # - "../include/bar" # - "/opt/baz/include" include_path: + - ".." # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the @end verbatim @subsection 静的解析の実行 @ref{screen_prepare, 静的解析の準備}で作成した @file{GNUmakefile} を使い、静的 解析を実行します。 @verbatim % make --version GNU Make 3.82 Built for i386-redhat-linux-gnu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. % make verbose-all adlint --verbose -t adlint_traits.yml -o . ../braille.c ../acls.c ../putenv.c ../fileio.c ../kmapdef.c ../search.c ../input.c ../ansi.c ../pty.c ../layer.c ../termcap.c ../loadav.c ../comm.c ../screen.c ../term.c ../teln.c ../socket.c ../encoding.c ../utmp.c ../logfile.c ../display.c ../misc.c ../attacher.c ../help.c ../tty.c ../nethack.c ../braille_tsi.c ../sched.c ../process.c ../window.c ../mark.c ../resize.c ../braille.c [fin] |============================| 7.999s ../acls.c [fin] |============================| 12.152s ../putenv.c [fin] |============================| 0.203s ../fileio.c [fin] |============================| 13.013s ...snip... ../window.c [fin] |============================| 22.388s ../mark.c [fin] |============================| 14.827s ../resize.c [fin] |============================| 18.964s screen-4.0.3 [fin] |============================| 58.346s 771.510s user, 2.370s system, 00:12:53.87 total % ls *.{i,msg.csv,met.csv,log} acls.c.log kmapdef.c.log sched.c.log acls.c.met.csv kmapdef.c.met.csv sched.c.met.csv acls.c.msg.csv kmapdef.c.msg.csv sched.c.msg.csv acls.i kmapdef.i sched.i ansi.c.log layer.c.log screen-4.0.3.log ansi.c.met.csv layer.c.met.csv screen-4.0.3.met.csv ansi.c.msg.csv layer.c.msg.csv screen-4.0.3.msg.csv ...snip... input.c.log resize.c.log window.c.met.csv input.c.met.csv resize.c.met.csv window.c.msg.csv input.c.msg.csv resize.c.msg.csv window.i input.i resize.i @end verbatim @node Dist Analyzing Screen @section distmake を用いた高速な分散並列解析 追記予定。 @node Command @chapter コマンド仕様 @menu * @command{adlintize} コマンド:AdLintize Command. * @command{adlint} コマンド:AdLint Command. * @command{adlint_sma} コマンド:AdLint SMA Command. * @command{adlint_cma} コマンド:AdLint CMA Command. * @command{adlint_chk} コマンド:AdLint CHK Command. @end menu @node AdLintize Command @section @command{adlintize} コマンド @cindex adlintize @subsection 機能 AdLint による静的解析に必要な下記ファイルの雛形を作成します。 @itemize @item @file{GNUmakefile} --- 解析手順が記述された GNU Make 用のメイクファイル @item @file{adlint_traits.yml} --- AdLint 解析動作をカスタマイズする特性ファイ ル @item @file{adlint_pinit.h} --- プロジェクト固有のイニシャルヘッダファイル @item @file{adlint_cinit.h} --- コンパイラ固有のイニシャルヘッダファイル @item @file{adlint_all.sh} --- 解析手順が記述されたシェルスクリプト @item @file{adlint_all.bat} --- 解析手順が記述された MS Windows 用バッチファイ ル @item @file{adlint_files.txt} --- シェルスクリプトとバッチファイルで使用する解 析対象ファイルのリスト @end itemize @file{GNUmakefile} 中の @code{SOURCES} 変数には、@command{adlintize} コマンドを 実行したディレクトリ配下にある全ての @file{*.c} ファイルが設定されます。 @subsection 使用方法 解析対象プロジェクトのルートディレクトリで、下記のように @command{adlintize} コ マンドを実行すると、@file{adlint} ディレクトリ中に静的解析に必要なファイルを作 成します。 @verbatim % cd project-root % adlintize -o adlint % ls adlint GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim @command{adlintize} コマンドには、プリセットのビルド環境がいくつか用意されてい ます。 プリセットのビルド環境を指定することで、設定ファイルの雛形により多くの情報を自 動生成することができます。 用意されているプリセットのビルド環境は、下記のコマンドにより一覧を確認すること ができます。 @verbatim % adlintize -L i686-linux-gcc_4.5.1 i686-cygwin-gcc_4.3.4 i686-mingw-gcc_4.5.2 x86_64-ubuntu_12.04-gcc_4.6.3 @end verbatim プリセットのビルド環境は、@option{-e} オプションで指定します。 @verbatim % cd project-root % adlintize -e i686-linux-gcc_4.5.1 -o adlint % ls adlint GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim @subsection ヘルプメッセージ @verbatim Usage: adlintize [options] [project-name] Options: -t FILE, --traits FILE Write traits to FILE If omitted, `adlint_traits.yml' will be used -p FILE, --pinit-header FILE Write project initial header to FILE If omitted, `adlint_pinit.h' will be used -c FILE, --cinit-header FILE Write compiler initial header to FILE If omitted, `adlint_cinit.h' will be used -l FILE, --list-file FILE Write list file to FILE If omitted, `adlint_files.txt' will be used -m FILE, --makefile FILE Write analysis procedure GNUmakefile to FILE If omitted, `GNUmakefile' will be used -s FILE, --sh-script FILE Write analysis procedure sh script to FILE If omitted, `adlint_all.sh' will be used -b FILE, --bat-file FILE Write analysis procedure bat file to FILE If omitted, `adlint_all.bat' will be used -o DIR, --output-dir DIR Set output directory If omitted, `.' will be used -e ENV, --environment ENV Assume ENV as target build environment -L, --list-environment List all preset build environments -f, --force Force to overwrite existing files --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint Command @section @command{adlint} コマンド @cindex adlint @subsection 機能 一括でシングルモジュール解析 (コンパイルフェーズに対応する解析) とクロスモジュ ール解析 (リンクフェーズに対応する解析) を実行します。 解析対象のソースファイルをコマンドラインで指定する方法と、リストファイルにより 指定する方法をサポートします。 動作内容は、解析対象のソースファイルを全て指定して @ref{AdLint SMA Command, @command{adlint_sma}} コマンドによりシングルモジュール解析を実行し、 @ref{AdLint CMA Command, @command{adlint_cma}} コマンドによりクロスモジュール解 析を実行する場合と同等です。 シングルモジュール解析結果として、ソースファイル毎に下記のファイルを作成します 。 @itemize @item @file{*.i} --- プリプロセス結果 @item @file{*.c.msg.csv} --- シングルモジュール解析によるメッセージ出力結果 @item @file{*.c.met.csv} --- シングルモジュール解析によるメトリクス測定結果 @item @file{*.c.log} --- シングルモジュール解析時のログメッセージ @end itemize クロスモジュール解析結果として、下記のファイルを作成します。 @itemize @item @file{project_name.msg.csv} --- プロジェクト全体のクロスモジュール解析に よるメッセージ出力結果 @item @file{project_name.met.csv} --- プロジェクト全体のクロスモジュール解析に よるメトリクス測定結果 @item @file{project_name.log} --- プロジェクト全体のクロスモジュール解析時のロ グメッセージ @end itemize @subsection 使用方法 @ref{AdLintize Command, @command{adlintize}} コマンドにより設定ファイルの雛形を 作成したディレクトリで、下記のように @command{adlint} コマンドを起動するとシン グルモジュール解析とクロスモジュール解析を一括で実行可能です。 @verbatim % cd project-root % adlintize -o adlint % cd adlint % adlint -v -t adlint_traits.yml -o . -p 1 -l adlint_files.txt ../intro_demo.c [fin] |============================| 0.134s intro_demo [fin] |============================| 0.012s 0.718s user, 0.500s system, 00:00:01.21 total @end verbatim テキストエディタや統合開発環境などと連携する場合、下記のように @option{-v,--verbose} オプションを指定しないことで、進捗表示を行わずメッセージ を stderr に出力することができます。 @verbatim % adlint -t adlint_traits.yml -o . -p 1 -l adlint_files.txt ../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:同じ識別子名 `i' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。 ../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:ポインタ型の変数に対して比較演算が行われています。 ../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:値が NULL になることがあるポインタに対して間接参照が行われています。 ../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:この制御式の値は常に偽になります。 ...snip... ../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:この文には制御が到達しません。 ../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:インクルードされている "../useless_header.h" の内容は翻訳単位の中で全く参照されていません。削除することができます。 ../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:関数 `int bar(void)' が定義されていますが、このプロジェクトでは使われていません。 @end verbatim @subsection ヘルプメッセージ @verbatim Usage: adlint [options] [source-file...] Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -l FILE, --list-file FILE Use FILE as list file -o DIR, --output-dir DIR Output result files to DIR -p NUM, --strip NUM Use source file names from which stripped NUM leading components as the base name of output files -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint SMA Command @section @command{adlint_sma} コマンド @cindex adlint_sma @subsection 機能 コマンドラインで指定した解析対象ソースファイルのシングルモジュール解析 (コンパ イルフェーズに対応する解析) のみを実行します。 シングルモジュール解析結果として、ソースファイル毎に下記のファイルを作成します 。 @itemize @item @file{*.i} --- プリプロセス結果 @item @file{*.c.msg.csv} --- シングルモジュール解析によるメッセージ出力結果 @item @file{*.c.met.csv} --- シングルモジュール解析によるメトリクス測定結果 @item @file{*.c.log} --- シングルモジュール解析時のログメッセージ @end itemize @subsection 使用方法 @ref{AdLintize Command, @command{adlintize}} コマンドにより設定ファイルの雛形を 作成したディレクトリで、下記のように @command{adlint_sma} コマンドを起動すると シングルモジュール解析のみを実行可能です。 @verbatim % adlint_sma -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c [fin] |============================| 0.134s 1.062s user, 0.843s system, 00:00:01.90 total @end verbatim テキストエディタや統合開発環境などと連携する場合、下記のように @option{-v,--verbose} オプションを指定しないことで、進捗表示を行わずコンパイラ と同じようにメッセージを stderr に出力することがきます。 @verbatim % adlint_sma -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:同じ識別子名 `i' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。 ../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:ポインタ型の変数に対して比較演算が行われています。 ../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:値が NULL になることがあるポインタに対して間接参照が行われています。 ../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:この制御式の値は常に偽になります。 ...snip... ../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:この文には制御が到達しません。 ../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:インクルードされている "../useless_header.h" の内容は翻訳単位の中で全く参照されていません。削除することができます。 @end verbatim @subsection ヘルプメッセージ @verbatim Usage: adlint_sma [options] source-file... Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -o DIR, --output-dir DIR Output result files to DIR -p NUM, --strip NUM Use source file names from which stripped NUM leading components as the base name of output files -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint CMA Command @section @command{adlint_cma} コマンド @cindex adlint_cma @subsection 機能 コマンドラインで指定した全シングルモジュール解析のメトリクス測定結果をもとに、 クロスモジュール解析 (リンクフェーズに対応する解析) のみを実行します。 クロスモジュール解析結果として、下記のファイルを作成します。 @itemize @item @file{project_name.msg.csv} --- プロジェクト全体のクロスモジュール解析に よるメッセージ出力結果 @item @file{project_name.met.csv} --- プロジェクト全体のクロスモジュール解析に よるメトリクス測定結果 @item @file{project_name.log} --- プロジェクト全体のクロスモジュール解析時のロ グメッセージ @end itemize @subsection 使用方法 @ref{AdLintize Command, @command{adlintize}} コマンドにより設定ファイルの雛形を 作成したディレクトリで、@ref{AdLint SMA Command, @command{adlint_sma}} コマンド によるシングルモジュール解析を実行後に下記のように @command{adlint_cma} コマン ドを起動するとクロスモジュール解析のみを実行可能です。 @verbatim % ls *.c.met.csv intro_demo.c.met.csv % adlint_cma -v -t adlint_traits.yml -o . intro_demo.c.met.csv intro_demo [fin] |============================| 0.011s 1.203s user, 0.843s system, 00:00:02.04 total @end verbatim テキストエディタや統合開発環境などと連携する場合、下記のように @option{-v,--verbose} オプションを指定しないことで、進捗表示を行わずリンカと同 じようにメッセージを stderr に出力することができます。 @verbatim % adlint_cma -t adlint_traits.yml -o . intro_demo.c.met.csv ../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:関数 `int bar(void)' が定義されていますが、このプロジェクトでは使われていません。 @end verbatim @subsection ヘルプメッセージ @verbatim Usage: adlint_cma [options] sma-metric-file... Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -o DIR, --output-dir DIR Output result files to DIR -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint CHK Command @section @command{adlint_chk} コマンド @cindex adlint_chk @subsection 機能 コマンドラインで指定した解析対象ソースファイルの前処理のみを実行することで、 @ref{Traits, 特性ファイル} の内容を検証します。 @subsection 使用方法 @ref{AdLintize Command, @command{adlintize}} コマンドにより設定ファイルの雛形を 作成し、解析対象プロジェクトに合わせて @ref{Traits, 特性ファイル} を編集した後 で、下記のように @command{adlint_chk} コマンドを起動すると前処理を実行し @ref{Traits, 特性ファイル} の内容を検証可能です。 @verbatim % adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c [fin] |============================| 0.047s 0.812s user, 0.875s system, 00:00:01.68 total @end verbatim ヘッダファイルのインクルードパスが正しく設定されていない場合は、下記のようにエ ラーが発生し、ソースファイルに該当する @file{*.c.msg.csv} ファイルを確認するこ とで、どのヘッダファイルがインクルードできなかったかを確認可能です。 @verbatim % adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c [cpp] |======= | 0.006s! An error was occurred while processing `../intro_demo.c'. See `intro_demo.c.msg.csv' and `intro_demo.c.log' for more details. % tail intro_demo.c.msg.csv E,../intro_demo.c,1,1,E0009,ヘッダファイル が見つかりません。 X,../intro_demo.c,1,1,X0003,回復不能なエラーにより解析処理を中断しました。詳細は `intro_demo.c.msg.csv' 及び `intro_demo.c.log' を確認して下さい。 @end verbatim @subsection ヘルプメッセージ @verbatim Usage: adlint_chk [options] source-file... Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -o DIR, --output-dir DIR Output result files to DIR -p NUM, --strip NUM Use source file names from which stripped NUM leading components as the base name of output files -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node Input @chapter 入力仕様 @menu * 入力ファイル:Input Files. * 特性ファイル:Traits. * メッセージ定義ファイル:Message Definition. * ソースコード注釈:Source Code Annotation. @end menu @node Input Files @section 入力ファイル 下記 2 種類のファイルにより解析動作を設定します。 @table @var @itemx @ref{Traits, 特性ファイル} 解析処理の方法を @uref{http://yaml.org/, YAML 形式}で記述します。 @itemx @ref{Message Definition, メッセージ定義ファイル} メッセージカタログを @uref{http://yaml.org/, YAML 形式}で記述します。 @end table 特性ファイルは、@ref{AdLint Command, @command{adlint}}、@ref{AdLint SMA Command, @command{adlint_sma}}、@ref{AdLint CMA Command, @command{adlint_cma}} コマンドのオプション @option{--traits} でパス名を指定します。 メッセージ定義ファイルは、AdLint インストールパス内の @file{etc/mesg.d} 内にイ ンストールされます。 @ref{AdLint Command, @command{adlint}}、@ref{AdLint SMA Command, @command{adlint_sma}}、@ref{AdLint CMA Command, @command{adlint_cma}} コマンド は、@ref{Message Traits, メッセージ特性}の @ref{message_traits:language, @code{language}} 項目で指定した言語に従い、適切なメッセージ定義ファイルを選択し ます。 @node Traits @section 特性ファイル @menu * グローバル特性:Global Traits. * プロジェクト特性:Project Traits. * コンパイラ特性:Compiler Traits. * リンカ特性:Linker Traits. * メッセージ特性:Message Traits. @end menu @ref{Project Traits, プロジェクト特性}、@ref{Compiler Traits, コンパイラ特性}、 @ref{Linker Traits, リンカ特性}、@ref{Message Traits, メッセージ特性} を 単一の @uref{http://yaml.org/, YAML 形式}の設定ファイル(@ref{Traits Sample, サンプル}) に記述します。 下記のように解析対象プロジェクトのルートディレクトリで @ref{AdLintize Command, @command{adlintize}} コマンドを実行すると、そのプロジェクト用の特性ファイル @file{adlint_traits.yml} の雛形、および、解析手順を自動化する @file{GNUmakefile} やシェルスクリプトなどを生成することができます。 @verbatim % cd project % adlintize -o adlint % ls adlint GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim 後述の特性ファイルの各設定項目には、環境変数を指定することもできます。 例えば、設定項目 @code{item} に、環境変数 @code{ENV_VAR} の値を指定する場合は下 記のように記述します。 @verbatim item: $ENV_VAR @end verbatim また、文字列形式の設定項目に、環境変数の値を埋め込んだ文字列を指定する場合は下 記のように記述します。 @verbatim item: "prefix${ENV_VAR}suffix" @end verbatim ディレクトリパス名の配列を指定する項目では、下記のように一つの環境変数の値によ り複数のパス名を指定することもできます。 @verbatim % export ENV_VAR="/usr/local/include:/usr/include" @end verbatim @verbatim include_path: - $ENV_VAR @end verbatim @node Global Traits @subsection グローバル特性 グローバル特性は、特性ファイルのルート項目で設定します。 @multitable @columnfractions .01 .3 .1 @headitem No. @tab 項目名 @tab 形式 @tab 内容 @item 1 @cindex version @anchor{global_traits:version} @tab @code{version} @tab 文字列 @tab 特性ファイルフォーマットのバージョンを表します。この項目は編集してはいけません 。 @item 2 @cindex exam_packages @anchor{global_traits:exam_packages} @tab @code{exam_packages} @tab 文字列の配列 @tab 静的解析に用いるソースコード検査パッケージの名前を列挙します。 @code{"c_builtin"} は AdLint 本体に組み込み済みの検査パッケージ名です。 また、今後さまざまな用途に特化したオプションのソースコード検査パッケージを開発 する予定です。 例えば、@code{adlint-exam-c_ansi} という、ソースコードが ANSI C に準拠している かを検査するパッケージをインストールした場合、@code{exam_packages} を下記のよう に編集して解析することができます。 以下の場合は、ANSI C 準拠の検査パッケージのみが実行されます。 @example exam_packages: - "c_ansi" @end example 以下の場合は、AdLint 組み込みの検査パッケージと、ANSI C 準拠の検査パッケージが実 行されます。 @example exam_packages: - "c_builtin" - "c_ansi" @end example @end multitable @node Project Traits @subsection プロジェクト特性 プロジェクト特性は、特性ファイルの @code{project_traits} 配下の項目で設定します 。 @multitable @columnfractions .01 .3 .1 @headitem No. @tab 項目名 @tab 形式 @tab 内容 @item 1 @cindex project_traits:project_name @anchor{project_traits:project_name} @tab @code{project_name} @tab 文字列 @tab プロジェクト名を設定します。 @item 2 @cindex project_traits:project_root @anchor{project_traits:project_root} @tab @code{project_root} @tab 文字列 @tab 解析対象プロジェクトのルートディレクトリを設定します。 @item 3 @cindex project_traits:target_files:inclusion_paths @anchor{project_traits:target_files:inclusion_paths} @tab @code{target_files:inclusion_paths} @tab 文字列の配列 @tab 解析対象ソースファイルが存在する上位ディレクトリのパス名を設定します。 各エントリの文字列は、@code{`:'} (Windows 環境では @code{`;'}) を区切り文字とし て複数のパス名を設定できます。 @item 4 @cindex project_traits:target_files:exclusion_paths @anchor{project_traits:target_files:exclusion_paths} @tab @code{target_files:exclusion_paths} @tab 文字列の配列 @tab @ref{project_traits:target_files:inclusion_paths, @code{target_files:inclusion_paths}} で指定したディレクトリ配下のファイルで、解析対象から除外するソースファイルが存在するディレクトリを設定します。 解析対象プロジェクト中にサードパーティ製ライブラリのソースコードを含み、それら のソースファイルに関するコードチェックを行いたくない場合などに指定します。 各エントリの文字列は、@code{`:'} (Windows 環境では @code{`;'}) を区切り文字とし て複数のパス名を設定できます。 @item 5 @cindex project_traits:initial_header @anchor{project_traits:initial_header} @tab @code{initial_header} @tab 文字列 @tab 解析対象ソースファイルの先頭に自動でインクルードされるヘッダファイルを指定しま す。このファイルには、プロジェクト固有のマクロ定義などを記述します。 @item 6 @cindex project_traits:file_search_paths @anchor{project_traits:file_search_paths} @tab @code{file_search_paths} @tab 文字列の配列 @tab プロジェクト固有のインクルードファイルの探索パスを設定します。 各エントリの文字列は、@code{`:'} (Windows 環境では @code{`;'}) を区切り文字とし て複数のパス名を設定できます。 @item 7 @cindex project_traits:coding_style:indent_style @anchor{project_traits:coding_style:indent_style} @tab @code{coding_style:indent_style} @tab 文字列 @tab コードの字下げスタイルを @code{"K&R"}、@code{"Allman"}、@code{"GNU"} から選択し て設定します。 @code{"K&R"} スタイルは、 @example int foo(int i) @{ if (i == 0) @{ return 0; @} return i; @} @end example となります。 @code{"Allman"} スタイルは、 @example int foo(int i) @{ if (i == 0) @{ return 0; @} return i; @} @end example となります。 @code{"GNU"} スタイルは、 @example int foo(int i) @{ if (i == 0) @{ return 0; @} return i; @} @end example となります。 @item 8 @cindex project_traits:coding_style:tab_width @anchor{project_traits:coding_style:tab_width} @tab @code{coding_style:tab_width} @tab 整数値 @tab タブ文字の見た目上の桁数を設定します。 @item 9 @cindex project_traits:coding_style:indent_width @anchor{project_traits:coding_style:indent_width} @tab @code{coding_style:indent_width} @tab 整数値 @tab インデントの見た目上の桁数を設定します。 @item 10 @cindex project_traits:file_encoding @anchor{project_traits:file_encoding} @tab @code{file_encoding} @tab 文字列 @tab ソースファイルの文字エンコーディングを設定します。値が設定されていない場合は "ASCII-8BIT" として処理します。 @end multitable @node Compiler Traits @subsection コンパイラ特性 @cindex compiler_traits コンパイラ特性は、@code{compiler_traits} 配下の項目で設定します。 @multitable @columnfractions .01 .3 .1 @headitem No. @tab 項目名 @tab 形式 @tab 内容 @item 1 @cindex compiler_traits:initial_header @anchor{compiler_traits:initial_header} @tab @code{initial_header} @tab 文字列 @tab 解析対象ソースファイルの先頭、かつ、@ref{project_traits:initial_header, プロジ ェクト固有の @code{initial_header}} より前に自動でインクルードされるヘッダファ イルを指定します。このファイルには、コンパイラ固有の定義済みマクロや型定義など を記述します。 @item 2 @cindex compiler_traits:file_search_paths @anchor{compiler_traits:file_search_paths} @tab @code{file_search_paths} @tab 文字列の配列 @tab コンパイラ固有のインクルードファイルの探索パスを設定します。 各エントリの文字列は、@code{`:'} (Windows 環境では @code{`;'}) を区切り文字とし て複数のパス名を設定できます。 @item 3 @cindex compiler_traits:standard_types:char_size @anchor{compiler_traits:standard_types:char_size} @tab @code{standard_types:char_size} @tab 整数値 @tab @code{char} 型ファミリのサイズをビット単位で設定します。 @item 4 @cindex compiler_traits:standard_types:char_alignment @anchor{compiler_traits:standard_types:char_alignment} @tab @code{standard_types:char_alignment} @tab 整数値 @tab @code{char} 型ファミリのメモリアライメントをビット単位で設定します。 @item 5 @cindex compiler_traits:standard_types:short_size @anchor{compiler_traits:standard_types:short_size} @tab @code{standard_types:short_size} @tab 整数値 @tab @code{short} 型ファミリのサイズをビット単位で設定します。 @item 6 @cindex compiler_traits:standard_types:short_alignment @anchor{compiler_traits:standard_types:short_alignment} @tab @code{standard_types:short_alignment} @tab 整数値 @tab @code{short} 型ファミリのメモリアライメントをビット単位で設定します。 @item 7 @cindex compiler_traits:standard_types:int_size @anchor{compiler_traits:standard_types:int_size} @tab @code{standard_types:int_size} @tab 整数値 @tab @code{int} 型ファミリのサイズをビット単位で設定します。 @item 8 @cindex compiler_traits:standard_types:int_alignment @anchor{compiler_traits:standard_types:int_alignment} @tab @code{standard_types:int_alignment} @tab 整数値 @tab @code{int} 型ファミリのメモリアライメントをビット単位で設定します。 @item 9 @cindex compiler_traits:standard_types:long_size @anchor{compiler_traits:standard_types:long_size} @tab @code{standard_types:long_size} @tab 整数値 @tab @code{long int} 型ファミリのサイズをビット単位で設定します。 @item 10 @cindex compiler_traits:standard_types:long_alignment @anchor{compiler_traits:standard_types:long_alignment} @tab @code{standard_types:long_alignment} @tab 整数値 @tab @code{long int} 型ファミリのメモリアライメントをビット単位で設定します。 @item 11 @cindex compiler_traits:standard_types:long_long_size @anchor{compiler_traits:standard_types:long_long_size} @tab @code{standard_types:long_long_size} @tab 整数値 @tab @code{long long int} 型ファミリのサイズをビット単位で設定します。 @item 12 @cindex compiler_traits:standard_types:long_long_alignment @anchor{compiler_traits:standard_types:long_long_alignment} @tab @code{standard_types:long_long_alignment} @tab 整数値 @tab @code{long long int} 型ファミリのメモリアライメントをビット単位で設定します。 @item 13 @cindex compiler_traits:standard_types:float_size @anchor{compiler_traits:standard_types:float_size} @tab @code{standard_types:float_size} @tab 整数値 @tab @code{float} 型のサイズをビット単位で設定します。 @item 14 @cindex compiler_traits:standard_types:float_alignment @anchor{compiler_traits:standard_types:float_alignment} @tab @code{standard_types:float_alignment} @tab 整数値 @tab @code{float} 型のメモリアライメントをビット単位で設定します。 @item 15 @cindex compiler_traits:standard_types:double_size @anchor{compiler_traits:standard_types:double_size} @tab @code{standard_types:double_size} @tab 整数値 @tab @code{double} 型のサイズをビット単位で設定します。 @item 16 @cindex compiler_traits:standard_types:double_alignment @anchor{compiler_traits:standard_types:double_alignment} @tab @code{standard_types:double_alignment} @tab 整数値 @tab @code{double} 型のメモリアライメントをビット単位で設定します。 @item 17 @cindex compiler_traits:standard_types:long_double_size @anchor{compiler_traits:standard_types:long_double_size} @tab @code{standard_types:long_double_size} @tab 整数値 @tab @code{long double} 型のサイズをビット単位で設定します。 @item 18 @cindex compiler_traits:standard_types:long_double_alignment @anchor{compiler_traits:standard_types:long_double_alignment} @tab @code{standard_types:long_double_alignment} @tab 整数値 @tab @code{long double} 型のメモリアライメントをビット単位で設定します。 @item 19 @cindex compiler_traits:standard_types:code_ptr_size @anchor{compiler_traits:standard_types:code_ptr_size} @tab @code{standard_types:code_ptr_size} @tab 整数値 @tab 関数へのポインタ型のサイズをビット単位で設定します。 @item 20 @cindex compiler_traits:standard_types:code_ptr_alignment @anchor{compiler_traits:standard_types:code_ptr_alignment} @tab @code{standard_types:code_ptr_alignment} @tab 整数値 @tab 関数へのポインタ型のメモリアライメントをビット単位で設定します。 @item 21 @cindex compiler_traits:standard_types:data_ptr_size @anchor{compiler_traits:standard_types:data_ptr_size} @tab @code{standard_types:data_ptr_size} @tab 整数値 @tab データへのポインタ型のサイズをビット単位で設定します。 @item 22 @cindex compiler_traits:standard_types:data_ptr_alignment @anchor{compiler_traits:standard_types:data_ptr_alignment} @tab @code{standard_types:data_ptr_alignment} @tab 整数値 @tab データへのポインタ型のメモリアライメントをビット単位で設定します。 @item 23 @cindex compiler_traits:standard_types:char_as_unsigned_char @anchor{compiler_traits:standard_types:char_as_unsigned_char} @tab @code{standard_types:char_as_unsigned_char} @tab 真偽値 @tab @code{`char'} 型を @code{`unsigned char'} 型として扱う場合 true を指定します。 @item 24 @cindex compiler_traits:arithmetic:logical_right_shift @anchor{compiler_traits:arithmetic:logical_right_shift} @tab @code{arithmetic:logical_right_shift} @tab 真偽値 @tab 右シフト式 @code{`>>'} を算術シフトではなく、論理シフトとして扱う場合 true を指 定します。 @item 25 @cindex compiler_traits:identifier_max @anchor{compiler_traits:identifier_max} @tab @code{identifier_max} @tab 整数値 @tab コンパイラにより識別可能なシンボルの最大長を指定します。 @item 26 @cindex compiler_traits:extension_substitutions @anchor{compiler_traits:extension_substitutions} @tab @code{extension_substitutions} @tab 文字列のマップ @tab コンパイラ固有の拡張機能を調整するためのトークン置換パターンを指定します。 AdLint は、ここで指定した拡張機能の使用箇所を @ref{W0061} メッセージによって警 告します。 @code{`__attribute__ ( 任意のトークン列 )'} というトークン列をプリプロセス後に 削除しつつ @ref{W0061} メッセージによる警告を出力する場合は、下記のように指定し ます。 @example extension_substitutions: "__attribute__(__adlint__any)": "" @end example また、@code{`__restrict'} というトークンを @code{`restrict'} に置換しつつ @ref{W0061} メッセージによる警告を出力する場合は、下記のように指定します。 @example extension_substitutions: "__restrict": "restrict" @end example @item 27 @cindex compiler_traits:arbitrary_substitutions @anchor{compiler_traits:arbitrary_substitutions} @tab @code{arbitrary_substitutions} @tab 文字列のマップ @tab @ref{compiler_traits:extension_substitutions, @code{extension_substitutions}} と同様に、プリプロセス後にトークン列を置換するための項目ですが、@ref{W0061} メ ッセージを出力しない点が異なります。 @end multitable @node Linker Traits @subsection リンカ特性 @cindex linker_traits リンカ特性は、@code{linker_traits} 配下の項目で設定します。 @multitable @columnfractions .01 .3 .1 @headitem No. @tab 項目名 @tab 形式 @tab 内容 @item 1 @cindex linker_traits:identifier_max @anchor{linker_traits:identifier_max} @tab @code{identifier_max} @tab 整数値 @tab リンカにより識別可能な外部シンボルの最大長を指定します。 @item 2 @cindex linker_traits:identifier_ignore_case @anchor{linker_traits:identifier_ignore_case} @tab @code{identifier_ignore_case} @tab 真偽値 @tab リンカにより外部シンボルを識別する際、大文字小文字を区別するかを指定します。 @end multitable @node Message Traits @subsection メッセージ特性 @cindex message_traits メッセージ特性は、@code{message_traits} 配下の項目で設定します。 @multitable @columnfractions .01 .3 .1 @headitem No. @tab 項目名 @tab 形式 @tab 内容 @item 1 @cindex message_traits:language @anchor{message_traits:language} @tab @code{language} @tab 文字列 @tab メッセージ本文の言語を指定します。(現時点では) @code{"en_US"} か @code{"ja_JP"} が指定可能です。 @item 2 @cindex message_traits:individual_suppression @anchor{message_traits:individual_suppression} @tab @code{individual_suppression} @tab 真偽値 @tab 解析対象ファイル内の @ref{Source Code Annotation, ソースコード注釈} による警告メッセージの抑止機能を有効化します。 @code{true} の場合、注釈によるメッセージ抑止が可能になります。 @item 3 @cindex message_traits:exclusion:categories @anchor{message_traits:exclusion:categories} @tab @code{exclusion:categories} @tab 文字列の配列 @tab @ref{global_traits:exam_packages, exam_packages} で指定したソースコード検査パッ ケージ中のコードチェック機能で、実行を除外するものをメッセージのカテゴリにより 指定します。 @item 4 @cindex message_traits:exclusion:severities @anchor{message_traits:exclusion:severities} @tab @code{exclusion:severities} @tab 正規表現を表す文字列 @tab @ref{global_traits:exam_packages, exam_packages} で指定したソースコード検査パッ ケージ中のコードチェック機能で、実行を除外するものをメッセージの深刻度により指 定します。 @item 5 @cindex message_traits:exclusion:messages @anchor{message_traits:exclusion:messages} @tab @code{exclusion:messages} @tab メッセージ ID と文字列のマップ @tab @ref{global_traits:exam_packages, exam_packages} で指定したソースコード検査パッ ケージ中のコードチェック機能で、実行を除外するものをメッセージ ID により指定し ます。 メッセージ ID は、ソースコード検査パッケージをまたいでユニークではない場合があ るため、文字列として該当するメッセージ ID が含まれるソースコード検査パッケージ 名も指定してください。 @item 6 @cindex message_traits:inclusion:messages @anchor{message_traits:inclusion:messages} @tab @code{inclusion:messages} @tab メッセージ ID と文字列のマップ @tab @code{exclusion} セクションの設定内容により除外しましたが、メッセージ ID 指定で 特定のコードチェック機能を含める場合に指定します。 例えば、@ref{message_traits:exclusion:categories, exclusion:categories} でカテ ゴリ指定により除外したコードチェック機能群のうち、特定のもののみを実行したい場 合を想定した項目です。 @item 7 @cindex message_traits:change_list @anchor{message_traits:change_list} @tab @code{change_list} @tab メッセージ ID と変更内容のマップ @tab 特定メッセージの定義情報を変更する場合に指定します。 例えば、@code{"c_builtin"} パッケージの @code{W9999} メッセージを変更する場合、 下記のように設定します。 @example change_list: W9999: package: "c_builtin" classes: - "新しいカテゴリ名1:深刻度1" - "新しいカテゴリ名2:深刻度2" format: "新しいメッセージフォーマット。" @end example @end multitable @node Message Definition @section メッセージ定義ファイル AdLint が出力する全てのエラー、警告メッセージを @uref{http://yaml.org/, YAML 形 式}の設定ファイルに記述します。 通常、このファイルは直接編集することはありません。 メッセージ内容を変更する場合は、特性ファイルの @ref{message_traits:change_list, @code{change_list}} 項目で変更内容を指定してください。 @node Source Code Annotation @section ソースコード注釈 解析対象のソースコード中にコメントとして、AdLint の解析動作を制御するための注釈 を記述することができます。 @subsection 警告メッセージ抑止注釈 通常のコメントに @code{ADLINT:SF} で始まる注釈を含めることで、該当ファイルの解 析時に指定した警告メッセージを抑止することができます。 また、@code{ADLINT:SL} で始まる注釈を含めると、該当行の解析時に指定した警告メッ セージを抑止することができます。 注釈の書式、および、使用例を下記に示します。 @subheading @bullet{ 共通定義} @example @anchor{message_specifier_list} message_specifier_list : @ref{qualified_message_specifier} | @ref{unqualified_message_specifier} | @ref{message_specifier_list} @ref{qualified_message_specifier} | @ref{message_specifier_list} @ref{unqualified_message_specifier} @anchor{qualified_message_specifier} qualified_message_specifier : ':' @ref{package_name} @ref{unqualified_message_specifier} @anchor{unqualified_message_specifier} unqualified_message_specifier : ':' '[' @ref{message_name_list} ']' @anchor{message_name_list} message_name_list : @ref{message_name} | @ref{message_name_list} ',' @ref{message_name} @anchor{message_name} message_name : 'W' [0-9]@{4@} @anchor{package_name} package_name : 特性ファイルの @ref{global_traits:exam_packages, @code{exam_packages}} に指定した文字列 @end example @subheading @bullet{ ファイル毎の警告メッセージ抑止注釈} @example @anchor{file_wise_suppressor_annotation} file_wise_suppressor_annotation : "/*" @ref{file_wise_suppressor_head} @ref{message_specifier_list} "*/" | "//" @ref{file_wise_suppressor_head} @ref{message_specifier_list} @anchor{file_wise_suppressor_head} file_wise_suppressor_head : "ADLINT:SF" @end example @subheading @bullet{ 行毎の警告メッセージ抑止注釈} @example @anchor{line_wise_suppressor_annotation} line_wise_suppressor_annotation : "/*" @ref{line_wise_suppressor_head} @ref{message_specifier_list} "*/" | "//" @ref{line_wise_suppressor_head} @ref{message_specifier_list} @anchor{line_wise_suppressor_head} line_wise_suppressor_head : "ADLINT:SL" @end example @subheading @bullet{ サンプルコード} @verbatim /* ADLINT:SF:[W0001,W0002] (to suppress W0001 and W0002 of all exam-packages in this file.) */ #include extern int i; /* ADLINT:SL:[W0003] (to suppress W0003 of all exam-packages only at this line.) */ extern int j; /* ADLINT:SL:c_staging:[W2001] (to suppress W2001 of `c_staging' exam-package only at this line.) */ void foo(void) { printf("%d\n", i + j); } @end verbatim @node Output @chapter 出力仕様 @menu * 出力ファイル:Output Files. * 共通定義:Common. * メトリクスファイル:Metrics File. * メッセージファイル:Message File. @end menu @node Output Files @section 出力ファイル シングルモジュール解析の結果を、下記 4 種類のファイルに出力します。 @multitable @columnfractions .01 .2 .2 .3 @headitem No. @tab 名称 @tab ファイル名 @tab 内容 @item 1 @tab プリプロセス済みソース @tab @file{<拡張子を除いたソースファイル名>.i} @tab # で始まる行はラインマーカーです。 @item 2 @tab @ref{Metrics File, メトリクスファイル} @tab @file{<ソースファイル名>.met.csv} @tab メトリクス、コード情報を CSV 形式で出力します。 @item 3 @tab @ref{Message File, メッセージファイル} @tab @file{<ソースファイル名>.msg.csv} @tab エラー、警告メッセージを CSV 形式で出力します。 @item 4 @tab ログファイル @tab @file{<ソースファイル名>.log} @tab シングルモジュール解析処理のログを出力します。 @end multitable クロスモジュール解析の結果を、下記 3 種類のファイルに出力します。 @multitable @columnfractions .01 .2 .2 .3 @headitem No. @tab 名称 @tab ファイル名 @tab 内容 @item 1 @tab @ref{Metrics File, メトリクスファイル} @tab @file{<プロジェクト名>.met.csv} @tab メトリクス情報を CSV 形式で出力します。 @item 2 @tab @ref{Message File, メッセージファイル} @tab @file{<プロジェクト名>.msg.csv} @tab 警告メッセージを CSV 形式で出力します。 @item 3 @tab ログファイル @tab @file{<プロジェクト名>.log} @tab クロスモジュール解析処理のログを出力します。 @end multitable @node Common @section 共通定義 @example @anchor{version_number} version_number : @ref{major_version} '.' @ref{minor_version} '.' @ref{patch_level} @anchor{major_version} major_version : 整数値 @anchor{minor_version} minor_version : 整数値 @anchor{patch_level} patch_level : 整数値 @anchor{exec_timestamp} exec_timestamp : 年 '-' 月 '-' 日 ' ' 時 ':' 分 ':' 秒 ':' タイムゾーン @anchor{exec_working_directory} exec_working_directory : 解析を実行したディレクトリのフルパス名 @anchor{new_line} new_line : 実行環境依存の改行文字列 @anchor{file_path} file_path : 実行環境依存のファイルパス名 @anchor{line_no} line_no : 整数値 @anchor{lines} lines : 整数値 @anchor{column_no} column_no : 整数値 @anchor{location} location : @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} @anchor{function_identifier} function_identifier : @ref{function_name} ',' @ref{function_signature} @anchor{function_name} function_name : c_identifier @anchor{function_signature} function_signature : c_declaration_specifiers c_declarator @anchor{function_linkage_type} function_linkage_type : 'I' <- Internal | 'X' <- eXternal @anchor{function_scope_type} function_scope_type : 'F' <- File | 'B' <- Block @anchor{function_declaration_type} function_declaration_type : 'E' <- Explicit | 'I' <- Implicit @anchor{type_name} type_name : c_identifier @anchor{type_rep} type_rep : c_declaration @anchor{variable_name} variable_name : c_identifier @anchor{initializer_rep} initializer_rep : c_initializer @anchor{assignment_rep} assignment_rep : c_assignment_operator c_assignment_expression @anchor{macro_name} macro_name : c_identifier @anchor{macro_value} macro_value : | @ref{pp_tokens} @anchor{pp_tokens} pp_tokens : c_pp_tokens @anchor{exam_package_name} exam_package_name : 任意の文字列 @anchor{message_id} message_id : 'W' [0-9]@{4@} | 'E' [0-9]@{4@} | 'C' [0-9]@{4@} @anchor{message_category} message_category : [A-Z]@{3@} @anchor{message_severity} message_severity : [A-Z][0-9]@{2@} @anchor{message_text} message_text : 任意の文字列 @end example @node Metrics File @section メトリクスファイル @itemize @item @ref{Output_Metrics_Ver, バージョンレコード} @item @ref{Output_Metrics_Dcl, 宣言レコード} @item @ref{Output_Metrics_Def, 定義レコード} @item @ref{Output_Metrics_Ini, 初期化レコード} @item @ref{Output_Metrics_Asn, 代入式レコード} @item @ref{Output_Metrics_Dep, 依存レコード} @item @ref{Output_Metrics_Lit, リテラルレコード} @item @ref{Output_Metrics_Pre, プリプロセスレコード} @item @ref{Output_Metrics_Met, メトリック値レコード} @end itemize @anchor{Output_Metrics_Ver} @subsection バージョンレコード @example @anchor{metrics_version_record} metrics_version_record : @ref{metrics_version_head} ',' @ref{version_number} ',' @ref{exec_timestamp} ',' @ref{exec_working_directory} @anchor{metrics_version_head} metrics_version_head : "VER" @end example @anchor{Output_Metrics_Ver_Sample} @subheading @bullet{ 出力例} @example VER,0.6.4,2012-02-16 14:10:59 +0900,/home/yanoh/intro_demo @end example @anchor{Output_Metrics_Dcl} @subsection 宣言レコード @example @anchor{declaration_record} declaration_record : @ref{declaration_head} ',' @ref{location} ',' @ref{typedcl_record_body} | @ref{declaration_head} ',' @ref{location} ',' @ref{gvardcl_record_body} | @ref{declaration_head} ',' @ref{location} ',' @ref{funcdcl_record_body} @anchor{declaration_head} declaration_head : "DCL" @end example @subheading @bullet{ 型宣言レコード} @example @anchor{typedcl_record_body} typedcl_record_body : 'T' ',' @ref{typedcl_type} ',' @ref{type_name} ',' @ref{type_rep} @anchor{typedcl_type} typedcl_type : 'T' <- typedef | 'S' <- struct | 'U' <- union | 'E' <- enum @end example @subheading @bullet{ 外部変数宣言レコード} @example @anchor{gvardcl_record_body} gvardcl_record_body : 'V' ',' @ref{variable_name} ',' @ref{type_rep} @end example @subheading @bullet{ 関数宣言レコード} @example @anchor{funcdcl_record_body} funcdcl_record_body : 'F' ',' @ref{function_linkage_type} ',' @ref{function_scope_type} ',' @ref{function_declaration_type} ',' @ref{function_identifier} @end example @anchor{Output_Metrics_Dcl_Sample} @subheading @bullet{ 出力例} @verbatim 1: typedef int *int_ptr; 2: 3: struct Foo { 4: int i; 5: long l; 6: }; 7: 8: union Bar { 9: int i; 10: char c; 11: }; 12: 13: enum Color { 14: RED = 1, 15: GREEN, 16: BLUE 17: }; 18: 19: extern int global_1; 20: 21: extern int foo(long); @end verbatim @example DCL,test.c,1,14,T,T,int_ptr,int * DCL,test.c,3,8,T,S,Foo,struct Foo @{ int i; long l; @} DCL,test.c,8,7,T,U,Bar,union Bar @{ int i; char c; @} DCL,test.c,13,6,T,E,Color,"enum Color @{ RED = 1, GREEN, BLUE @}" DCL,test.c,19,12,V,global_1,int DCL,test.c,21,12,F,X,F,E,foo,int foo(long) @end example @anchor{Output_Metrics_Def} @subsection 定義レコード @example @anchor{definition_record} definition_record : @ref{definition_head} ',' @ref{location} ',' @ref{vardef_record_body} | @ref{definition_head} ',' @ref{location} ',' @ref{fundef_record_body} | @ref{definition_head} ',' @ref{location} ',' @ref{macrodef_record_body} | @ref{definition_head} ',' @ref{location} ',' @ref{labeldef_record_body} @anchor{definition_head} definition_head : "DEF" @end example @subheading @bullet{ 変数定義レコード} @example @anchor{vardef_record_body} vardef_record_body : 'V' ',' @ref{variable_linkage_type} ',' @ref{variable_scope_type} ',' @ref{storage_class_type} ',' @ref{variable_name} ',' @ref{type_rep} @anchor{variable_linkage_type} variable_linkage_type : 'I' <- Internal | 'X' <- eXternal | 'N' <- None @anchor{variable_scope_type} variable_scope_type : 'F' <- File | 'B' <- Block | 'P' <- Parameter @anchor{storage_class_type} storage_class_type : 'A' <- Auto | 'R' <- Register | 'S' <- Static | 'N' <- None @end example @subheading @bullet{ 関数定義レコード} @example @anchor{fundef_record_body} fundef_record_body : 'F' ',' @ref{function_linkage_type} ',' @ref{function_scope_type} ',' @ref{function_identifier} ',' @ref{lines} @end example @subheading @bullet{ マクロ定義レコード} @example @anchor{macrodef_record_body} macrodef_record_body : 'M' ',' @ref{macro_name} ',' @ref{macro_form_type} @anchor{macro_form_type} macro_form_type : 'O' <- Object | 'F' <- Function @end example @subheading @bullet{ ラベル定義レコード} @example @anchor{labeldef_record_body} labeldef_record_body : 'L' ',' @ref{label_name} @anchor{label_name} label_name : c_identifier @end example @anchor{Output_Metrics_Def_Sample} @subheading @bullet{ 出力例} @verbatim 1: int global_1; 2: struct { int i; long l; } global_2; 3: 4: static long static_1; 5: static enum { FOO, BAR, BAZ } static_2; 6: 7: int foo(int i, register short s) 8: { 9: static char static_3 = 0; 10: register int local_1 = i + s + static_3; 11: auto int local_2 = 0; 12: int local_3 = 0; 13: goto end; 14: end: 15: return local_1 + local_2 + local_3; 16: } 17: 18: static void bar(void) {} 19: 20: #define OBJ_FORM_MACRO (1 + 2) 21: #define MAX(a, b) ((a) < (b) ? (b) : (a)) @end verbatim @example DEF,test.c,1,5,V,X,F,N,global_1,int DEF,test.c,2,27,V,X,F,N,global_2,struct __adlint__unnamed_1 DEF,test.c,4,13,V,I,F,S,static_1,long DEF,test.c,5,31,V,I,F,S,static_2,enum __adlint__unnamed_2 DEF,test.c,7,13,V,I,P,N,i,int DEF,test.c,7,31,V,I,P,R,s,short DEF,test.c,9,17,V,I,B,S,static_3,char DEF,test.c,10,18,V,I,B,R,local_1,int DEF,test.c,11,14,V,I,B,A,local_2,int DEF,test.c,12,9,V,I,B,N,local_3,int DEF,test.c,7,5,F,X,F,foo,"int foo(int,short)",10 DEF,test.c,18,13,F,I,F,bar,void bar(void),1 DEF,test.c,20,1,M,OBJ_FORM_MACRO,O DEF,test.c,21,1,M,MAX,F DEF,test.c,14,1,L,end @end example @anchor{Output_Metrics_Ini} @subsection 初期化レコード @example @anchor{initialization_record} initialization_record : @ref{initialization_head} ',' @ref{location} ',' @ref{variable_name} ',' @ref{initializer_rep} @anchor{initialization_head} initialization_head : "INI" @end example @anchor{Output_Metrics_Ini_Sample} @subheading @bullet{ 出力例} @verbatim 1: int global_1 = 1; 2: 3: int main(void) 4: { 5: int local_1 = global_1; 6: int local_2 = local_1 + 1; 7: 8: return local_1 + local_2; 9: } @end verbatim @example INI,test.c,1,5,global_1,1 INI,test.c,5,9,local_1,global_1 INI,test.c,6,9,local_2,local_1 + 1 @end example @anchor{Output_Metrics_Asn} @subsection 代入式レコード @example @anchor{assignment_record} assignment_record : @ref{assignment_head} ',' @ref{location} ',' @ref{variable_name} ',' @ref{assignment_rep} @anchor{assignment_head} assignment_head : "ASN" @end example @anchor{Output_Metrics_Asn_Sample} @subheading @bullet{ 出力例} @verbatim 1: int main(void) 2: { 3: int i; 4: 5: for (i = 0; i < 10; i++) { 6: if (i % 2) { 7: i += 1; 8: } 9: } 10: 11: return 0; 12: } @end verbatim @example ASN,test.c,5,12,i,= 0 ASN,test.c,7,15,i,+= 1 @end example @anchor{Output_Metrics_Dep} @subsection 依存レコード @example @anchor{dependency_record} dependency_record : @ref{dependency_head} ',' @ref{location} ',' @ref{include_record_body} | @ref{dependency_head} ',' @ref{location} ',' @ref{call_record_body} | @ref{dependency_head} ',' @ref{location} ',' @ref{xref_record_body} @anchor{dependency_head} dependency_head : "DEP" @end example @subheading @bullet{ インクルードレコード} @example @anchor{include_record_body} include_record_body : 'I' ',' @ref{included_fpath} @anchor{included_fpath} included_fpath : '<' @ref{file_path} '>' | '"' @ref{file_path} '"' @end example @subheading @bullet{ 呼び出しレコード} @example @anchor{call_record_body} call_record_body : 'C' ',' @ref{caller_function} ',' @ref{callee_function} @anchor{caller_function} caller_function : @ref{function_identifier} @anchor{callee_function} callee_function : @ref{function_identifier} @end example @subheading @bullet{ 外部参照レコード} @example @anchor{xref_record_body} xref_record_body : 'X' ',' xref_variable_record_body | 'X' ',' xref_function_record_body @anchor{xref_variable_record_body} xref_variable_record_body : 'V' ',' @ref{accessor_function} ',' @ref{access_type} ',' @ref{accessee_variable} @anchor{xref_function_record_body} xref_function_record_body : 'F' ',' @ref{accessor_function} ',' @ref{access_type} ',' @ref{accessee_function} @anchor{accessor_function} accessor_function : @ref{function_identifier} @anchor{access_type} access_type : 'R' | 'W' @anchor{accessee_variable} accessee_variable : @ref{variable_name} @anchor{accessee_function} accessee_function : @ref{function_identifier} @end example @anchor{Output_Metrics_Dep_Sample} @subheading @bullet{ 出力例} @verbatim 1: #include 2: #include "test.h" 3: 4: extern int global; 5: 6: int foo(long l) 7: { 8: int i = global; 9: 10: return l - i; 11: } 12: 13: int main(void) 14: { 15: int (*p)(long) = &foo; 16: 17: global = 5; 18: 19: return (*p)(10); 20: } @end verbatim @example DEP,test.c,1,1,I, DEP,test.c,2,1,I,"""test.h""" DEP,test.c,8,13,X,V,foo,int foo(long),R,global DEP,test.c,19,16,C,main,int main(void),foo,int foo(long) DEP,test.c,15,23,X,F,main,int main(void),R,foo,int foo(long) DEP,test.c,17,12,X,V,main,int main(void),W,global @end example @anchor{Output_Metrics_Lit} @subsection リテラルレコード @example @anchor{literal_record} literal_record : @ref{literal_head} ',' @ref{location} ',' @ref{literal_type} ',' @ref{literal_prefix} ',' @ref{literal_suffix} ',' @ref{literal_value} @anchor{literal_head} literal_head : "LIT" @anchor{literal_type} literal_type : 'DN' <- Decimal Number | 'HN' <- Hexadecimal Number | 'ON' <- Octal Number | 'BN' <- Binary Number | 'FN' <- Floating point Number | 'CN' <- Character Narrow | 'SN' <- String Narrow | 'CW' <- Character Wide | 'SW' <- String Wide @anchor{literal_prefix} literal_prefix : | 'l' | 'L' | '0' | '0x' | '0X' | '0b' | '0B' @anchor{literal_suffix} literal_suffix : | 'u' | 'U' | 'l' | 'L' | 'ul' | 'Ul' | 'uL' | 'UL' | 'ull' | 'Ull' | 'uLL' | 'ULL' | 'll' | 'LL' | 'f' | 'F' @anchor{literal_value} literal_value : c_constant | c_string_literal @end example @anchor{Output_Metrics_Lit_Sample} @subheading @bullet{ 出力例} @verbatim 1: unsigned int i = 0xFFU; 2: 3: int foo(long l) 4: { 5: const wchar_t *s = L"foobar"; 6: 7: return 0; 8: } @end verbatim @example LIT,test.c,1,18,HN,0x,U,0xFFU LIT,test.c,5,24,SW,L,,"L""foobar""" @end example @anchor{Output_Metrics_Pre} @subsection プリプロセスレコード @example @anchor{preprocess_record} preprocess_record : @ref{preprocess_head} ',' @ref{location} ',' @ref{pp_directive} ',' @ref{pp_tokens} @anchor{preprocess_head} preprocess_head : "PRE" @anchor{pp_directive} pp_directive : "#if" | "#ifdef" | "#ifndef" | "#elif" | "#else" | "#endif" | "#include" | "#define" | "#undef" | "#line" | "#error" | "#pragma" | "#" @end example @anchor{Output_Metrics_Pre_Sample} @subheading @bullet{ 出力例} @verbatim 1: #pragma once 2: 3: #if defined(NDEBUG) 4: void debug(const char *msg) {} 5: #else 6: #include 7: void debug(const char *msg) 8: { 9: puts(msg); 10: } 11: #endif @end verbatim @example PRE,test.c,1,1,#pragma,once PRE,test.c,3,1,#if,defined(NDEBUG) PRE,test.c,5,1,#else, PRE,test.c,6,1,#include, PRE,test.c,11,1,#endif, @end example @anchor{Output_Metrics_Met} @subsection メトリック値レコード @example @anchor{metric_record} metric_record : @ref{metric_head} ',' @ref{file_metric_record_body} | @ref{metric_head} ',' @ref{func_metric_record_body} @anchor{metric_head} metric_head : "MET" @anchor{file_metric_record_body} file_metric_record_body : @ref{file_metric_name} ',' @ref{file_path} ',' @ref{metric_value} @anchor{func_metric_record_body} func_metric_record_body : @ref{func_metric_name} ',' @ref{function_identifier} ',' @ref{location} ',' @ref{metric_value} @anchor{file_metric_name} file_metric_name : "FL_STMT" <- ステートメント数 | "FL_FUNC" <- 関数の数 @anchor{func_metric_name} func_metric_name : "FN_STMT" <- ステートメント数 | "FN_UNRC" <- 到達しないステートメント数 | "FN_LINE" <- 物理行数 | "FN_PARA" <- パラメータ数 | "FN_UNUV" <- 使用/再使用されない変数の数 | "FN_CSUB" <- 関数を呼び出す箇所数 | "FN_CALL" <- 関数から呼び出される箇所数 | "FN_GOTO" <- goto 文の数 | "FN_RETN" <- 関数内の戻り点の数 | "FN_UELS" <- else なしの if 文数 | "FN_NEST" <- 制御フローグラフの最大ネスト数 | "FN_PATH" <- 推定静的パス数 | "FN_CYCM" <- サイクロマティック複雑度 @anchor{metric_value} metric_value : 整数値 @end example @node Message File @section メッセージファイル @example @anchor{message_file} message_file : @ref{message_version_record} | @ref{message_version_record} @ref{new_line} @ref{message_list} @anchor{message_version_record} message_version_record : 'V' ',' @ref{version_number} ',' @ref{exec_timestamp} ',' @ref{exec_working_directory} @anchor{message_list} message_list : @ref{error_record} | @ref{warning_record} | @ref{message_list} @ref{new_line} @ref{error_record} | @ref{message_list} @ref{new_line} @ref{warning_record} @anchor{error_record} error_record : @ref{error_line} @ref{new_line} @ref{context_line_list} @anchor{error_line} error_line : 'E' ',' @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} ',' @ref{exam_package_name} ',' @ref{message_id} ',' @ref{message_category} ',' @ref{message_severity} ',' @ref{message_text} @anchor{warning_record} warning_record : @ref{warning_line} @ref{new_line} @ref{context_line_list} @anchor{warning_line} warning_line : 'W' ',' @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} ',' @ref{exam_package_name} ',' @ref{message_id} ',' @ref{message_category} ',' @ref{message_severity} ',' @ref{message_text} @anchor{context_line_list} context_line_list : | @ref{context_line} @ref{new_line} @ref{context_line_list} @anchor{context_line} context_line : 'C' ',' @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} ',' @ref{exam_package_name} ',' @ref{message_id} ',' @ref{message_category} ',' @ref{message_severity} ',' @ref{message_text} @end example @node Messages @chapter メッセージ一覧 @menu * X0001::不明な例外条件 `%s' を検出しました。 * X0002::不正なメッセージ ID`%s' を検出しました。 * X0003::回復不能なエラーにより解析処理を中断しました。詳細は `%s' 及び `%s' を確認して下さい。 * X0004::不正なメッセージフォーマット `%s' を検出しました。 * E0004::対応する #endif 行がありません。 * E0007::条件式中のトークン `%s' で構文エラーを検出しました。条件式を偽として評価します。 * E0008::トークン `%s' で構文エラーを検知しました。 * E0009::ヘッダファイル <%s> が見つかりません。 * E0010::ヘッダファイル "%s" が見つかりません。 * E0013::式に文を含めることはできません。 * E0014::ラベルのアドレスを取得するための && 単項演算子は GCC 独自の拡張機能です。 * E0015::ラベルのアドレスを指定した goto 文は GCC 独自の拡張機能です。 * E0016::終了しないコメントブロックが見つかりました。 * W0001::括弧 `()' のネストの深さが 32 を超えています。このプログラムは、ISO C90 標準規格に厳密に合致していません。 * W0002::関数 `%s()' の定義において、識別子と仮引数宣言を分けて記述するのは、古いスタイルです。 * W0003::この switch 文には default ラベルが含まれていません。 * W0007::直前の case 節あるいは default 節の末尾に、break 文または return 文がありません。 * W0010::この三項演算子 (条件演算子) のオペランドに副作用があります。 * W0013::繰り返し文の中で、continue 文が使用されています。 * W0016::変換指定子のフィールド幅が 509 文字を超えています。 * W0017::変換指定子のフィールド幅が 509 文字を超えています。 * W0018::変換指定子の精度幅が 509 文字を超えています。 * W0019::このポインタキャストは、const 修飾を削除しているので危険です。 * W0021::このポインタキャストは、volatile 修飾を削除しているので危険です。 * W0023::ポインタ型の変数に対して算術演算が行われています。 * W0024::ポインタ型の変数に対してインクリメントまたはデクリメントが行われています。 * W0025::`%s' は、既にこのファイルから直接インクルードされています。 * W0026::`%s' は、既にこのファイルから間接的にインクルードされています。 * W0027::ポインタ型の変数に対して比較演算が行われています。 * W0028::NULL ポインタに対して間接参照が行われています。 * W0030::NULL ポインタに対して算術演算が行われています。 * W0031::仮引数 `%s' は、この関数の中で使われていません。 * W0033::ラベル `%s:' は、この関数の中で使われていないため、削除することができます。 * W0035::`&&' または `||' の右のオペランドは、算術型またはポインタ型でなければなりません。 * W0036::宣言子の中の修飾子の数が 12 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0037::構造体または共用体のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0038::オブジェクト `%s' のサイズが 32767 バイトを超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0039::ブロックの中のローカルな識別子の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0040::ビットフィールドが signed または unsigned 付きで宣言されていません。 * W0041::構造体または共用体のメンバの数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0042::列挙定数の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0043::配列の初期値が、宣言された配列のサイズに足りません。残りの配列要素はゼロで初期化されます。 * W0049::制御構造のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0050::case ラベルの数が 257 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0051::外部識別子 `%s' が他の識別子名と、リンカ特性で指定された文字数の範囲内で区別できません。 * W0052::識別子名 `%s' が他の識別子名と、コンパイラ特性で指定された文字数の範囲内で区別できません。 * W0053::`#include "%s"' のネストが 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0054::`#if...' のネストの最大値が 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0055::マクロ定義の数が 1024 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0056::関数形式マクロの仮引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0057::関数形式マクロの呼び出しの実引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0058::文字列リテラルの文字数が 509 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 * W0059::このファイルの行末に Ctrl-M(^M) 制御文字が見つかりました。 * W0060::このファイル内に Ctrl-Z(^Z) 制御文字が見つかりました。 * W0061::`%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。 * W0062::`__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 * W0063::`__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 * W0064::2 進数整数リテラルが使われています。これは言語拡張です。 * W0065::代入演算子の左オペランドをキャストしてはなりません。 * W0066::`main()' 関数は、`int (void)' または `int (int, char *[])' のどちらかでなければなりません。 * W0067::ネストされた構造体のメンバに直接アクセスしています。これは言語拡張です。 * W0068::ビットにアクセスするために `.' を使っています。これは言語拡張です。 * W0069::`/*' で始まるコメントの中に `/*' が見つかりました。ネストされたコメントは、ISO C 標準規格では認められていません。 * W0070::インクルードされている <%s> の内容は翻訳単位の中で全く参照されていません。削除することができます。 * W0071::インクルードされている "%s" の内容は翻訳単位の中で全く参照されていません。削除することができます。 * W0072::基本ソース文字集合に含まれない文字が、ヘッダファイル名で使われています。 * W0073::このインクルードファイルには、インクルードガードが記述されていません。 * W0076::この 16 進整数リテラルには、接尾語 `U' または `u' が付けられていません。 * W0077::接尾語として小文字の `l' が整数または浮動小数点数に付けられています。 * W0078::仮引数並びがない関数が宣言されています。 * W0079::この配列は、初期値の文字列リテラルの終端文字 `\0' を保持できません。 * W0080::const 修飾されたグローバルオブジェクトが、明示的に初期化されずに定義されています。 * W0081::単項演算子 `-' を unsigned int 型、unsigned long 型、unsigned long long 型のオペランドに対して使うと、符号無し型になってしまいます。 * W0082::単項演算子 `-' を符号無しの潜在型 `%s' のオペランドに対して使っています。 * W0084::このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。 * W0085::この文には副作用がありません。誤りのある可能性が高いです。 * W0086::三項演算子 (条件演算子) の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。 * W0087::カンマ演算子の右側の式は、副作用がない冗長な式です。 * W0088::論理演算子の右側の式は、副作用がない冗長な式です。 * W0093::ゼロで除算される恐れがあります。 * W0096::ゼロになる定数式で除算しています。 * W0097::ゼロの値で除算しています。 * W0100::変数 `%s' は初期値を設定後に再代入されません。変数を const 付きで初期値を指定して定義できる可能性があります。 * W0101::自動変数のアドレスが、より長い寿命を持つポインタに代入されています。このプログラムは危険です。 * W0102::自動変数のアドレスが、関数の仮引数を介して戻されています。このプログラムは危険です。 * W0103::自動変数のアドレスが、戻り値として関数から返されています。このプログラムは危険です。 * W0104::仮引数 `%s' は値が変わりません。const 付きで宣言できる可能性があります。 * W0105::ポインタ仮引数 `%s' が指しているオブジェクトは関数内で変わらないので、const オブジェクトを指すポインタ型として宣言できる可能性があります。 * W0107::自動変数のアドレスが、static 付きローカルポインタに代入されています。このプログラムは危険です。 * W0108::代入演算子が論理演算式の中で使われています。 * W0109::この関数の宣言が見つかりません。省略されたものとみなし、`extern int %s()' を挿入します。 * W0110::浮動小数点型の変数が for 文のループカウンタとして使われています。 * W0112::浮動小数点の式を等価演算子で比較しています。 * W0114::この制御式は明示的な論理演算ではありません。 * W0115::符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。 * W0116::符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。 * W0117::`%s' の定義は外部結合を持ちますが、定義より前にその宣言がありません。 * W0118::外部結合を持つ `%s' の宣言が、ヘッダファイルの中にありません。 * W0119::暗黙的に char 型から signed char 型に型変換されています。 * W0120::暗黙的に char 型から unsigned char 型に型変換されています。 * W0121::暗黙的に char 型から signed short 型に型変換されています。 * W0122::暗黙的に char 型から unsigned short 型に型変換されています。 * W0123::暗黙的に char 型から signed int 型に型変換されています。 * W0124::暗黙的に char 型から unsigned int 型に型変換されています。 * W0125::暗黙的に char 型から signed long 型に型変換されています。 * W0126::暗黙的に char 型から unsigned long 型に型変換されています。 * W0127::暗黙的に char 型から float 型に型変換されています。 * W0128::暗黙的に char 型から double 型に型変換されています。 * W0129::暗黙的に char 型から long double 型に型変換されています。 * W0130::暗黙的に char 型から signed long long 型に型変換されています。 * W0131::暗黙的に char 型から unsigned long long 型に型変換されています。 * W0132::暗黙的に unsigned char 型から char 型に型変換されています。 * W0133::暗黙的に signed char 型から char 型に型変換されています。 * W0134::暗黙的に signed short 型から char 型に型変換されています。 * W0135::暗黙的に unsigned short 型から char 型に型変換されています。 * W0136::暗黙的に signed int 型から char 型に型変換されています。 * W0137::暗黙的に unsigned int 型から char 型に型変換されています。 * W0138::暗黙的に signed long 型から char 型に型変換されています。 * W0139::暗黙的に unsigned long 型から char 型に型変換されています。 * W0140::暗黙的に signed long long 型から char 型に型変換されています。 * W0141::暗黙的に unsigned long long 型から char 型に型変換されています。 * W0142::暗黙的に unsigned char 型から signed char 型に型変換されています。 * W0143::暗黙的に unsigned short 型から signed char 型に型変換されています。 * W0144::暗黙的に unsigned short 型から signed short 型に型変換されています。 * W0145::暗黙的に unsigned int 型から signed char 型に型変換されています。 * W0146::暗黙的に unsigned int 型から signed short 型に型変換されています。 * W0147::暗黙的に unsigned int 型から signed int 型に型変換されています。 * W0148::暗黙的に unsigned long 型から signed char 型に型変換されています。 * W0149::暗黙的に unsigned long 型から signed short 型に型変換されています。 * W0150::暗黙的に unsigned long 型から signed int 型に型変換されています。 * W0151::暗黙的に unsigned long 型から signed long 型に型変換されています。 * W0152::暗黙的に unsigned long long 型から signed char 型に型変換されています。 * W0153::暗黙的に unsigned long long 型から signed short 型に型変換されています。 * W0154::暗黙的に unsigned long long 型から signed int 型に型変換されています。 * W0155::暗黙的に unsigned long long 型から signed long 型に型変換されています。 * W0156::暗黙的に unsigned long long 型から signed long long 型に型変換されています。 * W0157::暗黙的に signed char 型から unsigned char 型に型変換されています。 * W0158::暗黙的に signed char 型から unsigned short 型に型変換されています。 * W0159::暗黙的に signed char 型から unsigned int 型に型変換されています。 * W0160::暗黙的に signed char 型から unsigned long 型に型変換されています。 * W0161::暗黙的に signed short 型から unsigned char 型に型変換されています。 * W0162::暗黙的に signed short 型から unsigned short 型に型変換されています。 * W0163::暗黙的に signed short 型から unsigned int 型に型変換されています。 * W0164::暗黙的に signed short 型から unsigned long 型に型変換されています。 * W0165::暗黙的に signed int 型から unsigned char 型に型変換されています。 * W0166::暗黙的に signed int 型から unsigned short 型に型変換されています。 * W0167::暗黙的に signed int 型から unsigned int 型に型変換されています。 * W0168::暗黙的に signed int 型から unsigned long 型に型変換されています。 * W0169::暗黙的に signed long 型から unsigned char 型に型変換されています。 * W0170::暗黙的に signed long 型から unsigned short 型に型変換されています。 * W0171::暗黙的に signed long 型から unsigned int 型に型変換されています。 * W0172::暗黙的に signed long 型から unsigned long 型に型変換されています。 * W0173::暗黙的に signed char 型から unsigned long long 型に型変換されています。 * W0174::暗黙的に signed short 型から unsigned long long 型に型変換されています。 * W0175::暗黙的に signed int 型から unsigned long long 型に型変換されています。 * W0176::暗黙的に signed long 型から unsigned long long 型に型変換されています。 * W0177::暗黙的に signed long long 型から unsigned char 型に型変換されています。 * W0178::暗黙的に signed long long 型から unsigned short 型に型変換されています。 * W0179::暗黙的に signed long long 型から unsigned int 型に型変換されています。 * W0180::暗黙的に signed long long 型から unsigned long 型に型変換されています。 * W0181::暗黙的に signed long long 型から unsigned long long 型に型変換されています。 * W0182::暗黙的に unsigned char 型から float 型に型変換されています。 * W0183::暗黙的に unsigned char 型から double 型に型変換されています。 * W0184::暗黙的に unsigned char 型から long double 型に型変換されています。 * W0185::暗黙的に signed char 型から float 型に型変換されています。 * W0186::暗黙的に signed char 型から double 型に型変換されています。 * W0187::暗黙的に signed char 型から long double 型に型変換されています。 * W0188::暗黙的に signed short 型から float 型に型変換されています。 * W0189::暗黙的に signed short 型から double 型に型変換されています。 * W0190::暗黙的に signed short 型から long double 型に型変換されています。 * W0191::暗黙的に unsigned short 型から float 型に型変換されています。 * W0192::暗黙的に unsigned short 型から double 型に型変換されています。 * W0193::暗黙的に unsigned short 型から long double 型に型変換されています。 * W0194::暗黙的に signed int 型から float 型に型変換されています。 * W0195::暗黙的に signed int 型から double 型に型変換されています。 * W0196::暗黙的に signed int 型から long double 型に型変換されています。 * W0197::暗黙的に unsigned int 型から float 型に型変換されています。 * W0198::暗黙的に unsigned int 型から double 型に型変換されています。 * W0199::暗黙的に unsigned int 型から long double 型に型変換されています。 * W0200::暗黙的に signed long 型から float 型に型変換されています。 * W0201::暗黙的に signed long 型から double 型に型変換されています。 * W0202::暗黙的に signed long 型から long double 型に型変換されています。 * W0203::暗黙的に unsigned long 型から float 型に型変換されています。 * W0204::暗黙的に unsigned long 型から double 型に型変換されています。 * W0205::暗黙的に unsigned long 型から long double 型に型変換されています。 * W0206::暗黙的に signed long long 型から float 型に型変換されています。 * W0207::暗黙的に signed long long 型から double 型に型変換されています。 * W0208::暗黙的に signed long long 型から long double 型に型変換されています。 * W0209::暗黙的に unsigned long long 型から float 型に型変換されています。 * W0210::暗黙的に unsigned long long 型から double 型に型変換されています。 * W0211::暗黙的に unsigned long long 型から long double 型に型変換されています。 * W0212::暗黙的に float 型から char 型に型変換されています。 * W0213::暗黙的に float 型から signed char 型に型変換されています。 * W0214::暗黙的に float 型から unsigned char 型に型変換されています。 * W0215::暗黙的に float 型から signed short 型に型変換されています。 * W0216::暗黙的に float 型から unsigned short 型に型変換されています。 * W0217::暗黙的に float 型から signed int 型に型変換されています。 * W0218::暗黙的に float 型から unsigned int 型に型変換されています。 * W0219::暗黙的に float 型から signed long 型に型変換されています。 * W0220::暗黙的に float 型から unsigned long 型に型変換されています。 * W0221::暗黙的に double 型から char 型に型変換されています。 * W0222::暗黙的に double 型から signed char 型に型変換されています。 * W0223::暗黙的に double 型から unsigned char 型に型変換されています。 * W0224::暗黙的に double 型から signed short 型に型変換されています。 * W0225::暗黙的に double 型から unsigned short 型に型変換されています。 * W0226::暗黙的に double 型から signed int 型に型変換されています。 * W0227::暗黙的に double 型から unsigned int 型に型変換されています。 * W0228::暗黙的に double 型から signed long 型に型変換されています。 * W0229::暗黙的に double 型から unsigned long 型に型変換されています。 * W0230::暗黙的に long double 型から char 型に型変換されています。 * W0231::暗黙的に long double 型から signed char 型に型変換されています。 * W0232::暗黙的に long double 型から unsigned char 型に型変換されています。 * W0233::暗黙的に long double 型から signed short 型に型変換されています。 * W0234::暗黙的に long double 型から unsigned short 型に型変換されています。 * W0235::暗黙的に long double 型から signed int 型に型変換されています。 * W0236::暗黙的に long double 型から unsigned int 型に型変換されています。 * W0237::暗黙的に long double 型から signed long 型に型変換されています。 * W0238::暗黙的に long double 型から unsigned long 型に型変換されています。 * W0239::暗黙的に float 型から signed long long 型に型変換されています。 * W0240::暗黙的に float 型から unsigned long long 型に型変換されています。 * W0241::暗黙的に double 型から signed long long 型に型変換されています。 * W0242::暗黙的に double 型から unsigned long long 型に型変換されています。 * W0243::暗黙的に long double 型から signed long long 型に型変換されています。 * W0244::暗黙的に long double 型から unsigned long long 型に型変換されています。 * W0245::暗黙的に unsigned char 型から signed short 型に型変換されています。 * W0246::暗黙的に unsigned char 型から signed int 型に型変換されています。 * W0247::暗黙的に unsigned char 型から signed long 型に型変換されています。 * W0248::暗黙的に unsigned short 型から signed int 型に型変換されています。 * W0249::暗黙的に unsigned short 型から signed long 型に型変換されています。 * W0250::暗黙的に unsigned int 型から signed long 型に型変換されています。 * W0251::暗黙的に unsigned char 型から signed long long 型に型変換されています。 * W0252::暗黙的に unsigned short 型から signed long long 型に型変換されています。 * W0253::暗黙的に unsigned int 型から signed long long 型に型変換されています。 * W0254::暗黙的に unsigned long 型から signed long long 型に型変換されています。 * W0255::char 型の値が関数 `signed char %s()' から返されています。 * W0256::char 型の値が関数 `unsigned char %s()' から返されています。 * W0257::char 型の値が関数 `signed short %s()' から返されています。 * W0258::char 型の値が関数 `unsigned short %s()' から返されています。 * W0259::char 型の値が関数 `signed int %s()' から返されています。 * W0260::char 型の値が関数 `unsigned int %s()' から返されています。 * W0261::char 型の値が関数 `signed long %s()' から返されています。 * W0262::char 型の値が関数 `unsigned long %s()' から返されています。 * W0263::char 型の値が関数 `float %s()' から返されています。 * W0264::char 型の値が関数 `double %s()' から返されています。 * W0265::char 型の値が関数 `long double %s()' から返されています。 * W0266::char 型の値が関数 `signed long long %s()' から返されています。 * W0267::char 型の値が関数 `unsigned long long %s()' から返されています。 * W0268::unsigned char 型の値が関数 `char %s()' から返されています。 * W0269::signed char 型の値が関数 `char %s()' から返されています。 * W0270::signed short 型の値が関数 `char %s()' から返されています。 * W0271::unsigned short 型の値が関数 `char %s()' から返されています。 * W0272::signed int 型の値が関数 `char %s()' から返されています。 * W0273::unsigned int 型の値が関数 `char %s()' から返されています。 * W0274::signed long 型の値が関数 `char %s()' から返されています。 * W0275::unsigned long 型の値が関数 `char %s()' から返されています。 * W0276::signed long long 型の値が関数 `char %s()' から返されています。 * W0277::unsigned long long 型の値が関数 `char %s()' から返されています。 * W0278::unsigned char 型の値が関数 `signed char %s()' から返されています。 * W0279::unsigned short 型の値が関数 `signed char %s()' から返されています。 * W0280::unsigned short 型の値が関数 `signed short %s()' から返されています。 * W0281::unsigned int 型の値が関数 `signed char %s()' から返されています。 * W0282::unsigned int 型の値が関数 `signed short %s()' から返されています。 * W0283::unsigned int 型の値が関数 `signed int %s()' から返されています。 * W0284::unsigned long 型の値が関数 `signed char %s()' から返されています。 * W0285::unsigned long 型の値が関数 `signed short %s()' から返されています。 * W0286::unsigned long 型の値が関数 `signed int %s()' から返されています。 * W0287::unsigned long 型の値が関数 `signed long %s()' から返されています。 * W0288::unsigned long long 型の値が関数 `signed char %s()' から返されています。 * W0289::unsigned long long 型の値が関数 `signed short %s()' から返されています。 * W0290::unsigned long long 型の値が関数 `signed int %s()' から返されています。 * W0291::unsigned long long 型の値が関数 `signed long %s()' から返されています。 * W0292::unsigned long long 型の値が関数 `signed long long %s()' から返されています。 * W0293::signed char 型の値が関数 `unsigned char %s()' から返されています。 * W0294::signed char 型の値が関数 `unsigned short %s()' から返されています。 * W0295::signed char 型の値が関数 `unsigned int %s()' から返されています。 * W0296::signed char 型の値が関数 `unsigned long %s()' から返されています。 * W0297::signed short 型の値が関数 `unsigned char %s()' から返されています。 * W0298::signed short 型の値が関数 `unsigned short %s()' から返されています。 * W0299::signed short 型の値が関数 `unsigned int %s()' から返されています。 * W0300::signed short 型の値が関数 `unsigned long %s()' から返されています。 * W0301::signed int 型の値が関数 `unsigned char %s()' から返されています。 * W0302::signed int 型の値が関数 `unsigned short %s()' から返されています。 * W0303::signed int 型の値が関数 `unsigned int %s()' から返されています。 * W0304::signed int 型の値が関数 `unsigned long %s()' から返されています。 * W0305::signed long 型の値が関数 `unsigned char %s()' から返されています。 * W0306::signed long 型の値が関数 `unsigned short %s()' から返されています。 * W0307::signed long 型の値が関数 `unsigned int %s()' から返されています。 * W0308::signed long 型の値が関数 `unsigned long %s()' から返されています。 * W0309::signed char 型の値が関数 `unsigned long long %s()' から返されています。 * W0310::signed short 型の値が関数 `unsigned long long %s()' から返されています。 * W0311::signed int 型の値が関数 `unsigned long long %s()' から返されています。 * W0312::signed long 型の値が関数 `unsigned long long %s()' から返されています。 * W0313::signed long long 型の値が関数 `unsigned char %s()' から返されています。 * W0314::signed long long 型の値が関数 `unsigned short %s()' から返されています。 * W0315::signed long long 型の値が関数 `unsigned int %s()' から返されています。 * W0316::signed long long 型の値が関数 `unsigned long %s()' から返されています。 * W0317::signed long long 型の値が関数 `unsigned long long %s()' から返されています。 * W0318::unsigned char 型の値が関数 `float %s()' から返されています。 * W0319::unsigned char 型の値が関数 `double %s()' から返されています。 * W0320::unsigned char 型の値が関数 `long double %s()' から返されています。 * W0321::signed char 型の値が関数 `float %s()' から返されています。 * W0322::signed char 型の値が関数 `double %s()' から返されています。 * W0323::signed char 型の値が関数 `long double %s()' から返されています。 * W0324::signed short 型の値が関数 `float %s()' から返されています。 * W0325::signed short 型の値が関数 `double %s()' から返されています。 * W0326::signed short 型の値が関数 `long double %s()' から返されています。 * W0327::unsigned short 型の値が関数 `float %s()' から返されています。 * W0328::unsigned short 型の値が関数 `double %s()' から返されています。 * W0329::unsigned short 型の値が関数 `long double %s()' から返されています。 * W0330::signed int 型の値が関数 `float %s()' から返されています。 * W0331::signed int 型の値が関数 `double %s()' から返されています。 * W0332::signed int 型の値が関数 `long double %s()' から返されています。 * W0333::unsigned int 型の値が関数 `float %s()' から返されています。 * W0334::unsigned int 型の値が関数 `double %s()' から返されています。 * W0335::unsigned int 型の値が関数 `long double %s()' から返されています。 * W0336::signed long 型の値が関数 `float %s()' から返されています。 * W0337::signed long 型の値が関数 `double %s()' から返されています。 * W0338::signed long 型の値が関数 `long double %s()' から返されています。 * W0339::unsigned long 型の値が関数 `float %s()' から返されています。 * W0340::unsigned long 型の値が関数 `double %s()' から返されています。 * W0341::unsigned long 型の値が関数 `long double %s()' から返されています。 * W0342::signed long long 型の値が関数 `float %s()' から返されています。 * W0343::signed long long 型の値が関数 `double %s()' から返されています。 * W0344::signed long long 型の値が関数 `long double %s()' から返されています。 * W0345::unsigned long long 型の値が関数 `float %s()' から返されています。 * W0346::unsigned long long 型の値が関数 `double %s()' から返されています。 * W0347::unsigned long long 型の値が関数 `long double %s()' から返されています。 * W0348::float 型の値が関数 `char %s()' から返されています。 * W0349::float 型の値が関数 `signed char %s()' から返されています。 * W0350::float 型の値が関数 `unsigned char %s()' から返されています。 * W0351::float 型の値が関数 `signed short %s()' から返されています。 * W0352::float 型の値が関数 `unsigned short %s()' から返されています。 * W0353::float 型の値が関数 `signed int %s()' から返されています。 * W0354::float 型の値が関数 `unsigned int %s()' から返されています。 * W0355::float 型の値が関数 `signed long %s()' から返されています。 * W0356::float 型の値が関数 `unsigned long %s()' から返されています。 * W0357::double 型の値が関数 `char %s()' から返されています。 * W0358::double 型の値が関数 `signed char %s()' から返されています。 * W0359::double 型の値が関数 `unsigned char %s()' から返されています。 * W0360::double 型の値が関数 `signed short %s()' から返されています。 * W0361::double 型の値が関数 `unsigned short %s()' から返されています。 * W0362::double 型の値が関数 `signed int %s()' から返されています。 * W0363::double 型の値が関数 `unsigned int %s()' から返されています。 * W0364::double 型の値が関数 `signed long %s()' から返されています。 * W0365::double 型の値が関数 `unsigned long %s()' から返されています。 * W0366::long double 型の値が関数 `char %s()' から返されています。 * W0367::long double 型の値が関数 `signed char %s()' から返されています。 * W0368::long double 型の値が関数 `unsigned char %s()' から返されています。 * W0369::long double 型の値が関数 `signed short %s()' から返されています。 * W0370::long double 型の値が関数 `unsigned short %s()' から返されています。 * W0371::long double 型の値が関数 `signed int %s()' から返されています。 * W0372::long double 型の値が関数 `unsigned int %s()' から返されています。 * W0373::long double 型の値が関数 `signed long %s()' から返されています。 * W0374::long double 型の値が関数 `unsigned long %s()' から返されています。 * W0375::float 型の値が関数 `signed long long %s()' から返されています。 * W0376::float 型の値が関数 `unsigned long long %s()' から返されています。 * W0377::double 型の値が関数 `signed long long %s()' から返されています。 * W0378::double 型の値が関数 `unsigned long long %s()' から返されています。 * W0379::long double 型の値が関数 `signed long long %s()' から返されています。 * W0380::long double 型の値が関数 `unsigned long long %s()' から返されています。 * W0381::signed short 型の値が関数 `signed char %s()' から返されています。 * W0382::unsigned short 型の値が関数 `unsigned char %s()' から返されています。 * W0383::signed int 型の値が関数 `signed char %s()' から返されています。 * W0384::signed int 型の値が関数 `signed short %s()' から返されています。 * W0385::unsigned int 型の値が関数 `unsigned char %s()' から返されています。 * W0386::unsigned int 型の値が関数 `unsigned short %s()' から返されています。 * W0387::signed long 型の値が関数 `signed char %s()' から返されています。 * W0388::signed long 型の値が関数 `signed short %s()' から返されています。 * W0389::signed long 型の値が関数 `signed int %s()' から返されています。 * W0390::unsigned long 型の値が関数 `unsigned char %s()' から返されています。 * W0391::unsigned long 型の値が関数 `unsigned short %s()' から返されています。 * W0392::unsigned long 型の値が関数 `unsigned int %s()' から返されています。 * W0393::signed long long 型の値が関数 `signed char %s()' から返されています。 * W0394::signed long long 型の値が関数 `signed short %s()' から返されています。 * W0395::signed long long 型の値が関数 `signed int %s()' から返されています。 * W0396::signed long long 型の値が関数 `signed long %s()' から返されています。 * W0397::unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 * W0398::unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 * W0399::unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 * W0400::unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 * W0401::unsigned char 型の値が関数 `signed short %s()' から返されています。 * W0402::unsigned char 型の値が関数 `signed int %s()' から返されています。 * W0403::unsigned char 型の値が関数 `signed long %s()' から返されています。 * W0404::unsigned short 型の値が関数 `signed int %s()' から返されています。 * W0405::unsigned short 型の値が関数 `signed long %s()' から返されています。 * W0406::unsigned int 型の値が関数 `signed long %s()' から返されています。 * W0407::unsigned char 型の値が関数 `signed long long %s()' から返されています。 * W0408::unsigned short 型の値が関数 `signed long long %s()' から返されています。 * W0409::unsigned int 型の値が関数 `signed long long %s()' から返されています。 * W0410::unsigned long 型の値が関数 `signed long long %s()' から返されています。 * W0411::列挙体は、最初だけ初期化するか、全てを初期化するか、全く初期化しないかのいずれかにしてください。 * W0413::制御文の本体が `@{@}' で囲まれたブロックになっていません。 * W0414::制御文の本体が同じ行にあり、`@{@}' で囲まれたブロックになっていません。 * W0421::値が NULL になるポインタに対して間接参照が行われています。 * W0422::値が NULL になることがあるポインタに対して間接参照が行われています。 * W0423::値が NULL になるポインタに対して算術演算を行っています。 * W0424::値が NULL になることがあるポインタに対して算術演算を行っています。 * W0425::一つの行に複数の宣言または文が存在します。 * W0431::この行は以前の同じ深さのインデントより左にずれています。 * W0432::この行はプロジェクトのインデントスタイルと合っていません。 * W0440::この閉じカッコ `@}' は、対応する開きカッコ `@{' に合うようなインデントに置かれていません。 * W0441::接尾辞がない整数リテラルの型が、int 型ではありません。 * W0442::関数形式マクロが定義されています。 * W0443::この関数形式マクロは関数で置き換えることができる可能性があります。 * W0444::`#' 演算子と `##' 演算子が一つのマクロ定義内で使われています。 * W0445::複数の `##' 演算子が一つのマクロ定義内で使われています。 * W0446::代入演算の結果値が使われています。 * W0447::カンマ演算子が for 文の制御式以外で使われています。 * W0456::外部結合を持つオブジェクトあるいは関数 `%s' が、ヘッダファイル内で定義されています。 * W0457::関数の宣言あるいは定義で、戻り値型が明示的に定義されていないので、暗黙的に int 型と定義されます。 * W0458::オブジェクトの宣言あるいは定義で、型が明示的に定義されていないので、暗黙的に int 型と定義されます。 * W0459::変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 * W0460::変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 * W0461::値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 * W0462::値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 * W0477::マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 * W0478::このマクロは、認識不可能なコードの断片を定義しています。 * W0479::このマクロ定義は typedef 宣言に置換することができます。 * W0480::このマクロは、制御文のキーワード、あるいは句読文字を定義しています。 * W0481::このマクロは、`@{@}' で囲まれたブロックを定義しています。 * W0482::このマクロは、いずれかの型指定子を定義しています。 * W0483::このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 * W0488::関数呼び出し `()'、配列添字演算 `[]'、あるいは構造体/共用体メンバ演算 `->' または `.' が、&& あるいは || と共に使われています。`()' で結合を明確にすることを勧めます。 * W0489::単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 * W0490::二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 * W0491::同じ識別子名 `%s' は他の名前空間内の宣言でも使われています。 * W0492::同じ識別子名 `%s' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。 * W0493::構造体あるいは共用体の値を関数の実引数として渡しています。 * W0495::演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 * W0496::三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 * W0497::シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 * W0498::二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 * W0499::+ - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 * W0500::二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 * W0501::三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 * W0502::+ - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 * W0508::`&&' あるいは `||' 演算子の右オペランドに副作用があります。 * W0511::C++ コメント `//' が使われています。 * W0512::`++' あるいは `--' 演算子の結果が式の中で使われています。 * W0525::1 ビットの名前が付いたフィールドが符号付き型として宣言されています。 * W0528::このマクロは、8 進数定数を定義しています。 * W0529::8 進数リテラルが使われています。 * W0530::文字定数または文字列リテラルの中で、8 進拡張表記が使われています。 * W0532::switch 文の case 節、default 節から出るために break 文が使われていますが、case 節の末尾に記述されていません。 * W0534::制御変数 `%s' は、この for 文制御式で初期化されていません。 * W0535::for 文の制御式の中にカンマ演算子が使われています。 * W0538::この default ラベルは、switch 文内の最後のラベルではありません。 * W0540::空の仮引数並びの関数が定義されています。`void' が省略されています。 * W0541::マクロで隠蔽されないインラインアセンブリコードです。 * W0542::関数宣言の仮引数の一部にのみ識別子が存在します。 * W0543::この関数宣言における仮引数の識別子は、以前の宣言の仮引数の識別子と異なります。 * W0544::関数宣言の仮引数の識別子と関数ポインタの宣言の仮引数の識別子が異なります。 * W0546::switch 文の case ラベルあるいは default ラベルが、ネストされたブロックの中に存在します。 * W0549::マクロの仮引数が `()' で囲まれていません。 * W0551::共用体型指定子が定義されています。 * W0552::共用体型のオブジェクトが定義されています。 * W0553::関数を指すポインタが、異なる関数ポインタ型へキャストされています。 * W0554::`#pragma' の実引数 `%s' は認識できません。この `#pragma' 指令は無視されました。 * W0555::この関数はプロジェクト中で間接的に再帰呼び出しされています。 * W0556::この呼び出しを含む関数は、再帰呼び出しされています。 * W0559::`!' 演算子のオペランドが算術演算あるいはビット演算の式になっています。 * W0560::`~' 演算子のオペランドがブール型式になっています。 * W0561::`*p++' の意味は、`(*p)++' ではなく、`*(p++)' です。`*' 演算子は冗長です。 * W0562::初期化子の中に余分な `@{@}' があります。 * W0563::このブロックの外側からラベル `%s' へジャンプした場合、ローカル変数は初期化されません。 * W0564::この goto 文がラベル `%s' へジャンプした場合、ローカル変数は初期化されません。 * W0565::汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。 * W0566::汎整数型を関数ポインタ型(またはその逆)へキャストしています。 * W0567::汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。 * W0568::符号付き定数式の値を左シフト演算した結果は、未定義になります。 * W0569::符号付きの式の値を左シフト演算した結果は、未定義になります。 * W0570::符号付きの式の値を左シフト演算した結果は、未定義になることがあります。 * W0571::符号付きデータの右シフト演算には、処理系によって論理シフトと算術シフトの両方の可能性があります。 * W0572::符号付きのデータに対するビット演算は処理系定義の結果になります。 * W0573::`[]' 内の走査セットの `-' 文字は、処理系定義になります。 * W0574::基本ソース文字集合に含まれない文字が、文字定数の中で使われています。 * W0575::基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。 * W0576::基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。 * W0577::基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。 * W0578::暗黙的に汎整数型 `%s' の複合式からより大きな型 `%s' に型変換されています。 * W0579::汎整数型 `%s' の複合式を、より大きな型 `%s' にキャストしています。 * W0580::ローカルな静的変数のアドレスが、より長い有効範囲を持つポインタに代入されています。 * W0581::実引数の個数か型が、この関数の以前の使用時と異なります。 * W0582::実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。 * W0583::実引数の個数か型が、この後で見つかる関数定義と異なります。 * W0584::%s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。 * W0585::制御変数 `%s' はインクリメント式に現れません。 * W0586::typedef`%s' が二つ以上の場所で宣言されています。 * W0589::オブジェクト `%s' は、定義されている翻訳単位の内の、関数 `%s' のみから参照されています。 * W0591::関数 `%s' は、定義されている翻訳単位の内でのみ参照されています。 * W0593::オブジェクト `%s' は、定義されている翻訳単位の中でのみ参照されています。 * W0597::副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。 * W0598::副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。 * W0599::副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。 * W0600::副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。 * W0605::繰り返し文を終了させる目的で、break 文が二つ以上使用されています。 * W0606::共用体に浮動小数点型のメンバがあります。 * W0607::値が負になる整数式が符号無し型に変換されています。 * W0608::値が負になることがありうる整数式が符号無し型に変換されています。 * W0609::この論理演算の結果は常に真になります。 * W0610::この論理演算の結果は常に偽になります。 * W0611::この繰り返し文の制御式の値は常に真です。 * W0612::この if 条件式の値は常に真です。 * W0613::この制御式の値は常に偽になります。 * W0614::この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。 * W0622::関数がブロックスコープ内で宣言されています。 * W0623::外部結合のオブジェクトが、ブロックスコープ内で宣言されています。 * W0624::#define あるいは #undef がブロックの中に存在します。 * W0625::外部結合の定義または宣言の中で `%s' が使われていますが、その typedef がヘッダファイルの中で宣言されていません。 * W0626::ワイド文字またはワイド文字列リテラルが使われています。 * W0627::一行に、空文(`;' だけの文)が、他のコードの後にあります。 * W0628::関数 `%s' が定義されていますが、このプロジェクトでは使われていません。 * W0629::static 関数 `%s()' は、この翻訳単位の中で使われていません。 * W0632::`#include <%s>' の中で ' や " 文字を使うと、未定義の動作になります。 * W0633::`#include "%s"' の中で ' 文字を使うと、未定義の動作になります。 * W0634::`#include' 行の中で `\' を使っています。パス区切り文字としては `/' を勧めます。 * W0635::%s 番目の変換指定子と、対応する実引数の型が合いません。 * W0636::%s 番目の変換指定子に対応する実引数が存在しません。 * W0637::関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。 * W0638::この関数呼び出しには、少なくとも一つの実引数が必要です。 * W0639::%s 番目の変換指定子と、対応する実引数の型が合いません。 * W0640::scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。 * W0641::浮動小数点数型をオブジェクトへのポインタ(あるいはその逆)へキャストしています。 * W0642::register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。 * W0643::このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。 * W0644::void 式の値を使用しようとしています。void 式は値をもちません。 * W0645::仮引数の型には、void 型を使うことができません。 * W0646::通常の文字列リテラルとワイド文字列リテラルが隣接しています。 * W0649::シフト演算子の右オペランドの値が負の定数です。結果は未定義になります。 * W0650::シフト演算子の右オペランドの値が左オペランドの型 `%s' で表されるビット数に対して大きすぎます。結果は未定義になります。 * W0653::配列、構造体あるいは共用体の初期値が `@{@}' で囲まれていません。 * W0654::構造体あるいは共用体の初期化子は、同じ構造体型あるいは共用体型の値でなければなりません。 * W0655::サイズが未定義のビットフィールド式です。 * W0656::%s 番目の変換指定子は、ISO C 標準規格でサポートされません。 * W0657::%s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 * W0658::%s 番目の変換指定子 `o' に無効なフラグが使われています。 * W0659::%s 番目の変換指定子 `u' に無効なフラグが使われています。 * W0660::%s 番目の変換指定子 `x' に無効なフラグが使われています。 * W0661::%s 番目の変換指定子 `X' に無効なフラグが使われています。 * W0662::%s 番目の変換指定子 `f' に無効なフラグが使われています。 * W0663::%s 番目の変換指定子 `e' に無効なフラグが使われています。 * W0664::%s 番目の変換指定子 `E' に無効なフラグが使われています。 * W0665::%s 番目の変換指定子 `g' に無効なフラグが使われています。 * W0666::%s 番目の変換指定子 `G' に無効なフラグが使われています。 * W0667::%s 番目の変換指定子 `c' に無効なフラグが使われています。 * W0668::%s 番目の変換指定子 `%' に無効なフラグが使われています。 * W0669::%s 番目の変換指定子 `s' に無効なフラグが使われています。 * W0670::%s 番目の変換指定子 `n' に無効なフラグが使われています。 * W0671::%s 番目の変換指定子 `p' に無効なフラグが使われています。 * W0672::%s 番目に無効な変換指定子が使われています。 * W0673::%s 番目の変換指定子は、ISO C 標準規格でサポートされません。 * W0674::%s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 * W0675::%s 番目の変換指定子 `o' に無効なフラグが使われています。 * W0676::%s 番目の変換指定子 `u' に無効なフラグが使われています。 * W0677::%s 番目の変換指定子 `x/X' に無効なフラグが使われています。 * W0678::%s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 * W0679::%s 番目の変換指定子 `s' に無効なフラグが使われています。 * W0680::%s 番目の変換指定子 `p' に無効なフラグが使われています。 * W0681::%s 番目の変換指定子 `%' に無効なフラグが使われています。 * W0682::%s 番目の変換指定子 `[' に無効なフラグが使われています。 * W0683::%s 番目の変換指定子 `c' に無効なフラグが使われています。 * W0684::%s 番目に無効な変換指定子が使われています。 * W0685::`[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 * W0686::走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 * W0687::defined 演算子を削除する目的で #undef を使っています。 * W0688::#line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。 * W0689::#line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。 * W0690::#line 指令の後に行番号が記述されていません。 * W0691::`##' 演算子の結果が有効な前処理字句ではありません。 * W0692::関数形式マクロ `%s' に実引数が与えられていません。 * W0693::関数形式マクロがその定義よりも少ない実引数で呼び出されています。 * W0694::`assert' という名称の関数を呼び出す目的で、assert マクロが抑制されています。未定義の結果になります。 * W0695::assert マクロを #undef してその名前の関数を呼び出しできるようにすると、未定義の結果になります。 * W0696::この `#if...' で使われているマクロ `%s' は定義されていません。 * W0697::戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。 * W0698::戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。 * W0699::関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。 * W0700::関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。 * W0703::タグ `%s' がより広い有効範囲をもつ同じ識別子の宣言を隠しています。 * W0704::この `%s' の宣言は、より広い有効範囲をもつ同じ識別子の宣言を隠しています。 * W0705::配列の添字が領域外を指すことがあります。 * W0707::配列の添字が領域外を指す定数です。 * W0708::for 文の制御変数 `%s' は繰り返し文本体の中で値を変えられています。 * W0711::関係演算子の右側のオペランドが実質的なブール型の式です。 * W0712::関係演算子の左側のオペランドが実質的なブール型の式です。 * W0713::関係演算子の両側のオペランドが実質的なブール型の式です。 * W0714::`&' 演算子の両側のオペランドが実質的なブール型の式です。 * W0715::`|' 演算子の両側のオペランドが実質的なブール型の式です。 * W0716::ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。 * W0717::ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。 * W0718::ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。 * W0719::シフト演算子の右オペランドが、潜在型 `%s' のビット幅以上の定数値です。 * W0720::浮動小数点型の値が変換先の型の範囲に入りきりません。 * W0721::この汎整数型は、ポインタの値を保持するのに十分な大きさをもちません。 * W0722::符号付きの式の値がオーバーフローしています。 * W0723::符号付きの式の値がオーバーフローする可能性があります。 * W0724::条件付きインクルード指令によって、認識できない前処理指令が無視されました。 * W0726::修飾子付き void 型の戻り値が定義された関数 `%s()' の中で、`return 式;' が見つかりました。 * W0727::列挙型にない値を使っています。 * W0728::列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。 * W0729::列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。 * W0730::列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。 * W0731::switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。 * W0732::`&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 * W0733::`||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 * W0734::論理演算子の左側のオペランドがビット演算の式あるいは算術式です。 * W0735::論理演算子の右側のオペランドがビット演算の式あるいは算術式です。 * W0736::ファイルスコープで宣言された静的変数 `%s' は 1 つの関数内でしか読み書きされていません。 * W0737::`enum %s' の内容が不明です。列挙体タグが内容を指定せずに宣言されています。 * W0738::正の整数定数の値がより小さな符号無し型への暗黙の型変換を行ったため、切り捨てられます。 * W0739::定数式における符号無し減算の結果が負になりました。 * W0740::定数式における符号無し加算の結果が最大値を超えました。 * W0741::定数式における符号無し乗算の結果が最大値を超えました。 * W0742::負の整数定数式が符号無し型に変換されています。 * W0743::整数定数式の値は、変換先の符号付きの結果の型で表現できる範囲を超えています。 * W0744::この制御式の値は偽になる定数のため、制御文本体は実行されません。 * W0745::配列の添字が、領域外を指しています。 * W0747::暗黙的に signed short 型から signed char 型に型変換されています。 * W0748::暗黙的に unsigned short 型から unsigned char 型に型変換されています。 * W0749::暗黙的に signed int 型から signed char 型に型変換されています。 * W0750::暗黙的に signed int 型から signed short 型に型変換されています。 * W0751::暗黙的に unsigned int 型から unsigned char 型に型変換されています。 * W0752::暗黙的に unsigned int 型から unsigned short 型に型変換されています。 * W0753::暗黙的に signed long 型から signed char 型に型変換されています。 * W0754::暗黙的に signed long 型から signed short 型に型変換されています。 * W0755::暗黙的に signed long 型から signed int 型に型変換されています。 * W0756::暗黙的に unsigned long 型から unsigned char 型に型変換されています。 * W0757::暗黙的に unsigned long 型から unsigned short 型に型変換されています。 * W0758::暗黙的に unsigned long 型から unsigned int 型に型変換されています。 * W0759::暗黙的に signed long long 型から signed char 型に型変換されています。 * W0760::暗黙的に signed long long 型から signed short 型に型変換されています。 * W0761::暗黙的に signed long long 型から signed int 型に型変換されています。 * W0762::暗黙的に signed long long 型から signed long 型に型変換されています。 * W0763::暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 * W0764::暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 * W0765::暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 * W0766::暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 * W0767::暗黙的に double 型から float 型に型変換されています。 * W0768::暗黙的に long double 型から float 型に型変換されています。 * W0769::暗黙的に long double 型から double 型に型変換されています。 * W0770::外部結合をもつ識別子 `%s' の宣言が、二つ以上存在しています。 * W0771::グローバルな識別子 `%s' が、二つ以上のファイルで宣言されています。 * W0774::double 型の値が関数 `float %s()' から返されています。 * W0775::long double 型の値が関数 `float %s()' から返されています。 * W0776::long double 型の値が関数 `double %s()' から返されています。 * W0777::暗黙的に float 型の複合式から double 型に型変換されています。 * W0778::暗黙的に float 型の複合式から long double 型に型変換されています。 * W0779::暗黙的に double 型の複合式から long double 型に型変換されています。 * W0780::定数式における符号無し左シフト演算 `<<' は、非ゼロの上位ビットを切り詰めます。 * W0781::この switch 文にはパスが 1 つしかありません。この switch 文は冗長です。 * W0783::不完全型を指すポインタを含むキャストが行われています。このプログラムは移植性がありません。 * W0784::非標準の拡張表記が使われています。 * W0785::このタグ `%s' の宣言は、以前の宣言と異なります。 * W0786::int、signed int、あるいは unsigned int 以外の型をもつビットフィールドは、ISO C 標準規格ではサポートされません。 * W0787::`%s' の型が、以前の異なるスコープで宣言された型と異なります。 * W0788::`%s' の型が、以前の同じスコープ内で宣言された型と異なります。 * W0789::`%s' の型が、以前のより広いスコープで宣言された型と異なります。 * W0790::グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。 * W0791::グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。 * W0792::浮動小数点数型を関数ポインタ(あるいはその逆)へキャストしています。 * W0793::関数ポインタをオブジェクトを指すポインタ(あるいはその逆)へキャストしています。 * W0794::符号付きのオペランドを左シフト演算しています。 * W0795::関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。 * W0796::関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。 * W0797::関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。 * W0798::不完全な共用体オブジェクトの値を使ってはいけません。 * W0799::不完全な構造体オブジェクトの値を使ってはいけません。 * W0800::`%s' は結合をもたない不完全型です。これは未定義です。 * W0801::この構造体あるいは共用体には名前付きのメンバがありません。 * W0802::`#include' 前処理指令の後が、<ファイル名> あるいは " ファイル名 " 形式のどちらでもありません。 * W0803::関数形式マクロの実引数の中に、前処理指令が記述されています。 * W0804::defined 構文が、`defined(識別子)' あるいは `defined 識別子' のどちらでもありません。 * W0805::`defined' に、実引数となる識別子がありません。 * W0806::`defined' という名称のマクロを定義しようとしています。 * W0807::事前定義のマクロ名 `%s' を削除しようとしています。 * W0808::事前定義のマクロ名 `%s' を再定義しようとしています。 * W0809::識別子 `%s' はライブラリで予約済みです。 * W0810::この `if-if-else' 文の構造をより明確にするためには `@{@}' が必要です。 * W0811::このマクロの展開結果の、`defined' トークンは、許容されません。 * W0827::ネストされた構造体の初期値の各要素が `@{@}' で囲まれていません。 * W0828::ネストされた配列の初期値の各要素が `@{@}' で囲まれていません。 * W0830::列挙子並びの末尾にカンマ `,' があります。 * W0831::これはインラインアセンブリ用の言語拡張です。#asm と #endasm の間は無視します。 * W0832::インラインアセンブリ構文を使っています。これは言語拡張です。このコードは無視します。 * W0833::接尾語 LL を使っています。 * W0834::long long 型を使っています。 * W0835::可変引数を受け取るマクロが定義されています。 * W0947::文字列リテラルが直接使われています。 * W0948::文字定数 %s が直接使われています。 * W0949::ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。 * W0950::配列のサイズ定義に、数値 `%s' が直接使われています。 * W1026::%s 番目の実引数がオブジェクト型ではありません。 * W1027::配列の基本型が関数型です。これは意味がありません。 * W1028::配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。 * W1029::配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。 * W1030::ラベル `%s' がこの関数の中で二回以上使われています。 * W1031::オブジェクト `%s' は、外部結合と内部結合の両方で宣言されています。その動作は未定義です。 * W1032::内部結合をもつ変数 '%s' の仮定義は、不完全型ではいけません。 * W1033::関数の戻り値の型に volatile あるいは const 修飾子を使っています。その動作は未定義です。 * W1034::ブロックスコープで、関数 `%s()' に static 記憶域クラス指定子を使って宣言されています。この用法は意味がありません。 * W1035::`%s' は typedef として宣言されています。明示的な型指定子を使わずに、より内側のスコープで再宣言することはできません。 * W1036::`%s' は typedef として宣言されています。明示的な型指定子を使わずに、構造体または共用体のメンバとして再宣言することはできません。 * W1037::外部結合をもつ `%s' が、二つ以上宣言されていますが互換性がありません。 * W1039::%s 番目の変換指定子に `ll' が使われています。 * W1040::前処理指令の後に認識できない文字列が記述されています。 * W1041::`%s' は、ISO C 標準規格の正式な前処理指令ではありません。 * W1042::前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。 * W1043::`@@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。 * W1045::この `@@ word' 構文は無視されます。 * W1046::`\' と改行の間にある空白文字類が無視されています。 * W1047::構造体、共用体、あるいは配列の初期化子がリテラルではありません。 * W1048::マルチバイト文字リテラルは処理系定義の値になります。 * W1049::この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 * W1050::この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 * W1051::符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。 * W1052::符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。 * W1053::仮引数が列挙型である関数の実引数に数値定数が渡されています。 * W1054::列挙型に、列挙型ではない式が代入されています。 * W1055::戻り値が列挙型の関数から、列挙型ではない式が返されています。 * W1056::仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 * W1057::列挙型に、異なる列挙型のオブジェクトが代入されています。 * W1058::戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 * W1059::仮引数が列挙型でない関数の実引数に列挙型が渡されています。 * W1060::戻り値が列挙型でない関数から、列挙型が返されています。 * W1061::仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 * W1062::異なる型の非定数式の値が列挙型オブジェクトに代入されています。 * W1063::戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 * W1064::列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 * W1065::列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 * W1066::明示的に float 型の複合式の値を double 型に変換しています。 * W1067::明示的に float 型の複合式の値を long double 型に変換しています。 * W1068::明示的に double 型の複合式の値を long double 型に変換しています。 * W1069::この `if-else-if' 文には、末尾の `else' 節がありません。 * W1070::この `switch' 文には実行経路が 2 つしか無いため、`if-else' 文に変換可能です。 * W1071::関数 `%s' には複数の終了点があります。 * W1072::`goto' 文を使用しています。 * W1073::関数 `%s' の戻り値を破棄しています。 * W1074::`sizeof' 演算子のオペランドは実行されないため、副作用が発生しません。 * W1075::`%s' は以前に内部結合として宣言されていますが、この宣言には `static' がありません。 * W1076::関数 `%s' は内部結合を持ちますが、事前に内部結合として宣言していません。 * W1077::サイズが省略された配列を宣言しています。 * W9001::この文には制御が到達しません。 * W9002::ファイルの末尾に改行文字がありません。 * W9003::暗黙的に `%s' 型のオブジェクトが `%s' 型のオブジェクトに変換されています。 * C0001::この識別名 `%s' で警告を検知しました。 * C1000::次の実行パスで警告を検知しました。 * C1001::この制御式を真として評価しました。 * C1002::この制御式を偽として評価しました。 * C1003::ここで該当変数が初期値を指定せずに定義されています。 * C1004::ここで該当変数に NULL の値を割り当てました。 * C1005::ここで該当変数に NULL の可能性がある値を割り当てました。 * C1006::ここで該当変数に値を割り当てました。 @end menu @node X0001 @section X0001 @cindex X0001 @subsection メッセージ本文 不明な例外条件 `%s' を検出しました。 @subsection 内容 AdLint 内部でエラーが発生したことを示します。 このメッセージが出力された場合、該当ソースファイル、@ref{Traits, 特性ファイル} 、@ref{Message File, メッセージファイル}、ログファイルとともに AdLint 開発チー ムへご報告いただければ、AdLint の品質向上につなげることができます。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node X0002 @section X0002 @cindex X0002 @subsection メッセージ本文 不正なメッセージ ID `%s' を検出しました。 @subsection 内容 AdLint が内部で使用するメッセージカタログファイルが壊れている可能性があります。 AdLint を再インストールしても問題が解決されない場合は、AdLint 開発チームへご報 告ください。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node X0003 @section X0003 @cindex X0003 @subsection メッセージ本文 回復不能なエラーにより解析処理を中断しました。詳細は `%s' 及び `%s' を確認して下さい。 @subsection 内容 ヘッダファイルが見つからない、ソースファイルの構文解析ができないなど、AdLint が 解析を続行できないエラーを検知した場合に出力されます。 この問題の多くは、@ref{Traits, 特性ファイル}の内容を見直すことで解決できます。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node X0004 @section X0004 @cindex X0004 @subsection メッセージ本文 不正なメッセージフォーマット `%s' を検出しました。 @subsection 内容 AdLint が内部で使用するメッセージカタログファイルが壊れている可能性があります。 AdLint を再インストールしても問題が解決されない場合は、AdLint 開発チームへご報 告ください。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node E0004 @section E0004 @cindex E0004 @subsection メッセージ本文 対応する @code{#endif} 行がありません。 @subsection 内容 @code{#if}、@code{#ifdef}、@code{#ifndef} ディレクティブに対応する @code{#endif} ディレクティブが見つからない場合に出力されます。 @subsection サンプルコード @verbatim #if DEBUG int i = 0; #else int i = 1; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node E0007 @section E0007 @cindex E0007 @subsection メッセージ本文 条件式中のトークン `%s' で構文エラーを検出しました。条件式を偽として評価します。 @subsection 内容 @code{#if}、@code{#elif} ディレクティブの条件式を評価中に構文エラーを検知した場 合に出力します。 このメッセージが出力された場合、該当する条件式は偽として評価されます。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node E0008 @section E0008 @cindex E0008 @subsection メッセージ本文 トークン `%s' で構文エラーを検知しました。 @subsection 内容 このメッセージはプリプロセス後のソースファイルを構文解析できない場合に出力され ます。 ビルドに使用するコンパイラ独自の拡張機能を使用している場合は、 @ref{Traits, 特性ファイル}で該当するトークン列を削除するように指定すれば解決で きます。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node E0009 @section E0009 @cindex E0009 @subsection メッセージ本文 ヘッダファイル <%s> が見つかりません。 @subsection 内容 @code{#include <...>} ディレクティブでヘッダファイルをインクルードしていますが 、@ref{Traits, 特性ファイル}で指定したインクルードパス中に該当するヘッダファイ ルが存在しない場合に出力されます。 @ref{Traits, 特性ファイル}のインクルードパス設定を見直すことで解決できます。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node E0010 @section E0010 @cindex E0010 @subsection メッセージ本文 ヘッダファイル "%s" が見つかりません。 @subsection 内容 @code{#include "..."} ディレクティブでヘッダファイルをインクルードしていますが 、@ref{Traits, 特性ファイル}で指定したインクルードパス中に該当するヘッダファイ ルが存在しない場合に出力されます。 @ref{Traits, 特性ファイル}のインクルードパス設定を見直すことで解決できます。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node E0013 @section E0013 @cindex E0013 @subsection メッセージ本文 式に文を含めることはできません。 @subsection 内容 式の中に文を記述する GCC 拡張機能 (Statement Exprs) を使用した場合に出力されます 。 @subsection サンプルコード @verbatim #define maxint(a, b) ({int _a = (a), _b = (b); _a > _b ? _a : _b; }) int i = maxint(1, 2); /* E0013 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node E0014 @section E0014 @cindex E0014 @subsection メッセージ本文 ラベルのアドレスを取得するための && 単項演算子は GCC 独自の拡張機能です。 @subsection 内容 ラベルを値として使用する GCC 拡張機能 (Labels as Values) を使用した場合に出力され ます。 @subsection サンプルコード @verbatim void *label_ptr = &&foo; /* E0014 */ goto *label_ptr; /* E0015 */ foo:; @end verbatim @subsection 関連メッセージ @itemize @item @ref{E0015} ラベルのアドレスを指定した goto 文は GCC 独自の拡張機能です。 @end itemize @subsection 対応バージョン 1.0.0 @node E0015 @section E0015 @cindex E0015 @subsection メッセージ本文 ラベルのアドレスを指定した goto 文は GCC 独自の拡張機能です。 @subsection 内容 ラベルを値として使用する GCC 拡張機能 (Labels as Values) を使用した場合に出力され ます。 @subsection サンプルコード @verbatim void *label_ptr = &&foo; /* E0014 */ goto *label_ptr; /* E0015 */ foo:; @end verbatim @subsection 関連メッセージ @itemize @item @ref{E0014} ラベルのアドレスを取得するための && 単項演算子は GCC 独自の拡張機能です。 @end itemize @subsection 対応バージョン 1.0.0 @node E0016 @section E0016 @cindex E0016 @subsection メッセージ本文 終了しないコメントブロックが見つかりました。 @subsection 内容 @code{/*} で開始するブロックコメントが @code{*/} で終了されない状態で、翻訳単位 の末尾に到達した場合に出力されます。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0001 @section W0001 @cindex W0001 @subsection メッセージ本文 括弧 `()' のネストの深さが 32 を超えています。このプログラムは、ISO C90 標準規格に厳密に合致していません。 @subsection 内容 括弧の入れ子レベルは最大 32 までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。 @subsection サンプルコード @verbatim int a = 10; int b = 20; int c = (((((((((((((((((((((((((((((((((a + b))))))))))))))))))))))))))))))))); /* W0001 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0002 @section W0002 @cindex W0002 @subsection メッセージ本文 関数 `%s()' の定義において、識別子と仮引数宣言を分けて記述するのは、古いスタイルです。 @subsection 内容 非 ANSI の関数定義は、いまや多くのエンジニアにとって馴染みがないものといえます。そのようなエンジニアにとって、解析性が低くなります。 @subsection サンプルコード @verbatim /* function definition in K&R style */ int func(arg) /* W0002 */ char arg; { return 0; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0003 @section W0003 @cindex W0003 @subsection メッセージ本文 この switch 文には default ラベルが含まれていません。 @subsection 内容 @code{default} 条件を持たない @code{switch} 文では、@code{case} ラベルの条件に該当しない場合に何も処理が行われないことになり、多くの場合、プログラマの意図しない動作になります。 @subsection サンプルコード @verbatim int foo(int i) { int j; switch(i) { /* W0003 */ case 1: j = 1; break; case 2: j = 2; break; case 3: j = 3; break; } return j; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0007 @section W0007 @cindex W0007 @subsection メッセージ本文 直前の case 節あるいは default 節の末尾に、break 文または return 文がありません。 @subsection 内容 @code{case} ラベルでは @code{break} 文や @code{return} 文を書かない限り、次の @code{case} ラベルへフォールスルーすることになりますが、 このようなフォールスルーは気づきにくいという点でコードの保守性を低下させます。 @subsection サンプルコード @verbatim int value; int number; switch (number) { case 1: value = 1; break; case 2: value = 2; case 3: /* W0007 */ value = 3; break; default: value = 0; break; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0010 @section W0010 @cindex W0010 @subsection メッセージ本文 この三項演算子(条件演算子)のオペランドに副作用があります。 @subsection 内容 副作用を生じる条件演算子を使用すると、条件によって副作用の内容が変わり、コードが複雑になります。 @subsection サンプルコード @verbatim x = (a > 0) ? b++ : b--; /* W0010 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0013 @section W0013 @cindex W0013 @subsection メッセージ本文 繰り返し文の中で、continue 文が使用されています。 @subsection 内容 @code{continue} 文はしばしば、構造化定理(「順次」「反復」「分岐」)に基づいたコードの構造を壊してしまいます。影響はループ文の中に限定されるため、 @code{goto} 文ほど大きなネガティブインパクトはありませんが、利用の際は注意が必要です。 @subsection サンプルコード @verbatim static void foo(void) { int i; int j; i++; for (i = 1, j = 0; i < 20; i++) { j += 2; if ((j % i) == 3) { continue; /* W0013 */ } } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0016 @section W0016 @cindex W0016 @subsection メッセージ本文 変換指定子のフィールド幅が 509 文字を超えています。 @subsection 内容 @code{printf()} 関数における変換指定子のフィールド幅は最大 509 文字までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。 @subsection サンプルコード @verbatim printf("%510d\n", a); /* W0016 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0017} 変換指定子のフィールド幅が 509 文字を超えています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0017 @section W0017 @cindex W0017 @subsection メッセージ本文 変換指定子のフィールド幅が 509 文字を超えています。 @subsection 内容 @code{scanf()} 関数における変換指定子のフィールド幅は最大 509 文字までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。 @subsection サンプルコード @verbatim scanf("%510d", &a); /* W0017 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0016} 変換指定子のフィールド幅が 509 文字を超えています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0018 @section W0018 @cindex W0018 @subsection メッセージ本文 変換指定子の精度幅が 509 文字を超えています。 @subsection 内容 変換指定子の精度幅は最大 509 文字までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。 @subsection サンプルコード @verbatim printf("%.510f\n", a); /* W0018 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0019 @section W0019 @cindex W0019 @subsection メッセージ本文 このポインタキャストは、const 修飾を削除しているので危険です。 @subsection 内容 @code{const} 修飾された変数は値が変更されないことを前提として使用されます。 そのような変数に @code{const} が失われるキャストが実行されると前提が崩れてしまい、意図しない結果を引き起こす可能性があります。 @subsection サンプルコード @verbatim int *pa; const int *pb; pa = (int *) pb; /* W0019 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0021 @section W0021 @cindex W0021 @subsection メッセージ本文 このポインタキャストは、volatile 修飾を削除しているので危険です。 @subsection 内容 @code{volatile} 修飾された変数は最適化の対象外にしたいという意図が含まれています。 そのような変数に @code{volatile} が失われるキャストが実行されると意図に反して最適化が行われてしまい、 意図しない結果を引き起こす可能性があります。 @subsection サンプルコード @verbatim int *pa; volatile int *pb; pa = (int *) pb; /* W0021 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0023 @section W0023 @cindex W0023 @subsection メッセージ本文 ポインタ型の変数に対して算術演算が行われています。 @subsection 内容 ポインタ演算により意図しないアドレスを使用する可能性が高くなります。 @subsection サンプルコード @verbatim int *p; int *q; long r = p + r; /* W0023 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0024} ポインタ型の変数に対してインクリメントまたはデクリメントが行われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0024 @section W0024 @cindex W0024 @subsection メッセージ本文 ポインタ型の変数に対してインクリメントまたはデクリメントが行われています。 @subsection 内容 ポインタ演算により意図しないアドレスを使用する可能性が高くなります。 @subsection サンプルコード @verbatim int *p; p++; /* W0024 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0023} ポインタ型の変数に対して算術演算が行われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0025 @section W0025 @cindex W0025 @subsection メッセージ本文 `%s' は、既にこのファイルから直接インクルードされています。 @subsection 内容 重複したインクルードは意味のない記述です。意味のない不要な記述がコード中にあることで解析性が低下します。 @subsection サンプルコード @verbatim #include "test.h" #include "test2.h" #include "test.h" /* W0025 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0026} `%s' は、既にこのファイルから間接的にインクルードされています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0026 @section W0026 @cindex W0026 @subsection メッセージ本文 `%s' は、既にこのファイルから間接的にインクルードされています。 @subsection 内容 重複したインクルードは意味のない記述です。意味のない不要な記述がコード中にあることで解析性が低下します。 @subsection サンプルコード @file{test.h} @verbatim #include "test2.h" @end verbatim @file{test.c} @verbatim #include "test.h" #include "test2.h" /* W0026 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0025} `%s' は、既にこのファイルから直接インクルードされています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0027 @section W0027 @cindex W0027 @subsection メッセージ本文 ポインタ型の変数に対して比較演算が行われています。 @subsection 内容 比較演算子を用いて異なる配列のポインタや異なる構造体のポインタと比較する動作は ISO C90 で未定義のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int *p; int *q; if (p < q) { /* W0027 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0028 @section W0028 @cindex W0028 @subsection メッセージ本文 NULL ポインタに対して間接参照が行われています。 @subsection 内容 @code{NULL} ポインタが指す値を間接参照する動作は ISO C90 で未定義のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int i = *(int *) NULL; /* W0028 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0030 @section W0030 @cindex W0030 @subsection メッセージ本文 NULL ポインタに対して算術演算が行われています。 @subsection 内容 @code{NULL} ポインタに対する算術演算は ISO C90 で未定義のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int *p; p = (int *) NULL + 1; /* W0030 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0031 @section W0031 @cindex W0031 @subsection メッセージ本文 仮引数 `%s' は、この関数の中で使われていません。 @subsection 内容 未使用の実引数は資源を無駄に使用するという点で効率性を低下させます。またコード中に無駄な要素があることで解析性が低下します。 @subsection サンプルコード @verbatim int func(int num) /* W0031 */ { return 0; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0033 @section W0033 @cindex W0033 @subsection メッセージ本文 ラベル `%s:' は、この関数の中で使われていないため、削除することができます。 @subsection 内容 使用されないラベルは無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。 @subsection サンプルコード @verbatim void func(void) { int num = 0; for (int i =0; i < 10; i++) { num++; } ERROR: /* W0033 */ num = 0; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0035 @section W0035 @cindex W0035 @subsection メッセージ本文 `&&' または `||' の右のオペランドは、算術型またはポインタ型でなければなりません。 @subsection 内容 ISO C90 では @code{&&} や @code{||} の右辺はスカラ型でなければならないとされています。 従って構造体型にした場合の動作は未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim struct STR { int x; int y; }; extern struct STR str; void func(void) { int x; int y; x = y && str; /* W0035 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0036 @section W0036 @cindex W0036 @subsection メッセージ本文 宣言子の中の修飾子の数が 12 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では宣言子の修飾子数の制限を 12 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim int num[1][2][3][4][5][6][7][8][9][10][11][12][13]; /* W0036 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0037 @section W0037 @cindex W0037 @subsection メッセージ本文 構造体または共用体のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では構造体や共用体のネスト数の制限を 15 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim struct st1 { struct st2 { struct st3 { struct st4 { struct st5 { struct st6 { struct st7 { struct st8 { struct st9 { struct st10 { struct st11 { struct st12 { struct st13 { struct st14 { struct st15 { struct st16 { /* W0037 */ int i; } st16; } st15; } st14; } st13; } st12; } st11; } st10; } st9; } st8; } st7; } st6; } st5; } st5; } st3; } st2; }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0038 @section W0038 @cindex W0038 @subsection メッセージ本文 オブジェクト `%s' のサイズが 32767 バイトを超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 ではオブジェクトのサイズ制限を 32767 バイトと定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim int num[100][330]; /* W0038 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0039 @section W0039 @cindex W0039 @subsection メッセージ本文 ブロックの中のローカルな識別子の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 ではブロックスコープ識別子を持つブロック数の制限を 127 個と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim void func(void) { int num1, num2, num3, num4, num5, num6, num7, num8, num9, num10; int num11, num12, num13, num14, num15, num16, num17, num18, num19, num20; ...snip... int num111, num112, num113, num114, num115, num116, num117, num118, num119, num120; int num121, num122, num123, num124, num125, num126, num127, num128; /* W0039 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0040 @section W0040 @cindex W0040 @subsection メッセージ本文 ビットフィールドが signed または unsigned 付きで宣言されていません。 @subsection 内容 単なる @code{int} 型でビットフィールドを定義した場合、@code{signed int} になるか @code{unsigned int} になるかは処理系依存になります。 従って、プログラマが意図しない型になる可能性があります。 @subsection サンプルコード @verbatim struct STR { /* W0040 */ int a:5; }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0041 @section W0041 @cindex W0041 @subsection メッセージ本文 構造体または共用体のメンバの数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では構造体や共用体のメンバ数の制限を 127 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim struct STR { int num1; int num2; int num3; int num4; int num5; ...snip... int num125; int num126; int num127; int num128; /* W0041 */ }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0042 @section W0042 @cindex W0042 @subsection メッセージ本文 列挙定数の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では列挙定数の制限を 127 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim enum ENM { e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...snip... e111, e112, e113, e114, e115, e116, e117, e118, e119, e120, e121, e122, e123, e124, e125, e126, e127, e128 /* W0042 */ }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0043 @section W0043 @cindex W0043 @subsection メッセージ本文 配列の初期値が、宣言された配列のサイズに足りません。残りの配列要素はゼロで初期化されます。 @subsection 内容 初期化子が不足する場合は 0 で初期化されますが、意図したものか、そうでないかが分かりづらくなります。 初期化子を指定する場合には、要素数と初期値の数を一致させることが望ましいです。 @subsection サンプルコード @verbatim int array[5] = { 1, 2, 3 }; /* W0043 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0049 @section W0049 @cindex W0049 @subsection メッセージ本文 制御構造のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では制御構造のネスト数の制限を 15 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if (x > 0) { if(x > 0) { /* W0049 */ ; } } } } } } } } } } } } } } } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0050 @section W0050 @cindex W0050 @subsection メッセージ本文 case ラベルの数が 257 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では @code{case} ラベルの制限を 257 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim switch (num) { case 1: break; case 2: break; case 3: break; ...snip... case 257: break; case 258: /* W0050 */ break; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0051 @section W0051 @cindex W0051 @subsection メッセージ本文 外部識別子 `%s' が他の識別子名と、リンカ特性で指定された文字数の範囲内で区別できません。 @subsection 内容 処理系で決められている文字数の制限を超えた場合の動作は未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern int very_long_long_long_ ...snip... _long_external_symbol; /* W0051 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{C0001} この識別名 `%s' で警告を検知しました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0052 @section W0052 @cindex W0052 @subsection メッセージ本文 識別子名 `%s' が他の識別子名と、コンパイラ特性で指定された文字数の範囲内で区別できません。 @subsection 内容 処理系で決められている文字数の制限(原則 31 文字)を超えた場合の動作は未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int very_long_long_long_long_long_ ...snip... _long_symbol; /* W0052 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C0001} この識別名 `%s' で警告を検知しました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0053 @section W0053 @cindex W0053 @subsection メッセージ本文 `#include "%s"' のネストが 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では @code{include} の入れ子レベルの制限を 8 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @file{test.c} @verbatim #include "test1.h" @end verbatim @file{test1.h} @verbatim #include "test2.h" @end verbatim @file{test2.h} @verbatim #include "test3.h" @end verbatim @file{test3.h} @verbatim #include "test4.h" @end verbatim @file{test4.h} @verbatim #include "test5.h" @end verbatim @file{test5.h} @verbatim #include "test6.h" @end verbatim @file{test6.h} @verbatim #include "test7.h" @end verbatim @file{test7.h} @verbatim #include "test8.h" @end verbatim @file{test8.h} @verbatim #include "test9.h" @end verbatim @file{test9.h} @verbatim #include "test10.h" /* W0053 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0054 @section W0054 @cindex W0054 @subsection メッセージ本文 `#if...' のネストの最大値が 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では @code{#if} の入れ子レベルの制限を 8 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim #if N > 1 #if N > 2 #if N > 3 #if N > 4 #if N > 5 #if N > 6 #if N > 7 #if N > 8 /* W0054 */ #endif #endif #endif #endif #endif #endif #endif #endif @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0055 @section W0055 @cindex W0055 @subsection メッセージ本文 マクロ定義の数が 1024 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では一つの翻訳単位中で定義できるマクロの制限を 1024 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim #define MACRO_1 #define MACRO_2 #define MACRO_3 ...snip... #define MACRO_1023 #define MACRO_1024 #define MACRO_1025 /* W0055 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0056 @section W0056 @cindex W0056 @subsection メッセージ本文 関数形式マクロの仮引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 ではマクロ引数数の制限を 31 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim #define MACRO(a1, a2, a3, ...snip... a30, a31, a32) /* W0056 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0057 @section W0057 @cindex W0057 @subsection メッセージ本文 関数形式マクロの呼び出しの実引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 ではマクロ呼び出しの引数数の制限を 31 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim int i = MACRO(1, 2, 3 ...snip... 30, 31, 32); /* W0057 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0058 @section W0058 @cindex W0058 @subsection メッセージ本文 文字列リテラルの文字数が 509 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。 @subsection 内容 ISO C90 では文字列リテラルの文字数の制限を 509 と定めています。この制限を超えると移植性が低下します。 @subsection サンプルコード @verbatim char buf[] = "very long long long ...snip... long string literal"; /* W0058 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0059 @section W0059 @cindex W0059 @subsection メッセージ本文 このファイルの行末に Ctrl-M(^M) 制御文字が見つかりました。 @subsection 内容 PC で作成したソースには機種依存の制御コードが使用されることがあります。 このような制御コードを無視せず、意図しない処理をする処理系が存在する可能性があります。 従ってこのような機種依存の記述は移植性を低下させます。 @subsection サンプルコード なし。 @subsection 関連メッセージ @itemize @item @ref{W0060} このファイル内に Ctrl-Z(^Z) 制御文字が見つかりました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0060 @section W0060 @cindex W0060 @subsection メッセージ本文 このファイル内に Ctrl-Z(^Z) 制御文字が見つかりました。 @subsection 内容 PC で作成したソースには機種依存の制御コードが使用されることがあります。 このような制御コードを無視せず、意図しない処理をしてしまう処理系が存在する可能性があります。 従ってこのような機種依存の記述は移植性を低下させます。 @subsection サンプルコード なし。 @subsection 関連メッセージ @itemize @item @ref{W0059} このファイルの行末に Ctrl-M(^M) 制御文字が見つかりました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0061 @section W0061 @cindex W0061 @subsection メッセージ本文 `%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。 @subsection 内容 ある特定のコンパイラで定義されている言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim extern int func(void) __attribute__ ((__const__)); /* W0061 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0062} `__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @item @ref{W0063} `__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @end itemize @subsection 対応バージョン 1.0.0 @node W0062 @section W0062 @cindex W0062 @subsection メッセージ本文 `__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @subsection 内容 ある特定のコンパイラで定義されている言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim #define DEF_FUNPTR(func) __typeof__(func) *ptr_##func = 0 DEF_FUNPTR(main); /* W0062 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0061} `%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。 @item @ref{W0063} `__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @end itemize @subsection 対応バージョン 1.0.0 @node W0063 @section W0063 @cindex W0063 @subsection メッセージ本文 `__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @subsection 内容 ある特定のコンパイラで定義されている言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim int a = __alignof__(struct sockaddr *) /* W0063 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0061} `%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。 @item @ref{W0062} `__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @end itemize @subsection 対応バージョン 1.0.0 @node W0064 @section W0064 @cindex W0064 @subsection メッセージ本文 2 進数整数リテラルが使われています。これは言語拡張です。 @subsection 内容 2 進数定数が認められている場合、それは言語拡張と考えられます。言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim unsigned char c = 0b00000001; /* W0064 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0065 @section W0065 @cindex W0065 @subsection メッセージ本文 代入演算子の左オペランドをキャストしてはなりません。 @subsection 内容 左オペランドに対するキャストが認められている場合、それは言語拡張と考えられます。 言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim void func(int num) { (unsigned short) num = 100U; /* W0065 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0066 @section W0066 @cindex W0066 @subsection メッセージ本文 `main()' 関数は、`int (void)' または `int (int, char *[])' のどちらかでなければなりません。 @subsection 内容 @code{int main(void)} または @code{int main(int, char*[])} 以外の形式の @code{main} 関数の定義が認められている場合、それは言語拡張と考えられます。 @subsection サンプルコード @verbatim void main(void) {} /* W0066 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0067 @section W0067 @cindex W0067 @subsection メッセージ本文 ネストされた構造体のメンバに直接アクセスしています。これは言語拡張です。 @subsection 内容 入れ子の構造体への直接アクセスや特定ビットへの直接アクセスが認められている場合、 それは言語拡張と考えられます。言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim struct BBB { int mb; struct AAA { int ma; }; } bbb; bbb.ma = 1; /* W0067 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0068} ビットにアクセスするために `.' を使っています。これは言語拡張です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0068 @section W0068 @cindex W0068 @subsection メッセージ本文 ビットにアクセスするために `.' を使っています。これは言語拡張です。 @subsection 内容 入れ子の構造体への直接アクセスや特定ビットへの直接アクセスが認められている場合、 それは言語拡張と考えられます。言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim unsigned short a; a.2 = 0; /* W0068 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0067} ネストされた構造体のメンバに直接アクセスしています。これは言語拡張です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0069 @section W0069 @cindex W0069 @subsection メッセージ本文 `/*' で始まるコメントの中に `/*' が見つかりました。ネストされたコメントは、ISO C 標準規格では認められていません。 @subsection 内容 @code{/*} コメントの入れ子は ISO C90 では認められていません。 入れ子によって即問題に直結するわけではありませんが、 内側のコメントの終端 @code{*/} によって外側のコメントが終了してしまうことで 予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim /* /* W0069 */ */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0070 @section W0070 @cindex W0070 @subsection メッセージ本文 インクルードされている <%s> の内容は翻訳単位の中で全く参照されていません。削除することができます。 @subsection 内容 参照しないヘッダファイルをインクルードすることは無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。 @subsection サンプルコード なし。 @subsection 関連メッセージ @itemize @item @ref{W0071} インクルードされている "%s" の内容は翻訳単位の中で全く参照されていません。削除することができます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0071 @section W0071 @cindex W0071 @subsection メッセージ本文 インクルードされている "%s" の内容は翻訳単位の中で全く参照されていません。削除することができます。 @subsection 内容 参照しないヘッダファイルをインクルードすることは無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。 @subsection サンプルコード なし。 @subsection 関連メッセージ @itemize @item @ref{W0070} インクルードされている <%s> の内容は翻訳単位の中で全く参照されていません。削除することができます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0072 @section W0072 @cindex W0072 @subsection メッセージ本文 基本ソース文字集合に含まれない文字が、ヘッダファイル名で使われています。 @subsection 内容 ISO C90 では処理できる最小限の文字集合を定めています。この集合に当てはまらない文字を処理する場合は処理系定義の動作となります。 処理系定義の動作を使用すると移植性が低下します。 @subsection サンプルコード @verbatim #include /* W0072 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0073 @section W0073 @cindex W0073 @subsection メッセージ本文 このインクルードファイルには、インクルードガードが記述されていません。 @subsection 内容 重複インクルードは型の再定義に関するエラーを引き起こす原因になります。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0076 @section W0076 @cindex W0076 @subsection メッセージ本文 この 16 進整数リテラルには、接尾語 `U' または `u' が付けられていません。 @subsection 内容 整数定数の値は、規格で指定された型のうち、その値を表現できる最初の型になります。 つまり、接尾語 "@code{U}" を使用していない 16 進定数は、 @code{unsigned} を意図していても、@code{signed} 型で表現できる場合は @code{signed} となります。 例えば、@code{0x8000} は、@code{int} の実装サイズが 16bit の場合 @code{unsigned int} になりますが、 int の実装サイズが 32bit の場合 @code{signed int} 型になります。 このように、16 進定数に接尾語 "@code{U}" を使用していない時、 @code{signed} と @code{unsigned} のどちらになるのかが判断しづらくなります。 @subsection サンプルコード @verbatim unsigned int num = 0x1234; /* W0076 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0077 @section W0077 @cindex W0077 @subsection メッセージ本文 接尾語として小文字の `l' が整数または浮動小数点数に付けられています。 @subsection 内容 @code{long} 型を表す接尾語 "@code{l}" の使用は、数字の "@code{1}" と間違えられやすいため解析性が低下します。 @subsection サンプルコード @verbatim long a = 0x1000l; /* W0077 */ long b = 0x1000L; /* OK */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0078 @section W0078 @cindex W0078 @subsection メッセージ本文 仮引数並びがない関数が宣言されています。 @subsection 内容 仮引数の並びが空の関数宣言は旧式 (K&R) の文法であり、 これが現在でも利用できるのはコンパイラが旧式の文法の一部をサポートしているためです。 このようなコンパイラの配慮に依存したコードは将来的に変更を余儀なくされる未成熟なコードといえます。 @subsection サンプルコード @verbatim int sample() /* W0078 */ { return 0; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0079 @section W0079 @cindex W0079 @subsection メッセージ本文 この配列は、初期値の文字列リテラルの終端文字 `\0' を保持できません。 @subsection 内容 文字列配列はターミネータとして終端にヌル文字が入っていることを想定して使用される場合が多くあります。 例えば、文字数を数えるために終端のヌル文字が見つかるまで反復処理するような使用法が挙げられます。 このような処理を、ヌル文字を保持していない文字列配列に行った場合、無限ループに陥ってしまいます。 @subsection サンプルコード @verbatim char text[3] = "ABC"; /* W0079 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0080 @section W0080 @cindex W0080 @subsection メッセージ本文 const 修飾されたグローバルオブジェクトが、明示的に初期化されずに定義されています。 @subsection 内容 @code{const} 指定されている変数は、値を代入することができませんので、宣言時に初期化する必要があります。 従って、@code{const} 指定されており、宣言時に初期化されていない変数は使いようのない無駄なデータということになります。 無駄なものは、メモリ資源を消費する、ソースコードの可読性を低下させる、などのデメリットがあります。 @subsection サンプルコード @verbatim const int num; /* W0080 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0081 @section W0081 @cindex W0081 @subsection メッセージ本文 単項演算子 `-' を unsigned int 型、unsigned long 型、unsigned long long 型のオペランドに対して使うと、符号無し型になってしまいます。 @subsection 内容 符号なし型の変数に、単項演算子 "@code{-}" を使用すると結果は処理系定義、または未定義の動作になります。 従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim unsigned long num = 0; long val = -num; /* W0081 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0082 @section W0082 @cindex W0082 @subsection メッセージ本文 単項演算子 `-' を符号無しの潜在型 `%s' のオペランドに対して使っています。 @subsection 内容 符号なし型の変数に、単項演算子 "@code{-}" を使用すると結果は処理系定義、または未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim unsigned short num = 20; int val = -num; /* W0082 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0084 @section W0084 @cindex W0084 @subsection メッセージ本文 このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。 @subsection 内容 副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。 @subsection サンプルコード @verbatim int a = 0; int b = 1; a, b++; /* W0084 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0085} この文には副作用がありません。誤りのある可能性が高いです。 @item @ref{W0086} 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。 @item @ref{W0087} カンマ演算子の右側の式は、副作用がない冗長な式です。 @item @ref{W0088} 論理演算子の右側の式は、副作用がない冗長な式です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0085 @section W0085 @cindex W0085 @subsection メッセージ本文 この文には副作用がありません。誤りのある可能性が高いです。 @subsection 内容 副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。 @subsection サンプルコード @verbatim a; /* W0085 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0084} このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。 @item @ref{W0086} 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。 @item @ref{W0087} カンマ演算子の右側の式は、副作用がない冗長な式です。 @item @ref{W0088} 論理演算子の右側の式は、副作用がない冗長な式です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0086 @section W0086 @cindex W0086 @subsection メッセージ本文 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。 @subsection 内容 副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。 @subsection サンプルコード @verbatim int a; int b; (a < 0) ? b : b++; /* W0086 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0084} このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。 @item @ref{W0085} この文には副作用がありません。誤りのある可能性が高いです。 @item @ref{W0087} カンマ演算子の右側の式は、副作用がない冗長な式です。 @item @ref{W0088} 論理演算子の右側の式は、副作用がない冗長な式です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0087 @section W0087 @cindex W0087 @subsection メッセージ本文 カンマ演算子の右側の式は、副作用がない冗長な式です。 @subsection 内容 副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。 @subsection サンプルコード @verbatim int a = 0; int b = 1; a++, b; /* W0087 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0084} このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。 @item @ref{W0085} この文には副作用がありません。誤りのある可能性が高いです。 @item @ref{W0086} 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。 @item @ref{W0088} 論理演算子の右側の式は、副作用がない冗長な式です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0088 @section W0088 @cindex W0088 @subsection メッセージ本文 論理演算子の右側の式は、副作用がない冗長な式です。 @subsection 内容 副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。 @subsection サンプルコード @verbatim (a < 0) && func(a) && func(b) && c; /* W0088 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0084} このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。 @item @ref{W0085} この文には副作用がありません。誤りのある可能性が高いです。 @item @ref{W0086} 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。 @item @ref{W0087} カンマ演算子の右側の式は、副作用がない冗長な式です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0093 @section W0093 @cindex W0093 @subsection メッセージ本文 ゼロで除算される恐れがあります。 @subsection 内容 ゼロでの除算は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b) { if (b > 0) { return a / b; /* OK */ } return a / b; /* W0093 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0096 @section W0096 @cindex W0096 @subsection メッセージ本文 ゼロになる定数式で除算しています。 @subsection 内容 ゼロでの除算は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #define A (0) int b = 10 / A; /* W0096 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0097 @section W0097 @cindex W0097 @subsection メッセージ本文 ゼロの値で除算しています。 @subsection 内容 ゼロでの除算は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b) { if (a < 0) { ...snip... } else { ...snip... if (a < 1) { return b / a; /* W0097 */ } } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0100 @section W0100 @cindex W0100 @subsection メッセージ本文 変数 `%s' は初期値を設定後に再代入されません。変数を const 付きで初期値を指定して定義できる可能性があります。 @subsection 内容 このような変数は、値を変更しても良いか否かがわかりづらいといった問題があります。 @subsection サンプルコード @verbatim int func(int a) { int b = a; /* W0100 */ return b; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0101 @section W0101 @cindex W0101 @subsection メッセージ本文 自動変数のアドレスが、より長い寿命を持つポインタに代入されています。このプログラムは危険です。 @subsection 内容 ある関数で宣言された自動変数のスコープはその関数内に限定されますが、 その自動変数のアドレスをより大きなスコープを持つポインタに代入して使用した場合、 あたかもそのポインタが有効なスコープで自動変数のアドレスを扱うようなソースコードになります。 しかし実際は、関数内で宣言された自動変数は、その関数を抜けた時点でスコープを外れるため、 その自動変数のポインタも無効になります。 従って、自動変数のポインタをより大きいスコープを持つポインタへ代入することは、 無効なポインタを意図しないタイミングで使う可能性を生じさせるため危険です。 @subsection サンプルコード @verbatim extern long *ptr; void func() { long value = 0; ptr = &value; /* W0101 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0102 @section W0102 @cindex W0102 @subsection メッセージ本文 自動変数のアドレスが、関数の仮引数を介して戻されています。このプログラムは危険です。 @subsection 内容 関数内で宣言された自動変数は、関数の実行が終了した時点で無効になります。 そのような変数のアドレスは、いつ別の変数のメモリ領域として使用されるかわかりません。 @subsection サンプルコード @verbatim void func(int **ptr) { int num; *ptr = # /* W0102 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0103} 自動変数のアドレスが、戻り値として関数から返されています。このプログラムは危険です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0103 @section W0103 @cindex W0103 @subsection メッセージ本文 自動変数のアドレスが、戻り値として関数から返されています。このプログラムは危険です。 @subsection 内容 関数内で宣言された自動変数は、関数の実行が終了した時点で無効になります。 そのような変数のアドレスは、いつ別の変数のメモリ領域として使用されるかわかりません。 @subsection サンプルコード @verbatim char *foo1(void) { char a[3]; return a; /* W0103 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0102} 自動変数のアドレスが、関数の仮引数を介して戻されています。このプログラムは危険です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0104 @section W0104 @cindex W0104 @subsection メッセージ本文 仮引数 `%s' は値が変わりません。const 付きで宣言できる可能性があります。 @subsection 内容 このような引数は、値を変更しても良いか否かがわかりづらいといった問題があります。 @subsection サンプルコード @verbatim void func(int val) /* W0104 */ { const int num = val + 1; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0105} ポインタ仮引数 `%s' が指しているオブジェクトは関数内で変わらないので、const オブジェクトを指すポインタ型として宣言できる可能性があります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0105 @section W0105 @cindex W0105 @subsection メッセージ本文 ポインタ仮引数 `%s' が指しているオブジェクトは関数内で変わらないので、const オブジェクトを指すポインタ型として宣言できる可能性があります。 @subsection 内容 このような引数は、値を変更しても良いか否かがわかりづらいといった問題があります。 @subsection サンプルコード @verbatim void func(int *val) /* W0105 */ { const int num = *val; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0104} 仮引数 `%s' は値が変わりません。const 付きで宣言できる可能性があります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0107 @section W0107 @cindex W0107 @subsection メッセージ本文 自動変数のアドレスが、static 付きローカルポインタに代入されています。このプログラムは危険です。 @subsection 内容 関数のスコープを抜けると自動記憶域期間を持つオブジェクトが無効になる一方で、 静的記憶域期間を持つオブジェクトは無効になりません。 従って、静的記憶域期間を持つポインタに自動記憶域期間を持つオブジェクトのアドレスを代入することは危険です。 @subsection サンプルコード @verbatim void foo() { static int *p; int b = 100; p = &b; /* W0107 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0108 @section W0108 @cindex W0108 @subsection メッセージ本文 代入演算子が論理演算式の中で使われています。 @subsection 内容 実質的にブール型として使用されている変数に対する代入演算子や複合代入演算子の使用は、 どのように解釈してよいかがわかりづらく、コードを複雑にします。 @subsection サンプルコード @verbatim int a; int b; if (a = b) { /* W0108 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0109 @section W0109 @cindex W0109 @subsection メッセージ本文 この関数の宣言が見つかりません。省略されたものとみなし、`extern int %s()' を挿入します。 @subsection 内容 ISO C90 では、関数は使用される前に定義もしくはプロトタイプ宣言すべきとされています。 定義もしくはプロトタイプ宣言なしで使用する場合は、暗黙の宣言があるものと見なされます。 しかし、このような規格の配慮に依存したコードは将来的に変更を余儀なくされる未成熟なコードといえます。 @subsection サンプルコード @verbatim void func() { foo(); /* W0109 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0110 @section W0110 @cindex W0110 @subsection メッセージ本文 浮動小数点型の変数が for 文のループカウンタとして使われています。 @subsection 内容 ループカウンタ(ループの制御変数)の型を浮動小数点型にした場合、 ループを抜ける条件に等式や不等式を採用した場合に、 ループカウンタの丸め誤差が原因で無限ループになる可能性が高くなります。 @subsection サンプルコード @verbatim double d; for (d = 0.0; d != 1.0; d += 0.1) { /* W0110 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0112 @section W0112 @cindex W0112 @subsection メッセージ本文 浮動小数点の式を等価演算子で比較しています。 @subsection 内容 浮動小数点型の変数は様々な誤差の影響により、ある数と等式や不等式で比較しても目的の結果を得られるとは限りません。 @subsection サンプルコード @verbatim double a = 0.1; a = (a + 0.1) * 5.0; if (a == 1.0) { /* W0112 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0114 @section W0114 @cindex W0114 @subsection メッセージ本文 この制御式は明示的な論理演算ではありません。 @subsection 内容 制御式で比較演算子を使用しないと暗黙的に 0 と比較された結果を判定することになります。 このような比較演算子を用いない書き方はコーディング量が減るメリットよりも解析性が低下するデメリットの方が大きいと考えられます。 @subsection サンプルコード @verbatim int a; if (a != 0) { /* OK */ } if (a) { /* W0114 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0115 @section W0115 @cindex W0115 @subsection メッセージ本文 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。 @subsection 内容 符号なし型の変数に対する左シフト演算は上位ビットを切り詰めて、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned int func(unsigned int a) { if (a > 0x40000000U) { return a << 2; /* W0115 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0116} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0116 @section W0116 @cindex W0116 @subsection メッセージ本文 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。 @subsection 内容 符号なし型の変数に対する左シフト演算は上位ビットを切り詰めて、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned int func(unsigned int a) { if (a > 0x40000000U) { return a << 1; /* W0116 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0115} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0117 @section W0117 @cindex W0117 @subsection メッセージ本文 `%s' の定義は外部結合を持ちますが、定義より前にその宣言がありません。 @subsection 内容 外部変数や外部関数は複数のファイルで使用されることを想定して宣言されます。 従って、これらはヘッダファイルで宣言され、インクルードして使用されるべきです。 ソースファイルで宣言して使用する場合、ヘッダファイルで宣言して使用するよりも安全性、保守性が低下します。 @subsection サンプルコード @verbatim void func(void) /* W0117 */ { ...snip... } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0118} 外部結合を持つ `%s' の宣言が、ヘッダファイルの中にありません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0118 @section W0118 @cindex W0118 @subsection メッセージ本文 外部結合を持つ `%s' の宣言が、ヘッダファイルの中にありません。 @subsection 内容 外部変数や外部関数は複数のファイルで使用されることを想定して宣言されます。 従って、これらはヘッダファイルで宣言され、インクルードして使用されるべきです。 ソースファイルで宣言して使用する場合、ヘッダファイルで宣言して使用するよりも安全性、保守性が低下します。 @subsection サンプルコード @file{test.c} @verbatim extern int val; /* W0118 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0117} `%s' の定義は外部結合を持ちますが、定義より前にその宣言がありません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0119 @section W0119 @cindex W0119 @subsection メッセージ本文 暗黙的に char 型から signed char 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(char a) { signed char b = a; /* W0119 */ foo(a); /* W0119 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0120 @section W0120 @cindex W0120 @subsection メッセージ本文 暗黙的に char 型から unsigned char 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(char a) { unsigned char b = a; /* W0120 */ foo(a); /* W0120 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0121 @section W0121 @cindex W0121 @subsection メッセージ本文 暗黙的に char 型から signed short 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(char a) { short b = a; /* W0121 */ foo(a); /* W0121 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0122 @section W0122 @cindex W0122 @subsection メッセージ本文 暗黙的に char 型から unsigned short 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(char a) { unsigned short b = a; /* W0122 */ foo(a); /* W0122 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0123 @section W0123 @cindex W0123 @subsection メッセージ本文 暗黙的に char 型から signed int 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(char a) { int b = a; /* W0123 */ foo(a); /* W0123 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0124 @section W0124 @cindex W0124 @subsection メッセージ本文 暗黙的に char 型から unsigned int 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(char a) { unsigned int b = a; /* W0124 */ foo(a); /* W0124 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0125 @section W0125 @cindex W0125 @subsection メッセージ本文 暗黙的に char 型から signed long 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(char a) { long b = a; /* W0125 */ foo(a); /* W0125 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0126 @section W0126 @cindex W0126 @subsection メッセージ本文 暗黙的に char 型から unsigned long 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(char a) { unsigned long b = a; /* W0126 */ foo(a); /* W0126 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0127 @section W0127 @cindex W0127 @subsection メッセージ本文 暗黙的に char 型から float 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(char a) { float b = a; /* W0127 */ foo(a); /* W0127 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0128 @section W0128 @cindex W0128 @subsection メッセージ本文 暗黙的に char 型から double 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(char a) { double b = a; /* W0128 */ foo(a); /* W0128 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0129 @section W0129 @cindex W0129 @subsection メッセージ本文 暗黙的に char 型から long double 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(char a) { long double b = a; /* W0129 */ foo(a); /* W0129 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0130 @section W0130 @cindex W0130 @subsection メッセージ本文 暗黙的に char 型から signed long long 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(char a) { long long b = a; /* W0130 */ foo(a); /* W0130 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0131} 暗黙的に char 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0131 @section W0131 @cindex W0131 @subsection メッセージ本文 暗黙的に char 型から unsigned long long 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(char a) { unsigned long long b = a; /* W0131 */ foo(a); /* W0131 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0119} 暗黙的に char 型から signed char 型に型変換されています。 @item @ref{W0120} 暗黙的に char 型から unsigned char 型に型変換されています。 @item @ref{W0121} 暗黙的に char 型から signed short 型に型変換されています。 @item @ref{W0122} 暗黙的に char 型から unsigned short 型に型変換されています。 @item @ref{W0123} 暗黙的に char 型から signed int 型に型変換されています。 @item @ref{W0124} 暗黙的に char 型から unsigned int 型に型変換されています。 @item @ref{W0125} 暗黙的に char 型から signed long 型に型変換されています。 @item @ref{W0126} 暗黙的に char 型から unsigned long 型に型変換されています。 @item @ref{W0127} 暗黙的に char 型から float 型に型変換されています。 @item @ref{W0128} 暗黙的に char 型から double 型に型変換されています。 @item @ref{W0129} 暗黙的に char 型から long double 型に型変換されています。 @item @ref{W0130} 暗黙的に char 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0132 @section W0132 @cindex W0132 @subsection メッセージ本文 暗黙的に unsigned char 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(unsigned char a) { char b = a; /* W0132 */ foo(a); /* W0132 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0133 @section W0133 @cindex W0133 @subsection メッセージ本文 暗黙的に signed char 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(signed char a) { char b = a; /* W0133 */ foo(a); /* W0133 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0134 @section W0134 @cindex W0134 @subsection メッセージ本文 暗黙的に signed short 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(short a) { char b = a; /* W0134 */ foo(a); /* W0134 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0135 @section W0135 @cindex W0135 @subsection メッセージ本文 暗黙的に unsigned short 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(unsigned short a) { char b = a; /* W0135 */ foo(a); /* W0135 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0136 @section W0136 @cindex W0136 @subsection メッセージ本文 暗黙的に signed int 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(int a) { char b = a; /* W0136 */ foo(a); /* W0136 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0137 @section W0137 @cindex W0137 @subsection メッセージ本文 暗黙的に unsigned int 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(unsigned int a) { char b = a; /* W0137 */ foo(a); /* W0137 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0138 @section W0138 @cindex W0138 @subsection メッセージ本文 暗黙的に signed long 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(long a) { char b = a; /* W0138 */ foo(a); /* W0138 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0139 @section W0139 @cindex W0139 @subsection メッセージ本文 暗黙的に unsigned long 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(unsigned long a) { char b = a; /* W0139 */ foo(a); /* W0139 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0140 @section W0140 @cindex W0140 @subsection メッセージ本文 暗黙的に signed long long 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(long long a) { char b = a; /* W0140 */ foo(a); /* W0140 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0141} 暗黙的に unsigned long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0141 @section W0141 @cindex W0141 @subsection メッセージ本文 暗黙的に unsigned long long 型から char 型に型変換されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(unsigned long long a) { char b = a; /* W0141 */ foo(a); /* W0141 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0132} 暗黙的に unsigned char 型から char 型に型変換されています。 @item @ref{W0133} 暗黙的に signed char 型から char 型に型変換されています。 @item @ref{W0134} 暗黙的に signed short 型から char 型に型変換されています。 @item @ref{W0135} 暗黙的に unsigned short 型から char 型に型変換されています。 @item @ref{W0136} 暗黙的に signed int 型から char 型に型変換されています。 @item @ref{W0137} 暗黙的に unsigned int 型から char 型に型変換されています。 @item @ref{W0138} 暗黙的に signed long 型から char 型に型変換されています。 @item @ref{W0139} 暗黙的に unsigned long 型から char 型に型変換されています。 @item @ref{W0140} 暗黙的に signed long long 型から char 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0142 @section W0142 @cindex W0142 @subsection メッセージ本文 暗黙的に unsigned char 型から signed char 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(unsigned char a) { signed char b = a; /* W0142 */ foo(a); /* W0142 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0143 @section W0143 @cindex W0143 @subsection メッセージ本文 暗黙的に unsigned short 型から signed char 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(unsigned short a) { signed char b = a; /* W0143 */ foo(a); /* W0143 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0144 @section W0144 @cindex W0144 @subsection メッセージ本文 暗黙的に unsigned short 型から signed short 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(unsigned short a) { short b = a; /* W0144 */ foo(a); /* W0144 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0145 @section W0145 @cindex W0145 @subsection メッセージ本文 暗黙的に unsigned int 型から signed char 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(unsigned int a) { signed char b = a; /* W0145 */ foo(a); /* W0145 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0146 @section W0146 @cindex W0146 @subsection メッセージ本文 暗黙的に unsigned int 型から signed short 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(unsigned int a) { short b = a; /* W0146 */ foo(a); /* W0146 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0147 @section W0147 @cindex W0147 @subsection メッセージ本文 暗黙的に unsigned int 型から signed int 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(unsigned int a) { int b = a; /* W0147 */ foo(a); /* W0147 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0148 @section W0148 @cindex W0148 @subsection メッセージ本文 暗黙的に unsigned long 型から signed char 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(unsigned long a) { signed char b = a; /* W0148 */ foo(a); /* W0148 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0149 @section W0149 @cindex W0149 @subsection メッセージ本文 暗黙的に unsigned long 型から signed short 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(unsigned long a) { short b = a; /* W0149 */ foo(a); /* W0149 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0150 @section W0150 @cindex W0150 @subsection メッセージ本文 暗黙的に unsigned long 型から signed int 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(unsigned long a) { int b = a; /* W0150 */ foo(a); /* W0150 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0151 @section W0151 @cindex W0151 @subsection メッセージ本文 暗黙的に unsigned long 型から signed long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(unsigned long a) { long b = a; /* W0151 */ foo(a); /* W0151 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0152 @section W0152 @cindex W0152 @subsection メッセージ本文 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(unsigned long long a) { signed char b = a; /* W0152 */ foo(a); /* W0152 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0153 @section W0153 @cindex W0153 @subsection メッセージ本文 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(unsigned long long a) { short b = a; /* W0153 */ foo(a); /* W0153 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0154 @section W0154 @cindex W0154 @subsection メッセージ本文 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(unsigned long long a) { int b = a; /* W0154 */ foo(a); /* W0154 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0155 @section W0155 @cindex W0155 @subsection メッセージ本文 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(unsigned long long a) { long b = a; /* W0155 */ foo(a); /* W0155 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0156} 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0156 @section W0156 @cindex W0156 @subsection メッセージ本文 暗黙的に unsigned long long 型から signed long long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(unsigned long long a) { long long b = a; /* W0156 */ foo(a); /* W0156 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0142} 暗黙的に unsigned char 型から signed char 型に型変換されています。 @item @ref{W0143} 暗黙的に unsigned short 型から signed char 型に型変換されています。 @item @ref{W0144} 暗黙的に unsigned short 型から signed short 型に型変換されています。 @item @ref{W0145} 暗黙的に unsigned int 型から signed char 型に型変換されています。 @item @ref{W0146} 暗黙的に unsigned int 型から signed short 型に型変換されています。 @item @ref{W0147} 暗黙的に unsigned int 型から signed int 型に型変換されています。 @item @ref{W0148} 暗黙的に unsigned long 型から signed char 型に型変換されています。 @item @ref{W0149} 暗黙的に unsigned long 型から signed short 型に型変換されています。 @item @ref{W0150} 暗黙的に unsigned long 型から signed int 型に型変換されています。 @item @ref{W0151} 暗黙的に unsigned long 型から signed long 型に型変換されています。 @item @ref{W0152} 暗黙的に unsigned long long 型から signed char 型に型変換されています。 @item @ref{W0153} 暗黙的に unsigned long long 型から signed short 型に型変換されています。 @item @ref{W0154} 暗黙的に unsigned long long 型から signed int 型に型変換されています。 @item @ref{W0155} 暗黙的に unsigned long long 型から signed long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0157 @section W0157 @cindex W0157 @subsection メッセージ本文 暗黙的に signed char 型から unsigned char 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(signed char a) { unsigned char b = a; /* W0157 */ foo(a); /* W0157 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0158 @section W0158 @cindex W0158 @subsection メッセージ本文 暗黙的に signed char 型から unsigned short 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(signed char a) { unsigned short b = a; /* W0158 */ foo(a); /* W0158 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0159 @section W0159 @cindex W0159 @subsection メッセージ本文 暗黙的に signed char 型から unsigned int 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(signed char a) { unsigned int b = a; /* W0159 */ foo(a); /* W0159 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0160 @section W0160 @cindex W0160 @subsection メッセージ本文 暗黙的に signed char 型から unsigned long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(signed char a) { unsigned long b = a; /* W0160 */ foo(a); /* W0160 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0161 @section W0161 @cindex W0161 @subsection メッセージ本文 暗黙的に signed short 型から unsigned char 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(short a) { unsigned char b = a; /* W0161 */ foo(a); /* W0161 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0162 @section W0162 @cindex W0162 @subsection メッセージ本文 暗黙的に signed short 型から unsigned short 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(short a) { unsigned short b = a; /* W0162 */ foo(a); /* W0162 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0163 @section W0163 @cindex W0163 @subsection メッセージ本文 暗黙的に signed short 型から unsigned int 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(short a) { unsigned int b = a; /* W0163 */ foo(a); /* W0163 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0164 @section W0164 @cindex W0164 @subsection メッセージ本文 暗黙的に signed short 型から unsigned long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(short a) { unsigned long b = a; /* W0164 */ foo(a); /* W0164 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0165 @section W0165 @cindex W0165 @subsection メッセージ本文 暗黙的に signed int 型から unsigned char 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(int a) { unsigned char b = a; /* W0165 */ foo(a); /* W0165 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0166 @section W0166 @cindex W0166 @subsection メッセージ本文 暗黙的に signed int 型から unsigned short 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(int a) { unsigned short b = a; /* W0166 */ foo(a); /* W0166 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0167 @section W0167 @cindex W0167 @subsection メッセージ本文 暗黙的に signed int 型から unsigned int 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(int a) { unsigned int b = a; /* W0167 */ foo(a); /* W0167 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0168 @section W0168 @cindex W0168 @subsection メッセージ本文 暗黙的に signed int 型から unsigned long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(int a) { unsigned long b = a; /* W0168 */ foo(a); /* W0168 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0169 @section W0169 @cindex W0169 @subsection メッセージ本文 暗黙的に signed long 型から unsigned char 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(long a) { unsigned char b = a; /* W0169 */ foo(a); /* W0169 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0170 @section W0170 @cindex W0170 @subsection メッセージ本文 暗黙的に signed long 型から unsigned short 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(long a) { unsigned short b = a; /* W0170 */ foo(a); /* W0170 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0171 @section W0171 @cindex W0171 @subsection メッセージ本文 暗黙的に signed long 型から unsigned int 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(long a) { unsigned int b = a; /* W0171 */ foo(a); /* W0171 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0172 @section W0172 @cindex W0172 @subsection メッセージ本文 暗黙的に signed long 型から unsigned long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(long a) { unsigned long b = a; /* W0172 */ foo(a); /* W0172 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0173 @section W0173 @cindex W0173 @subsection メッセージ本文 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(signed char a) { unsigned long long b = a; /* W0173 */ foo(a); /* W0173 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0174 @section W0174 @cindex W0174 @subsection メッセージ本文 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(short a) { unsigned long long b = a; /* W0174 */ foo(a); /* W0174 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0175 @section W0175 @cindex W0175 @subsection メッセージ本文 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(int a) { unsigned long long b = a; /* W0175 */ foo(a); /* W0175 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0176 @section W0176 @cindex W0176 @subsection メッセージ本文 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(long a) { unsigned long long b = a; /* W0176 */ foo(a); /* W0176 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0177 @section W0177 @cindex W0177 @subsection メッセージ本文 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(long long a) { unsigned char b = a; /* W0177 */ foo(a); /* W0177 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0178 @section W0178 @cindex W0178 @subsection メッセージ本文 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(long long a) { unsigned short b = a; /* W0178 */ foo(a); /* W0178 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0179 @section W0179 @cindex W0179 @subsection メッセージ本文 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(long long a) { unsigned int b = a; /* W0179 */ foo(a); /* W0179 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0180 @section W0180 @cindex W0180 @subsection メッセージ本文 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(long long a) { unsigned long b = a; /* W0180 */ foo(a); /* W0180 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0181} 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0181 @section W0181 @cindex W0181 @subsection メッセージ本文 暗黙的に signed long long 型から unsigned long long 型に型変換されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(long long a) { unsigned long long b = a; /* W0181 */ foo(a); /* W0181 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0157} 暗黙的に signed char 型から unsigned char 型に型変換されています。 @item @ref{W0158} 暗黙的に signed char 型から unsigned short 型に型変換されています。 @item @ref{W0159} 暗黙的に signed char 型から unsigned int 型に型変換されています。 @item @ref{W0160} 暗黙的に signed char 型から unsigned long 型に型変換されています。 @item @ref{W0161} 暗黙的に signed short 型から unsigned char 型に型変換されています。 @item @ref{W0162} 暗黙的に signed short 型から unsigned short 型に型変換されています。 @item @ref{W0163} 暗黙的に signed short 型から unsigned int 型に型変換されています。 @item @ref{W0164} 暗黙的に signed short 型から unsigned long 型に型変換されています。 @item @ref{W0165} 暗黙的に signed int 型から unsigned char 型に型変換されています。 @item @ref{W0166} 暗黙的に signed int 型から unsigned short 型に型変換されています。 @item @ref{W0167} 暗黙的に signed int 型から unsigned int 型に型変換されています。 @item @ref{W0168} 暗黙的に signed int 型から unsigned long 型に型変換されています。 @item @ref{W0169} 暗黙的に signed long 型から unsigned char 型に型変換されています。 @item @ref{W0170} 暗黙的に signed long 型から unsigned short 型に型変換されています。 @item @ref{W0171} 暗黙的に signed long 型から unsigned int 型に型変換されています。 @item @ref{W0172} 暗黙的に signed long 型から unsigned long 型に型変換されています。 @item @ref{W0173} 暗黙的に signed char 型から unsigned long long 型に型変換されています。 @item @ref{W0174} 暗黙的に signed short 型から unsigned long long 型に型変換されています。 @item @ref{W0175} 暗黙的に signed int 型から unsigned long long 型に型変換されています。 @item @ref{W0176} 暗黙的に signed long 型から unsigned long long 型に型変換されています。 @item @ref{W0177} 暗黙的に signed long long 型から unsigned char 型に型変換されています。 @item @ref{W0178} 暗黙的に signed long long 型から unsigned short 型に型変換されています。 @item @ref{W0179} 暗黙的に signed long long 型から unsigned int 型に型変換されています。 @item @ref{W0180} 暗黙的に signed long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0182 @section W0182 @cindex W0182 @subsection メッセージ本文 暗黙的に unsigned char 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(unsigned char a) { float b = a; /* W0182 */ foo(a); /* W0182 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0183 @section W0183 @cindex W0183 @subsection メッセージ本文 暗黙的に unsigned char 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(unsigned char a) { double b = a; /* W0183 */ foo(a); /* W0183 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0184 @section W0184 @cindex W0184 @subsection メッセージ本文 暗黙的に unsigned char 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(unsigned char a) { long double b = a; /* W0184 */ foo(a); /* W0184 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0185 @section W0185 @cindex W0185 @subsection メッセージ本文 暗黙的に signed char 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(signed char a) { float b = a; /* W0185 */ foo(a); /* W0185 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0186 @section W0186 @cindex W0186 @subsection メッセージ本文 暗黙的に signed char 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(signed char a) { double b = a; /* W0186 */ foo(a); /* W0186 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0187 @section W0187 @cindex W0187 @subsection メッセージ本文 暗黙的に signed char 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(signed char a) { long double b = a; /* W0187 */ foo(a); /* W0187 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0188 @section W0188 @cindex W0188 @subsection メッセージ本文 暗黙的に signed short 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(short a) { float b = a; /* W0188 */ foo(a); /* W0188 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0189 @section W0189 @cindex W0189 @subsection メッセージ本文 暗黙的に signed short 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(short a) { double b = a; /* W0189 */ foo(a); /* W0189 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0190 @section W0190 @cindex W0190 @subsection メッセージ本文 暗黙的に signed short 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(short a) { long double b = a; /* W0190 */ foo(a); /* W0190 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0191 @section W0191 @cindex W0191 @subsection メッセージ本文 暗黙的に unsigned short 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(unsigned short a) { float b = a; /* W0191 */ foo(a); /* W0191 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0192 @section W0192 @cindex W0192 @subsection メッセージ本文 暗黙的に unsigned short 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(unsigned short a) { double b = a; /* W0192 */ foo(a); /* W0192 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0193 @section W0193 @cindex W0193 @subsection メッセージ本文 暗黙的に unsigned short 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(unsigned short a) { long double b = a; /* W0193 */ foo(a); /* W0193 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0194 @section W0194 @cindex W0194 @subsection メッセージ本文 暗黙的に signed int 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(int a) { float b = a; /* W0194 */ foo(a); /* W0194 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0195 @section W0195 @cindex W0195 @subsection メッセージ本文 暗黙的に signed int 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(int a) { double b = a; /* W0195 */ foo(a); /* W0195 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0196 @section W0196 @cindex W0196 @subsection メッセージ本文 暗黙的に signed int 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(int a) { long double b = a; /* W0196 */ foo(a); /* W0196 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0197 @section W0197 @cindex W0197 @subsection メッセージ本文 暗黙的に unsigned int 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(unsigned int a) { float b = a; /* W0197 */ foo(a); /* W0197 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0198 @section W0198 @cindex W0198 @subsection メッセージ本文 暗黙的に unsigned int 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(unsigned int a) { double b = a; /* W0198 */ foo(a); /* W0198 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0199 @section W0199 @cindex W0199 @subsection メッセージ本文 暗黙的に unsigned int 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(unsigned int a) { long double b = a; /* W0199 */ foo(a); /* W0199 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0200 @section W0200 @cindex W0200 @subsection メッセージ本文 暗黙的に signed long 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(long a) { float b = a; /* W0200 */ foo(a); /* W0200 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0201 @section W0201 @cindex W0201 @subsection メッセージ本文 暗黙的に signed long 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(long a) { double b = a; /* W0201 */ foo(a); /* W0201 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0202 @section W0202 @cindex W0202 @subsection メッセージ本文 暗黙的に signed long 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(long a) { long double b = a; /* W0202 */ foo(a); /* W0202 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0203 @section W0203 @cindex W0203 @subsection メッセージ本文 暗黙的に unsigned long 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(unsigned long a) { float b = a; /* W0203 */ foo(a); /* W0203 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0204 @section W0204 @cindex W0204 @subsection メッセージ本文 暗黙的に unsigned long 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(unsigned long a) { double b = a; /* W0204 */ foo(a); /* W0204 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0205 @section W0205 @cindex W0205 @subsection メッセージ本文 暗黙的に unsigned long 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(unsigned long a) { long double b = a; /* W0205 */ foo(a); /* W0205 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0206 @section W0206 @cindex W0206 @subsection メッセージ本文 暗黙的に signed long long 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(long long a) { float b = a; /* W0206 */ foo(a); /* W0206 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0207 @section W0207 @cindex W0207 @subsection メッセージ本文 暗黙的に signed long long 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(long long a) { double b = a; /* W0207 */ foo(a); /* W0207 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0208 @section W0208 @cindex W0208 @subsection メッセージ本文 暗黙的に signed long long 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(long long a) { long double b = a; /* W0208 */ foo(a); /* W0208 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0209 @section W0209 @cindex W0209 @subsection メッセージ本文 暗黙的に unsigned long long 型から float 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(unsigned long long a) { float b = a; /* W0209 */ foo(a); /* W0209 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0210 @section W0210 @cindex W0210 @subsection メッセージ本文 暗黙的に unsigned long long 型から double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(unsigned long long a) { double b = a; /* W0210 */ foo(a); /* W0210 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0211} 暗黙的に unsigned long long 型から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0211 @section W0211 @cindex W0211 @subsection メッセージ本文 暗黙的に unsigned long long 型から long double 型に型変換されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long double a); void bar(unsigned long long a) { long double b = a; /* W0211 */ foo(a); /* W0211 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0182} 暗黙的に unsigned char 型から float 型に型変換されています。 @item @ref{W0183} 暗黙的に unsigned char 型から double 型に型変換されています。 @item @ref{W0184} 暗黙的に unsigned char 型から long double 型に型変換されています。 @item @ref{W0185} 暗黙的に signed char 型から float 型に型変換されています。 @item @ref{W0186} 暗黙的に signed char 型から double 型に型変換されています。 @item @ref{W0187} 暗黙的に signed char 型から long double 型に型変換されています。 @item @ref{W0188} 暗黙的に signed short 型から float 型に型変換されています。 @item @ref{W0189} 暗黙的に signed short 型から double 型に型変換されています。 @item @ref{W0190} 暗黙的に signed short 型から long double 型に型変換されています。 @item @ref{W0191} 暗黙的に unsigned short 型から float 型に型変換されています。 @item @ref{W0192} 暗黙的に unsigned short 型から double 型に型変換されています。 @item @ref{W0193} 暗黙的に unsigned short 型から long double 型に型変換されています。 @item @ref{W0194} 暗黙的に signed int 型から float 型に型変換されています。 @item @ref{W0195} 暗黙的に signed int 型から double 型に型変換されています。 @item @ref{W0196} 暗黙的に signed int 型から long double 型に型変換されています。 @item @ref{W0197} 暗黙的に unsigned int 型から float 型に型変換されています。 @item @ref{W0198} 暗黙的に unsigned int 型から double 型に型変換されています。 @item @ref{W0199} 暗黙的に unsigned int 型から long double 型に型変換されています。 @item @ref{W0200} 暗黙的に signed long 型から float 型に型変換されています。 @item @ref{W0201} 暗黙的に signed long 型から double 型に型変換されています。 @item @ref{W0202} 暗黙的に signed long 型から long double 型に型変換されています。 @item @ref{W0203} 暗黙的に unsigned long 型から float 型に型変換されています。 @item @ref{W0204} 暗黙的に unsigned long 型から double 型に型変換されています。 @item @ref{W0205} 暗黙的に unsigned long 型から long double 型に型変換されています。 @item @ref{W0206} 暗黙的に signed long long 型から float 型に型変換されています。 @item @ref{W0207} 暗黙的に signed long long 型から double 型に型変換されています。 @item @ref{W0208} 暗黙的に signed long long 型から long double 型に型変換されています。 @item @ref{W0209} 暗黙的に unsigned long long 型から float 型に型変換されています。 @item @ref{W0210} 暗黙的に unsigned long long 型から double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0212 @section W0212 @cindex W0212 @subsection メッセージ本文 暗黙的に float 型から char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(float a) { char b = a; /* W0212 */ foo(a); /* W0212 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0213 @section W0213 @cindex W0213 @subsection メッセージ本文 暗黙的に float 型から signed char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(float a) { signed char b = a; /* W0213 */ foo(a); /* W0213 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0214 @section W0214 @cindex W0214 @subsection メッセージ本文 暗黙的に float 型から unsigned char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(float a) { unsigned char b = a; /* W0214 */ foo(a); /* W0214 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0215 @section W0215 @cindex W0215 @subsection メッセージ本文 暗黙的に float 型から signed short 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(float a) { short b = a; /* W0215 */ foo(a); /* W0215 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0216 @section W0216 @cindex W0216 @subsection メッセージ本文 暗黙的に float 型から unsigned short 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(float a) { unsigned short b = a; /* W0216 */ foo(a); /* W0216 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0217 @section W0217 @cindex W0217 @subsection メッセージ本文 暗黙的に float 型から signed int 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(float a) { int b = a; /* W0217 */ foo(a); /* W0217 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0218 @section W0218 @cindex W0218 @subsection メッセージ本文 暗黙的に float 型から unsigned int 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(float a) { unsigned int b = a; /* W0218 */ foo(a); /* W0218 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0219 @section W0219 @cindex W0219 @subsection メッセージ本文 暗黙的に float 型から signed long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(float a) { long b = a; /* W0219 */ foo(a); /* W0219 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0220 @section W0220 @cindex W0220 @subsection メッセージ本文 暗黙的に float 型から unsigned long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(float a) { unsigned long b = a; /* W0220 */ foo(a); /* W0220 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0221 @section W0221 @cindex W0221 @subsection メッセージ本文 暗黙的に double 型から char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(double a) { char b = a; /* W0221 */ foo(a); /* W0221 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0222 @section W0222 @cindex W0222 @subsection メッセージ本文 暗黙的に double 型から signed char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(double a) { signed char b = a; /* W0222 */ foo(a); /* W0222 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0223 @section W0223 @cindex W0223 @subsection メッセージ本文 暗黙的に double 型から unsigned char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(double a) { unsigned char b = a; /* W0223 */ foo(a); /* W0223 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0224 @section W0224 @cindex W0224 @subsection メッセージ本文 暗黙的に double 型から signed short 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(double a) { short b = a; /* W0224 */ foo(a); /* W0224 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0225 @section W0225 @cindex W0225 @subsection メッセージ本文 暗黙的に double 型から unsigned short 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(double a) { unsigned short b = a; /* W0225 */ foo(a); /* W0225 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0226 @section W0226 @cindex W0226 @subsection メッセージ本文 暗黙的に double 型から signed int 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(double a) { int b = a; /* W0226 */ foo(a); /* W0226 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0227 @section W0227 @cindex W0227 @subsection メッセージ本文 暗黙的に double 型から unsigned int 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(double a) { unsigned int b = a; /* W0227 */ foo(a); /* W0227 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0228 @section W0228 @cindex W0228 @subsection メッセージ本文 暗黙的に double 型から signed long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(double a) { long b = a; /* W0228 */ foo(a); /* W0228 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0229 @section W0229 @cindex W0229 @subsection メッセージ本文 暗黙的に double 型から unsigned long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(double a) { unsigned long b = a; /* W0229 */ foo(a); /* W0229 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0230 @section W0230 @cindex W0230 @subsection メッセージ本文 暗黙的に long double 型から char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(char a); void bar(long double a) { char b = a; /* W0230 */ foo(a); /* W0230 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0231 @section W0231 @cindex W0231 @subsection メッセージ本文 暗黙的に long double 型から signed char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(long double a) { signed char b = a; /* W0231 */ foo(a); /* W0231 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0232 @section W0232 @cindex W0232 @subsection メッセージ本文 暗黙的に long double 型から unsigned char 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(long double a) { unsigned char b = a; /* W0232 */ foo(a); /* W0232 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0233 @section W0233 @cindex W0233 @subsection メッセージ本文 暗黙的に long double 型から signed short 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(long double a) { short b = a; /* W0233 */ foo(a); /* W0233 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0234 @section W0234 @cindex W0234 @subsection メッセージ本文 暗黙的に long double 型から unsigned short 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(long double a) { unsigned short b = a; /* W0234 */ foo(a); /* W0234 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0235 @section W0235 @cindex W0235 @subsection メッセージ本文 暗黙的に long double 型から signed int 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(long double a) { int b = a; /* W0235 */ foo(a); /* W0235 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0236 @section W0236 @cindex W0236 @subsection メッセージ本文 暗黙的に long double 型から unsigned int 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(long double a) { unsigned int b = a; /* W0236 */ foo(a); /* W0236 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0237 @section W0237 @cindex W0237 @subsection メッセージ本文 暗黙的に long double 型から signed long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(long double a) { long b = a; /* W0237 */ foo(a); /* W0237 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0238 @section W0238 @cindex W0238 @subsection メッセージ本文 暗黙的に long double 型から unsigned long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(long double a) { unsigned long b = a; /* W0238 */ foo(a); /* W0238 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0239 @section W0239 @cindex W0239 @subsection メッセージ本文 暗黙的に float 型から signed long long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(float a) { long long b = a; /* W0239 */ foo(a); /* W0239 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0240 @section W0240 @cindex W0240 @subsection メッセージ本文 暗黙的に float 型から unsigned long long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(float a) { unsigned long long b = a; /* W0240 */ foo(a); /* W0240 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0241 @section W0241 @cindex W0241 @subsection メッセージ本文 暗黙的に double 型から signed long long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(double a) { long long b = a; /* W0241 */ foo(a); /* W0241 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0242 @section W0242 @cindex W0242 @subsection メッセージ本文 暗黙的に double 型から unsigned long long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(double a) { unsigned long long b = a; /* W0242 */ foo(a); /* W0242 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0243 @section W0243 @cindex W0243 @subsection メッセージ本文 暗黙的に long double 型から signed long long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(long double a) { long long b = a; /* W0243 */ foo(a); /* W0243 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0244} 暗黙的に long double 型から unsigned long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0244 @section W0244 @cindex W0244 @subsection メッセージ本文 暗黙的に long double 型から unsigned long long 型に型変換されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long long a); void bar(long double a) { unsigned long long b = a; /* W0244 */ foo(a); /* W0244 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0212} 暗黙的に float 型から char 型に型変換されています。 @item @ref{W0213} 暗黙的に float 型から signed char 型に型変換されています。 @item @ref{W0214} 暗黙的に float 型から unsigned char 型に型変換されています。 @item @ref{W0215} 暗黙的に float 型から signed short 型に型変換されています。 @item @ref{W0216} 暗黙的に float 型から unsigned short 型に型変換されています。 @item @ref{W0217} 暗黙的に float 型から signed int 型に型変換されています。 @item @ref{W0218} 暗黙的に float 型から unsigned int 型に型変換されています。 @item @ref{W0219} 暗黙的に float 型から signed long 型に型変換されています。 @item @ref{W0220} 暗黙的に float 型から unsigned long 型に型変換されています。 @item @ref{W0221} 暗黙的に double 型から char 型に型変換されています。 @item @ref{W0222} 暗黙的に double 型から signed char 型に型変換されています。 @item @ref{W0223} 暗黙的に double 型から unsigned char 型に型変換されています。 @item @ref{W0224} 暗黙的に double 型から signed short 型に型変換されています。 @item @ref{W0225} 暗黙的に double 型から unsigned short 型に型変換されています。 @item @ref{W0226} 暗黙的に double 型から signed int 型に型変換されています。 @item @ref{W0227} 暗黙的に double 型から unsigned int 型に型変換されています。 @item @ref{W0228} 暗黙的に double 型から signed long 型に型変換されています。 @item @ref{W0229} 暗黙的に double 型から unsigned long 型に型変換されています。 @item @ref{W0230} 暗黙的に long double 型から char 型に型変換されています。 @item @ref{W0231} 暗黙的に long double 型から signed char 型に型変換されています。 @item @ref{W0232} 暗黙的に long double 型から unsigned char 型に型変換されています。 @item @ref{W0233} 暗黙的に long double 型から signed short 型に型変換されています。 @item @ref{W0234} 暗黙的に long double 型から unsigned short 型に型変換されています。 @item @ref{W0235} 暗黙的に long double 型から signed int 型に型変換されています。 @item @ref{W0236} 暗黙的に long double 型から unsigned int 型に型変換されています。 @item @ref{W0237} 暗黙的に long double 型から signed long 型に型変換されています。 @item @ref{W0238} 暗黙的に long double 型から unsigned long 型に型変換されています。 @item @ref{W0239} 暗黙的に float 型から signed long long 型に型変換されています。 @item @ref{W0240} 暗黙的に float 型から unsigned long long 型に型変換されています。 @item @ref{W0241} 暗黙的に double 型から signed long long 型に型変換されています。 @item @ref{W0242} 暗黙的に double 型から unsigned long long 型に型変換されています。 @item @ref{W0243} 暗黙的に long double 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0245 @section W0245 @cindex W0245 @subsection メッセージ本文 暗黙的に unsigned char 型から signed short 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(unsigned char a) { short b = a; /* W0245 */ foo(a); /* W0245 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0246 @section W0246 @cindex W0246 @subsection メッセージ本文 暗黙的に unsigned char 型から signed int 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(unsigned char a) { int b = a; /* W0246 */ foo(a); /* W0246 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0247 @section W0247 @cindex W0247 @subsection メッセージ本文 暗黙的に unsigned char 型から signed long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(unsigned char a) { long b = a; /* W0247 */ foo(a); /* W0247 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0248 @section W0248 @cindex W0248 @subsection メッセージ本文 暗黙的に unsigned short 型から signed int 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(unsigned short a) { int b = a; /* W0248 */ foo(a); /* W0248 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0249 @section W0249 @cindex W0249 @subsection メッセージ本文 暗黙的に unsigned short 型から signed long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(unsigned short a) { long b = a; /* W0249 */ foo(a); /* W0249 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0250 @section W0250 @cindex W0250 @subsection メッセージ本文 暗黙的に unsigned int 型から signed long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(unsigned int a) { long b = a; /* W0250 */ foo(a); /* W0250 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0251 @section W0251 @cindex W0251 @subsection メッセージ本文 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(unsigned char a) { long long b = a; /* W0251 */ foo(a); /* W0251 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0252 @section W0252 @cindex W0252 @subsection メッセージ本文 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(unsigned short a) { long long b = a; /* W0252 */ foo(a); /* W0252 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0253 @section W0253 @cindex W0253 @subsection メッセージ本文 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(unsigned int a) { long long b = a; /* W0253 */ foo(a); /* W0253 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0254} 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0254 @section W0254 @cindex W0254 @subsection メッセージ本文 暗黙的に unsigned long 型から signed long long 型に型変換されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim extern void foo(long long a); void bar(unsigned long a) { long long b = a; /* W0254 */ foo(a); /* W0254 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0245} 暗黙的に unsigned char 型から signed short 型に型変換されています。 @item @ref{W0246} 暗黙的に unsigned char 型から signed int 型に型変換されています。 @item @ref{W0247} 暗黙的に unsigned char 型から signed long 型に型変換されています。 @item @ref{W0248} 暗黙的に unsigned short 型から signed int 型に型変換されています。 @item @ref{W0249} 暗黙的に unsigned short 型から signed long 型に型変換されています。 @item @ref{W0250} 暗黙的に unsigned int 型から signed long 型に型変換されています。 @item @ref{W0251} 暗黙的に unsigned char 型から signed long long 型に型変換されています。 @item @ref{W0252} 暗黙的に unsigned short 型から signed long long 型に型変換されています。 @item @ref{W0253} 暗黙的に unsigned int 型から signed long long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0255 @section W0255 @cindex W0255 @subsection メッセージ本文 char 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { char a = 0; return a; /* W0255 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0256 @section W0256 @cindex W0256 @subsection メッセージ本文 char 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { char a = 0; return a; /* W0256 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0257 @section W0257 @cindex W0257 @subsection メッセージ本文 char 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim short func(void) { char a = 0; return a; /* W0257 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0258 @section W0258 @cindex W0258 @subsection メッセージ本文 char 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { char a = 0; return a; /* W0258 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0259 @section W0259 @cindex W0259 @subsection メッセージ本文 char 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim int func(void) { char a = 0; return a; /* W0259 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0260 @section W0260 @cindex W0260 @subsection メッセージ本文 char 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { char a = 0; return a; /* W0260 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0261 @section W0261 @cindex W0261 @subsection メッセージ本文 char 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim long func(void) { char a = 0; return a; /* W0261 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0262 @section W0262 @cindex W0262 @subsection メッセージ本文 char 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { char a = 0; return a; /* W0262 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0263 @section W0263 @cindex W0263 @subsection メッセージ本文 char 型の値が関数 `float %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim float func(void) { char a = 0; return a; /* W0263 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0264 @section W0264 @cindex W0264 @subsection メッセージ本文 char 型の値が関数 `double %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim double func(void) { char a = 0; return a; /* W0264 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0265 @section W0265 @cindex W0265 @subsection メッセージ本文 char 型の値が関数 `long double %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim long double func(void) { char a = 0; return a; /* W0265 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0266 @section W0266 @cindex W0266 @subsection メッセージ本文 char 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim long long func(void) { char a = 0; return a; /* W0266 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0267} char 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0267 @section W0267 @cindex W0267 @subsection メッセージ本文 char 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 単なる @code{char} 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { char a = 0; return a; /* W0267 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0255} char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0256} char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0257} char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0258} char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0259} char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0260} char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0261} char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0262} char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0263} char 型の値が関数 `float %s()' から返されています。 @item @ref{W0264} char 型の値が関数 `double %s()' から返されています。 @item @ref{W0265} char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0266} char 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0268 @section W0268 @cindex W0268 @subsection メッセージ本文 unsigned char 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim char func(void) { unsigned char a = 0; return a; /* W0268 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0269 @section W0269 @cindex W0269 @subsection メッセージ本文 signed char 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 @subsection サンプルコード @verbatim char func(void) { signed char a = 0; return a; /* W0269 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0270 @section W0270 @cindex W0270 @subsection メッセージ本文 signed short 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { short a = 0; return a; /* W0270 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0271 @section W0271 @cindex W0271 @subsection メッセージ本文 unsigned short 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { unsigned short a = 0; return a; /* W0271 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0272 @section W0272 @cindex W0272 @subsection メッセージ本文 signed int 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { int a = 0; return a; /* W0272 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0273 @section W0273 @cindex W0273 @subsection メッセージ本文 unsigned int 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { unsigned int a = 0; return a; /* W0273 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0274 @section W0274 @cindex W0274 @subsection メッセージ本文 signed long 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { long a = 0; return a; /* W0274 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0275 @section W0275 @cindex W0275 @subsection メッセージ本文 unsigned long 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { unsigned long a = 0; return a; /* W0275 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0276 @section W0276 @cindex W0276 @subsection メッセージ本文 signed long long 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { long long a = 0; return a; /* W0276 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0277} unsigned long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0277 @section W0277 @cindex W0277 @subsection メッセージ本文 unsigned long long 型の値が関数 `char %s()' から返されています。 @subsection 内容 単なる @code{char} 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim char func(void) { unsigned long long a = 0; return a; /* W0277 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0268} unsigned char 型の値が関数 `char %s()' から返されています。 @item @ref{W0269} signed char 型の値が関数 `char %s()' から返されています。 @item @ref{W0270} signed short 型の値が関数 `char %s()' から返されています。 @item @ref{W0271} unsigned short 型の値が関数 `char %s()' から返されています。 @item @ref{W0272} signed int 型の値が関数 `char %s()' から返されています。 @item @ref{W0273} unsigned int 型の値が関数 `char %s()' から返されています。 @item @ref{W0274} signed long 型の値が関数 `char %s()' から返されています。 @item @ref{W0275} unsigned long 型の値が関数 `char %s()' から返されています。 @item @ref{W0276} signed long long 型の値が関数 `char %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0278 @section W0278 @cindex W0278 @subsection メッセージ本文 unsigned char 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { unsigned char a = 0; return a; /* W0278 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0279 @section W0279 @cindex W0279 @subsection メッセージ本文 unsigned short 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { unsigned short a = 0; return a; /* W0279 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0280 @section W0280 @cindex W0280 @subsection メッセージ本文 unsigned short 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim short func(void) { unsigned short a = 0; return a; /* W0280 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0281 @section W0281 @cindex W0281 @subsection メッセージ本文 unsigned int 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { unsigned int a = 0; return a; /* W0281 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0282 @section W0282 @cindex W0282 @subsection メッセージ本文 unsigned int 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim short func(void) { unsigned int a = 0; return a; /* W0282 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0283 @section W0283 @cindex W0283 @subsection メッセージ本文 unsigned int 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim int func(void) { unsigned int a = 0; return a; /* W0283 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0284 @section W0284 @cindex W0284 @subsection メッセージ本文 unsigned long 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { unsigned long a = 0; return a; /* W0284 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0285 @section W0285 @cindex W0285 @subsection メッセージ本文 unsigned long 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim short func(void) { unsigned long a = 0; return a; /* W0285 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0286 @section W0286 @cindex W0286 @subsection メッセージ本文 unsigned long 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim int func(void) { unsigned long a = 0; return a; /* W0286 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0287 @section W0287 @cindex W0287 @subsection メッセージ本文 unsigned long 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long func(void) { unsigned long a = 0; return a; /* W0287 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0288 @section W0288 @cindex W0288 @subsection メッセージ本文 unsigned long long 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { unsigned long long a = 0; return a; /* W0288 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0289 @section W0289 @cindex W0289 @subsection メッセージ本文 unsigned long long 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim short func(void) { unsigned long long a = 0; return a; /* W0289 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0290 @section W0290 @cindex W0290 @subsection メッセージ本文 unsigned long long 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim int func(void) { unsigned long long a = 0; return a; /* W0290 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0291 @section W0291 @cindex W0291 @subsection メッセージ本文 unsigned long long 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim long func(void) { unsigned long long a = 0; return a; /* W0291 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0292} unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0292 @section W0292 @cindex W0292 @subsection メッセージ本文 unsigned long long 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim long long func(void) { unsigned long long a = 0; return a; /* W0292 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0278} unsigned char 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0279} unsigned short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0280} unsigned short 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0281} unsigned int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0282} unsigned int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0283} unsigned int 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0284} unsigned long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0285} unsigned long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0286} unsigned long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0287} unsigned long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0288} unsigned long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0289} unsigned long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0290} unsigned long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0291} unsigned long long 型の値が関数 `signed long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0293 @section W0293 @cindex W0293 @subsection メッセージ本文 signed char 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { signed char a = 0; return a; /* W0293 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0294 @section W0294 @cindex W0294 @subsection メッセージ本文 signed char 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { signed char a = 0; return a; /* W0294 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0295 @section W0295 @cindex W0295 @subsection メッセージ本文 signed char 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { signed char a = 0; return a; /* W0295 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0296 @section W0296 @cindex W0296 @subsection メッセージ本文 signed char 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { signed char a = 0; return a; /* W0296 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0297 @section W0297 @cindex W0297 @subsection メッセージ本文 signed short 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { short a = 0; return a; /* W0297 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0298 @section W0298 @cindex W0298 @subsection メッセージ本文 signed short 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { short a = 0; return a; /* W0298 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0299 @section W0299 @cindex W0299 @subsection メッセージ本文 signed short 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { short a = 0; return a; /* W0299 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0300 @section W0300 @cindex W0300 @subsection メッセージ本文 signed short 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { short a = 0; return a; /* W0300 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0301 @section W0301 @cindex W0301 @subsection メッセージ本文 signed int 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { int a = 0; return a; /* W0301 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0302 @section W0302 @cindex W0302 @subsection メッセージ本文 signed int 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { int a = 0; return a; /* W0302 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0303 @section W0303 @cindex W0303 @subsection メッセージ本文 signed int 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { int a = 0; return a; /* W0303 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0304 @section W0304 @cindex W0304 @subsection メッセージ本文 signed int 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { int a = 0; return a; /* W0304 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0305 @section W0305 @cindex W0305 @subsection メッセージ本文 signed long 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { long a = 0; return a; /* W0305 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0306 @section W0306 @cindex W0306 @subsection メッセージ本文 signed long 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { long a = 0; return a; /* W0306 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0307 @section W0307 @cindex W0307 @subsection メッセージ本文 signed long 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { long a = 0; return a; /* W0307 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0308 @section W0308 @cindex W0308 @subsection メッセージ本文 signed long 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { long a = 0; return a; /* W0308 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0309 @section W0309 @cindex W0309 @subsection メッセージ本文 signed char 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { signed char a = 0; return a; /* W0309 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0310 @section W0310 @cindex W0310 @subsection メッセージ本文 signed short 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { short a = 0; return a; /* W0310 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0311 @section W0311 @cindex W0311 @subsection メッセージ本文 signed int 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { int a = 0; return a; /* W0311 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0312 @section W0312 @cindex W0312 @subsection メッセージ本文 signed long 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { long a = 0; return a; /* W0312 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0313 @section W0313 @cindex W0313 @subsection メッセージ本文 signed long long 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { long long a = 0; return a; /* W0313 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0314 @section W0314 @cindex W0314 @subsection メッセージ本文 signed long long 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { long long a = 0; return a; /* W0314 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0315 @section W0315 @cindex W0315 @subsection メッセージ本文 signed long long 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { long long a = 0; return a; /* W0315 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0316 @section W0316 @cindex W0316 @subsection メッセージ本文 signed long long 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { long long a = 0; return a; /* W0316 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0317} signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0317 @section W0317 @cindex W0317 @subsection メッセージ本文 signed long long 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { long long a = 0; return a; /* W0317 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0293} signed char 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0294} signed char 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0295} signed char 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0296} signed char 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0297} signed short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0298} signed short 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0299} signed short 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0300} signed short 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0301} signed int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0302} signed int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0303} signed int 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0304} signed int 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0305} signed long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0306} signed long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0307} signed long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0308} signed long 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0309} signed char 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0310} signed short 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0311} signed int 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0312} signed long 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0313} signed long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0314} signed long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0315} signed long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0316} signed long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0318 @section W0318 @cindex W0318 @subsection メッセージ本文 unsigned char 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { unsigned char a = 0; return a; /* W0318 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0319 @section W0319 @cindex W0319 @subsection メッセージ本文 unsigned char 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { unsigned char a = 0; return a; /* W0319 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0320 @section W0320 @cindex W0320 @subsection メッセージ本文 unsigned char 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { unsigned char a = 0; return a; /* W0320 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0321 @section W0321 @cindex W0321 @subsection メッセージ本文 signed char 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { unsigned char a = 0; return a; /* W0321 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0322 @section W0322 @cindex W0322 @subsection メッセージ本文 signed char 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { unsigned char a = 0; return a; /* W0322 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0323 @section W0323 @cindex W0323 @subsection メッセージ本文 signed char 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { unsigned char a = 0; return a; /* W0323 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0324 @section W0324 @cindex W0324 @subsection メッセージ本文 signed short 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { short a = 0; return a; /* W0324 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0325 @section W0325 @cindex W0325 @subsection メッセージ本文 signed short 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { short a = 0; return a; /* W0325 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0326 @section W0326 @cindex W0326 @subsection メッセージ本文 signed short 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { short a = 0; return a; /* W0326 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0327 @section W0327 @cindex W0327 @subsection メッセージ本文 unsigned short 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { unsigned short a = 0; return a; /* W0327 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0328 @section W0328 @cindex W0328 @subsection メッセージ本文 unsigned short 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { unsigned short a = 0; return a; /* W0328 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0329 @section W0329 @cindex W0329 @subsection メッセージ本文 unsigned short 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { unsigned short a = 0; return a; /* W0329 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0330 @section W0330 @cindex W0330 @subsection メッセージ本文 signed int 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { int a = 0; return a; /* W0330 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0331 @section W0331 @cindex W0331 @subsection メッセージ本文 signed int 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { int a = 0; return a; /* W0331 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0332 @section W0332 @cindex W0332 @subsection メッセージ本文 signed int 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { int a = 0; return a; /* W0332 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0333 @section W0333 @cindex W0333 @subsection メッセージ本文 unsigned int 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { unsigned int a = 0; return a; /* W0333 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0334 @section W0334 @cindex W0334 @subsection メッセージ本文 unsigned int 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { unsigned int a = 0; return a; /* W0334 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0335 @section W0335 @cindex W0335 @subsection メッセージ本文 unsigned int 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { unsigned int a = 0; return a; /* W0335 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0336 @section W0336 @cindex W0336 @subsection メッセージ本文 signed long 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { long a = 0; return a; /* W0336 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0337 @section W0337 @cindex W0337 @subsection メッセージ本文 signed long 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { long a = 0; return a; /* W0337 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0338 @section W0338 @cindex W0338 @subsection メッセージ本文 signed long 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { long a = 0; return a; /* W0338 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0339 @section W0339 @cindex W0339 @subsection メッセージ本文 unsigned long 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { unsigned long a = 0; return a; /* W0339 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0340 @section W0340 @cindex W0340 @subsection メッセージ本文 unsigned long 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { unsigned long a = 0; return a; /* W0340 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0341 @section W0341 @cindex W0341 @subsection メッセージ本文 unsigned long 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { unsigned long a = 0; return a; /* W0341 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0342 @section W0342 @cindex W0342 @subsection メッセージ本文 signed long long 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { long long a = 0; return a; /* W0342 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0343 @section W0343 @cindex W0343 @subsection メッセージ本文 signed long long 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { long long a = 0; return a; /* W0343 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0344 @section W0344 @cindex W0344 @subsection メッセージ本文 signed long long 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { long long a = 0; return a; /* W0344 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0345 @section W0345 @cindex W0345 @subsection メッセージ本文 unsigned long long 型の値が関数 `float %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim float func(void) { unsigned long long a = 0; return a; /* W0345 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0346 @section W0346 @cindex W0346 @subsection メッセージ本文 unsigned long long 型の値が関数 `double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim double func(void) { unsigned long long a = 0; return a; /* W0346 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0347} unsigned long long 型の値が関数 `long double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0347 @section W0347 @cindex W0347 @subsection メッセージ本文 unsigned long long 型の値が関数 `long double %s()' から返されています。 @subsection 内容 整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long double func(void) { unsigned long long a = 0; return a; /* W0347 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0318} unsigned char 型の値が関数 `float %s()' から返されています。 @item @ref{W0319} unsigned char 型の値が関数 `double %s()' から返されています。 @item @ref{W0320} unsigned char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0321} signed char 型の値が関数 `float %s()' から返されています。 @item @ref{W0322} signed char 型の値が関数 `double %s()' から返されています。 @item @ref{W0323} signed char 型の値が関数 `long double %s()' から返されています。 @item @ref{W0324} signed short 型の値が関数 `float %s()' から返されています。 @item @ref{W0325} signed short 型の値が関数 `double %s()' から返されています。 @item @ref{W0326} signed short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0327} unsigned short 型の値が関数 `float %s()' から返されています。 @item @ref{W0328} unsigned short 型の値が関数 `double %s()' から返されています。 @item @ref{W0329} unsigned short 型の値が関数 `long double %s()' から返されています。 @item @ref{W0330} signed int 型の値が関数 `float %s()' から返されています。 @item @ref{W0331} signed int 型の値が関数 `double %s()' から返されています。 @item @ref{W0332} signed int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0333} unsigned int 型の値が関数 `float %s()' から返されています。 @item @ref{W0334} unsigned int 型の値が関数 `double %s()' から返されています。 @item @ref{W0335} unsigned int 型の値が関数 `long double %s()' から返されています。 @item @ref{W0336} signed long 型の値が関数 `float %s()' から返されています。 @item @ref{W0337} signed long 型の値が関数 `double %s()' から返されています。 @item @ref{W0338} signed long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0339} unsigned long 型の値が関数 `float %s()' から返されています。 @item @ref{W0340} unsigned long 型の値が関数 `double %s()' から返されています。 @item @ref{W0341} unsigned long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0342} signed long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0343} signed long long 型の値が関数 `double %s()' から返されています。 @item @ref{W0344} signed long long 型の値が関数 `long double %s()' から返されています。 @item @ref{W0345} unsigned long long 型の値が関数 `float %s()' から返されています。 @item @ref{W0346} unsigned long long 型の値が関数 `double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0348 @section W0348 @cindex W0348 @subsection メッセージ本文 float 型の値が関数 `char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim char func(void) { float a = 0; return a; /* W0348 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0349 @section W0349 @cindex W0349 @subsection メッセージ本文 float 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { float a = 0; return a; /* W0349 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0350 @section W0350 @cindex W0350 @subsection メッセージ本文 float 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { float a = 0; return a; /* W0350 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0351 @section W0351 @cindex W0351 @subsection メッセージ本文 float 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim short func(void) { float a = 0; return a; /* W0351 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0352 @section W0352 @cindex W0352 @subsection メッセージ本文 float 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { float a = 0; return a; /* W0352 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0353 @section W0353 @cindex W0353 @subsection メッセージ本文 float 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim int func(void) { float a = 0; return a; /* W0353 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0354 @section W0354 @cindex W0354 @subsection メッセージ本文 float 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { float a = 0; return a; /* W0354 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0355 @section W0355 @cindex W0355 @subsection メッセージ本文 float 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long func(void) { float a = 0; return a; /* W0355 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0356 @section W0356 @cindex W0356 @subsection メッセージ本文 float 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { float a = 0; return a; /* W0356 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0357 @section W0357 @cindex W0357 @subsection メッセージ本文 double 型の値が関数 `char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim char func(void) { double a = 0; return a; /* W0357 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0358 @section W0358 @cindex W0358 @subsection メッセージ本文 double 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { double a = 0; return a; /* W0358 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0359 @section W0359 @cindex W0359 @subsection メッセージ本文 double 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { double a = 0; return a; /* W0359 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0360 @section W0360 @cindex W0360 @subsection メッセージ本文 double 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim short func(void) { double a = 0; return a; /* W0360 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0361 @section W0361 @cindex W0361 @subsection メッセージ本文 double 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { double a = 0; return a; /* W0361 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0362 @section W0362 @cindex W0362 @subsection メッセージ本文 double 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim int func(void) { double a = 0; return a; /* W0362 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0363 @section W0363 @cindex W0363 @subsection メッセージ本文 double 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { double a = 0; return a; /* W0363 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0364 @section W0364 @cindex W0364 @subsection メッセージ本文 double 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long func(void) { double a = 0; return a; /* W0364 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0365 @section W0365 @cindex W0365 @subsection メッセージ本文 double 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { double a = 0; return a; /* W0365 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0366 @section W0366 @cindex W0366 @subsection メッセージ本文 long double 型の値が関数 `char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim char func(void) { long double a = 0; return a; /* W0366 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0367 @section W0367 @cindex W0367 @subsection メッセージ本文 long double 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim signed char func(void) { long double a = 0; return a; /* W0367 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0368 @section W0368 @cindex W0368 @subsection メッセージ本文 long double 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned char func(void) { long double a = 0; return a; /* W0368 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0369 @section W0369 @cindex W0369 @subsection メッセージ本文 long double 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim short func(void) { long double a = 0; return a; /* W0369 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0370 @section W0370 @cindex W0370 @subsection メッセージ本文 long double 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned short func(void) { long double a = 0; return a; /* W0370 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0371 @section W0371 @cindex W0371 @subsection メッセージ本文 long double 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim int func(void) { long double a = 0; return a; /* W0371 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0372 @section W0372 @cindex W0372 @subsection メッセージ本文 long double 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(void) { long double a = 0; return a; /* W0372 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0373 @section W0373 @cindex W0373 @subsection メッセージ本文 long double 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long func(void) { long double a = 0; return a; /* W0373 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0374 @section W0374 @cindex W0374 @subsection メッセージ本文 long double 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned long func(void) { long double a = 0; return a; /* W0374 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0375 @section W0375 @cindex W0375 @subsection メッセージ本文 float 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long long func(void) { float a = 0; return a; /* W0375 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0376 @section W0376 @cindex W0376 @subsection メッセージ本文 float 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { float a = 0; return a; /* W0376 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0377 @section W0377 @cindex W0377 @subsection メッセージ本文 double 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long long func(void) { double a = 0; return a; /* W0377 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0378 @section W0378 @cindex W0378 @subsection メッセージ本文 double 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { double a = 0; return a; /* W0378 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0379 @section W0379 @cindex W0379 @subsection メッセージ本文 long double 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim long long func(void) { long double a = 0; return a; /* W0379 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0380} long double 型の値が関数 `unsigned long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0380 @section W0380 @cindex W0380 @subsection メッセージ本文 long double 型の値が関数 `unsigned long long %s()' から返されています。 @subsection 内容 浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim unsigned long long func(void) { long double a = 0; return a; /* W0380 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0348} float 型の値が関数 `char %s()' から返されています。 @item @ref{W0349} float 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0350} float 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0351} float 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0352} float 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0353} float 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0354} float 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0355} float 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0356} float 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0357} double 型の値が関数 `char %s()' から返されています。 @item @ref{W0358} double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0359} double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0360} double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0361} double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0362} double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0363} double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0364} double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0365} double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0366} long double 型の値が関数 `char %s()' から返されています。 @item @ref{W0367} long double 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0368} long double 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0369} long double 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0370} long double 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0371} long double 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0372} long double 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0373} long double 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0374} long double 型の値が関数 `unsigned long %s()' から返されています。 @item @ref{W0375} float 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0376} float 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0377} double 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0378} double 型の値が関数 `unsigned long long %s()' から返されています。 @item @ref{W0379} long double 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0381 @section W0381 @cindex W0381 @subsection メッセージ本文 signed short 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim signed char func(void) { short a = 0; return a; /* W0381 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0382 @section W0382 @cindex W0382 @subsection メッセージ本文 unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned char func(void) { unsigned short a = 0; return a; /* W0382 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0383 @section W0383 @cindex W0383 @subsection メッセージ本文 signed int 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim signed char func(void) { int a = 0; return a; /* W0383 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0384 @section W0384 @cindex W0384 @subsection メッセージ本文 signed int 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim short func(void) { int a = 0; return a; /* W0384 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0385 @section W0385 @cindex W0385 @subsection メッセージ本文 unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned char func(void) { unsigned int a = 0; return a; /* W0385 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0386 @section W0386 @cindex W0386 @subsection メッセージ本文 unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned short func(void) { unsigned int a = 0; return a; /* W0386 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0387 @section W0387 @cindex W0387 @subsection メッセージ本文 signed long 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim signed char func(void) { long a = 0; return a; /* W0387 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0388 @section W0388 @cindex W0388 @subsection メッセージ本文 signed long 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim short func(void) { long a = 0; return a; /* W0388 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0389 @section W0389 @cindex W0389 @subsection メッセージ本文 signed long 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim int func(void) { long a = 0; return a; /* W0389 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0390 @section W0390 @cindex W0390 @subsection メッセージ本文 unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned char func(void) { unsigned long a = 0; return a; /* W0390 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0391 @section W0391 @cindex W0391 @subsection メッセージ本文 unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned short func(void) { unsigned long a = 0; return a; /* W0391 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0392 @section W0392 @cindex W0392 @subsection メッセージ本文 unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned int func(void) { unsigned long a = 0; return a; /* W0392 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0393 @section W0393 @cindex W0393 @subsection メッセージ本文 signed long long 型の値が関数 `signed char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim signed char func(void) { long long a = 0; return a; /* W0393 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0394 @section W0394 @cindex W0394 @subsection メッセージ本文 signed long long 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim short func(void) { long long a = 0; return a; /* W0394 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0395 @section W0395 @cindex W0395 @subsection メッセージ本文 signed long long 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim int func(void) { long long a = 0; return a; /* W0395 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0396 @section W0396 @cindex W0396 @subsection メッセージ本文 signed long long 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim long func(void) { long long a = 0; return a; /* W0396 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0397 @section W0397 @cindex W0397 @subsection メッセージ本文 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned char func(void) { unsigned long long a = 0; return a; /* W0397 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0398 @section W0398 @cindex W0398 @subsection メッセージ本文 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned short func(void) { unsigned long long a = 0; return a; /* W0398 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0399 @section W0399 @cindex W0399 @subsection メッセージ本文 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned int func(void) { unsigned long long a = 0; return a; /* W0399 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0400} unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0400 @section W0400 @cindex W0400 @subsection メッセージ本文 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。 @subsection サンプルコード @verbatim unsigned long func(void) { unsigned long long a = 0; return a; /* W0400 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0381} signed short 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0382} unsigned short 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0383} signed int 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0384} signed int 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0385} unsigned int 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0386} unsigned int 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0387} signed long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0388} signed long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0389} signed long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0390} unsigned long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0391} unsigned long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0392} unsigned long 型の値が関数 `unsigned int %s()' から返されています。 @item @ref{W0393} signed long long 型の値が関数 `signed char %s()' から返されています。 @item @ref{W0394} signed long long 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0395} signed long long 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0396} signed long long 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0397} unsigned long long 型の値が関数 `unsigned char %s()' から返されています。 @item @ref{W0398} unsigned long long 型の値が関数 `unsigned short %s()' から返されています。 @item @ref{W0399} unsigned long long 型の値が関数 `unsigned int %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0401 @section W0401 @cindex W0401 @subsection メッセージ本文 unsigned char 型の値が関数 `signed short %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim short func(void) { unsigned char a = 0; return a; /* W0401 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0402 @section W0402 @cindex W0402 @subsection メッセージ本文 unsigned char 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim int func(void) { unsigned char a = 0; return a; /* W0402 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0403 @section W0403 @cindex W0403 @subsection メッセージ本文 unsigned char 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long func(void) { unsigned char a = 0; return a; /* W0403 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0404 @section W0404 @cindex W0404 @subsection メッセージ本文 unsigned short 型の値が関数 `signed int %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim int func(void) { unsigned short a = 0; return a; /* W0404 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0405 @section W0405 @cindex W0405 @subsection メッセージ本文 unsigned short 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long func(void) { unsigned short a = 0; return a; /* W0405 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0406 @section W0406 @cindex W0406 @subsection メッセージ本文 unsigned int 型の値が関数 `signed long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long func(void) { unsigned int a = 0; return a; /* W0406 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0407 @section W0407 @cindex W0407 @subsection メッセージ本文 unsigned char 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long long func(void) { unsigned char a = 0; return a; /* W0407 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0408 @section W0408 @cindex W0408 @subsection メッセージ本文 unsigned short 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long long func(void) { unsigned short a = 0; return a; /* W0408 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0409 @section W0409 @cindex W0409 @subsection メッセージ本文 unsigned int 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long long func(void) { unsigned int a = 0; return a; /* W0409 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0410} unsigned long 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0410 @section W0410 @cindex W0410 @subsection メッセージ本文 unsigned long 型の値が関数 `signed long long %s()' から返されています。 @subsection 内容 符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 @subsection サンプルコード @verbatim long long func(void) { unsigned long a = 0; return a; /* W0410 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0401} unsigned char 型の値が関数 `signed short %s()' から返されています。 @item @ref{W0402} unsigned char 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0403} unsigned char 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0404} unsigned short 型の値が関数 `signed int %s()' から返されています。 @item @ref{W0405} unsigned short 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0406} unsigned int 型の値が関数 `signed long %s()' から返されています。 @item @ref{W0407} unsigned char 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0408} unsigned short 型の値が関数 `signed long long %s()' から返されています。 @item @ref{W0409} unsigned int 型の値が関数 `signed long long %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0411 @section W0411 @cindex W0411 @subsection メッセージ本文 列挙体は、最初だけ初期化するか、全てを初期化するか、全く初期化しないかのいずれかにしてください。 @subsection 内容 “列挙型の初期化が不十分”と判断されるのは、サンプルコードのような初期化の場合です。 このような初期化を行うと、@code{spring} や @code{winter} がどのような値で初期化されているのかがわかりづらくなります。 また、意図的に行っているのか、一部の初期化を忘れているのかの判断も難しくなります。 以上より、混乱を招く可能性の高い記述だと言えます。 @subsection サンプルコード @verbatim enum SEASON1 { /* W0411 */ SPRING, SUMMER = 4, AUTUMN = 8, WINTER }; enum SEASON2 { /* OK */ SPRING, SUMMER, AUTUMN, WINTER }; enum SEASON3 { /* OK */ SPRING = 0, SUMMER = 1, AUTUMN = 2, WINTER = 3 }; enum SEASON4 { /* OK */ SPRING = 1, SUMMER, AUTUMN, WINTER }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0413 @section W0413 @cindex W0413 @subsection メッセージ本文 制御文の本体が `@{@}' で囲まれたブロックになっていません。 @subsection 内容 波括弧がなければ、本体がどこまでなのかが直感的にわかりづらくなるデメリットがあります。 また、制御文における本体が単一文で済まなくなったときに、波括弧をつけ忘れるリスクもあります。 @subsection サンプルコード @verbatim if (x > 0) x++; /* W0413 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0414} 制御文の本体が同じ行にあり、`@{@}' で囲まれたブロックになっていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0414 @section W0414 @cindex W0414 @subsection メッセージ本文 制御文の本体が同じ行にあり、`@{@}' で囲まれたブロックになっていません。 @subsection 内容 波括弧がなければ、本体がどこまでなのかが直感的にわかりづらくなるデメリットがあります。 また、制御文における本体が単一文で済まなくなったときに、波括弧をつけ忘れるリスクもあります。 @subsection サンプルコード @verbatim if (x > 0) x++; /* W0414 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0413} 制御文の本体が `@{@}' で囲まれたブロックになっていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0421 @section W0421 @cindex W0421 @subsection メッセージ本文 値が NULL になるポインタに対して間接参照が行われています。 @subsection 内容 @code{NULL} ポインタを間接参照するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a, int *p) { int b; if (p) { b = *p; /* OK */ } else { b = *p; /* W0421 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1004} ここで該当変数に NULL の値を割り当てました。 @item @ref{C1005} ここで該当変数に NULL の可能性がある値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0422 @section W0422 @cindex W0422 @subsection メッセージ本文 値が NULL になることがあるポインタに対して間接参照が行われています。 @subsection 内容 @code{NULL} ポインタを間接参照するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a, int *p) { int b; if (p) { b = *p; /* OK */ } b = *p; /* W0422 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1004} ここで該当変数に NULL の値を割り当てました。 @item @ref{C1005} ここで該当変数に NULL の可能性がある値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0423 @section W0423 @cindex W0423 @subsection メッセージ本文 値が NULL になるポインタに対して算術演算を行っています。 @subsection 内容 @code{NULL} ポインタに対して算術演算するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int *func(int *p) { if (p) { return p + 1; /* OK */ } else { return p + 1; /* W0423 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1004} ここで該当変数に NULL の値を割り当てました。 @item @ref{C1005} ここで該当変数に NULL の可能性がある値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0424 @section W0424 @cindex W0424 @subsection メッセージ本文 値が NULL になることがあるポインタに対して算術演算を行っています。 @subsection 内容 @code{NULL} ポインタに対して算術演算するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int *func(int *p) { int a; if (p) { a = *(p + 1); /* OK */ } return p + 1; /* W0424 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1004} ここで該当変数に NULL の値を割り当てました。 @item @ref{C1005} ここで該当変数に NULL の可能性がある値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0425 @section W0425 @cindex W0425 @subsection メッセージ本文 一つの行に複数の宣言または文が存在します。 @subsection 内容 1 行中に複数の宣言や文を書くことは文法上の誤りではありませんが、コードがやや複雑になります。 @subsection サンプルコード @verbatim int a, b; /* W0425 */ int a; int b; /* W0425 */ struct C { int i; } c = { 0 }; c.i = a; /* W0425 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0431 @section W0431 @cindex W0431 @subsection メッセージ本文 この行は以前の同じ深さのインデントより左にずれています。 @subsection 内容 インデントの付け方に一貫性が保たれていないと、解析性が低下します。 @subsection サンプルコード @verbatim void func() { int a; int b; /* W0431 */ a = var(); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0432} この行はプロジェクトのインデントスタイルと合っていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0432 @section W0432 @cindex W0432 @subsection メッセージ本文 この行はプロジェクトのインデントスタイルと合っていません。 @subsection 内容 インデントの付け方に一貫性が保たれていないと、解析性が低下します。 @subsection サンプルコード @verbatim void func() { int a; int b; /* W0432 */ a = var(); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0431} この行は以前の同じ深さのインデントより左にずれています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0440 @section W0440 @cindex W0440 @subsection メッセージ本文 この閉じカッコ `@}' は、対応する開きカッコ `@{' に合うようなインデントに置かれていません。 @subsection 内容 制御文の開き波括弧と閉じ波括弧の配置を合っていないコードはスタイルの統一感がないという意味で解析性が低下します。 @subsection サンプルコード @verbatim void func() { if (x == 0) { if (y == 0) { ...snip... } /* W0440 */ } /* W0440 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0441 @section W0441 @cindex W0441 @subsection メッセージ本文 接尾辞がない整数リテラルの型が、int 型ではありません。 @subsection 内容 整数定数の型が @code{int} 型でない場合、どのような型になるかは、接尾語の有無、サイズ、@code{int} の処理系依存のサイズなどによって決まります。 従って、接尾語がない場合、整数定数の型が不明確となり解析性が低下します。 @subsection サンプルコード @verbatim int i = 0x1234; /* W0441 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0442 @section W0442 @cindex W0442 @subsection メッセージ本文 関数形式マクロが定義されています。 @subsection 内容 関数形式マクロは関数呼び出しのオーバーヘッドがない分だけ効率性にメリットがある反面、 実引数に対する型チェックが行われない、ブレークポイント等を用いたデバッグが行いにくい、などのデメリットがあります。 @subsection サンプルコード @verbatim #define MAX(a, b) (a < b ? b : a) /* W0442 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0443} この関数形式マクロは関数で置き換えることができる可能性があります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0443 @section W0443 @cindex W0443 @subsection メッセージ本文 この関数形式マクロは関数で置き換えることができる可能性があります。 @subsection 内容 関数形式マクロは関数呼び出しのオーバーヘッドがない分だけ効率性にメリットがある反面、 実引数に対する型チェックが行われない、ブレークポイント等を用いたデバッグが行いにくい、などのデメリットがあります。 @subsection サンプルコード @verbatim #define MACRO(a, b) (a * b) /* W0443 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0442} 関数形式マクロが定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0444 @section W0444 @cindex W0444 @subsection メッセージ本文 `#' 演算子と `##' 演算子が一つのマクロ定義内で使われています。 @subsection 内容 プリプロセッサが @code{#} 演算子や @code{##} 演算子を評価する順番は、 ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #define MACRO(a) L ## #a /* W0444 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0445} 複数の `##' 演算子が一つのマクロ定義内で使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0445 @section W0445 @cindex W0445 @subsection メッセージ本文 複数の `##' 演算子が一つのマクロ定義内で使われています。 @subsection 内容 プリプロセッサが @code{#} 演算子や @code{##} 演算子を評価する順番は、 ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #define MACRO(prefix, name, suffix) int i = prefix##name##suffix /* W0445 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0444} `#' 演算子と `##' 演算子が一つのマクロ定義内で使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0446 @section W0446 @cindex W0446 @subsection メッセージ本文 代入演算の結果値が使われています。 @subsection 内容 1 つの式の中に、複数の代入演算子や複合代入演算子を使用すると、文が複雑になります。 @subsection サンプルコード @verbatim void func(void) { int a; int b; a = b += 3; /* W0446 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0447 @section W0447 @cindex W0447 @subsection メッセージ本文 カンマ演算子が for 文の制御式以外で使われています。 @subsection 内容 カンマ演算子は複数の式を一つの文で書きたいときに使用します。主な用途は @code{for} 文です。@code{for} 文以外で使用するとコードが複雑になります。 @subsection サンプルコード @verbatim int a = 1; int b = 0; int c = (b = a, a); /* W0447 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0456 @section W0456 @cindex W0456 @subsection メッセージ本文 外部結合を持つオブジェクトあるいは関数 `%s' が、ヘッダファイル内で定義されています。 @subsection 内容 ヘッダファイルは通常は複数のファイルからインクルードされることを想定します。このようなヘッダファイルに外部結合を持つオブジェクトや関数が定義されていると、インクルードされている数分定義されることになり、通常はリンクエラーとなります。 @subsection サンプルコード @file{test.h} @verbatim int num = 1; /* W0456 */ int func(void) /* W0456 */ { return num; } @end verbatim @file{test.c} @verbatim #include "test.h" @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0457 @section W0457 @cindex W0457 @subsection メッセージ本文 関数の宣言あるいは定義で、戻り値型が明示的に定義されていないので、暗黙的に int 型と定義されます。 @subsection 内容 関数宣言の際に型を明示しなければ、暗黙的に @code{int} 型の関数として宣言されます。これはコードを省略したい動機で使われることもあるかもしれませんが、コードの明確さが失われ、解析性を低下させます。 @subsection サンプルコード @verbatim func1(void); /* W0457 */ func2(void) /* W0457 */ { return 0; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0458 @section W0458 @cindex W0458 @subsection メッセージ本文 オブジェクトの宣言あるいは定義で、型が明示的に定義されていないので、暗黙的に int 型と定義されます。 @subsection 内容 オブジェクト宣言の際に型を明示しなければ、暗黙的に @code{int} 型の関数として宣言されます。これはコードを省略したい動機で使われることもあるかもしれませんが、コードの明確さが失われ、解析性を低下させます。 @subsection サンプルコード @verbatim a; /* W0458 */ b = 0; /* W0458 */ extern c; /* W0458 */ static d; /* W0458 */ int func(e) /* W0458 */ { const f = e; /* W0458 */ return f; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0459 @section W0459 @cindex W0459 @subsection メッセージ本文 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 @subsection 内容 変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int a; if(a > 0) { /* W0459 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0460} 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 @item @ref{W0461} 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 @item @ref{W0462} 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1003} ここで該当変数が初期値を指定せずに定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0460 @section W0460 @cindex W0460 @subsection メッセージ本文 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 @subsection 内容 変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a) { int b; if (a == 0) { b = 1; } if (b > 0) { /* W0460 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0459} 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 @item @ref{W0461} 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 @item @ref{W0462} 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1003} ここで該当変数が初期値を指定せずに定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0461 @section W0461 @cindex W0461 @subsection メッセージ本文 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 @subsection 内容 変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern int func1(const int *); void func2(int a) { int b; func1(&a); /* OK */ func1(&b); /* W0461 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0459} 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 @item @ref{W0460} 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 @item @ref{W0462} 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1003} ここで該当変数が初期値を指定せずに定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0462 @section W0462 @cindex W0462 @subsection メッセージ本文 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 @subsection 内容 変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern int func1(const int *); int func2(int a) { int b; if (a > 10) { b = a + 10; } func1(&b); /* W0462 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0459} 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 @item @ref{W0460} 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 @item @ref{W0461} 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1003} ここで該当変数が初期値を指定せずに定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0477 @section W0477 @cindex W0477 @subsection メッセージ本文 マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 @subsection 内容 このようなマクロ定義は、プロジェクトやプログラマに特有のものになりがちなため、 外部の人が見たときの解析性が大幅に低下します。 @subsection サンプルコード @verbatim #define BEGIN { /* W0477 */ #define END } /* W0477 */ void func() BEGIN ...snip... END @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0478} このマクロは、認識不可能なコードの断片を定義しています。 @item @ref{W0479} このマクロ定義は typedef 宣言に置換することができます。 @item @ref{W0480} このマクロは、制御文のキーワード、あるいは句読文字を定義しています。 @item @ref{W0481} このマクロは、`@{@}' で囲まれたブロックを定義しています。 @item @ref{W0482} このマクロは、いずれかの型指定子を定義しています。 @item @ref{W0483} このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0478 @section W0478 @cindex W0478 @subsection メッセージ本文 このマクロは、認識不可能なコードの断片を定義しています。 @subsection 内容 このようなマクロ定義は、プロジェクトやプログラマに特有のものになりがちなため、 外部の人が見たときの解析性が大幅に低下します。 @subsection サンプルコード @verbatim #define MALLOC_OR_DIE(ptr, size) ptr = malloc(size); if (!ptr) exit(1); /* W0478 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0477} マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 @item @ref{W0479} このマクロ定義は typedef 宣言に置換することができます。 @item @ref{W0480} このマクロは、制御文のキーワード、あるいは句読文字を定義しています。 @item @ref{W0481} このマクロは、`@{@}' で囲まれたブロックを定義しています。 @item @ref{W0482} このマクロは、いずれかの型指定子を定義しています。 @item @ref{W0483} このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0479 @section W0479 @cindex W0479 @subsection メッセージ本文 このマクロ定義は typedef 宣言に置換することができます。 @subsection 内容 外部の人が見たときの解析性が大幅に低下します。 @subsection サンプルコード @verbatim #define foo unsigned int /* W0479 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0477} マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 @item @ref{W0478} このマクロは、認識不可能なコードの断片を定義しています。 @item @ref{W0480} このマクロは、制御文のキーワード、あるいは句読文字を定義しています。 @item @ref{W0481} このマクロは、`@{@}' で囲まれたブロックを定義しています。 @item @ref{W0482} このマクロは、いずれかの型指定子を定義しています。 @item @ref{W0483} このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0480 @section W0480 @cindex W0480 @subsection メッセージ本文 このマクロは、制御文のキーワード、演算子、あるいは区切り文字を定義しています。 @subsection 内容 外部の人が見たときの解析性が大幅に低下します。 @subsection サンプルコード @verbatim #define PLUS + /* W0480 */ #define LOOP while /* W0480 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0477} マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 @item @ref{W0478} このマクロは、認識不可能なコードの断片を定義しています。 @item @ref{W0479} このマクロ定義は typedef 宣言に置換することができます。 @item @ref{W0481} このマクロは、`@{@}' で囲まれたブロックを定義しています。 @item @ref{W0482} このマクロは、いずれかの型指定子を定義しています。 @item @ref{W0483} このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0481 @section W0481 @cindex W0481 @subsection メッセージ本文 このマクロは、`@{@}' で囲まれたブロックを定義しています。 @subsection 内容 外部の人が見たときの解析性が大幅に低下します。 @subsection サンプルコード @verbatim #define SETUP(a, b) /* W0481 */ \ { \ if (a) \ b = 0; \ else \ b = 1; \ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0477} マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 @item @ref{W0478} このマクロは、認識不可能なコードの断片を定義しています。 @item @ref{W0479} このマクロ定義は typedef 宣言に置換することができます。 @item @ref{W0480} このマクロは、制御文のキーワード、あるいは句読文字を定義しています。 @item @ref{W0482} このマクロは、いずれかの型指定子を定義しています。 @item @ref{W0483} このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0482 @section W0482 @cindex W0482 @subsection メッセージ本文 このマクロは、いずれかの型指定子を定義しています。 @subsection 内容 外部の人が見たときの解析性が大幅に低下します。 @subsection サンプルコード @verbatim #define COMPOSITE struct /* W0482 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0477} マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 @item @ref{W0478} このマクロは、認識不可能なコードの断片を定義しています。 @item @ref{W0479} このマクロ定義は typedef 宣言に置換することができます。 @item @ref{W0480} このマクロは、制御文のキーワード、あるいは句読文字を定義しています。 @item @ref{W0481} このマクロは、`@{@}' で囲まれたブロックを定義しています。 @item @ref{W0483} このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0483 @section W0483 @cindex W0483 @subsection メッセージ本文 このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。 @subsection 内容 外部の人が見たときの解析性が大幅に低下します。 @subsection サンプルコード @verbatim #define PRIVATE_FINAL static const /* W0483 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0477} マクロ定義の中に、対になっていない `[]'、`()'、`@{@}' が存在します。 @item @ref{W0478} このマクロは、認識不可能なコードの断片を定義しています。 @item @ref{W0479} このマクロ定義は typedef 宣言に置換することができます。 @item @ref{W0480} このマクロは、制御文のキーワード、あるいは句読文字を定義しています。 @item @ref{W0481} このマクロは、`@{@}' で囲まれたブロックを定義しています。 @item @ref{W0482} このマクロは、いずれかの型指定子を定義しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0488 @section W0488 @cindex W0488 @subsection メッセージ本文 関数呼び出し `()'、配列添字演算 `[]'、あるいは構造体/共用体メンバ演算 `->' または `.' が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、 チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim while (func(&a, &b) < 0 && i > 0) { /* W0488 */ ...snip... } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0489} 単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0490} 二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0489 @section W0489 @cindex W0489 @subsection メッセージ本文 単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、 チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(unsigned int a, unsigned int b) { unsigned int c = !a && b; /* W0489 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0488} 関数呼び出し `()' 、配列添字演算 `[]' 、あるいは構造体/共用体メンバ演算 `->' または `.' が、&& あるいは || と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0490} 二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0490 @section W0490 @cindex W0490 @subsection メッセージ本文 二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、 チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(unsigned int a, unsigned int b, unsigned int c) { unsigned int d = a && b || c; /* W0490 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0488} 関数呼び出し `()' 、配列添字演算 `[]' 、あるいは構造体/共用体メンバ演算 `->' または `.' が、&& あるいは || と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0489} 単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0491 @section W0491 @cindex W0491 @subsection メッセージ本文 同じ識別子名 `%s' は他の名前空間内の宣言でも使われています。 @subsection 内容 名前空間が異なるからといって、同じ名前の識別子を使用すると、コードが紛らわしくなります。 @subsection サンプルコード @verbatim extern int foo; struct foo { /* W0491 */ int a; int b; }; @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0492} 同じ識別子名 `%s' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0492 @section W0492 @cindex W0492 @subsection メッセージ本文 同じ識別子名 `%s' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。 @subsection 内容 名前空間が異なるからといって、同じ名前の識別子を使用すると、コードが紛らわしくなります。 @subsection サンプルコード @verbatim extern int foo; struct a { int foo; /* W0492 */ int b; }; void func(void) { struct a a; int b; /* W0492 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0491} 同じ識別子名 `%s' は他の名前空間内の宣言でも使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0493 @section W0493 @cindex W0493 @subsection メッセージ本文 構造体あるいは共用体の値を関数の実引数として渡しています。 @subsection 内容 引数にオブジェクトの値を渡すと、それらの要素のサイズ分スタックメモリを消費することになり、パフォーマンスの面でデメリットがあります。 @subsection サンプルコード @verbatim struct STR { long a; long b; }; extern int foo(struct STR s); void func(void) { struct STR s = { 0 }; foo(s); /* W0493 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0495 @section W0495 @cindex W0495 @subsection メッセージ本文 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { int x = a % b * c; /* W0495 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0496} 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0497} シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0498} 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0499} + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0500} 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0501} 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0502} + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0496 @section W0496 @cindex W0496 @subsection メッセージ本文 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c, int d, int e) { int f = a ? b : c ? d : e; /* W0496 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0495} 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0497} シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0498} 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0499} + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0500} 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0501} 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0502} + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0497 @section W0497 @cindex W0497 @subsection メッセージ本文 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { int d = a << b << c; /* W0497 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0495} 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0496} 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0498} 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0499} + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0500} 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0501} 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0502} + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0498 @section W0498 @cindex W0498 @subsection メッセージ本文 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { int d = a - b + c; /* W0498 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0495} 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0496} 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0497} シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0499} + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0500} 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0501} 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0502} + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0499 @section W0499 @cindex W0499 @subsection メッセージ本文 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { int d = a << b >> c; /* W0499 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0495} 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0496} 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0497} シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0498} 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0500} 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0501} 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0502} + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0500 @section W0500 @cindex W0500 @subsection メッセージ本文 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { int d = a * b + c; /* W0500 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0495} 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0496} 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0497} シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0498} 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0499} + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0501} 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0502} + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0501 @section W0501 @cindex W0501 @subsection メッセージ本文 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { int d = a ? a : a + c; /* W0501 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0495} 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0496} 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0497} シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0498} 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0499} + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0500} 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0502} + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0502 @section W0502 @cindex W0502 @subsection メッセージ本文 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @subsection 内容 演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { int d = a != b << c; /* W0502 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0495} 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0496} 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0497} シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0498} 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0499} + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0500} 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。 @item @ref{W0501} 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0508 @section W0508 @cindex W0508 @subsection メッセージ本文 `&&' あるいは `||' 演算子の右オペランドに副作用があります。 @subsection 内容 && 演算子および || 演算子は短絡評価の方式で処理されます。 したがって、これらの右オペランドに副作用を含む式がある場合、 その副作用の有無が左オペランドに依存することになります。 これは非常に紛らわしく、バグが入り込む可能性を高めます。 @subsection サンプルコード @verbatim if ((a == b) && ((c = func()) == d)) /* W0508 */ @end verbatim @code{c} には、 @code{a==b} の評価が真の場合にのみ @code{func()} の戻り値が代入されます。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0511 @section W0511 @cindex W0511 @subsection メッセージ本文 C++ コメント `//' が使われています。 @subsection 内容 @code{//} コメントは ISO C90 で規定されておらず、言語拡張に該当します。言語拡張を使用すると移植性が低下します。 @subsection サンプルコード @verbatim // W0511 @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0512 @section W0512 @cindex W0512 @subsection メッセージ本文 `++' あるいは `--' 演算子の結果が式の中で使われています。 @subsection 内容 このような式では @code{++} 演算子や @code{--} 演算子の評価順の認識誤りがあれば、意図しない結果になる可能性が高いです。 見た目にも複雑な式になり、理解が困難かつ誤った理解をしやすいなどのデメリットもあります。 @subsection サンプルコード @verbatim a = b++ + --c + d++; /* W0512 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0525 @section W0525 @cindex W0525 @subsection メッセージ本文 1 ビットの名前が付いたフィールドが符号付き型として宣言されています。 @subsection 内容 1 ビットの符号付ビットフィールドで表すことができるのは "-1" と "0" のみで、"1" を表すことはできません。 このようなビットフィールドは用途が考えづらく、理解が困難です。 @subsection サンプルコード @verbatim struct ST { int bit:1; /* W0525 */ }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0528 @section W0528 @cindex W0528 @subsection メッセージ本文 このマクロは、8 進数定数を定義しています。 @subsection 内容 0 で始まる定数は 8 進数として解釈されます。 10 進数と比べて紛らわしいです。 @subsection サンプルコード @verbatim #define MACRO 0123 /* W0528 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0529} 8 進数リテラルが使われています。 @item @ref{W0530} 文字定数または文字列リテラルの中で、8 進拡張表記が使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0529 @section W0529 @cindex W0529 @subsection メッセージ本文 8 進数リテラルが使われています。 @subsection 内容 0 で始まる定数は 8 進数として解釈されます。 10 進数と比べて紛らわしいです。 @subsection サンプルコード @verbatim #define MACRO 0123 int a = 0123; /* W0529 */ int b = MACRO; /* W0529 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0528} このマクロは、8 進数定数を定義しています。 @item @ref{W0530} 文字定数または文字列リテラルの中で、8 進拡張表記が使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0530 @section W0530 @cindex W0530 @subsection メッセージ本文 文字定数または文字列リテラルの中で、8 進拡張表記が使われています。 @subsection 内容 0 で始まる定数は 8 進数として解釈されます。 10 進数と比べて紛らわしいです。 @subsection サンプルコード @verbatim char *s = "\012"; /* W0530 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0528} このマクロは、8 進数定数を定義しています。 @item @ref{W0529} 8 進数リテラルが使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0532 @section W0532 @cindex W0532 @subsection メッセージ本文 switch 文の case 節、default 節から出るために break 文が使われていますが、case 節の末尾に記述されていません。 @subsection 内容 @code{break} 文は、@code{case} 文内の末尾でのみ使用されるべきです。 @subsection サンプルコード @verbatim switch (x) { case 1: if (y == 0) { break; /* W0532 */ } ...snip... break; case 2: ...snip... break; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0534 @section W0534 @cindex W0534 @subsection メッセージ本文 制御変数 `%s' は、この for 文制御式で初期化されていません。 @subsection 内容 ループ制御変数は必ずしも @code{for} 文の初期化式の中で初期化しないといけないわけではありません。 しかし、@code{for} 文以前のどこかから初期化文を探すよりも、@code{for} 文の初期化式に初期化文が書いている方がわかりやすいといえます。 @subsection サンプルコード @verbatim int i = 0; int j; for (; i < 10; i++) { /* W0534 */ } for (j = 0; i < 20; i++) { /* W0534 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0535 @section W0535 @cindex W0535 @subsection メッセージ本文 for 文の制御式の中にカンマ演算子が使われています。 @subsection 内容 @code{for} 文におけるカンマ演算子の使用は、@code{for} 文以外での使用よりはデメリットが少ないと言えます。 しかし、程度は小さいながらも解析性を低下させることに変わりはありません。 @subsection サンプルコード @verbatim int i, j, k = 0; for (i = 0, j = 0; i < 10; i++, j++, k--) { /* W0535 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0538 @section W0538 @cindex W0538 @subsection メッセージ本文 この default ラベルは、switch 文内の最後のラベルではありません。 @subsection 内容 @code{switch} 文において @code{default} 節が末尾でない場合、その節以降の @code{case} 節が判定されません。 これは、ほどんどの場合プログラマの意図ではないと想定されます。 @subsection サンプルコード @verbatim switch (x) { default: /* W0538 */ ...snip... case 1: ...snip... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0540 @section W0540 @cindex W0540 @subsection メッセージ本文 空の仮引数並びの関数が定義されています。`void' が省略されています。 @subsection 内容 引数を持たない関数定義で @code{void} を使用しない書き方は、古い形式の関数定義と見なされ、意図しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func() /* W0540 */ { ...snip... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0541 @section W0541 @cindex W0541 @subsection メッセージ本文 マクロで隠蔽されないインラインアセンブリコードです。 @subsection 内容 アセンブラコードは環境によって変わるため、複数の関数に点在させると、別の環境に移植するときの変更コストが大きくなります。 @subsection サンプルコード @verbatim #define ASM_CODE asm("movl %ecx, %eax") void foo(int arg1, int *arg2, int arg3) { asm("movl %ecx, %eax"); /* W0541 */ __asm__("movl %ecx, (%eax)"); /* W0541 */ asm { /* W0541 */ xorl eax, eax } ASM_CODE; /* OK */ __asm__ volatile ( /* W0541 */ "int $0x80" : "=a" (r) "+b" (arg1), "+c" (arg2), "+d" (arg3) : "a" (128) : "memory", "cc"); } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.6.0 @node W0542 @section W0542 @cindex W0542 @subsection メッセージ本文 関数宣言の仮引数の一部にのみ識別子が存在します。 @subsection 内容 関数定義の仮引数名が対応する宣言の仮引数名と異なる場合、その関数の仕様変更が未完了となる可能性があります。 @subsection サンプルコード @verbatim void func(int i, char, int, char c); /* W0542 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0543 @section W0543 @cindex W0543 @subsection メッセージ本文 この関数宣言における仮引数の識別子は、以前の宣言の仮引数の識別子と異なります。 @subsection 内容 関数定義の仮引数名が対応する宣言の仮引数名と異なる場合、その関数の仕様変更が未完了となる可能性があります。 @subsection サンプルコード @verbatim void func(int i1, int i2); void func(int i2, int i1) /* W0543 */ { ...snip... } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0544} 関数宣言の仮引数の識別子と関数ポインタの宣言の仮引数の識別子が異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0544 @section W0544 @cindex W0544 @subsection メッセージ本文 関数宣言の仮引数の識別子と関数ポインタの宣言の仮引数の識別子が異なります。 @subsection 内容 関数定義の仮引数名が対応する宣言の仮引数名と異なる場合、その関数の仕様変更が未完了となる可能性があります。 @subsection サンプルコード @verbatim void func(int i1, int i2); void (*p)(int i2, int i1) = &func; /* W0544 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0543} この関数宣言における仮引数の識別子は、以前の宣言の仮引数の識別子と異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0546 @section W0546 @cindex W0546 @subsection メッセージ本文 switch 文の case ラベルあるいは default ラベルが、ネストされたブロックの中に存在します。 @subsection 内容 @code{switch} 文中の入れ子ブロックの中に @code{case} 節や @code{default} 節を記述することは可能ですが、文が複雑になります。 また、入れ子ブロックが条件文になっている場合には構造化定理の側面から見ても怪しいものになってしまいます。 @subsection サンプルコード @verbatim switch (x) { case 1: if (y > 0) { case 2: /* W0546 */ break; } ...snip... break; default: ...snip... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0549 @section W0549 @cindex W0549 @subsection メッセージ本文 マクロの仮引数が `()' で囲まれていません。 @subsection 内容 マクロ仮引数が式である場合に、演算子の優先順位に関して問題が生じる可能性があります。 @subsection サンプルコード @verbatim #define ADD(a, b) a + b /* W0549 */ int x = 3 * ADD(1, 2); @end verbatim 上記コードでは、 @code{3 * (1 + 2) = 9} ではなく、@code{(3 * 1) + 2 = 5} が @code{x} に代入されます。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0551 @section W0551 @cindex W0551 @subsection メッセージ本文 共用体型指定子が定義されています。 @subsection 内容 共用体では、メンバがどのような順番でメモリに配置されるかが環境依存になります。従って、移植性が低下します。 @subsection サンプルコード @verbatim union UNI { /* W0551 */ int a; short b; long c; }; @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0552} 共用体型のオブジェクトが定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0552 @section W0552 @cindex W0552 @subsection メッセージ本文 共用体型のオブジェクトが定義されています。 @subsection 内容 共用体では、メンバがどのような順番でメモリに配置されるかが環境依存になります。従って、移植性が低下します。 @subsection サンプルコード @verbatim union UNI { int a; short b; long c; }; union UNI u; /* W0552 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0551} 共用体型指定子が定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0553 @section W0553 @cindex W0553 @subsection メッセージ本文 関数を指すポインタが、異なる関数ポインタ型へキャストされています。 @subsection 内容 異なる関数ポインタ型へのキャストを使用しても問題ない処理系が多いですが、中には関数ポインタのキャストを実施した時点でアボートするような処理系も存在します。 @subsection サンプルコード @verbatim extern int func(void); void (*p)(int) = (void (*)(int)) &func; /* W0553 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0554 @section W0554 @cindex W0554 @subsection メッセージ本文 `#pragma' の実引数 `%s' は認識できません。この `#pragma' 指令は無視されました。 @subsection 内容 @code{#pragma} ディレクティブで実行できる命令の内容や種類は処理系依存になります。従って、@code{#pragma} ディレクティブを使用するだけで移植性が低下します。 @subsection サンプルコード @verbatim #pragma SystemSpecificPragmaName 5 /* W0544 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0555 @section W0555 @cindex W0555 @subsection メッセージ本文 この関数はプロジェクト中で間接的に再帰呼び出しされています。 @subsection 内容 再帰関数は、効率性の面で「処理が遅くなる」、「スタックを想定以上に使用してしまう可能性がある」などのデメリットがあります。 また、無限ループに陥る可能性があるため危険だという側面もあります。 @subsection サンプルコード @file{test1.c} @verbatim int func1(int i) /* W0555 */ { if (i < 10) { return i + 1; } else { return func3(i); } } @end verbatim @file{test2.c} @verbatim int func2(int i) /* W0555 */ { return func1(i) + 2; } @end verbatim @file{test3.c} @verbatim int func3(int i) /* W0555 */ { return func2(i) + 3; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0556} この呼び出しを含む関数は、再帰呼び出しされています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0556 @section W0556 @cindex W0556 @subsection メッセージ本文 この呼び出しを含む関数は、再帰呼び出しされています。 @subsection 内容 再帰関数は、効率性の面で、「処理が遅くなる」、「スタックを想定以上に使用してしまう可能性がある」、などのデメリットがあります。 また、無限ループに陥る可能性があるため危険だという側面もあります。 @subsection サンプルコード @verbatim int func(int i) { if (i == 0) { return 0; } else { return func(i - 1); /* W0556 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0555} この関数はプロジェクト中で間接的に再帰呼び出しされています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0559 @section W0559 @cindex W0559 @subsection メッセージ本文 `!' 演算子のオペランドが算術演算あるいはビット演算の式になっています。 @subsection 内容 正しい単項演算子の使い方をしていません。ビット単位の論理積 `&' または論理和 `|' を使用すべきです。 @subsection サンプルコード @verbatim int func(int a, int b) { if (!(a || b)) { return 0; } else { return !(a & b); /* W0559 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0560} `~' 演算子のオペランドがブール型式になっています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0560 @section W0560 @cindex W0560 @subsection メッセージ本文 `~' 演算子のオペランドがブール型式になっています。 @subsection 内容 正しい単項演算子の使い方をしていません。論理否定演算子 `!' を使用すべきです。 @subsection サンプルコード @verbatim int func(int a, int b) { return ~((a < b) && (b > 0)); /* W0560 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0559} `!' 演算子のオペランドが算術演算あるいはビット演算の式になっています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0561 @section W0561 @cindex W0561 @subsection メッセージ本文 `*p++' の意味は、`(*p)++' ではなく、`*(p++)' です。`*' 演算子は冗長です。 @subsection 内容 プログラムの動作に寄与しない文の具体例としてサンプルコードの例が挙げられます。 この文は @code{*(p++)} と同義になるため、@code{p++} とした場合と処理結果は変わりません。 従って @code{*} 演算子が冗長といえます。冗長な記述が削除されずにコード中に残ることで解析性が低下します。 @subsection サンプルコード @verbatim *p++; /* W0561 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0562 @section W0562 @cindex W0562 @subsection メッセージ本文 初期化子の中に余分な `@{@}' があります。 @subsection 内容 ここでの余分な波括弧とは、配列の初期化子でいうとサンプルコードの配列 @code{ng} における外側から一つ内側にある波括弧です。 このような波括弧は冗長であり、配列要素の数を変えるときなどに修正ミスを生じやすくさせます。 @subsection サンプルコード @verbatim int ng[3][2] = { { {1, 2}, { 3, 4}, { 5, 6 } } }; /* W0562 */ int ok[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* OK */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0563 @section W0563 @cindex W0563 @subsection メッセージ本文 このブロックの外側からラベル `%s' へジャンプした場合、ローカル変数は初期化されません。 @subsection 内容 不定値を使うことで予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a, int b) { if (a == 0) { if (b != 0) { goto ERR; } } else { int c = 0; ERR: /* W0563 */ b = c; } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0564} この goto 文がラベル `%s' へジャンプした場合、ローカル変数は初期化されません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0564 @section W0564 @cindex W0564 @subsection メッセージ本文 この goto 文がラベル `%s' へジャンプした場合、ローカル変数は初期化されません。 @subsection 内容 不定値を使うことで予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a, int b) { if (a == 0) { int c = 0; RETRY: b = c; } if (b != 0) { goto RETRY; /* W0564 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0563} このブロックの外側からラベル `%s' へジャンプした場合、ローカル変数は初期化されません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0565 @section W0565 @cindex W0565 @subsection メッセージ本文 汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。 @subsection 内容 このようなキャストの動作は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim unsigned int a = 0xFFFFU; volatile unsigned int *b = (volatile unsigned int *) a; /* W0565 */ unsigned int c = (unsigned int) b; /* W0565 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0566} 汎整数型を関数ポインタ型(またはその逆)へキャストしています。 @item @ref{W0567} 汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0566 @section W0566 @cindex W0566 @subsection メッセージ本文 汎整数型を関数ポインタ型(またはその逆)へキャストしています。 @subsection 内容 このようなキャストの動作は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim unsigned int addr = 0xFFFFFFFFU; void (*p)(int, long) = (void (*)(int, long)) addr; /* W0566 */ int i = (int) p; /* W0566 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0565} 汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。 @item @ref{W0567} 汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0567 @section W0567 @cindex W0567 @subsection メッセージ本文 汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。 @subsection 内容 このようなキャストの動作は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim unsigned int addr = 0xFFFFFFFFU; void (*p)(int, long) = (void (*)(int, long)) addr; /* W0567 */ int i = (int) p; /* W0567 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0565} 汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。 @item @ref{W0566} 汎整数型を関数ポインタ型(またはその逆)へキャストしています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0568 @section W0568 @cindex W0568 @subsection メッセージ本文 符号付き定数式の値を左シフト演算した結果は、未定義になります。 @subsection 内容 このようなシフト演算は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim int a = 0x7FFFFFFF << 1; /* W0568 */ int b = -5 << 1; /* W0568 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0569} 符号付きの式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0570} 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0569 @section W0569 @cindex W0569 @subsection メッセージ本文 符号付きの式の値を左シフト演算した結果は、未定義になります。 @subsection 内容 このようなシフト演算は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim int func(int a) { if (a >= 0x40000000) { return a << 1; /* W0569 */ } if (a < 0) { return a << 1; /* W0569 */ } return a << 1; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0568} 符号付き定数式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0570} 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0570 @section W0570 @cindex W0570 @subsection メッセージ本文 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。 @subsection 内容 このようなシフト演算は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim int func(int a) { if (a >= 0x10000000) { return a << 1; /* W0570 */ } if (a < 10) { return a << 1; /* W0570 */ } return a << 1; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0568} 符号付き定数式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0569} 符号付きの式の値を左シフト演算した結果は、未定義になります。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0571 @section W0571 @cindex W0571 @subsection メッセージ本文 符号付きデータの右シフト演算には、処理系によって論理シフトと算術シフトの両方の可能性があります。 @subsection 内容 このような符号付き型の演算は、符号ビットがゼロになる(論理シフト)場合と符号ビットを複製したものに置き換わる(算術シフト)場合があり、 どちらになるかは処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim int func(int a) { return a >> 3; /* W0571 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0572} 符号付きのデータに対するビット演算は処理系定義の結果になります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0572 @section W0572 @cindex W0572 @subsection メッセージ本文 符号付きのデータに対するビット演算は処理系定義の結果になります。 @subsection 内容 このような符号付き型の演算は、符号ビットがゼロになる(論理シフト)場合と符号ビットを複製したものに置き換わる(算術シフト)場合があり、 どちらになるかは処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim void func(short a) { short b; b = a >> 8; /* W0572 */ b <<= 1; /* W0572 */ b = a & 15; /* W0572 */ b = a | 15; /* W0572 */ b = a ^ 15; /* W0572 */ b = ~a; /* W0572 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0571} 符号付きデータの右シフト演算には、処理系によって論理シフトと算術シフトの両方の可能性があります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0573 @section W0573 @cindex W0573 @subsection メッセージ本文 `[]' 内の走査セットの `-' 文字は、処理系定義になります。 @subsection 内容 このような変換指定子の動作は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim char c; scanf("%[a-z]", &c); /* W0573 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.6.0 @node W0574 @section W0574 @cindex W0574 @subsection メッセージ本文 基本ソース文字集合に含まれない文字が、文字定数の中で使われています。 @subsection 内容 基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim const char c = '$'; /* W0574 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0575} 基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。 @item @ref{W0576} 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。 @item @ref{W0577} 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0575 @section W0575 @cindex W0575 @subsection メッセージ本文 基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。 @subsection 内容 基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim const char *str = "@$"; /* W0575 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0574} 基本ソース文字集合に含まれない文字が、文字定数の中で使われています。 @item @ref{W0576} 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。 @item @ref{W0577} 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0576 @section W0576 @cindex W0576 @subsection メッセージ本文 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。 @subsection 内容 基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim /* $ W0576 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0574} 基本ソース文字集合に含まれない文字が、文字定数の中で使われています。 @item @ref{W0575} 基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。 @item @ref{W0577} 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0577 @section W0577 @cindex W0577 @subsection メッセージ本文 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。 @subsection 内容 基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。 @subsection サンプルコード @verbatim #define MACRO $ /* W0577 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0574} 基本ソース文字集合に含まれない文字が、文字定数の中で使われています。 @item @ref{W0575} 基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。 @item @ref{W0576} 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0578 @section W0578 @cindex W0578 @subsection メッセージ本文 暗黙的に汎整数型 `%s' の複合式からより大きな型 `%s' に型変換されています。 @subsection 内容 サンプルコードの関数では @code{int} 型変数 @code{a} の 2 乗した値が @code{int} 型の範囲に収まらないことを想定して @code{long} 型変数 @code{b} へ代入しています。 しかし、環境によっては @code{a * a} の演算はいったん @code{int} 型として結果を出したあとに @code{b} へ代入される場合があります。その場合、@code{a} の値によっては情報の損失が起こります。 @subsection サンプルコード @verbatim void func(int a) { long b = a * a; /* W0578 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0579 @section W0579 @cindex W0579 @subsection メッセージ本文 汎整数型 `%s' の複合式を、より大きな型 `%s' にキャストしています。 @subsection 内容 サンプルコードの関数では @code{int} 型変数 @code{a} の 2 乗した値が @code{int} 型の範囲に収まらないことを想定して @code{long} 型変数 @code{b} へ代入しています。 しかし、環境によっては @code{a * a} の演算はいったん @code{int} 型として結果を出したあとに @code{b} へ代入される場合があります。その場合、@code{a} の値によっては情報の損失が起こります。 @subsection サンプルコード @verbatim void func(int a) { long b = (long) (a * a); /* W0579 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.6.0 @node W0580 @section W0580 @cindex W0580 @subsection メッセージ本文 ローカルな静的変数のアドレスが、より長い寿命を持つポインタに代入されています。 @subsection 内容 ローカルで @code{static} な変数のアドレスが、結合またはより広いスコープを持つポインタに代入されています。 静的記憶域期間を持つため、危険ではありませんが、データ隠蔽の原則に反します。 @subsection サンプルコード @verbatim int *p; void func(void) { static int i = 0; p = &i; /* W0580 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0581 @section W0581 @cindex W0581 @subsection メッセージ本文 実引数の個数か型が、この関数の以前の使用時と異なります。 @subsection 内容 足りない引数がある場合は補われますが、値は不定になります。 従って、その不定値を使用する部分の処理に不具合が生じる危険性が高いといえます。 @subsection サンプルコード @verbatim int func(int a, short b, long c) { switch (a) { case 0: return foo(a, b, c); case 1: return foo(a, c, b); /* W0581 */ default: return foo(b, c); /* W0581 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0582} 実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。 @item @ref{W0583} 実引数の個数か型が、この後で見つかる関数定義と異なります。 @item @ref{W0584} %s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0582 @section W0582 @cindex W0582 @subsection メッセージ本文 実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。 @subsection 内容 足りない引数がある場合は補われますが、値は不定になります。 従って、その不定値を使用する部分の処理に不具合が生じる危険性が高いといえます。 @subsection サンプルコード @verbatim int func(int a, short b, long c) { switch (a) { case 0: return foo(a, b, c); case 1: return foo(a, c, b); /* W0582 */ default: return foo(b, c); /* W0582 */ } } extern int foo(int, short, long); @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0581} 実引数の個数か型が、この関数の以前の使用時と異なります。 @item @ref{W0583} 実引数の個数か型が、この後で見つかる関数定義と異なります。 @item @ref{W0584} %s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0583 @section W0583 @cindex W0583 @subsection メッセージ本文 実引数の個数か型が、この後で見つかる関数定義と異なります。 @subsection 内容 足りない引数がある場合は補われますが、値は不定になります。 従って、その不定値を使用する部分の処理に不具合が生じる危険性が高いといえます。 @subsection サンプルコード @verbatim int func(int a, short b, long c) { switch (a) { case 0: return foo(a, b, c); case 1: return foo(a, c, b); /* W0583 */ default: return foo(b, c); /* W0583 */ } } int foo(int a, short b, long c) { return a + b + c; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0581} 実引数の個数か型が、この関数の以前の使用時と異なります。 @item @ref{W0582} 実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。 @item @ref{W0584} %s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0584 @section W0584 @cindex W0584 @subsection メッセージ本文 %s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。 @subsection 内容 実引数の型と仮引数の型が異なる場合、値が暗黙的に変換されます。 @subsection サンプルコード @verbatim extern void func1(a, b) long a; double b; { ...snip... } void func2(void) { int a = 0; long b = 0; func1(a, b); /* W0584 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0581} 実引数の個数か型が、この関数の以前の使用時と異なります。 @item @ref{W0582} 実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。 @item @ref{W0583} 実引数の個数か型が、この後で見つかる関数定義と異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0585 @section W0585 @cindex W0585 @subsection メッセージ本文 制御変数 `%s' はインクリメント式に現れません。 @subsection 内容 ループ変数の増分を増分式で行わずにループ本体中で行うとループの仕様がわかりにくくなります。 @subsection サンプルコード @verbatim int i, j; for (i = j = 0; i < 10; j++) { /* W0585 */ i++; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0586 @section W0586 @cindex W0586 @subsection メッセージ本文 typedef`%s' が二つ以上の場所で宣言されています。 @subsection 内容 @code{typedef} 名はリンケージを持ちません。同一の @code{typedef} を複数宣言しても、それらの @code{typedef} 名は別物として扱われます。 これは非常に紛らわしく、コードの可読性を低下させます。 @subsection サンプルコード @file{test1.c} @verbatim typedef int *INT_PTR; /* W0586 */ void func1(INT_PTR) { ...snip... } @end verbatim @file{test2.c} @verbatim typedef int *INT_PTR; /* W0586 */ void func2(INT_PTR) { ...snip... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0589 @section W0589 @cindex W0589 @subsection メッセージ本文 オブジェクト `%s' は、定義されている翻訳単位の内の、関数 `%s' のみから参照されています。 @subsection 内容 グローバルな可視性を持ちながら、局所的な参照をされています。グローバルなオブジェクトの数が多いと、プログラム全体を理解する場合の可読性が減少します。 @subsection サンプルコード @file{test1.c} @verbatim void func1(void) /* W0589 & W0591 */ { ...snip... } void func2(void) { func1(); } @end verbatim @file{test2.c} @verbatim extern void func2(void); void func3(void) { func2(); } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0591 @section W0591 @cindex W0591 @subsection メッセージ本文 関数 `%s' は、定義されている翻訳単位の内でのみ参照されています。 @subsection 内容 グローバルな関数の数が多いと、プログラム全体を理解する場合の可読性が減少します。 @subsection サンプルコード @file{test1.c} @verbatim void func1(void) /* W0589 & W0591 */ { ...snip... } void func2(void) { func1(); } @end verbatim @file{test2.c} @verbatim extern void func2(void); void func3(void) { func2(); } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0593 @section W0593 @cindex W0593 @subsection メッセージ本文 オブジェクト `%s' は、定義されている翻訳単位の中でのみ参照されています。 @subsection 内容 グローバルなオブジェクトの数が多いと、プログラム全体を理解する場合の可読性が減少します。 @subsection サンプルコード @file{test1.c} @verbatim int a = 100; /* W0593 */ void func1(void) { a += 1; } void func2(void) { func1(); a += 2; } @end verbatim @file{test2.c} @verbatim extern void func2(void); void func3(void) { func2(); } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0597 @section W0597 @cindex W0597 @subsection メッセージ本文 副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。 @subsection 内容 同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。 @subsection サンプルコード @verbatim extern int bar(int *); extern int baz(const int *); void foo(int a, int b) { a = b * a++; /* W0597 */ a = bar(&a) * a++; /* W0597 */ b = bar(&a) * (a++ + --a); /* W0597, W0599 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0598} 副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。 @item @ref{W0599} 副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。 @item @ref{W0600} 副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。 @end itemize @subsection 対応バージョン 1.2.0 @node W0598 @section W0598 @cindex W0598 @subsection メッセージ本文 副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。 @subsection 内容 同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。 @subsection サンプルコード @verbatim extern int bar(int *); extern int baz(const int *); void foo(int a, int b) { b = bar(&a) * a++; /* W0598 */ b = bar(&a) + bar(&a); /* W0598 */ b = bar(&a) + baz(&a); /* W0600 */ b = baz(&a) + baz(&a); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0597} 副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。 @item @ref{W0599} 副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。 @item @ref{W0600} 副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。 @end itemize @subsection 対応バージョン 1.2.0 @node W0599 @section W0599 @cindex W0599 @subsection メッセージ本文 副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。 @subsection 内容 同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。 @subsection サンプルコード @verbatim extern void bar(int, int, int); void foo(int a, int b, int *c) { b = (a + 1) + a++; /* W0599 */ b = c[a] + c[++a]; /* W0599 */ bar(a, a++, c[a]); /* W0599 */ bar(a, a, c[a++]); /* W0599 */ a = a + b; c[a] = a++ + b; /* W0599 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0597} 副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。 @item @ref{W0598} 副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。 @item @ref{W0600} 副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。 @end itemize @subsection 対応バージョン 1.2.0 @node W0600 @section W0600 @cindex W0600 @subsection メッセージ本文 副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。 @subsection 内容 同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。 @subsection サンプルコード @verbatim extern int bar(int *); extern int baz(const int *); void foo(int a, int b) { b = bar(&a) * a; /* W0600 */ b = baz(&a) * a; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0597} 副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。 @item @ref{W0598} 副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。 @item @ref{W0599} 副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。 @end itemize @subsection 対応バージョン 1.2.0 @node W0605 @section W0605 @cindex W0605 @subsection メッセージ本文 繰り返し文を終了させる目的で、break 文が二つ以上使用されています。 @subsection 内容 繰り返し文で複数の @code{break} 文が使用されている場合、コードの構造が複雑になり、 構造化定理(「順次」「反復」「分岐」)に基づいたコードで実現できる保守性に関するメリットを損ないます。 @subsection サンプルコード @verbatim while (n > 0) { if (n == 1) { break; } if (n == 2) { break; /* W0605 */ } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0606 @section W0606 @cindex W0606 @subsection メッセージ本文 共用体に浮動小数点型のメンバがあります。 @subsection 内容 浮動小数点型のメンバ変数に対して共用体を使ってビット単位でアクセスする場合の動作はコンパイラ依存なので、移植性を低下させます。 @subsection サンプルコード @verbatim union UNI { /* W0606 */ float a; int b; }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0607 @section W0607 @cindex W0607 @subsection メッセージ本文 値が負になる整数式が符号無し型に変換されています。 @subsection 内容 明らかに負になることが明らかな整数は、負の数として扱われることが想定されます。 そのような値が符号無し型に変換されることで意図しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a) { if (a < 0) { unsigned int b = (unsigned int) a; /* W0607 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0608} 値が負になることがありうる整数式が符号無し型に変換されています。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.8.0 @node W0608 @section W0608 @cindex W0608 @subsection メッセージ本文 値が負になることがありうる整数式が符号無し型に変換されています。 @subsection 内容 明らかに負になることが明らかな整数は、負の数として扱われることが想定されます。 そのような値が符号無し型に変換されることで意図しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void fuu(int a) { unsigned char b; if (a < 256) { b = (unsigned char) a; /* W0608 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0607} 値が負になる整数式が符号無し型に変換されています。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.8.0 @node W0609 @section W0609 @cindex W0609 @subsection メッセージ本文 この論理演算の結果は常に真になります。 @subsection 内容 処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。 @subsection サンプルコード @verbatim void func(int a) { if (a < 0) { if (a != 0) { /* W0609 */ ...snip... } } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0610} この論理演算の結果は常に偽になります。 @item @ref{W0611} この繰り返し文の制御式の値は常に真です。 @item @ref{W0612} この if 条件式の値は常に真です。 @item @ref{W0613} この制御式の値は常に偽になります。 @item @ref{W0614} この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0610 @section W0610 @cindex W0610 @subsection メッセージ本文 この論理演算の結果は常に偽になります。 @subsection 内容 処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。 @subsection サンプルコード @verbatim void func(int a) { if (a < 0) { if (a == 0) { /* W0610 */ } } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0609} この論理演算の結果は常に真になります。 @item @ref{W0611} この繰り返し文の制御式の値は常に真です。 @item @ref{W0612} この if 条件式の値は常に真です。 @item @ref{W0613} この制御式の値は常に偽になります。 @item @ref{W0614} この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0611 @section W0611 @cindex W0611 @subsection メッセージ本文 この繰り返し文の制御式の値は常に真です。 @subsection 内容 処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。 @subsection サンプルコード @verbatim void func(int a) { if ( a > 0 ) { while (a != 0) { /* W0611 */ ...snip... } } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0609} この論理演算の結果は常に真になります。 @item @ref{W0610} この論理演算の結果は常に偽になります。 @item @ref{W0612} この if 条件式の値は常に真です。 @item @ref{W0613} この制御式の値は常に偽になります。 @item @ref{W0614} この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0612 @section W0612 @cindex W0612 @subsection メッセージ本文 この if 条件式の値は常に真です。 @subsection 内容 処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。 @subsection サンプルコード @verbatim int i; for (i = 0; i < 10; i++) { if (i < 20) { /* W0612 */ ...snip... } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0609} この論理演算の結果は常に真になります。 @item @ref{W0610} この論理演算の結果は常に偽になります。 @item @ref{W0611} この繰り返し文の制御式の値は常に真です。 @item @ref{W0613} この制御式の値は常に偽になります。 @item @ref{W0614} この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0613 @section W0613 @cindex W0613 @subsection メッセージ本文 この制御式の値は常に偽になります。 @subsection 内容 処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。 @subsection サンプルコード @verbatim int i; for (i = 0; i < 10; i++) { if (i > 10) { /* W0613 */ ...snip... } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0609} この論理演算の結果は常に真になります。 @item @ref{W0610} この論理演算の結果は常に偽になります。 @item @ref{W0611} この繰り返し文の制御式の値は常に真です。 @item @ref{W0612} この if 条件式の値は常に真です。 @item @ref{W0614} この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。 @end itemize @subsection 対応バージョン 1.0.0 @node W0614 @section W0614 @cindex W0614 @subsection メッセージ本文 この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。 @subsection 内容 処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。 また、不必要な処理がある場合は、コードが冗長になります。 @subsection サンプルコード @verbatim void func(int a) { if (a == 0) { do { } while (a > 0); /* W0614 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0609} この論理演算の結果は常に真になります。 @item @ref{W0610} この論理演算の結果は常に偽になります。 @item @ref{W0611} この繰り返し文の制御式の値は常に真です。 @item @ref{W0612} この if 条件式の値は常に真です。 @item @ref{W0613} この制御式の値は常に偽になります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0622 @section W0622 @cindex W0622 @subsection メッセージ本文 関数がブロックスコープ内で宣言されています。 @subsection 内容 この関数は、ファイルスコープ内で宣言されるべきです。このような記述は解析性を低下させます。 @subsection サンプルコード @verbatim int func1(void) { extern int func2(void); /* W0622 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0623 @section W0623 @cindex W0623 @subsection メッセージ本文 外部結合のオブジェクトが、ブロックスコープ内で宣言されています。 @subsection 内容 このオブジェクトは、ファイルスコープ内で宣言されるべきです。このような記述は解析性を低下させます。 @subsection サンプルコード @verbatim int func(void) { extern int i; /* W0623 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0624 @section W0624 @cindex W0624 @subsection メッセージ本文 #define あるいは #undef がブロックの中に存在します。 @subsection 内容 @code{#define}、@code{#undef} は、ファイルスコープ内で宣言されるべきです。このような記述は解析性を低下させます。 @subsection サンプルコード @verbatim #define MACRO 0 int foo(void) { #if defined(MACRO) #undef MACRO /* W0624 */ #define MACRO 1 /* W0624 */ #endif return MACRO; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0625 @section W0625 @cindex W0625 @subsection メッセージ本文 外部結合の定義または宣言の中で `%s' が使われていますが、その typedef がヘッダファイルの中で宣言されていません。 @subsection 内容 @code{typedef} 宣言はヘッダファイル内でのみ行うべきです。このような記述は保守性を低下させます。 @subsection サンプルコード @verbatim typedef int *INT_PTR; /* W0625 */ extern INT_PTR func(void); INT_PTR func(void) { return 0; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.8.0 @node W0626 @section W0626 @cindex W0626 @subsection メッセージ本文 ワイド文字またはワイド文字列リテラルが使われています。 @subsection 内容 ワイド文字またはワイド文字列リテラルを使用するコードは実行環境のロケールに依存 することになります。 @subsection サンプルコード @verbatim const wchar_t a = L'あ'; /* W0626 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0627 @section W0627 @cindex W0627 @subsection メッセージ本文 一行に、空文(`;' だけの文)が、他のコードの後にあります。 @subsection 内容 他の文と空文が 1 行で書かれている場合、空文の意図が不明確になります。 @subsection サンプルコード @verbatim if (0); /* W0627 */ { ...snip... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0628 @section W0628 @cindex W0628 @subsection メッセージ本文 関数 `%s' が定義されていますが、このプロジェクトでは使われていません。 @subsection 内容 使用されていない関数は無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。 @subsection サンプルコード @file{test1.c} @verbatim int func1(void) { return 0; } void func2(void) /* W0628 */ { ...snip... } @end verbatim @file{test2.c} @verbatim extern int func1(void); int main(void) { return func1(); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0629} static 関数 `%s()' は、この翻訳単位の中で使われていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0629 @section W0629 @cindex W0629 @subsection メッセージ本文 static 関数 `%s()' は、この翻訳単位の中で使われていません。 @subsection 内容 使用されていない関数は無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。 @subsection サンプルコード @verbatim static int func1(void) /* W0629 */ { return 1; } int func2(void) { return 1; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0628} 関数 `%s' が定義されていますが、このプロジェクトでは使われていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0632 @section W0632 @cindex W0632 @subsection メッセージ本文 `@code{#include <%s>}' の中で ' や " 文字を使うと、未定義の動作になります。 @subsection 内容 `@code{'}'、`@code{"}' または `@code{/*}' を @code{#include} 文で使用すると、未定義の動作になります。 @subsection サンプルコード @verbatim #include /* W0632 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0633} `#include "%s"' の中で ' 文字を使うと、未定義の動作になります。 @item @ref{W0634} `#include' 行の中で `\' を使っています。パス区切り文字としては `/' を勧めます。 @end itemize @subsection 対応バージョン 1.8.0 @node W0633 @section W0633 @cindex W0633 @subsection メッセージ本文 `@code{#include "%s"}' の中で ' 文字を使うと、未定義の動作になります。 @subsection 内容 `@code{'}' を @code{#include} 文で使用すると、未定義の動作になります。 @subsection サンプルコード @verbatim #include "NG'_header.h" /* W0633 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0632} `#include <%s>' の中で ' や " 文字を使うと、未定義の動作になります。 @item @ref{W0634} `#include' 行の中で `\' を使っています。パス区切り文字としては `/' を勧めます。 @end itemize @subsection 対応バージョン 1.8.0 @node W0634 @section W0634 @cindex W0634 @subsection メッセージ本文 `#include' 行の中で `\' を使っています。パス区切り文字としては `/' を勧めます。 @subsection 内容 @code{\} は PC 環境におけるパス区切り文字であり、@code{#include} 文で使用することで移植性を損ないます。 @subsection サンプルコード @verbatim #include "..\ng\header.h" /* W0634 */ #include "..\\ng\\header.h" /* W0634 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0632} `#include <%s>' の中で ' や " 文字を使うと、未定義の動作になります。 @item @ref{W0633} `#include "%s"' の中で ' 文字を使うと、未定義の動作になります。 @end itemize @subsection 対応バージョン 1.8.0 @node W0635 @section W0635 @cindex W0635 @subsection メッセージ本文 %s 番目の変換指定子と、対応する実引数の型が合いません。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a) { printf("Apple %f\n", a); /* W0635 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0636} %s 番目の変換指定子に対応する実引数が存在しません。 @item @ref{W0637} 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。 @item @ref{W0638} この関数呼び出しには、少なくとも一つの実引数が必要です。 @item @ref{W0639} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0640} scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0636 @section W0636 @cindex W0636 @subsection メッセージ本文 %s 番目の変換指定子に対応する実引数が存在しません。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a, int b, int c) { printf("Banana %d, %d, %d\n", a, b); /* W0636 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0635} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0637} 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。 @item @ref{W0638} この関数呼び出しには、少なくとも一つの実引数が必要です。 @item @ref{W0639} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0640} scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0637 @section W0637 @cindex W0637 @subsection メッセージ本文 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int a, int b) { printf("Orange %d\n", a, b); /* W0637 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0635} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0636} %s 番目の変換指定子に対応する実引数が存在しません。 @item @ref{W0638} この関数呼び出しには、少なくとも一つの実引数が必要です。 @item @ref{W0639} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0640} scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0638 @section W0638 @cindex W0638 @subsection メッセージ本文 この関数呼び出しには、少なくとも一つの実引数が必要です。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim printf(); /* W0638 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0635} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0636} %s 番目の変換指定子に対応する実引数が存在しません。 @item @ref{W0637} 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。 @item @ref{W0639} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0640} scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0639 @section W0639 @cindex W0639 @subsection メッセージ本文 %s 番目の変換指定子と、対応する実引数の型が合いません。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int a; scanf("%f", &a); /* W0639 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0635} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0636} %s 番目の変換指定子に対応する実引数が存在しません。 @item @ref{W0637} 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。 @item @ref{W0638} この関数呼び出しには、少なくとも一つの実引数が必要です。 @item @ref{W0640} scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0640 @section W0640 @cindex W0640 @subsection メッセージ本文 scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int a; fscanf(stdin, "%d", a); /* W0640 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0635} %s 番目の変換指定子と、対応する実引数の型が合いません。 @item @ref{W0636} %s 番目の変換指定子に対応する実引数が存在しません。 @item @ref{W0637} 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。 @item @ref{W0638} この関数呼び出しには、少なくとも一つの実引数が必要です。 @item @ref{W0639} %s 番目の変換指定子と、対応する実引数の型が合いません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0641 @section W0641 @cindex W0641 @subsection メッセージ本文 浮動小数点数型をオブジェクトへのポインタ(あるいはその逆)へキャストしています。 @subsection 内容 このようなキャストは未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int *foo(const float f) { return (int *) f; /* W0641 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0642 @section W0642 @cindex W0642 @subsection メッセージ本文 register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { register int a[3]; int *p1 = a; /* W0642 */ int *p2 = &a[1]; /* W0642 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0643} このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。 @item @ref{W0644} void 式の値を使用しようとしています。void 式は値をもちません。 @item @ref{W0645} 仮引数の型には、void 型を使うことができません。 @item @ref{W0646} 通常の文字列リテラルとワイド文字列リテラルが隣接しています。 @end itemize @subsection 対応バージョン 1.8.0 @node W0643 @section W0643 @cindex W0643 @subsection メッセージ本文 このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #define MACRO(x) #x const char *str = MACRO(foo\); /* W0643 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。 @item @ref{W0644} void 式の値を使用しようとしています。void 式は値をもちません。 @item @ref{W0645} 仮引数の型には、void 型を使うことができません。 @item @ref{W0646} 通常の文字列リテラルとワイド文字列リテラルが隣接しています。 @end itemize @subsection 対応バージョン 1.16.0 @node W0644 @section W0644 @cindex W0644 @subsection メッセージ本文 void 式の値を使用しようとしています。void 式は値をもちません。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern void foo(void); int bar(void) { return (int) foo(); /* W0644 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。 @item @ref{W0643} このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。 @item @ref{W0645} 仮引数の型には、void 型を使うことができません。 @item @ref{W0646} 通常の文字列リテラルとワイド文字列リテラルが隣接しています。 @end itemize @subsection 対応バージョン 1.18.0 @node W0645 @section W0645 @cindex W0645 @subsection メッセージ本文 仮引数の型には、void 型を使うことができません。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern void func(a) /* W0645 */ void a; { } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。 @item @ref{W0643} このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。 @item @ref{W0644} void 式の値を使用しようとしています。void 式は値をもちません。 @item @ref{W0646} 通常の文字列リテラルとワイド文字列リテラルが隣接しています。 @end itemize @subsection 対応バージョン 1.14.0 @node W0646 @section W0646 @cindex W0646 @subsection メッセージ本文 通常の文字列リテラルとワイド文字列リテラルが隣接しています。 @subsection 内容 未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim static const char *str = "foo" L"bar"; /* W0646 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。 @item @ref{W0643} このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。 @item @ref{W0644} void 式の値を使用しようとしています。void 式は値をもちません。 @item @ref{W0645} 仮引数の型には、void 型を使うことができません。 @end itemize @subsection 対応バージョン 1.16.0 @node W0649 @section W0649 @cindex W0649 @subsection メッセージ本文 シフト演算子の右オペランドの値が負の定数です。結果は未定義になります。 @subsection 内容 このようなシフト演算は未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int foo(int i) { return i << -1; /* W0649 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0650} シフト演算子の右オペランドの値が左オペランドの型 `%s' で表されるビット数に対して大きすぎます。結果は未定義になります。 @end itemize @subsection 対応バージョン 1.18.0 @node W0650 @section W0650 @cindex W0650 @subsection メッセージ本文 シフト演算子の右オペランドの値が左オペランドの型 `%s' で表されるビット数に対して大きすぎます。結果は未定義になります。 @subsection 内容 このようなシフト演算は未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim unsigned int foo(unsigned int i) { return i << 32; /* W0650 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0649} シフト演算子の右オペランドの値が負の定数です。結果は未定義になります。 @end itemize @subsection 対応バージョン 1.18.0 @node W0653 @section W0653 @cindex W0653 @subsection メッセージ本文 配列、構造体あるいは共用体の初期値が `@{@}' で囲まれていません。 @subsection 内容 適合しない型の変数を用いて、構造体や共用体を初期化することは ISO C90 で未定義なので、 予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim struct ST { int i; }; int a[3] = 0; /* W0653 */ struct ST s = 0; /* W0653 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0654} 構造体あるいは共用体の初期化子は、同じ構造体型あるいは共用体型の値でなければなりません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0654 @section W0654 @cindex W0654 @subsection メッセージ本文 構造体あるいは共用体の初期化子は、同じ構造体型あるいは共用体型の値でなければなりません。 @subsection 内容 適合しない型の変数を用いて、構造体や共用体を初期化することは ISO C90 で未定義なので、 予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim struct A { int i; }; struct B { int j; }; struct A a = { 0 }; struct B b = a; /* W0654 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0653} 配列、構造体あるいは共用体の初期値が `@{@}' で囲まれていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0655 @section W0655 @cindex W0655 @subsection メッセージ本文 サイズが未定義のビットフィールド式です。 @subsection 内容 ビットフィールド式に対して @code{sizeof} 演算子を使用することは無意味です。 @subsection サンプルコード @verbatim struct ST { unsigned int a:2; unsigned int b:4; }; void func(void) { struct ST s = { 0 }; int i = sizeof(s.a); /* W0655 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0656 @section W0656 @cindex W0656 @subsection メッセージ本文 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int count) { printf("There are %Ld apples\n", count); /* W0656 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0657 @section W0657 @cindex W0657 @subsection メッセージ本文 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(int count) { printf("There are %Ld apples\n", count); /* W0657 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0658 @section W0658 @cindex W0658 @subsection メッセージ本文 %s 番目の変換指定子 `o' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(unsigned int count) { printf("There are %Lo apples\n", count); /* W0658 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0659 @section W0659 @cindex W0659 @subsection メッセージ本文 %s 番目の変換指定子 `u' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(unsigned int count) { printf("There are %Lu apples\n", count); /* W0659 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0660 @section W0660 @cindex W0660 @subsection メッセージ本文 %s 番目の変換指定子 `x' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(unsigned int count) { printf("There are %Lx apples\n", count); /* W0660 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0661 @section W0661 @cindex W0661 @subsection メッセージ本文 %s 番目の変換指定子 `X' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(unsigned int count) { printf("There are %LX apples\n", count); /* W0661 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0662 @section W0662 @cindex W0662 @subsection メッセージ本文 %s 番目の変換指定子 `f' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(double count) { printf("There are %lf apples\n", count); /* W0662 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0663 @section W0663 @cindex W0663 @subsection メッセージ本文 %s 番目の変換指定子 `e' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(double count) { printf("There are %le apples\n", count); /* W0663 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0664 @section W0664 @cindex W0664 @subsection メッセージ本文 %s 番目の変換指定子 `E' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(double count) { printf("There are %lE apples\n", count); /* W0664 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0665 @section W0665 @cindex W0665 @subsection メッセージ本文 %s 番目の変換指定子 `g' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(double count) { printf("There are %lg apples\n", count); /* W0665 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0666 @section W0666 @cindex W0666 @subsection メッセージ本文 %s 番目の変換指定子 `G' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(double count) { printf("There are %lG apples\n", count); /* W0666 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0667 @section W0667 @cindex W0667 @subsection メッセージ本文 %s 番目の変換指定子 `c' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(char count) { printf("There are %hc apples\n", count); /* W0667 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0668 @section W0668 @cindex W0668 @subsection メッセージ本文 %s 番目の変換指定子 `%' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(double percent) { printf("There is %f%l% apple juice\n", percent); /* W0668 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0669 @section W0669 @cindex W0669 @subsection メッセージ本文 %s 番目の変換指定子 `s' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(char *s) { printf("There are %hs apples\n", s); /* W0669 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0670 @section W0670 @cindex W0670 @subsection メッセージ本文 %s 番目の変換指定子 `n' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int n; printf("There are %Ln apples\n", &n); /* W0670 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0671 @section W0671 @cindex W0671 @subsection メッセージ本文 %s 番目の変換指定子 `p' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(char *p) { printf("p points to %lp\n", p); /* W0671 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0672 @section W0672 @cindex W0672 @subsection メッセージ本文 %s 番目に無効な変換指定子が使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int a; printf("%0", &a); /* W0672 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0673 @section W0673 @cindex W0673 @subsection メッセージ本文 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int a; scanf("%y", &a); /* W0673 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0674 @section W0674 @cindex W0674 @subsection メッセージ本文 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int a; scanf("%Ld", &a); /* W0674 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0675 @section W0675 @cindex W0675 @subsection メッセージ本文 %s 番目の変換指定子 `o' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int a; scanf("%Lo", &a); /* W0675 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0676 @section W0676 @cindex W0676 @subsection メッセージ本文 %s 番目の変換指定子 `u' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int a; scanf("%Lu", &a); /* W0676 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0677 @section W0677 @cindex W0677 @subsection メッセージ本文 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int a; scanf("%Lx", &a); /* W0677 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0678 @section W0678 @cindex W0678 @subsection メッセージ本文 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { double a; scanf("%lle", &a); /* W0678 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0679 @section W0679 @cindex W0679 @subsection メッセージ本文 %s 番目の変換指定子 `s' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { char a[256]; scanf("%lls", a); /* W0679 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0680 @section W0680 @cindex W0680 @subsection メッセージ本文 %s 番目の変換指定子 `p' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { void *a; scanf("%lp", &a); /* W0680 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0681 @section W0681 @cindex W0681 @subsection メッセージ本文 %s 番目の変換指定子 `%' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { int a; scanf("%d%l%", &a); /* W0681 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0682 @section W0682 @cindex W0682 @subsection メッセージ本文 %s 番目の変換指定子 `[' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { char buf[256]; scanf("%L[0-9]", buf); /* W0682 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0683 @section W0683 @cindex W0683 @subsection メッセージ本文 %s 番目の変換指定子 `c' に無効なフラグが使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { char a; scanf("%Lc", &a); /* W0683 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0684 @section W0684 @cindex W0684 @subsection メッセージ本文 %s 番目に無効な変換指定子が使われています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(void) { long a; scanf("%l", &a); /* W0684 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0685 @section W0685 @cindex W0685 @subsection メッセージ本文 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim char c; scanf("%[z-a]", &c); /* W0685 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0686} 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @end itemize @subsection 対応バージョン 1.6.0 @node W0686 @section W0686 @cindex W0686 @subsection メッセージ本文 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。 @subsection 内容 未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim char c; scanf("%[abcda]", &c); /* W0686 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0655} サイズが未定義のビットフィールド式です。 @item @ref{W0656} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0657} %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。 @item @ref{W0658} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0659} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0660} %s 番目の変換指定子 `x' に無効なフラグが使われています。 @item @ref{W0661} %s 番目の変換指定子 `X' に無効なフラグが使われています。 @item @ref{W0662} %s 番目の変換指定子 `f' に無効なフラグが使われています。 @item @ref{W0663} %s 番目の変換指定子 `e' に無効なフラグが使われています。 @item @ref{W0664} %s 番目の変換指定子 `E' に無効なフラグが使われています。 @item @ref{W0665} %s 番目の変換指定子 `g' に無効なフラグが使われています。 @item @ref{W0666} %s 番目の変換指定子 `G' に無効なフラグが使われています。 @item @ref{W0667} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0668} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0669} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0670} %s 番目の変換指定子 `n' に無効なフラグが使われています。 @item @ref{W0671} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0672} %s 番目に無効な変換指定子が使われています。 @item @ref{W0673} %s 番目の変換指定子は、ISO C 標準規格でサポートされません。 @item @ref{W0674} %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。 @item @ref{W0675} %s 番目の変換指定子 `o' に無効なフラグが使われています。 @item @ref{W0676} %s 番目の変換指定子 `u' に無効なフラグが使われています。 @item @ref{W0677} %s 番目の変換指定子 `x/X' に無効なフラグが使われています。 @item @ref{W0678} %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。 @item @ref{W0679} %s 番目の変換指定子 `s' に無効なフラグが使われています。 @item @ref{W0680} %s 番目の変換指定子 `p' に無効なフラグが使われています。 @item @ref{W0681} %s 番目の変換指定子 `%' に無効なフラグが使われています。 @item @ref{W0682} %s 番目の変換指定子 `[' に無効なフラグが使われています。 @item @ref{W0683} %s 番目の変換指定子 `c' に無効なフラグが使われています。 @item @ref{W0684} %s 番目に無効な変換指定子が使われています。 @item @ref{W0685} `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。 @end itemize @subsection 対応バージョン 1.6.0 @node W0687 @section W0687 @cindex W0687 @subsection メッセージ本文 defined 演算子を削除する目的で #undef を使っています。 @subsection 内容 このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #undef defined /* W0687 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0688} #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。 @item @ref{W0689} #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。 @item @ref{W0690} #line 指令の後に行番号が記述されていません。 @item @ref{W0691} `##' 演算子の結果が有効な前処理字句ではありません。 @end itemize @subsection 対応バージョン 1.4.0 @node W0688 @section W0688 @cindex W0688 @subsection メッセージ本文 #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。 @subsection 内容 このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #line 35000 "test.c" /* W0688 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0687} defined 演算子を削除する目的で #undef を使っています。 @item @ref{W0689} #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。 @item @ref{W0690} #line 指令の後に行番号が記述されていません。 @item @ref{W0691} `##' 演算子の結果が有効な前処理字句ではありません。 @end itemize @subsection 対応バージョン 1.2.0 @node W0689 @section W0689 @cindex W0689 @subsection メッセージ本文 #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。 @subsection 内容 このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #line 35 * 100 /* W0689 */ #line 35 * 100 "test.c" /* W0689 */ #line 35 L"あいう.c" /* W0689 */ #line __FILE__ 35 /* W0689 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0687} defined 演算子を削除する目的で #undef を使っています。 @item @ref{W0688} #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。 @item @ref{W0690} #line 指令の後に行番号が記述されていません。 @item @ref{W0691} `##' 演算子の結果が有効な前処理字句ではありません。 @end itemize @subsection 対応バージョン 1.2.0 @node W0690 @section W0690 @cindex W0690 @subsection メッセージ本文 #line 指令の後に行番号が記述されていません。 @subsection 内容 このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #line LINE1000 /* W0690 */ #line __FILE__ 35 /* W0690 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0687} defined 演算子を削除する目的で #undef を使っています。 @item @ref{W0688} #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。 @item @ref{W0689} #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。 @item @ref{W0691} `##' 演算子の結果が有効な前処理字句ではありません。 @end itemize @subsection 対応バージョン 1.2.0 @node W0691 @section W0691 @cindex W0691 @subsection メッセージ本文 `##' 演算子の結果が有効な前処理字句ではありません。 @subsection 内容 このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #define MACRO(a, b) a ## b double d = (double) MACRO(-, 123); /* W0691 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0687} defined 演算子を削除する目的で #undef を使っています。 @item @ref{W0688} #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。 @item @ref{W0689} #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。 @item @ref{W0690} #line 指令の後に行番号が記述されていません。 @end itemize @subsection 対応バージョン 1.16.0 @node W0692 @section W0692 @cindex W0692 @subsection メッセージ本文 関数形式マクロ `%s' に実引数が与えられていません。 @subsection 内容 このような記述は ISO C99 のみで使用可能なので、移植性を低下させます。 @subsection サンプルコード @verbatim #define MACRO(a) #a const char *s = (char *) MACRO(); /* W0692 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0693} 関数形式マクロがその定義よりも少ない実引数で呼び出されています。 @end itemize @subsection 対応バージョン 1.16.0 @node W0693 @section W0693 @cindex W0693 @subsection メッセージ本文 関数形式マクロがその定義よりも少ない実引数で呼び出されています。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} このような記述は、言語制約違反になりますので、移植性を低下させます。 @subsection サンプルコード @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0692} 関数形式マクロ `%s' に実引数が与えられていません。 @end itemize @subsection 対応バージョン 2.0.0 以降の予定 @node W0694 @section W0694 @cindex W0694 @subsection メッセージ本文 `assert' という名称の関数を呼び出す目的で、assert マクロが抑制されています。未定義の結果になります。 @subsection 内容 @code{assert} という名前の関数を作成すると、未定義の結果になります。 @subsection サンプルコード @verbatim #undef assert extern void assert(int); void foo(void) { assert("should not be reached" == ""); /* W0694 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W0695 @section W0695 @cindex W0695 @subsection メッセージ本文 assert マクロを #undef してその名前の関数を呼び出しできるようにすると、未定義の結果になります。 @subsection 内容 @code{assert} マクロの定義解消や再定義は、未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #undef assert /* W0695 */ extern void assert(int a); @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0696 @section W0696 @cindex W0696 @subsection メッセージ本文 この `#if...' で使われているマクロ `%s' は定義されていません。 @subsection 内容 通常、未定義マクロは 0 に置き換えられるため、未定義の動作というわけではありませんが、プリプロセッサに依存した処理といえますので、移植性を低下させます。 また、マクロが未定義であることはプログラマの意図しないことの可能性もあります。その場合は、動作上のバグにつながります。 @subsection サンプルコード @verbatim #define MACRO (1) #if MACRO == 1 ...snip... #endif #undef MACRO #if MACRO == 2 /* W0696 */ ...snip... #endif @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0697 @section W0697 @cindex W0697 @subsection メッセージ本文 戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。 @subsection 内容 式を持たない @code{return} 文は不定値を返します。 @subsection サンプルコード @verbatim int func(int value) /* W0697 */ { if (value == 0) { return 0; } /* No return statement at the end of this function. */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0698} 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。 @item @ref{W0699} 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。 @item @ref{W0700} 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。 @end itemize @subsection 対応バージョン 1.14.0 @node W0698 @section W0698 @cindex W0698 @subsection メッセージ本文 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。 @subsection 内容 式を持たない @code{return} 文は不定値を返します。 @subsection サンプルコード @verbatim int func(void) { return; /* W0698 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0698} 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。 @item @ref{W0699} 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。 @item @ref{W0700} 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。 @end itemize @subsection 対応バージョン 1.4.0 @node W0699 @section W0699 @cindex W0699 @subsection メッセージ本文 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。 @subsection 内容 式を持たない @code{return} 文は不定値を返します。 @subsection サンプルコード @verbatim extern func(void) { return; /* W0699 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0697} 戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。 @item @ref{W0698} 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。 @item @ref{W0700} 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。 @end itemize @subsection 対応バージョン 1.4.0 @node W0700 @section W0700 @cindex W0700 @subsection メッセージ本文 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。 @subsection 内容 式を持たない @code{return} 文は不定値を返します。 @subsection サンプルコード @verbatim extern func(void) /* W0700 */ { } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0697} 戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。 @item @ref{W0698} 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。 @item @ref{W0699} 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。 @end itemize @subsection 対応バージョン 1.14.0 @node W0703 @section W0703 @cindex W0703 @subsection メッセージ本文 タグ `%s' がより広い有効範囲をもつ同じ識別子の宣言を隠しています。 @subsection 内容 ローカル変数がグローバル変数を隠蔽することで、ローカル領域でグローバル変数を使用している箇所が影響を受ける可能性があります。 @subsection サンプルコード @verbatim union FOO { ...snip... }; void func(void) { struct FOO { /* W0703 */ ...snip... }; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0704} この `%s' の宣言は、より広い有効範囲をもつ同じ識別子の宣言を隠しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0704 @section W0704 @cindex W0704 @subsection メッセージ本文 この `%s' の宣言は、より広い有効範囲をもつ同じ識別子の宣言を隠しています。 @subsection 内容 ローカル変数がグローバル変数を隠蔽することで、ローカル領域でグローバル変数を使用している箇所が影響を受ける可能性があります。 @subsection サンプルコード @verbatim int a; void func(void) { double a; /* W0704 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0703} タグ `%s' がより広い有効範囲をもつ同じ識別子の宣言を隠しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0705 @section W0705 @cindex W0705 @subsection メッセージ本文 配列の添字が領域外を指すことがあります。 @subsection 内容 配列の領域外にアクセスする動作は未定義の動作になります。したがって予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(unsigned int a) { int buf[10]; if (a < 10) { buf[a] = 0; } ...snip... buf[a] = 5; /* W0705 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0707 @section W0707 @cindex W0707 @subsection メッセージ本文 配列の添字が領域外を指す定数です。 @subsection 内容 配列の領域外にアクセスする動作は未定義の動作になります。したがって予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern int a[5]; int foo(void) { int i = a[5]; /* W0707 */ return i; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.18.0 @node W0708 @section W0708 @cindex W0708 @subsection メッセージ本文 for 文の制御変数 `%s' は繰り返し文本体の中で値を変えられています。 @subsection 内容 ループ本体でループ制御変数を変更することが、すぐさま構造化定理に違反することにはなりませんが、 どのように反復するかを判断しにくくなり、修正やテスト時に混乱のもとになります。 @subsection サンプルコード @verbatim int i, j; for (i = j = 0; i < 10; j++) { i++; /* W0708 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0711 @section W0711 @cindex W0711 @subsection メッセージ本文 関係演算子の右側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c, int d) { return (a + b) > (c > d); /* W0711 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0712} 関係演算子の左側のオペランドが実質的なブール型の式です。 @item @ref{W0713} 関係演算子の両側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.8.0 @node W0712 @section W0712 @cindex W0712 @subsection メッセージ本文 関係演算子の左側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c, int d) { return (a > b) > (c + d); /* W0712 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0711} 関係演算子の右側のオペランドが実質的なブール型の式です。 @item @ref{W0713} 関係演算子の両側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.8.0 @node W0713 @section W0713 @cindex W0713 @subsection メッセージ本文 関係演算子の両側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c, int d) { return (a > b) > (c > d); /* W0713 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0711} 関係演算子の右側のオペランドが実質的なブール型の式です。 @item @ref{W0712} 関係演算子の左側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.8.0 @node W0714 @section W0714 @cindex W0714 @subsection メッセージ本文 `&' 演算子の両側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c, int d) { return (a > b) & (c > d); /* W0714 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0715} `|' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0716} ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0717} ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。 @item @ref{W0718} ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.8.0 @node W0715 @section W0715 @cindex W0715 @subsection メッセージ本文 `|' 演算子の両側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c, int d) { return (a > b) | (c > d); /* W0715 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0714} `&' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0716} ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0717} ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。 @item @ref{W0718} ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.8.0 @node W0716 @section W0716 @cindex W0716 @subsection メッセージ本文 ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c, int d) { return (a > b) + (c > d); /* W0716 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0714} `&' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0715} `|' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0717} ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。 @item @ref{W0718} ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.10.0 @node W0717 @section W0717 @cindex W0717 @subsection メッセージ本文 ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c) { return (a > b) + c; /* W0717 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0714} `&' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0715} `|' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0716} ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0717} ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.10.0 @node W0718 @section W0718 @cindex W0718 @subsection メッセージ本文 ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim int func(int a, int b, int c) { return a + (b > c); /* W0718 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0714} `&' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0715} `|' 演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0716} ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。 @item @ref{W0717} ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。 @end itemize @subsection 対応バージョン 1.10.0 @node W0719 @section W0719 @cindex W0719 @subsection メッセージ本文 シフト演算子の右オペランドが、潜在型 `%s' のビット幅以上の定数値です。 @subsection 内容 このようなシフト演算は汎整数拡張後の型の範囲を超えていないため、 未定義の動作にはなりませんが、 汎整数拡張が生じない型の変数への代入に変更した時点で未定義の動作になりますので、 潜在的な危険を伴います。 @subsection サンプルコード @verbatim int foo(char c) { return c << 31; /* W0719 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0720 @section W0720 @cindex W0720 @subsection メッセージ本文 浮動小数点型の値が変換先の型の範囲に入りきりません。 @subsection 内容 このような式は未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim signed char sc1 = (signed char) 127.5; /* OK */ signed char sc2 = (signed char) 128.5; /* W0720 */ signed char sc3 = (signed char) -128.5; /* OK */ signed char sc4 = (signed char) -129.5; /* W0720 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.4.0 @node W0721 @section W0721 @cindex W0721 @subsection メッセージ本文 この汎整数型は、ポインタの値を保持するのに十分な大きさをもちません。 @subsection 内容 上記のような変換により、ポインタ型変数の一部の情報が欠落したものが整数型に代入されることになります。 したがって、代入先の値はもはや正しいアドレスを指していないことになります。 @subsection サンプルコード @verbatim void func(int *p) { /* when short is 16 bit long and pointer is 32 bit long */ unsigned short us = (unsigned short) p; /* W0721 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0722 @section W0722 @cindex W0722 @subsection メッセージ本文 符号付きの式の値がオーバーフローしています。 @subsection 内容 値が型で表現可能な範囲を超えてしまう(オーバーフローする)と、どのような値が代入されるかは未定義です。 したがって、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int func(int a) { /* when int is 32 bit long */ if (a < 0) { return a + 1; /* OK */ } else if (a < 2147483647) { return a + 1; /* OK */ } return a + 1; /* W0722 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0723} 符号付きの式の値がオーバーフローする可能性があります。 @end itemize @subsection 対応バージョン 1.4.0 @node W0723 @section W0723 @cindex W0723 @subsection メッセージ本文 符号付きの式の値がオーバーフローする可能性があります。 @subsection 内容 値が型で表現可能な範囲を超えてしまう(オーバーフローする)と、どのような値が代入されるかは未定義です。 したがって、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int func(int a) { /* when int is 32 bit long */ if (a < 0) { return a + 1; /* OK */ } else if (a < 2000000000) { return a + 1; /* OK */ } return a + 1; /* W0723 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0722} 符号付きの式の値がオーバーフローしています。 @end itemize @subsection 対応バージョン 1.4.0 @node W0724 @section W0724 @cindex W0724 @subsection メッセージ本文 条件付きインクルード指令によって、認識できない前処理指令が無視されました。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} 認識できない前処理指令を見つけたときの対処方法は処理系定義です。したがって、移植性が低下します。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 2.0.0 以降の予定 @node W0726 @section W0726 @cindex W0726 @subsection メッセージ本文 修飾子付き void 型の戻り値が定義された関数 `%s()' の中で、`return 式;' が見つかりました。 @subsection 内容 値を戻してはならない関数であるにも関わらず、明示的な @code{return} 文があります。このような記述は誤りです。 @subsection サンプルコード @verbatim const void func(int a) { if (a == 0) { return 0; /* W0726 */ } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0727 @section W0727 @cindex W0727 @subsection メッセージ本文 列挙型にない値を使っています。 @subsection 内容 このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。 @subsection サンプルコード @verbatim enum Fruits { APPLE = 1, BANANA, ORANGE }; enum Fruits fruit = 5; /* W0727 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0728} 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。 @item @ref{W0729} 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。 @item @ref{W0730} 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。 @item @ref{W0731} switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。 @end itemize @subsection 対応バージョン 1.4.0 @node W0728 @section W0728 @cindex W0728 @subsection メッセージ本文 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。 @subsection 内容 このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。 @subsection サンプルコード @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE }; extern void func1(enum Color); void func2(void) { func1(ORANGE); /* W0728 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0727} 列挙型にない値を使っています。 @item @ref{W0729} 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。 @item @ref{W0730} 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。 @item @ref{W0731} switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。 @end itemize @subsection 対応バージョン 1.4.0 @node W0729 @section W0729 @cindex W0729 @subsection メッセージ本文 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。 @subsection 内容 このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。 @subsection サンプルコード @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE }; void func(void) { enum Color c; c = ORANGE; /* W0729 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0727} 列挙型にない値を使っています。 @item @ref{W0728} 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。 @item @ref{W0730} 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。 @item @ref{W0731} switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。 @end itemize @subsection 対応バージョン 1.4.0 @node W0730 @section W0730 @cindex W0730 @subsection メッセージ本文 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。 @subsection 内容 このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。 @subsection サンプルコード @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE }; enum Color func(void) { return ORANGE; /* W0730 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0727} 列挙型にない値を使っています。 @item @ref{W0728} 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。 @item @ref{W0729} 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。 @item @ref{W0731} switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。 @end itemize @subsection 対応バージョン 1.4.0 @node W0731 @section W0731 @cindex W0731 @subsection メッセージ本文 switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。 @subsection 内容 このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。 @subsection サンプルコード @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE, GRAPE }; int func(enum Color c) { switch (c) { case RED: return 1; case GRAPE: /* W0731 */ return 2; } return 0; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0727} 列挙型にない値を使っています。 @item @ref{W0728} 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。 @item @ref{W0729} 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。 @item @ref{W0730} 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。 @end itemize @subsection 対応バージョン 1.4.0 @node W0732 @section W0732 @cindex W0732 @subsection メッセージ本文 `&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d) { int r; r = (a + b) && (c - d); /* W0732 */ r = (a * b) && (c / d); /* W0732 */ r = (a << b) && (c << d); /* W0732 */ r = (a >> b) && (c >> d); /* W0732 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0733} `||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0734} 論理演算子の左側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0735} 論理演算子の右側のオペランドがビット演算の式あるいは算術式です。 @end itemize @subsection 対応バージョン 1.12.0 @node W0733 @section W0733 @cindex W0733 @subsection メッセージ本文 `||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d) { int r; r = (a + b) || (c - d); /* W0733 */ r = (a * b) || (c / d); /* W0733 */ r = (a << b) || (c << d); /* W0733 */ r = (a >> b) || (c >> d); /* W0733 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0732} `&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0734} 論理演算子の左側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0735} 論理演算子の右側のオペランドがビット演算の式あるいは算術式です。 @end itemize @subsection 対応バージョン 1.12.0 @node W0734 @section W0734 @cindex W0734 @subsection メッセージ本文 論理演算子の左側のオペランドがビット演算の式あるいは算術式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim extern void func(unsigned int a, unsigned int b, unsigned int c) { int r; r = (a + b) && c; /* W0734 */ r = (a - b) && c; /* W0734 */ r = (a << b) || c; /* W0734 */ r = (a >> b) || c; /* W0734 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0732} `&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0733} `||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0735} 論理演算子の右側のオペランドがビット演算の式あるいは算術式です。 @end itemize @subsection 対応バージョン 1.12.0 @node W0735 @section W0735 @cindex W0735 @subsection メッセージ本文 論理演算子の右側のオペランドがビット演算の式あるいは算術式です。 @subsection 内容 このような記述は誤りの可能性があります。 @subsection サンプルコード @verbatim extern void func(unsigned int a, unsigned int b, unsigned int c) { int r; r = a && (b + c); /* W0735 */ r = a && (b - c); /* W0735 */ r = a || (b >> c); /* W0735 */ r = a || (b << c); /* W0735 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0732} `&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0733} `||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。 @item @ref{W0734} 論理演算子の左側のオペランドがビット演算の式あるいは算術式です。 @end itemize @subsection 対応バージョン 1.12.0 @node W0736 @section W0736 @cindex W0736 @subsection メッセージ本文 ファイルスコープで宣言された静的変数 `%s' は 1 つの関数内でしか読み書きされていません。 @subsection 内容 グローバル変数が、1 つの関数内でしか使用されていません。このような変数は、保守性を低下させます。 @subsection サンプルコード @verbatim static int a = 10; /* W0736 */ int func1(void) { return 0; } int func2(void) { return ++a; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0737 @section W0737 @cindex W0737 @subsection メッセージ本文 `enum %s' の内容が不明です。列挙体タグが内容を指定せずに宣言されています。 @subsection 内容 定義していない列挙体のタグを使用することは言語制約違反になります。したがって、移植性を低下させます。 @subsection サンプルコード @verbatim extern enum Foo foo; /* W0737 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0738 @section W0738 @cindex W0738 @subsection メッセージ本文 正の整数定数の値がより小さな符号無し型への暗黙の型変換を行ったため、切り捨てられます。 @subsection 内容 値が型で表現可能な範囲を超えてしまう(オーバーフローする)ことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。 @subsection サンプルコード @verbatim /* when char is 8 bit long */ const unsigned char uc1 = 255; /* OK */ const unsigned char uc2 = 256; /* W0738 */ /* when int is 32 bit long */ const unsigned int ui1 = 4294967295; /* OK */ const unsigned int ui2 = 4294967296; /* W0738 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0739 @section W0739 @cindex W0739 @subsection メッセージ本文 定数式における符号無し減算の結果が負になりました。 @subsection 内容 値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。 @subsection サンプルコード @verbatim const unsigned int ui1 = 3U - 3U; /* OK */ const unsigned int ui2 = 3U - 5U; /* W0739 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0740} 定数式における符号無し加算の結果が最大値を超えました。 @item @ref{W0741} 定数式における符号無し乗算の結果が最大値を超えました。 @end itemize @subsection 対応バージョン 1.4.0 @node W0740 @section W0740 @cindex W0740 @subsection メッセージ本文 定数式における符号無し加算の結果が最大値を超えました。 @subsection 内容 値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。 @subsection サンプルコード @verbatim /* when int is 32 bit long */ const unsigned int ui1 = 4294967294U + 1U; /* OK */ const unsigned int ui2 = 4294967295U + 1U; /* W0740 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0739} 定数式における符号無し減算の結果が負になりました。 @item @ref{W0741} 定数式における符号無し乗算の結果が最大値を超えました。 @end itemize @subsection 対応バージョン 1.4.0 @node W0741 @section W0741 @cindex W0741 @subsection メッセージ本文 定数式における符号無し乗算の結果が最大値を超えました。 @subsection 内容 値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。 @subsection サンプルコード @verbatim /* when int is 32 bit long */ const unsigned int ui1 = 2000000000U * 2U; /* OK */ const unsigned int ui2 = 3000000000U * 2U; /* W0741 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0739} 定数式における符号無し減算の結果が負になりました。 @item @ref{W0740} 定数式における符号無し加算の結果が最大値を超えました。 @end itemize @subsection 対応バージョン 1.4.0 @node W0742 @section W0742 @cindex W0742 @subsection メッセージ本文 負の整数定数式が符号無し型に変換されています。 @subsection 内容 この変換は文法的に問題ありませんが、プログラマの意図どおりでない可能性が高いです。 @subsection サンプルコード @verbatim #define MACRO (50) unsigned int ui; ui = MACRO - 100; /* W0742 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0743 @section W0743 @cindex W0743 @subsection メッセージ本文 整数定数式の値は、変換先の符号付きの結果の型で表現できる範囲を超えています。 @subsection 内容 値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。 また、このような処理は、動作が処理系定義になります。したがって、移植性を低下させます。 @subsection サンプルコード @verbatim /* when char is 8 bit long */ const signed char sc1 = 127; /* OK */ const signed char sc2 = 128; /* W0743 */ /* when int is 32 bit long */ const int si1 = 2147483647; /* OK */ const int si2 = 2147483648; /* W0743 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0744 @section W0744 @cindex W0744 @subsection メッセージ本文 この制御式の値は偽になる定数のため、制御文本体は実行されません。 @subsection 内容 到達しないコードがあるため、信頼性が低下します。 @subsection サンプルコード @verbatim #define MACRO1 (0) #define MACRO2 (1) if (MACRO1 == MACRO2) { /* W0744 */ ...snip... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0745 @section W0745 @cindex W0745 @subsection メッセージ本文 配列の添字が、領域外を指しています。 @subsection 内容 配列の領域外にアクセスする動作は未定義の動作になります。したがって予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim void func(unsigned int a) { int buf[10]; if (a > 5 && a < 10) { buf[a + 5] = 0; /* W0745 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W0747 @section W0747 @cindex W0747 @subsection メッセージ本文 暗黙的に signed short 型から signed char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(short a) { signed char b = a; /* W0747 */ foo(a); /* W0747 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0748 @section W0748 @cindex W0748 @subsection メッセージ本文 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(unsigned short a) { unsigned char b = a; /* W0748 */ foo(a); /* W0748 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0749 @section W0749 @cindex W0749 @subsection メッセージ本文 暗黙的に signed int 型から signed char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(int a) { signed char b = a; /* W0749 */ foo(a); /* W0749 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0750 @section W0750 @cindex W0750 @subsection メッセージ本文 暗黙的に signed int 型から signed short 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(int a) { short b = a; /* W0750 */ foo(a); /* W0750 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0751 @section W0751 @cindex W0751 @subsection メッセージ本文 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(unsigned int a) { unsigned char b = a; /* W0751 */ foo(a); /* W0751 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0752 @section W0752 @cindex W0752 @subsection メッセージ本文 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(unsigned int a) { unsigned short b = a; /* W0752 */ foo(a); /* W0752 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0753 @section W0753 @cindex W0753 @subsection メッセージ本文 暗黙的に signed long 型から signed char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(long a) { signed char b = a; /* W0753 */ foo(a); /* W0753 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0754 @section W0754 @cindex W0754 @subsection メッセージ本文 暗黙的に signed long 型から signed short 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(long a) { short b = a; /* W0754 */ foo(a); /* W0754 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0755 @section W0755 @cindex W0755 @subsection メッセージ本文 暗黙的に signed long 型から signed int 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(long a) { int b = a; /* W0755 */ foo(a); /* W0755 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0756 @section W0756 @cindex W0756 @subsection メッセージ本文 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(unsigned long a) { unsigned char b = a; /* W0756 */ foo(a); /* W0756 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0757 @section W0757 @cindex W0757 @subsection メッセージ本文 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(unsigned long a) { unsigned short b = a; /* W0757 */ foo(a); /* W0757 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0758 @section W0758 @cindex W0758 @subsection メッセージ本文 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(unsigned long a) { unsigned int b = a; /* W0758 */ foo(a); /* W0758 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0759 @section W0759 @cindex W0759 @subsection メッセージ本文 暗黙的に signed long long 型から signed char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(signed char a); void bar(long long a) { signed char b = a; /* W0759 */ foo(a); /* W0759 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0760 @section W0760 @cindex W0760 @subsection メッセージ本文 暗黙的に signed long long 型から signed short 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(short a); void bar(long long a) { short b = a; /* W0760 */ foo(a); /* W0760 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0761 @section W0761 @cindex W0761 @subsection メッセージ本文 暗黙的に signed long long 型から signed int 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(int a); void bar(long long a) { int b = a; /* W0761 */ foo(a); /* W0761 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0762 @section W0762 @cindex W0762 @subsection メッセージ本文 暗黙的に signed long long 型から signed long 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(long a); void bar(long long a) { long b = a; /* W0762 */ foo(a); /* W0762 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0763 @section W0763 @cindex W0763 @subsection メッセージ本文 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned char a); void bar(unsigned long long a) { unsigned char b = a; /* W0763 */ foo(a); /* W0763 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0764 @section W0764 @cindex W0764 @subsection メッセージ本文 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned short a); void bar(unsigned long long a) { unsigned short b = a; /* W0764 */ foo(a); /* W0764 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0765 @section W0765 @cindex W0765 @subsection メッセージ本文 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned int a); void bar(unsigned long long a) { unsigned int b = a; /* W0765 */ foo(a); /* W0765 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0766} 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0766 @section W0766 @cindex W0766 @subsection メッセージ本文 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。 @subsection 内容 より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 @subsection サンプルコード @verbatim extern void foo(unsigned long a); void bar(unsigned long long a) { unsigned long b = a; /* W0766 */ foo(a); /* W0766 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0747} 暗黙的に signed short 型から signed char 型に型変換されています。 @item @ref{W0748} 暗黙的に unsigned short 型から unsigned char 型に型変換されています。 @item @ref{W0749} 暗黙的に signed int 型から signed char 型に型変換されています。 @item @ref{W0750} 暗黙的に signed int 型から signed short 型に型変換されています。 @item @ref{W0751} 暗黙的に unsigned int 型から unsigned char 型に型変換されています。 @item @ref{W0752} 暗黙的に unsigned int 型から unsigned short 型に型変換されています。 @item @ref{W0753} 暗黙的に signed long 型から signed char 型に型変換されています。 @item @ref{W0754} 暗黙的に signed long 型から signed short 型に型変換されています。 @item @ref{W0755} 暗黙的に signed long 型から signed int 型に型変換されています。 @item @ref{W0756} 暗黙的に unsigned long 型から unsigned char 型に型変換されています。 @item @ref{W0757} 暗黙的に unsigned long 型から unsigned short 型に型変換されています。 @item @ref{W0758} 暗黙的に unsigned long 型から unsigned int 型に型変換されています。 @item @ref{W0759} 暗黙的に signed long long 型から signed char 型に型変換されています。 @item @ref{W0760} 暗黙的に signed long long 型から signed short 型に型変換されています。 @item @ref{W0761} 暗黙的に signed long long 型から signed int 型に型変換されています。 @item @ref{W0762} 暗黙的に signed long long 型から signed long 型に型変換されています。 @item @ref{W0763} 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。 @item @ref{W0764} 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。 @item @ref{W0765} 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0767 @section W0767 @cindex W0767 @subsection メッセージ本文 暗黙的に double 型から float 型に型変換されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(double a) { float b = a; /* W0767 */ foo(a); /* W0767 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0768} 暗黙的に long double 型から float 型に型変換されています。 @item @ref{W0769} 暗黙的に long double 型から double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0768 @section W0768 @cindex W0768 @subsection メッセージ本文 暗黙的に long double 型から float 型に型変換されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(float a); void bar(long double a) { float b = a; /* W0768 */ foo(a); /* W0768 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0767} 暗黙的に double 型から float 型に型変換されています。 @item @ref{W0769} 暗黙的に long double 型から double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0769 @section W0769 @cindex W0769 @subsection メッセージ本文 暗黙的に long double 型から double 型に型変換されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern void foo(double a); void bar(long double a) { double b = a; /* W0769 */ foo(a); /* W0769 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0767} 暗黙的に double 型から float 型に型変換されています。 @item @ref{W0768} 暗黙的に long double 型から float 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0770 @section W0770 @cindex W0770 @subsection メッセージ本文 外部結合をもつ識別子 `%s' の宣言が、二つ以上存在しています。 @subsection 内容 リンケージをもつオブジェクトおよび関数を複数のファイルで宣言する際は、その宣言に互換性があることを保証する必要があります。 これは、保守性を大きく低下させます。 @subsection サンプルコード @file{test1.h} @verbatim extern int func(void); /* W0770 */ @end verbatim @file{test2.h} @verbatim extern int func(void); /* W0770 */ @end verbatim @file{test.c} @verbatim #include "test1.h" #include "test2.h" int func(void) { return 0; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0771} グローバルな識別子 `%s' が、二つ以上のファイルで宣言されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0771 @section W0771 @cindex W0771 @subsection メッセージ本文 グローバルな識別子 `%s' が、二つ以上のファイルで宣言されています。 @subsection 内容 リンケージをもつオブジェクトおよび関数を複数のファイルで宣言する際は、その宣言に互換性があることを保証する必要があります。 これは、保守性を大きく低下させます。 @subsection サンプルコード @file{test1.h} @verbatim extern int func(void); /* W0771 */ extern int a; /* W0771 */ @end verbatim @file{test2.h} @verbatim extern int func(void); /* W0771 */ extern int a; /* W0771 */ @end verbatim @file{test.c} @verbatim #include "test1.h" #include "test2.h" @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0770} 外部結合をもつ識別子 `%s' の宣言が、二つ以上存在しています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0774 @section W0774 @cindex W0774 @subsection メッセージ本文 double 型の値が関数 `float %s()' から返されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern double foo(void); float bar(void) { return foo(); /* W0774 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0775} long double 型の値が関数 `float %s()' から返されています。 @item @ref{W0776} long double 型の値が関数 `double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0775 @section W0775 @cindex W0775 @subsection メッセージ本文 long double 型の値が関数 `float %s()' から返されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern long double foo(void); float bar(void) { return foo(); /* W0775 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0774} double 型の値が関数 `float %s()' から返されています。 @item @ref{W0776} long double 型の値が関数 `double %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0776 @section W0776 @cindex W0776 @subsection メッセージ本文 long double 型の値が関数 `double %s()' から返されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 @subsection サンプルコード @verbatim extern long double foo(void); double bar(void) { return foo(); /* W0776 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0774} double 型の値が関数 `float %s()' から返されています。 @item @ref{W0775} long double 型の値が関数 `float %s()' から返されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0777 @section W0777 @cindex W0777 @subsection メッセージ本文 暗黙的に float 型の複合式から double 型に型変換されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 より大きい浮動小数点型への暗黙のキャストでは、大きな問題は起きませんが、暗黙のキャストは解析性にもデメリットがあるため推奨しません。 @subsection サンプルコード @verbatim void func(float a, float b) { double c = a + b; /* W0777 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0778} 暗黙的に float 型の複合式から long double 型に型変換されています。 @item @ref{W0779} 暗黙的に double 型の複合式から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0778 @section W0778 @cindex W0778 @subsection メッセージ本文 暗黙的に float 型の複合式から long double 型に型変換されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 より大きい浮動小数点型への暗黙のキャストでは、大きな問題は起きませんが、暗黙のキャストは解析性にもデメリットがあるため推奨しません。 @subsection サンプルコード @verbatim void func(float a, float b) { long double c = a + b; /* W0778 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0777} 暗黙的に float 型の複合式から double 型に型変換されています。 @item @ref{W0779} 暗黙的に double 型の複合式から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0779 @section W0779 @cindex W0779 @subsection メッセージ本文 暗黙的に double 型の複合式から long double 型に型変換されています。 @subsection 内容 より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 より大きい浮動小数点型への暗黙のキャストでは、大きな問題は起きませんが、暗黙のキャストは解析性にもデメリットがあるため推奨しません。 @subsection サンプルコード @verbatim void func(double a, double b) { long double c = a + b; /* W0779 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0777} 暗黙的に float 型の複合式から double 型に型変換されています。 @item @ref{W0778} 暗黙的に float 型の複合式から long double 型に型変換されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0780 @section W0780 @cindex W0780 @subsection メッセージ本文 定数式における符号無し左シフト演算 `<<' は、非ゼロの上位ビットを切り詰めます。 @subsection 内容 シフト演算の結果として上位ビットの情報が欠落してしまいます。 これが意図通りであれば問題ありませんが、意図通りでない場合は、不具合の原因になる可能性があります。 @subsection サンプルコード @verbatim unsigned int foo(void) { return 0x08000000U << 5; /* W0780 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0781 @section W0781 @cindex W0781 @subsection メッセージ本文 この switch 文にはパスが 1 つしかありません。この switch 文は冗長です。 @subsection 内容 このような @code{switch} 文がプログラマの意図通りだとしたら、 冗長な記述という意味で問題があります。 また、意図通りでないとしたら @code{case} 節の書き忘れが考えられますので、 動作上のバグが発生する可能性があります。 また、コードの閲覧者から見てプログラマの意図通りかどうかを判断できないという問題もあります。 @subsection サンプルコード @verbatim int foo(const int i) { if (i > 5) { switch (i) { /* W0781 */ case 0: return 1; case 5: return 2; default: return 3; } } switch (i) { /* OK */ case 0: return 4; default: switch (i) { /* W0781 */ case 10: return 5; default: return 6; } } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.6.0 @node W0783 @section W0783 @cindex W0783 @subsection メッセージ本文 不完全型を指すポインタを含むキャストが行われています。このプログラムは移植性がありません。 @subsection 内容 完全型から不完全型へのキャストは ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern struct Foo *gp; void foo(int *p) { gp = (struct Foo *) p; /* W0783 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0784 @section W0784 @cindex W0784 @subsection メッセージ本文 非標準の拡張表記が使われています。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} 未定義の拡張表記を使用した場合の動作は未定義です。したがって、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 2.0.0 以降の予定 @node W0785 @section W0785 @cindex W0785 @subsection メッセージ本文 このタグ `%s' の宣言は、以前の宣言と異なります。 @subsection 内容 構造体、共用体、列挙体は衝突しないように異なる識別子でタグ宣言する必要があります。 同じ識別子でタグ宣言されている構造体や共用体の動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim struct AAA { int a; }; union AAA { /* W0785 */ long a; int b; }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0786 @section W0786 @cindex W0786 @subsection メッセージ本文 int、signed int、あるいは unsigned int 以外の型をもつビットフィールドは、ISO C 標準規格ではサポートされません。 @subsection 内容 コンパイラの中には @code{int} 型以外のビットフィールドの使用を許すものがあります。 しかし、@code{int} 型以外のビットフィールドの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim struct ST { /* W0786 */ unsigned int a:3; unsigned long b:1; }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0787 @section W0787 @cindex W0787 @subsection メッセージ本文 `%s' の型が、以前の異なるスコープで宣言された型と異なります。 @subsection 内容 宣言が異なるスコープにある場合の動作は処理系定義になります。 また、宣言が同じスコープにある場合は標準制約違反になります。 従って、移植性が低下します。 ただし、一方がもう一方の内側のスコープで宣言される場合は問題ありません。 @subsection サンプルコード @verbatim void func1(void) { extern int num; extern void func3(void); } void func2(void) { extern double num; /* W0787 */ extern void func3(int); /* W0787 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0788} `%s' の型が、以前の同じスコープ内で宣言された型と異なります。 @item @ref{W0789} `%s' の型が、以前のより広いスコープで宣言された型と異なります。 @end itemize @subsection 対応バージョン 1.6.0 @node W0788 @section W0788 @cindex W0788 @subsection メッセージ本文 `%s' の型が、以前の同じスコープ内で宣言された型と異なります。 @subsection 内容 宣言が異なるスコープにある場合の動作は処理系定義になります。 また、宣言が同じスコープにある場合は標準制約違反になります。 従って、移植性が低下します。 ただし、一方がもう一方の内側のスコープで宣言される場合は問題ありません。 @subsection サンプルコード @verbatim extern int func(void); void func(void) /* W0788 */ { typedef int num; double num; /* W0788 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0787} `%s' の型が、以前の異なるスコープで宣言された型と異なります。 @item @ref{W0789} `%s' の型が、以前のより広いスコープで宣言された型と異なります。 @end itemize @subsection 対応バージョン 1.6.0 @node W0789 @section W0789 @cindex W0789 @subsection メッセージ本文 `%s' の型が、以前のより広いスコープで宣言された型と異なります。 @subsection 内容 宣言が異なるスコープにある場合の動作は処理系定義になります。 また、宣言が同じスコープにある場合は標準制約違反になります。 従って、移植性が低下します。 ただし、一方がもう一方の内側のスコープで宣言される場合は問題ありません。 @subsection サンプルコード @verbatim int num = 0; extern int func1(void); void func2(void) { extern double num; /* W0789 */ extern void func1(void); /* W0789 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0788} `%s' の型が、以前の同じスコープ内で宣言された型と異なります。 @item @ref{W0789} `%s' の型が、以前のより広いスコープで宣言された型と異なります。 @end itemize @subsection 対応バージョン 1.6.0 @node W0790 @section W0790 @cindex W0790 @subsection メッセージ本文 グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。 @subsection 内容 文法上の誤りではありませんので、重複定義そのものが原因で予期しない動作を引き起こすことはありません。 しかし、同じ識別子で複数回定義することは無駄な処理と言えます。 無駄なものは、メモリ資源を消費する、ソースコードの可読性を低下させる、などのデメリットがあります。 @subsection サンプルコード @verbatim int func(void) { return 0; } int a = 0; int func(void) /* W0790 */ { return 1; } int a = 1; /* W0790 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0791} グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0791 @section W0791 @cindex W0791 @subsection メッセージ本文 グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。 @subsection 内容 文法上の誤りではありませんので、重複定義そのものが原因で予期しない動作を引き起こすことはありません。 しかし、同じ識別子で複数回定義することは無駄な処理と言えます。 無駄なものは、メモリ資源を消費する、ソースコードの可読性を低下させる、などのデメリットがあります。 @subsection サンプルコード @file{test1.c} @verbatim int func(void) /* W0791 */ { return 0; } int a = 0; /* W0791 */ @end verbatim @file{test2.c} @verbatim int func(void) /* W0791 */ { return 1; } int a = 1; /* W0791 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0790} グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0792 @section W0792 @cindex W0792 @subsection メッセージ本文 浮動小数点数型を関数ポインタ(あるいはその逆)へキャストしています。 @subsection 内容 関数ポインタから浮動小数点型へのキャスト、またはその逆のキャストは未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int (*foo(const float f))(void) { return (int (*)(void)) f; /* W0792 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0793 @section W0793 @cindex W0793 @subsection メッセージ本文 関数ポインタをオブジェクトを指すポインタ(あるいはその逆)へキャストしています。 @subsection 内容 オブジェクトを指すポインタから関数ポインタへのキャスト、またはその逆の黄やストは未定義の動作になります。 従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim typedef int (*funptr_t)(void); funptr_t foo(float *p) { return (funptr_t) p; /* W0793 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0794 @section W0794 @cindex W0794 @subsection メッセージ本文 符号付きのオペランドを左シフト演算しています。 @subsection 内容 整数の負の値をどのように表現するかは規格で定義されているわけではありません。 従って、符号付き型の値に対して左シフト演算をした結果は、コンパイラに依存することになり、移植性が低下します。 @subsection サンプルコード @verbatim int func(int i) { return i << 1; /* W0794 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0795 @section W0795 @cindex W0795 @subsection メッセージ本文 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。 @subsection 内容 このような記述は、言語制約違反になりますので、移植性を低下させます。 また、スタックを破壊する可能性があるため危険です。 @subsection サンプルコード @verbatim extern void foo(int, int, int); static void bar(void) { foo(1, 2); /* W0795 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0796} 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。 @item @ref{W0797} 関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0796 @section W0796 @cindex W0796 @subsection メッセージ本文 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。 @subsection 内容 このような記述は、言語制約違反になりますので、移植性を低下させます。 また、スタックを破壊する可能性があるため危険です。 @subsection サンプルコード @verbatim extern void foo(int, int); static void bar(void) { foo(1, 2, 3); /* W0796 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0795} 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。 @item @ref{W0797} 関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。 @end itemize @subsection 対応バージョン 1.0.0 @node W0797 @section W0797 @cindex W0797 @subsection メッセージ本文 関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。 @subsection 内容 このような記述は、言語制約違反になりますので、移植性を低下させます。 また、スタックを破壊する可能性があるため危険です。 @subsection サンプルコード @verbatim static int foo(int, int); static int bar(void) { int a = foo(1); /* W0795 */ int b = foo(1, 2); int c = foo(1, 2, 3); /* W0795 */ } static int foo(int a, int b) { return a + b; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0795} 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。 @item @ref{W0796} 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。 @end itemize @subsection 対応バージョン 1.0.0 @node W0798 @section W0798 @cindex W0798 @subsection メッセージ本文 不完全な共用体オブジェクトの値を使ってはいけません。 @subsection 内容 オブジェクトの値が必要な文脈で、不完全型をもつ左辺値を用いるような式は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern union UN *p; void func(void) { int i = 0; if (p) { i = p->i; /* W0798 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0799} 不完全な構造体オブジェクトの値を使ってはいけません。 @item @ref{W0800} `%s' は結合をもたない不完全型です。これは未定義です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0799 @section W0799 @cindex W0799 @subsection メッセージ本文 不完全な構造体オブジェクトの値を使ってはいけません。 @subsection 内容 オブジェクトの値が必要な文脈で、不完全型をもつ左辺値を用いるような式は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim extern struct ST *p; void func(void) { int i = 0; if (p) { i = p->i; /* W0799 */ } } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0798} 不完全な共用体オブジェクトの値を使ってはいけません。 @item @ref{W0800} `%s' は結合をもたない不完全型です。これは未定義です。 @end itemize @subsection 対応バージョン 1.0.0 @node W0800 @section W0800 @cindex W0800 @subsection メッセージ本文 `%s' は結合をもたない不完全型です。これは未定義です。 @subsection 内容 オブジェクトの値が必要な文脈で、不完全型をもつ左辺値を用いるような式は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim int a[]; /* W0800 */ struct ST s = { 0 }; /* W0800 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0798} 不完全な共用体オブジェクトの値を使ってはいけません。 @item @ref{W0799} 不完全な構造体オブジェクトの値を使ってはいけません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0801 @section W0801 @cindex W0801 @subsection メッセージ本文 この構造体あるいは共用体には名前付きのメンバがありません。 @subsection 内容 名前付きのメンバを一つも持たない構造体または共用体を使用したときの動作は未定義です。 従って、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim struct foo { /* W0801 */ }; struct bar { /* W0801 */ int; int :1; long; double; }; @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W0802 @section W0802 @cindex W0802 @subsection メッセージ本文 `#include' 前処理指令の後が、<ファイル名> あるいは "ファイル名" 形式のどちらでもありません。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} @code{#include <ファイル名>} または @code{#include "ファイル名"} 以外の形式で記述されている @code{#include} 文の動作は未定義になります。 従って、予期しない動作を引き起こす可能性があります。" @subsection サンプルコード @verbatim #include fruits.h /* W0802 */ #define MACRO 1 #include MACRO /* W0802 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 2.0.0 以降の予定 @node W0803 @section W0803 @cindex W0803 @subsection メッセージ本文 関数形式マクロの実引数の中に、前処理指令が記述されています。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 2.0.0 以降の予定 @node W0804 @section W0804 @cindex W0804 @subsection メッセージ本文 defined 構文が、`defined(識別子)' あるいは `defined 識別子' のどちらでもありません。 @subsection 内容 このような記述は未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #if defined "MACRO" /* W0804 */ #endif @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0805} `defined' に、実引数となる識別子がありません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0805 @section W0805 @cindex W0805 @subsection メッセージ本文 `defined' に、実引数となる識別子がありません。 @subsection 内容 このような記述は未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #if defined "foo" /* W0805 */ int i = 0; #endif @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0804} defined 構文が、`defined(識別子)' あるいは `defined 識別子' のどちらでもありません。 @end itemize @subsection 対応バージョン 1.16.0 @node W0806 @section W0806 @cindex W0806 @subsection メッセージ本文 `defined' という名称のマクロを定義しようとしています。 @subsection 内容 ISO C90 で規定されている予約語を定義、再定義、定義解消することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。 @subsection サンプルコード @verbatim #define defined !defined /* W0806 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0807} 事前定義のマクロ名 `%s' を削除しようとしています。 @item @ref{W0808} 事前定義のマクロ名 `%s' を再定義しようとしています。 @end itemize @subsection 対応バージョン 1.4.0 @node W0807 @section W0807 @cindex W0807 @subsection メッセージ本文 事前定義のマクロ名 `%s' を削除しようとしています。 @subsection 内容 ISO C90 で規定されている予約語を定義、再定義、定義解消することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。 @subsection サンプルコード @verbatim #undef __STDC_VERSION__ /* W0807 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0806} `defined' という名称のマクロを定義しようとしています。 @item @ref{W0808} 事前定義のマクロ名 `%s' を再定義しようとしています。 @end itemize @subsection 対応バージョン 1.6.0 @node W0808 @section W0808 @cindex W0808 @subsection メッセージ本文 事前定義のマクロ名 `%s' を再定義しようとしています。 @subsection 内容 ISO C90 で規定されている予約語を定義、再定義、定義解消することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。 @subsection サンプルコード @verbatim #define __FILE__ "test.c" /* W0808 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0806} `defined' という名称のマクロを定義しようとしています。 @item @ref{W0807} 事前定義のマクロ名 `%s' を削除しようとしています。 @end itemize @subsection 対応バージョン 1.6.0 @node W0809 @section W0809 @cindex W0809 @subsection メッセージ本文 識別子 `%s' はライブラリで予約済みです。 @subsection 内容 ISO C90 で規定されている予約語を再使用することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。 @subsection サンプルコード @verbatim extern int __value; /* W0809 */ int _VAL = 10; /* W0809 */ static void _func(void); /* W0809 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.6.0 @node W0810 @section W0810 @cindex W0810 @subsection メッセージ本文 この `if-if-else' 文の構造をより明確にするためには `@{@}' が必要です。 @subsection 内容 サンプルコードのようなコードでは、@code{else} がどちらの @code{if} に対応するのかが不明確です。 また、本体が単一文で済まなくなったときに、波括弧をつけ忘れるリスクもあります。 @subsection サンプルコード @verbatim int foo(int i, int j) { if (i < 0) /* W0810 */ if (j > 0) { return 0; } else { return 1; } if (i > 0) /* W0810 */ if (j < 0) { return 2; } else { return 3; } return 4; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W0811 @section W0811 @cindex W0811 @subsection メッセージ本文 このマクロの展開結果の、`defined' トークンは、許容されません。 @subsection 内容 このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。 @subsection サンプルコード @verbatim #define COND defined(FOO) #if COND /* W0811 */ int i = 0; #endif @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W0827 @section W0827 @cindex W0827 @subsection メッセージ本文 ネストされた構造体の初期値の各要素が `@{@}' で囲まれていません。 @subsection 内容 構造体を 0 以外で初期化する場合は、構造を示し、初期化子は波括弧 "@{@}" で囲まなければなりません。 @subsection サンプルコード @verbatim struct ST { int i; int j; }; struct ST a[2] = { 10, 20, 30, 40 }; /* W0827 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0828} ネストされた配列の初期値の各要素が `@{@}' で囲まれていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0828 @section W0828 @cindex W0828 @subsection メッセージ本文 ネストされた配列の初期値の各要素が `@{@}' で囲まれていません。 @subsection 内容 配列を 0 以外で初期化する場合は、構造を示し、初期化子は波括弧 "@{@}" で囲まなければなりません。 @subsection サンプルコード @verbatim int a[3][2] = { {1, 2}, {3, 4}, {5, 6} }; int b[3][2] = { 1, 2, 3, 4, 5, 6 }; /* W0828 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0827} ネストされた構造体の初期値の各要素が `@{@}' で囲まれていません。 @end itemize @subsection 対応バージョン 1.0.0 @node W0830 @section W0830 @cindex W0830 @subsection メッセージ本文 列挙子並びの末尾にカンマ `,' があります。 @subsection 内容 このような記述は、言語拡張に該当するため、移植性を低下させます。 @subsection サンプルコード @verbatim enum Color { Red, Green, Blue, }; /* W0830 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W0831 @section W0831 @cindex W0831 @subsection メッセージ本文 これはインラインアセンブリ用の言語拡張です。#asm と #endasm の間は無視します。 @subsection 内容 インライン・アセンブラ構文は、言語拡張に該当するため、移植性を低下させます。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0832} インラインアセンブリ構文を使っています。これは言語拡張です。このコードは無視します。 @end itemize @subsection 対応バージョン 1.0.0 @node W0832 @section W0832 @cindex W0832 @subsection メッセージ本文 インラインアセンブリ構文を使っています。これは言語拡張です。このコードは無視します。 @subsection 内容 インライン・アセンブラ構文は、言語拡張に該当するため、移植性を低下させます。 @subsection サンプルコード @verbatim #define ASM_CODE asm("movl %ecx, %eax") void foo(int arg1, int *arg2, int arg3) { asm("movl %ecx, %eax"); /* W0832 */ __asm__("movl %ecx, (%eax)"); /* W0832 */ asm { /* W0832 */ xorl eax, eax } ASM_CODE; /* W0832 */ __asm__ volatile ( /* W0832 */ "int $0x80" : "=a" (r) "+b" (arg1), "+c" (arg2), "+d" (arg3) : "a" (128) : "memory", "cc"); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0831} これはインラインアセンブリ用の言語拡張です。#asm と #endasm の間は無視します。 @end itemize @subsection 対応バージョン 1.8.0 @node W0833 @section W0833 @cindex W0833 @subsection メッセージ本文 接尾語 LL を使っています。 @subsection 内容 接尾語 @code{LL} は、言語拡張に該当するため、移植性を低下させます。 @subsection サンプルコード @verbatim long long ll = 123LL; /* W0833 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0834} long long 型を使っています。 @end itemize @subsection 対応バージョン 1.18.0 @node W0834 @section W0834 @cindex W0834 @subsection メッセージ本文 long long 型を使っています。 @subsection 内容 @code{long long} 型は、言語拡張に該当するため、移植性を低下させます。 @subsection サンプルコード @verbatim extern long long ll; /* W0834 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0833} 接尾語 LL を使っています。 @end itemize @subsection 対応バージョン 1.18.0 @node W0835 @section W0835 @cindex W0835 @subsection メッセージ本文 可変引数を受け取るマクロが定義されています。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} 可変個引数マクロの定義は、言語拡張に該当するため、移植性を低下させます。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 2.0.0 以降の予定 @node W0947 @section W0947 @cindex W0947 @subsection メッセージ本文 文字列リテラルが直接使われています。 @subsection 内容 リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。 @subsection サンプルコード @verbatim func("Apple, Banana, Chocolate"); /* W0947 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0948} 文字定数 %s が直接使われています。 @item @ref{W0949} ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。 @item @ref{W0950} 配列のサイズ定義に、数値 `%s' が直接使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0948 @section W0948 @cindex W0948 @subsection メッセージ本文 文字定数 %s が直接使われています。 @subsection 内容 リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。 @subsection サンプルコード @verbatim func('a'); /* W0948 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0947} 文字列リテラルが直接使われています。 @item @ref{W0949} ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。 @item @ref{W0950} 配列のサイズ定義に、数値 `%s' が直接使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0949 @section W0949 @cindex W0949 @subsection メッセージ本文 ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。 @subsection 内容 リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。 @subsection サンプルコード @verbatim struct ST { unsigned int a:1; unsigned int a:2; /* W0949 */ unsigned int a:3; /* W0949 */ }; @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0947} 文字列リテラルが直接使われています。 @item @ref{W0948} 文字定数 %s が直接使われています。 @item @ref{W0950} 配列のサイズ定義に、数値 `%s' が直接使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W0950 @section W0950 @cindex W0950 @subsection メッセージ本文 配列のサイズ定義に、数値 `%s' が直接使われています。 @subsection 内容 リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。 @subsection サンプルコード @verbatim int a[10]; /* W0950 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0947} 文字列リテラルが直接使われています。 @item @ref{W0948} 文字定数 %s が直接使われています。 @item @ref{W0949} ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。 @end itemize @subsection 対応バージョン 1.0.0 @node W1026 @section W1026 @cindex W1026 @subsection メッセージ本文 %s 番目の実引数がオブジェクト型ではありません。 @subsection 内容 不完全型の構造体や配列を仮引数にしています。関数の全ての仮引数はオブジェクト型の式である必要があります。 @subsection サンプルコード @verbatim extern struct st s; extern void foo(struct st); void bar(void) { foo(s); /* W1026 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W1027 @section W1027 @cindex W1027 @subsection メッセージ本文 配列の基本型が関数型です。これは意味がありません。 @subsection 内容 関数の配列が存在しています。 @subsection サンプルコード @verbatim int (fun_tbl[20])(void); /* W1027 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1028} 配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。 @item @ref{W1029} 配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。 @end itemize @subsection 対応バージョン 1.0.0 @node W1028 @section W1028 @cindex W1028 @subsection メッセージ本文 配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。 @subsection 内容 この配列は不完全型で定義されています。これは誤りです。 @subsection サンプルコード @verbatim int a[4][]; /* W1028 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1027} 配列の基本型が関数型です。これは意味がありません。 @item @ref{W1029} 配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。 @end itemize @subsection 対応バージョン 1.0.0 @node W1029 @section W1029 @cindex W1029 @subsection メッセージ本文 配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。 @subsection 内容 この配列は、不完全な要素を持つ構造体または共用体を型として定義しています。 @subsection サンプルコード @verbatim struct ST a[5]; /* W1029 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1027} 配列の基本型が関数型です。これは意味がありません。 @item @ref{W1028} 配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。 @end itemize @subsection 対応バージョン 1.0.0 @node W1030 @section W1030 @cindex W1030 @subsection メッセージ本文 ラベル `%s' がこの関数の中で二回以上使われています。 @subsection 内容 同じ名前のラベルが、関数内で 2 回以上使われています。このような使い方は誤りです。 @subsection サンプルコード @verbatim void func(int a, int b) { if (a == 0) { int c = 0; RETRY: b = 10; } if (b != 0) { goto RETRY; } RETRY: /* W1030 */ b = 1; ...snip... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.6.0 @node W1031 @section W1031 @cindex W1031 @subsection メッセージ本文 オブジェクト `%s' は、外部結合と内部結合の両方で宣言されています。その動作は未定義です。 @subsection 内容 同じ名前の変数が 2 回以上定義されていて、その 1 つには @code{static} 宣言がついています。このような使い方は誤りです。 @subsection サンプルコード @file{test.h} @verbatim extern int a; @end verbatim @file{test.c} @verbatim #include "test.h" static int a; /* W1031 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W1032 @section W1032 @cindex W1032 @subsection メッセージ本文 内部結合をもつ変数 '%s' の仮定義は、不完全型ではいけません。 @subsection 内容 内部結合を持つオブジェクトの仮定義でのうち、後で示されたほうにに明示的な定義が見つかりません。このような使い方は誤りです。 @subsection サンプルコード @verbatim static struct ST a[3]; /* W1032 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W1033 @section W1033 @cindex W1033 @subsection メッセージ本文 関数の戻り値の型に volatile あるいは const 修飾子を使っています。その動作は未定義です。 @subsection 内容 関数の戻り値の型が、@code{volatile} 型の場合の動作は処理系定義です。 また、@code{const} 型の場合は未定義です。 @subsection サンプルコード @verbatim extern const int func1(int); /* W1033 */ const int func2(int i) /* W1033 */ { return i + 1; } const int *func3(int i) /* OK */ { static int j; j = i; return &j; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.4.0 @node W1034 @section W1034 @cindex W1034 @subsection メッセージ本文 ブロックスコープで、関数 `%s()' に static 記憶域クラス指定子を使って宣言されています。この用法は意味がありません。 @subsection 内容 @code{static} な関数がブロックスコープ内で宣言されています。 関数宣言はブロック・スコープの場合 @code{static} を使用できません。 @subsection サンプルコード @verbatim int func(void) { static int func1(void); /* W1034 */ extern int func2(void); } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W1035 @section W1035 @cindex W1035 @subsection メッセージ本文 `%s' は typedef として宣言されています。明示的な型指定子を使わずに、より内側のスコープで再宣言することはできません。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} @code{typedef} の再定義は未定義の動作になります。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1036} `%s' は typedef として宣言されています。明示的な型指定子を使わずに、構造体または共用体のメンバとして再宣言することはできません。 @end itemize @subsection 対応バージョン 2.0.0 以降の予定 @node W1036 @section W1036 @cindex W1036 @subsection メッセージ本文 `%s' は typedef として宣言されています。明示的な型指定子を使わずに、構造体または共用体のメンバとして再宣言することはできません。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} @code{typedef} の再定義は未定義の動作になります。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1035} `%s' は typedef として宣言されています。明示的な型指定子を使わずに、より内側のスコープで再宣言することはできません。 @end itemize @subsection 対応バージョン 2.0.0 以降の予定 @node W1037 @section W1037 @cindex W1037 @subsection メッセージ本文 外部結合をもつ `%s' が、二つ以上宣言されていますが互換性がありません。 @subsection 内容 外部結合を持つ同一の識別子を複数宣言する際は、すべての宣言において、 その型(関数の宣言の場合は、戻り値の型、結合、例外仕様)に互換性を保証する必要があります。 @subsection サンプルコード @file{test1.c} @verbatim extern void func(void); /* W1037 */ extern int a; /* W1037 */ @end verbatim @file{test2.c} @verbatim extern int func(int); /* W1037 */ extern long a; /* W1037 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W1039 @section W1039 @cindex W1039 @subsection メッセージ本文 %s 番目の指定子に `ll' が使われています。 @subsection 内容 '@code{ll}' を変換指定子に使用しています。このような記述は ISO C90 では認められていません。 @subsection サンプルコード @verbatim extern int printf(const char *, ...); void foo(long long ll) { printf("%lld", ll); /* W1039 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W1040 @section W1040 @cindex W1040 @subsection メッセージ本文 前処理指令の後に認識できない文字列が記述されています。 @subsection 内容 このような前処理指令の記述は、ISO C90 標準規格ではサポートされていません。 @subsection サンプルコード @verbatim #define TEST #ifdef TEST #if defined(CASE_1) int i = 1; #elif defined(CASE_2) int i = 2; #endif CASE /* W1040 */ #else int i = 0; #endif TEST /* W1040 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1041} `%s' は、ISO C 標準規格の正式な前処理指令ではありません。 @item @ref{W1042} 前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。 @end itemize @subsection 対応バージョン 1.16.0 @node W1041 @section W1041 @cindex W1041 @subsection メッセージ本文 `%s' は、ISO C 標準規格の正式な前処理指令ではありません。 @subsection 内容 このような前処理指令の記述は、ISO C90 標準規格ではサポートされていません。 @subsection サンプルコード @verbatim #compiler_specific_extension 1 2.3 "4" /* W1041 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1040} 前処理指令の後に認識できない文字列が記述されています。 @item @ref{W1042} 前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。 @end itemize @subsection 対応バージョン 1.16.0 @node W1042 @section W1042 @cindex W1042 @subsection メッセージ本文 前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} このような前処理指令の記述は、ISO C90 標準規格ではサポートされていません。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1040} 前処理指令の後に認識できない文字列が記述されています。 @item @ref{W1041} `%s' は、ISO C 標準規格の正式な前処理指令ではありません。 @end itemize @subsection 対応バージョン 2.0.0 以降の予定 @node W1043 @section W1043 @cindex W1043 @subsection メッセージ本文 `@@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} このような構文記述は、ISO C90 標準規格ではサポートされていないため、言語拡張とみなされます。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1045} この `@@ word' 構文は無視されます。 @end itemize @subsection 対応バージョン 2.0.0 以降の予定 @node W1045 @section W1045 @cindex W1045 @subsection メッセージ本文 この `@@ word' 構文は無視されます。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} このような構文記述は、ISO C90 標準規格ではサポートされていないため、言語拡張とみなされます。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1043} `@@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。 @end itemize @subsection 対応バージョン 2.0.0 以降の予定 @node W1046 @section W1046 @cindex W1046 @subsection メッセージ本文 `\' と改行の間にある空白文字類が無視されています。 @subsection 内容 ISO C 規格ではバックスラッシュ文字の後に直接改行文字が続くべきであると規定しています。 @subsection サンプルコード @verbatim #define FOO(a, b) /* OK */ \ ( /* W1046 */ \ (a) + (b) /* W1046 */ \ ) @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W1047 @section W1047 @cindex W1047 @subsection メッセージ本文 構造体、共用体、あるいは配列の初期化子がリテラルではありません。 @subsection 内容 初期化子が定数式になっていません。 @subsection サンプルコード @verbatim int foo(int i, int j) { int a[] = { 0, i, j }; /* W1047 */ return a[1]; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W1048 @section W1048 @cindex W1048 @subsection メッセージ本文 マルチバイト文字リテラルは処理系定義の値になります。 @subsection 内容 @b{このメッセージは AdLint 2.0.0 以降で出力する予定です。} マルチバイト文字定数が使用されています。この値やサイズは処理系によって異なるため、移植性が低下します。 @subsection サンプルコード @c{未実装} @verbatim /* 追記予定 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 2.0.0 以降の予定 @node W1049 @section W1049 @cindex W1049 @subsection メッセージ本文 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 @subsection 内容 @code{char} が 8bit の場合、@code{signed char} 型は -128~127 の範囲しか表現できません。したがって、例 1 では表現できないことがあります。この場合、結果は "処理系定義" になります。 符号なし演算の結果は、オーバーフローせず、ラップアラウンドします。例 2 では、ラップアラウンドし結果が切り詰められる可能性があります。 @subsection サンプルコード 例 1 @verbatim void func1(signed int si) { signed char sc = (signed char) si + 10; /* W1049 */ } @end verbatim 例 2 @verbatim void func(unsigned int ui) { unsigned int a = ui * ui; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1050} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 @item @ref{W1051} 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。 @item @ref{W1052} 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W1050 @section W1050 @cindex W1050 @subsection メッセージ本文 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 @subsection 内容 @code{char} が 8bit の場合、@code{signed char} 型は -128~127 の範囲しか表現できません。したがって、例 1 では表現できないことがあります。この場合、結果は "処理系定義" になります。 符号なし演算の結果は、オーバーフローせず、ラップアラウンドします。例 2 では、ラップアラウンドし結果が切り詰められる可能性があります。 @subsection サンプルコード 例 1 @verbatim void func(signed int si) { signed char sc = 0; if (si > 127) { sc = (signed char) si + 1; /* W1050 */ } } @end verbatim 例 2 @verbatim void func(unsigned int ui) { unsigned int a = ui * ui; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1049} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 @item @ref{W1051} 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。 @item @ref{W1052} 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。 @item @ref{C1000} 次の実行パスで警告を検知しました。 @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 1.0.0 @node W1051 @section W1051 @cindex W1051 @subsection メッセージ本文 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。 @subsection 内容 符号なし演算の結果は、オーバーフローせずラップアラウンドし、結果が切り詰められる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(unsigned int ui) { if (ui > 0xEFFFFFFFU) { return ui + 0x10000000U; /* W1051 */ } return 0U; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1049} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 @item @ref{W1050} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 @item @ref{W1052} 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。 @end itemize @subsection 対応バージョン 1.0.0 @node W1052 @section W1052 @cindex W1052 @subsection メッセージ本文 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。 @subsection 内容 符号なし演算の結果は、オーバーフローせずラップアラウンドし、結果が切り詰められる可能性があります。 @subsection サンプルコード @verbatim unsigned int func(unsigned int a, unsigned int b) { if (a > 0xEFFFFFFFU && b < 0x20000000U) { return a + b; /* W1052 */ } return 0U; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1049} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 @item @ref{W1050} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 @item @ref{W1051} 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。 @end itemize @subsection 対応バージョン 1.0.0 @node W1053 @section W1053 @cindex W1053 @subsection メッセージ本文 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @subsection 内容 非列挙型から列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern void func1(enum Color); void func2(void) { func1(4); /* W1053 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1054 @section W1054 @cindex W1054 @subsection メッセージ本文 列挙型に、列挙型ではない式が代入されています。 @subsection 内容 非列挙型から列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern enum Color col; void func2(void) { col = 4; /* W1054 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1055 @section W1055 @cindex W1055 @subsection メッセージ本文 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @subsection 内容 列挙型から非列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Color func(void) { return 4; /* W1055 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1056 @section W1056 @cindex W1056 @subsection メッセージ本文 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @subsection 内容 列挙型から異なる列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN= 2, BLUE = 4 }; enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER }; extern void func1(enum Color); void func2(enum Season ssn) { func1(ssn); /* W1056 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1057 @section W1057 @cindex W1057 @subsection メッセージ本文 列挙型に、異なる列挙型のオブジェクトが代入されています。 @subsection 内容 列挙型から異なる列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER }; extern enum Color col; void func(enum Season ssn) { col = ssn; /* W1057 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1058 @section W1058 @cindex W1058 @subsection メッセージ本文 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @subsection 内容 列挙型から異なる列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER }; enum Color func(enum Season ssn) { return ssn; /* W1058 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1059 @section W1059 @cindex W1059 @subsection メッセージ本文 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @subsection 内容 列挙型から非列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern void func1(int num); void func2(enum Color col) { func1(col); /* W1059 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1060 @section W1060 @cindex W1060 @subsection メッセージ本文 戻り値が列挙型でない関数から、列挙型が返されています。 @subsection 内容 非列挙型から列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; int func2(enum Color col) { return col; /* W1060 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1061 @section W1061 @cindex W1061 @subsection メッセージ本文 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @subsection 内容 非列挙型から列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern void func1(enum Color); void func2(int num) { func1(num); /* W1061 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1062 @section W1062 @cindex W1062 @subsection メッセージ本文 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @subsection 内容 非列挙型から列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern enum Color col; void func(int num) { col = num + 1; /* W1062 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1063 @section W1063 @cindex W1063 @subsection メッセージ本文 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @subsection 内容 非列挙型から列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Color func(int num) { return num / 2; /* W1063 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.6.0 @node W1064 @section W1064 @cindex W1064 @subsection メッセージ本文 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @subsection 内容 非列挙型から列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED, BLUE, GREEN }; int func(enum Color c) { switch (c) { case RED: /* OK */ return 1; case 1: /* W1064 */ return 2; } return 0; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1065} 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.4.0 @node W1065 @section W1065 @cindex W1065 @subsection メッセージ本文 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。 @subsection 内容 列挙型から異なる列挙型への変換が生じています。 @subsection サンプルコード @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE, GRAPE }; int func(enum Color c) { switch (c) { case RED: /* OK */ return 1; case ORANGE: /* W1065 */ return 2; } return 0; } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1053} 仮引数が列挙型である関数の実引数に数値定数が渡されています。 @item @ref{W1054} 列挙型に、列挙型ではない式が代入されています。 @item @ref{W1055} 戻り値が列挙型の関数から、列挙型ではない式が返されています。 @item @ref{W1056} 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。 @item @ref{W1057} 列挙型に、異なる列挙型のオブジェクトが代入されています。 @item @ref{W1058} 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。 @item @ref{W1059} 仮引数が列挙型でない関数の実引数に列挙型が渡されています。 @item @ref{W1060} 戻り値が列挙型でない関数から、列挙型が返されています。 @item @ref{W1061} 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。 @item @ref{W1062} 異なる型の非定数式の値が列挙型オブジェクトに代入されています。 @item @ref{W1063} 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。 @item @ref{W1064} 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。 @end itemize @subsection 対応バージョン 1.4.0 @node W1066 @section W1066 @cindex W1066 @subsection メッセージ本文 明示的に float 型の複合式の値を double 型に変換しています。 @subsection 内容 例えばサンプルコードでは @code{float} 型変数 @code{a} の 2 乗した値が @code{float} 型の範囲に収まらないことを想定して @code{double} 型変数 @code{b} へ代入しています。しかし、環境によっては @code{a * a} の演算はいったん @code{float} 型として 結果を出したあとに @code{double} 型にキャストされ、@code{b} へ代入される場合があります。その場合、@code{a} の値によっては精度落ちが起こります。 @subsection サンプルコード @verbatim void func(float a) { double b = (double) (a * a); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1067} 明示的に float 型の複合式の値を long double 型に変換しています。 @item @ref{W1068} 明示的に double 型の複合式の値を long double 型に変換しています。 @end itemize @subsection 対応バージョン 1.14.0 @node W1067 @section W1067 @cindex W1067 @subsection メッセージ本文 明示的に float 型の複合式の値を long double 型に変換しています。 @subsection 内容 例えばサンプルコードでは @code{float} 型変数 @code{a} の 2 乗した値が @code{float} 型の範囲に収まらないことを想定して @code{long double} 型変数 @code{b} へ代入しています。しかし、環境によっては @code{a * a} の演算はいったん @code{float} 型として 結果を出したあとに @code{long double} 型にキャストされ、@code{b} へ代入される場合があります。その場合、@code{a} の値によっては精度落ちが起こります。 @subsection サンプルコード @verbatim void func(float a) { long double b = (long double) (a * a); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1066} 明示的に float 型の複合式の値を double 型に変換しています。 @item @ref{W1068} 明示的に double 型の複合式の値を long double 型に変換しています。 @end itemize @subsection 対応バージョン 1.14.0 @node W1068 @section W1068 @cindex W1068 @subsection メッセージ本文 明示的に double 型の複合式の値を long double 型に変換しています。 @subsection 内容 例えばサンプルコードでは @code{double} 型変数 @code{a} の 2 乗した値が @code{double} 型の範囲に収まらないことを想定して @code{long double} 型変数 @code{b} へ代入しています。しかし、環境によっては @code{a * a} の演算はいったん @code{double} 型として 結果を出したあとに @code{long double} 型にキャストされ、@code{b} へ代入される場合があります。その場合、@code{a} の値によっては精度落ちが起こります。 @subsection サンプルコード @verbatim void func(double a) { long double b = (long double) (a * a); } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W1066} 明示的に float 型の複合式の値を double 型に変換しています。 @item @ref{W1067} 明示的に float 型の複合式の値を long double 型に変換しています。 @end itemize @subsection 対応バージョン 1.14.0 @node W1069 @section W1069 @cindex W1069 @subsection メッセージ本文 この `if-else-if' 文には、末尾の `else' 節がありません。 @subsection 内容 @code{else} 節がないと、 @code{else} 節を書き忘れているのか、 @code{else} 節が発生しない @code{if-else if} 文なのかが分からず、混乱を招きます。 @subsection サンプルコード @verbatim static int func(int i) { if (i == 2) { /* W1069 */ return 0; } else if (i == 4) { return 1; } return 2; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.14.0 @node W1070 @section W1070 @cindex W1070 @subsection メッセージ本文 この `switch' 文には実行経路が 2 つしか無いため、`if-else' 文に変換可能です。 @subsection 内容 深刻な問題ではありませんが、通常 @code{switch} 文は 2 つ以上の分岐があることが想定されるので、 @code{case} 節が 1 つしかない @code{switch} 文では、実行パスの定義漏れが疑われます。 @subsection サンプルコード @verbatim switch (x) { /* W1070 */ case 1: ... break; default: ... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.14.0 @node W1071 @section W1071 @cindex W1071 @subsection メッセージ本文 関数 `%s' には複数の終了点があります。 @subsection 内容 出口となる @code{return} 文が関数内に複数個存在しています。 @subsection サンプルコード @verbatim void foo(int i) /* W1071 */ { if (i == 0) { return; } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.18.0 @node W1072 @section W1072 @cindex W1072 @subsection メッセージ本文 `goto' 文を使用しています。 @subsection 内容 ファイル内で @code{goto} 文が使用されています。 @subsection サンプルコード @verbatim static int func(int i) { if (i == 1) { goto Label1; /* W1072 */ } goto Label2; /* W1072 */ Label1: i = 10; Label2: i = 20; return i; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.14.0 @node W1073 @section W1073 @cindex W1073 @subsection メッセージ本文 関数 `%s' の戻り値を破棄しています。 @subsection 内容 関数の戻り値が使用されていない場合、その戻り値は無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。 また、使用されない戻り値が多いことは、戻り値のチェックも怠っていることが推測されるため、障害許容性が低下している可能性が高いといえます。 @subsection サンプルコード @verbatim extern int bar(void); static void foo(void) { int i; int j; for (i = 0, bar(); i < 10; i++) { /* W1073 */ j = bar(); /* OK */ } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W1074 @section W1074 @cindex W1074 @subsection メッセージ本文 `sizeof' 演算子のオペランドは実行されないため、副作用が発生しません。 @subsection 内容 サンプルコードで示したソースコードの場合、@code{sizeof} 演算子は式を評価しないため、@code{data++} は実行されません。 従って @code{data++} が実行されていることが前提だとすると様々な予期しない問題が起きる可能性があります。 @subsection サンプルコード @verbatim static int foo(void) { int i = 0; if (sizeof(i++) == 4) { /* W1074 */ return 0; } else { return 1; } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W1075 @section W1075 @cindex W1075 @subsection メッセージ本文 `%s' は以前に内部結合として宣言されていますが、この宣言には `static' がありません。 @subsection 内容 static 記憶域クラス指定子が明示されていません。 @subsection サンプルコード @verbatim static int func(void); int func(void) /* W1075 */ { ... } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W1076 @section W1076 @cindex W1076 @subsection メッセージ本文 関数 `%s' は内部結合を持ちますが、事前に内部結合として宣言していません。 @subsection 内容 関数プロトタイプ宣言がないまま static 記憶域クラス指定子付きの関数が定義されています。 @subsection サンプルコード @verbatim static int func(void) /* W1076 */ { return 0; } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W1077 @section W1077 @cindex W1077 @subsection メッセージ本文 サイズが省略された配列を宣言しています。 @subsection 内容 この配列は、サイズが明示されていません。 @subsection サンプルコード @verbatim extern int a[]; /* W1077 */ @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.16.0 @node W9001 @section W9001 @cindex W9001 @subsection メッセージ本文 この文には制御が到達しません。 @subsection 内容 この実行経路に至るための分岐条件が常に偽と評価されるため、この文は実行されるこ とがありません。 @subsection サンプルコード @verbatim extern int all_possible_values_of_int(void); extern unsigned int zero_if_succeeded(void); void func(void) { int i = all_possible_values_of_int(); if (i < 0) { unsigned int ui = zero_if_succeeded(); if (ui > 0) { return; } /* "ui" is equal to zero at this point */ /* Always be true? No, it'll be false all the time */ if (i < ui) { return; /* W9001: Control never reaches here! */ } /* * ISO standard says; * Usual Arithmetic Conversion performed before evaluating * the expression "i < ui". * Usual Arithmetic Conversion makes "i < ui" into * "(unsigned int) i < ui" and then the value of "i" which * is less than 0 will be converted into a new value which * is greater than 0 because of the wrap-around. * So, the expression ("a value greater than 0" < 0) makes * always false. */ } } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W9002 @section W9002 @cindex W9002 @subsection メッセージ本文 ファイルの末尾に改行文字がありません。 @subsection 内容 プリプロセッサによって処理する行は、すべて末尾に改行文字が必要です。 @subsection サンプルコード なし。 @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.0.0 @node W9003 @section W9003 @cindex W9003 @subsection メッセージ本文 暗黙的に `%s' 型のオブジェクトが `%s' 型のオブジェクトに変換されています。 @subsection 内容 変換元または変換先の型が非標準型である暗黙的な変換が発生することを示します。 @subsection サンプルコード @verbatim enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE }; extern void foo(enum Color); static void bar(void) { int i = RED; /* W9003 */ foo(ORANGE); /* W9003 */ } @end verbatim @subsection 関連メッセージ なし。 @subsection 対応バージョン 1.12.0 @node C0001 @section C0001 @cindex C0001 @subsection メッセージ本文 この識別名 `%s' で警告を検知しました。 @subsection 内容 @ref{W0051,W0051}、@ref{W0052,W0052}、@ref{W0491,W0491}、@ref{W0492,W0492}、 @ref{W0703,W0703}、@ref{W0770,W0770}、@ref{W0771,W0771}、@ref{W0787,W0787}、 @ref{W0788,W0788}、@ref{W0789,W0789}、@ref{W0790,W0790}、@ref{W0791,W0791}、 @ref{W1037,W1037} メッセージの直後に出力され、問題となる識別子の対となる識別子の位置を示します。 @subsection サンプルコード @verbatim int very_long_long_long_long_long_long_long_identifier_2 = 1; /* W0052 */ int very_long_long_long_long_long_long_long_identifier_1 = 0; /* C0001 */ @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0051} 外部識別子 `%s' が他の識別子名と、リンカ特性で指定された文字数の範囲内で区別できません。 @item @ref{W0052} 識別子名 `%s' が他の識別子名と、コンパイラ特性で指定された文字数の範囲内で区別できません。 @end itemize @subsection 対応バージョン 1.0.0 @node C1000 @section C1000 @cindex C1000 @subsection メッセージ本文 次の実行パスで警告を検知しました。 @subsection 内容 @ref{W0093,W0093}、@ref{W0096,W0096}、@ref{W0097,W0097}、@ref{W0115,W0115}、 @ref{W0116,W0116}、@ref{W0421,W0421}、@ref{W0422,W0422}、@ref{W0423,W0423}、 @ref{W0424,W0424}、@ref{W0459,W0459}、@ref{W0460,W0460}、@ref{W0461,W0461}、 @ref{W0462,W0462}、@ref{W0568,W0568}、@ref{W0569,W0569}、@ref{W0570,W0570}、 @ref{W0607,W0607}、@ref{W0608,W0608}、@ref{W0705,W0705}、@ref{W0707,W0707}、 @ref{W0720,W0720}、@ref{W0745,W0745}、@ref{W1049,W1049}、@ref{W1050,W1050} メッセージの直後に出力され、このメッセージの後に問題を検出した状況を補足するメ ッセージが続くことを示します。 @subsection サンプルコード @verbatim 1: int foo(int i) 2: { 3: int j; /* C1003 */ 4: 5: if (i < 0) { /* C1001 */ 6: if (i < -10) { /* C1002 */ 7: j = 2; 8: } 9: else if (i < -5) { /* C1002 */ 10: j = 3; 11: } 12: } 13: else { 14: j = 1; 15: } 16: 17: return j; /* W0460 */ 18: } a.c:17:12:warning:c_builtin:W0460:UNC:X99:変数 `j' の値は、この式の評価時点では設定されていないことがあります。 :::context:c_builtin:C1000:INF:X99:次の実行パスで警告を検知しました。 a.c:3:9:context:c_builtin:C1003:INF:X99:ここで該当変数が初期値を指定せずに定義されています。 a.c:5:11:context:c_builtin:C1001:INF:X99:この制御式を真として評価しました。 a.c:6:15:context:c_builtin:C1002:INF:X99:この制御式を偽として評価しました。 a.c:9:20:context:c_builtin:C1002:INF:X99:この制御式を偽として評価しました。 @end verbatim @subsection 関連メッセージ @itemize @item @ref{C1001} この制御式を真として評価しました。 @item @ref{C1002} この制御式を偽として評価しました。 @item @ref{C1003} ここで該当変数が初期値を指定せずに定義されています。 @item @ref{C1004} ここで該当変数に NULL の値を割り当てました。 @item @ref{C1005} ここで該当変数に NULL の可能性がある値を割り当てました。 @item @ref{C1006} ここで該当変数に値を割り当てました。 @end itemize @subsection 対応バージョン 3.2.0 @node C1001 @section C1001 @cindex C1001 @subsection メッセージ本文 この制御式を真として評価しました。 @subsection 内容 @ref{W0093,W0093}、@ref{W0096,W0096}、@ref{W0097,W0097}、@ref{W0115,W0115}、 @ref{W0116,W0116}、@ref{W0421,W0421}、@ref{W0422,W0422}、@ref{W0423,W0423}、 @ref{W0424,W0424}、@ref{W0459,W0459}、@ref{W0460,W0460}、@ref{W0461,W0461}、 @ref{W0462,W0462}、@ref{W0568,W0568}、@ref{W0569,W0569}、@ref{W0570,W0570}、 @ref{W0607,W0607}、@ref{W0608,W0608}、@ref{W0705,W0705}、@ref{W0707,W0707}、 @ref{W0720,W0720}、@ref{W0745,W0745}、@ref{W1049,W1049}、@ref{W1050,W1050} メッセージを検出した状況として、該当制御式を真と評価したことを示します。 @subsection サンプルコード @verbatim int foo(int i) { int j; /* C1003 */ if (i < 0) { /* C1001 */ if (i < -10) { /* C1002 */ j = 2; } else if (i < -5) { /* C1002 */ j = 3; } } else { j = 1; } return j; /* W0460 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0093} ゼロで除算される恐れがあります。 @item @ref{W0096} ゼロになる定数式で除算しています。 @item @ref{W0097} ゼロの値で除算しています。 @item @ref{W0115} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。 @item @ref{W0116} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。 @item @ref{W0421} 値が NULL になるポインタに対して間接参照が行われています。 @item @ref{W0422} 値が NULL になることがあるポインタに対して間接参照が行われています。 @item @ref{W0423} 値が NULL になるポインタに対して算術演算を行っています。 @item @ref{W0424} 値が NULL になることがあるポインタに対して算術演算を行っています。 @item @ref{W0459} 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 @item @ref{W0460} 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 @item @ref{W0461} 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 @item @ref{W0462} 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 @item @ref{W0568} 符号付き定数式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0569} 符号付きの式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0570} 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。 @item @ref{W0607} 値が負になる整数式が符号無し型に変換されています。 @item @ref{W0608} 値が負になることがありうる整数式が符号無し型に変換されています。 @item @ref{W0705} 配列の添字が領域外を指すことがあります。 @item @ref{W0707} 配列の添字が領域外を指す定数です。 @item @ref{W0720} 浮動小数点型の値が変換先の型の範囲に入りきりません。 @item @ref{W0745} 配列の添字が、領域外を指しています。 @item @ref{W1049} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 @item @ref{W1050} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 @end itemize @subsection 対応バージョン 3.2.0 @node C1002 @section C1002 @cindex C1002 @subsection メッセージ本文 この制御式を偽として評価しました。 @subsection 内容 @ref{W0093,W0093}、@ref{W0096,W0096}、@ref{W0097,W0097}、@ref{W0115,W0115}、 @ref{W0116,W0116}、@ref{W0421,W0421}、@ref{W0422,W0422}、@ref{W0423,W0423}、 @ref{W0424,W0424}、@ref{W0459,W0459}、@ref{W0460,W0460}、@ref{W0461,W0461}、 @ref{W0462,W0462}、@ref{W0568,W0568}、@ref{W0569,W0569}、@ref{W0570,W0570}、 @ref{W0607,W0607}、@ref{W0608,W0608}、@ref{W0705,W0705}、@ref{W0707,W0707}、 @ref{W0720,W0720}、@ref{W0745,W0745}、@ref{W1049,W1049}、@ref{W1050,W1050} メッセージを検出した状況として、該当制御式を偽と評価したことを示します。 @subsection サンプルコード @verbatim int foo(int i) { int j; /* C1003 */ if (i < 0) { /* C1001 */ if (i < -10) { /* C1002 */ j = 2; } else if (i < -5) { /* C1002 */ j = 3; } } else { j = 1; } return j; /* W0460 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0093} ゼロで除算される恐れがあります。 @item @ref{W0096} ゼロになる定数式で除算しています。 @item @ref{W0097} ゼロの値で除算しています。 @item @ref{W0115} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。 @item @ref{W0116} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。 @item @ref{W0421} 値が NULL になるポインタに対して間接参照が行われています。 @item @ref{W0422} 値が NULL になることがあるポインタに対して間接参照が行われています。 @item @ref{W0423} 値が NULL になるポインタに対して算術演算を行っています。 @item @ref{W0424} 値が NULL になることがあるポインタに対して算術演算を行っています。 @item @ref{W0459} 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 @item @ref{W0460} 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 @item @ref{W0461} 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 @item @ref{W0462} 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 @item @ref{W0568} 符号付き定数式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0569} 符号付きの式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0570} 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。 @item @ref{W0607} 値が負になる整数式が符号無し型に変換されています。 @item @ref{W0608} 値が負になることがありうる整数式が符号無し型に変換されています。 @item @ref{W0705} 配列の添字が領域外を指すことがあります。 @item @ref{W0707} 配列の添字が領域外を指す定数です。 @item @ref{W0720} 浮動小数点型の値が変換先の型の範囲に入りきりません。 @item @ref{W0745} 配列の添字が、領域外を指しています。 @item @ref{W1049} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 @item @ref{W1050} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 @end itemize @subsection 対応バージョン 3.2.0 @node C1003 @section C1003 @cindex C1003 @subsection メッセージ本文 ここで該当変数が初期値を指定せずに定義されています。 @subsection 内容 @ref{W0459,W0459}、@ref{W0460,W0460}、@ref{W0461,W0461}、@ref{W0462,W0462} メッセージを検出した状況として、どの位置で該当変数を定義したかを示します。 @subsection サンプルコード @verbatim int foo(int i) { int j; /* C1003 */ if (i < 0) { /* C1001 */ if (i < -10) { /* C1002 */ j = 2; } else if (i < -5) { /* C1002 */ j = 3; } } else { j = 1; } return j; /* W0460 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0459} 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。 @item @ref{W0460} 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。 @item @ref{W0461} 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。 @item @ref{W0462} 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。 @end itemize @subsection 対応バージョン 3.2.0 @node C1004 @section C1004 @cindex C1004 @subsection メッセージ本文 ここで該当変数に NULL の値を割り当てました。 @subsection 内容 @ref{W0421,W0421}、@ref{W0422,W0422}、@ref{W0423,W0423}、@ref{W0424,W0424} メッセージを検出した状況として、どの位置で該当変数に NULL を割り当てたかを示し ます。 @subsection サンプルコード @verbatim extern int *bar(void); extern int *baz(void); void foo(int i) { int *p = NULL; /* C1004 */ if (i < 0) { /* C1002 */ p = bar(); if (!p) { return; } } else { p = baz(); /* C1005 */ } *p += 2; /* W0422 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0421} 値が NULL になるポインタに対して間接参照が行われています。 @item @ref{W0422} 値が NULL になることがあるポインタに対して間接参照が行われています。 @item @ref{W0423} 値が NULL になるポインタに対して算術演算を行っています。 @item @ref{W0424} 値が NULL になることがあるポインタに対して算術演算を行っています。 @end itemize @subsection 対応バージョン 3.2.0 @node C1005 @section C1005 @cindex C1005 @subsection メッセージ本文 ここで該当変数に NULL の可能性がある値を割り当てました。 @subsection 内容 @ref{W0421,W0421}、@ref{W0422,W0422}、@ref{W0423,W0423}、@ref{W0424,W0424} メッセージを検出した状況として、どの位置で該当変数に NULL となり得る値を割り当 てたかを示します。 @subsection サンプルコード @verbatim extern int *bar(void); extern int *baz(void); void foo(int i) { int *p = NULL; /* C1004 */ if (i < 0) { /* C1002 */ p = bar(); if (!p) { return; } } else { p = baz(); /* C1005 */ } *p += 2; /* W0422 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0421} 値が NULL になるポインタに対して間接参照が行われています。 @item @ref{W0422} 値が NULL になることがあるポインタに対して間接参照が行われています。 @item @ref{W0423} 値が NULL になるポインタに対して算術演算を行っています。 @item @ref{W0424} 値が NULL になることがあるポインタに対して算術演算を行っています。 @end itemize @subsection 対応バージョン 3.2.0 @node C1006 @section C1006 @cindex C1006 @subsection メッセージ本文 ここで該当変数に値を割り当てました。 @subsection 内容 @ref{W0093,W0093}、@ref{W0096,W0096}、@ref{W0097,W0097}、@ref{W0115,W0115}、 @ref{W0116,W0116}、@ref{W0568,W0568}、@ref{W0569,W0569}、@ref{W0570,W0570}、 @ref{W0607,W0607}、@ref{W0608,W0608}、@ref{W0705,W0705}、@ref{W0707,W0707}、 @ref{W0720,W0720}、@ref{W0745,W0745}、@ref{W1049,W1049}、@ref{W1050,W1050} メッセージを検出した状況として、どの位置で該当変数に問題の値を割り当てたかを示 します。 @subsection サンプルコード @verbatim int foo(int i) { int j = 0; /* C1006 */ if (i < 0) { /* C1002 */ j = -i; } else if (i > 0) { /* C1002 */ j = i; } return 5 / j; /* W0093 */ } @end verbatim @subsection 関連メッセージ @itemize @item @ref{W0093} ゼロで除算される恐れがあります。 @item @ref{W0096} ゼロになる定数式で除算しています。 @item @ref{W0097} ゼロの値で除算しています。 @item @ref{W0115} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。 @item @ref{W0116} 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。 @item @ref{W0568} 符号付き定数式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0569} 符号付きの式の値を左シフト演算した結果は、未定義になります。 @item @ref{W0570} 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。 @item @ref{W0607} 値が負になる整数式が符号無し型に変換されています。 @item @ref{W0608} 値が負になることがありうる整数式が符号無し型に変換されています。 @item @ref{W0705} 配列の添字が領域外を指すことがあります。 @item @ref{W0707} 配列の添字が領域外を指す定数です。 @item @ref{W0720} 浮動小数点型の値が変換先の型の範囲に入りきりません。 @item @ref{W0745} 配列の添字が、領域外を指しています。 @item @ref{W1049} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。 @item @ref{W1050} この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。 @end itemize @subsection 対応バージョン 3.2.0 @node Metrics @chapter メトリクス一覧 @menu * FL_STMT::ファイル内の文の数 * FL_FUNC::ファイル内の関数定義の数 * FN_STMT::関数内の文の数 * FN_UNRC::関数内の制御が到達しない文の数 * FN_LINE::関数内の保守コード行数 * FN_PARA::関数の仮引数の数 * FN_UNUV::関数内の未使用および再使用されない変数の数 * FN_CSUB::関数内の子関数コールの数 * FN_CALL::他の関数から被呼び出し箇所数 * FN_GOTO::関数内の @code{goto} 文の数 * FN_RETN::関数内の戻り点の数 * FN_UELS::関数内の完結していない @code{if} 文の数 * FN_NEST::関数内のネスティングの最深段数 * FN_PATH::関数内の推定静的パス数 * FN_CYCM::関数の経路複雑度 @end menu @node FL_STMT @section FL_STMT @cindex FL_STMT @subsection メトリック名 ファイル内の文の数 @subsection 内容 ファイル内に言語の構文規則としてステートメント(文)と認識されるものの数を示しま す。 @subsection サンプルコード @verbatim int foo(int a) { int i = 0; /* A declaration is not a statement */ if (a > 0) { /* An if-else-statement makes FL_STMT += 1 */ i = a + 1; /* An expression-statement makes FL_STMT += 1 */ } else { ; /* An empty expression-statement makes FL_STMT += 1 */ } return i; /* A jump-statement makes FL_STMT += 1 */ } /* Now, FL_STMT == 4 */ void bar(int a) { struct { /* A declaration is not a statement */ int i; } s; /* A for-statement which has 2 expression-statements (`s.i=0;' and `s.i 0) { /* An if-else-statement makes foo's FN_STMT += 1 */ i = a + 1; /* An expression-statement makes foo's FN_STMT += 1 */ } else { ; /* An empty expression-statement makes foo's FN_STMT += 1 */ } return i; /* A jump-statement makes foo's FN_STMT += 1 */ /* foo's FN_STMT == 4 */ } void bar(int a) { struct { /* A declaration is not a statement */ int i; } s; /* A for-statement which has 2 expression-statements (`s.i=0;' and * `s.i int foo(int i) { unsigned int ui; if (i < 0) { switch (i) { case -3: ui = 0; break; /* Control never reaches to this "case 3:" clause because "i" is less than 0 at this point */ case 3: /* This label is part of an unreachable labeled-statement, but it makes foo's FN_UNRC += 1 */ ui = 1; /* An unreachable labeled expression-statement makes FN_UNRC += 1 */ break; /* An unreachable jump-statement makes FN_UNRC += 1 */ default: ui = 0; } /* "ui" is equal to 0 at this point */ /* * The usual-arithmetic-conversion makes "i < ui" into "(unsigned int) i < ui". * Then, the value of "i" which is less than 0 will be converted into the new value which is greater than 0 * because of the wrap-around. * So, "(value which is greater than 0) < 0" makes false at all times. */ if (i < ui) { exit(0); /* An unreachable expression-statement makes FN_UNRC += 1 */ } } else { /* "i" is greater than or equal to 0 at this point */ abort(); /* The abort() standard function terminates this execution path */ } /* "i" is less than 0 at this point */ if (i == 3) { /* "(value which is less than 0) == 3" makes false at all times */ return -1; /* An unreachable jump-statement makes FN_UNRC += 1 */ } return 0; /* foo's FN_UNRC == 5 */ } @end verbatim @example MET,FN_UNRC,foo,int foo(int),test.c,3,5,5 @end example @subsection 対応バージョン 1.0.0 @node FN_LINE @section FN_LINE @cindex FN_LINE @subsection メトリック名 関数内の保守コード行数 @subsection 内容 関数定義の開始行から関数定義の終了行までの物理行数を示します。 @subsection サンプルコード @verbatim int foo(void) /* foo's function definition starts here */ { return 0; } /* foo's function definition ends here */ /* foo's FN_LINE == 3 */ int bar /* bar's function definition starts here */ (void) { return 0; } /* bar's function definition ends here */ /* bar's FN_LINE == 5 */ int baz /* baz's old style function definition starts here */ (a) int a; { return 0; } /* baz's old style function definition ends here */ /* baz's FN_LINE == 6 */ @end verbatim @example MET,FN_LINE,foo,int foo(void),test.c,1,5,3 MET,FN_LINE,bar,int bar(void),test.c,8,1,5 MET,FN_LINE,baz,int baz(int),test.c,17,1,6 @end example @subsection 対応バージョン 1.0.0 @node FN_PARA @section FN_PARA @cindex FN_PARA @subsection メトリック名 関数の仮引数の数 @subsection 内容 関数定義の引数リスト内に宣言された仮引数の数を示します。 @subsection サンプルコード @verbatim int foo(int a, long b, char *p) { return 0; } /* foo's FN_PARA == 3 */ int bar(a, b, p) /* An old style function definition */ long b; /* A type-specifier of "a" is omitted */ char *p; { return 0; } /* bar's FN_PARA == 3 */ @end verbatim @example MET,FN_PARA,foo,"int foo(int,long,char *)",test.c,1,5,3 MET,FN_PARA,bar,"int bar(int,long,char *)",test.c,6,5,3 @end example @subsection 対応バージョン 1.0.0 @node FN_UNUV @section FN_UNUV @cindex FN_UNUV @subsection メトリック名 関数内の未使用および再使用されない変数の数 @subsection 内容 使用されないにも関わらず宣言されている変数、および、値を割り当てた後に使用され ない変数の数を示します。 @subsection サンプルコード @verbatim void foo(int i, int j) /* A useless declaration of "j" makes FN_UNUV += 1 */ { int a; int b; int c = 0; /* A useless declaration of "c" makes FN_UNUV += 1 */ if (i < 0) { a = -i; } else { a = i; } b = a * 2; /* A useless assignment to "b" makes FN_UNUV += 1 */ printf("%d\n", a); /* foo's FN_UNUV == 3 */ } @end verbatim @example MET,FN_UNUV,foo,"void foo(int,int)",test.c,1,6,3 @end example @subsection 対応バージョン 1.0.0 @node FN_CSUB @section FN_CSUB @cindex FN_CSUB @subsection メトリック名 関数内の子関数コールの数 @subsection 内容 関数内にて他の関数を呼び出す箇所数を示します。 @subsection サンプルコード @verbatim extern int foo(int); static int bar(int); int baz(int i) { int j = foo(i); /* A function-call-expression makes baz's FN_CSUB += 1 */ return foo(bar(j)); /* 2 function-call-expressions makes baz's FN_CSUB += 2 */ /* baz's FN_CSUB == 3 */ } @end verbatim @example MET,FN_CSUB,baz,int baz(int),test.c,5,5,3 @end example @subsection 対応バージョン 1.0.0 @node FN_CALL @section FN_CALL @cindex FN_CALL @subsection メトリック名 他の関数から被呼び出し箇所数 @subsection 内容 該当する関数がプロジェクト中の他の関数から呼び出される箇所数を示します。 @subsection サンプルコード @file{test1.c} @verbatim int foo(int i) { return i + 1; } int bar(int i) { return foo(i) + 1; /* A function-call-expression makes foo's FN_CALL += 1 */ } @end verbatim @file{test2.c} @verbatim extern int bar(int); static void baz(void) { int i = bar(0); /* A function-call-expression makes bar's FN_CALL += 1 and foo's FN_CALL += 1 */ } @end verbatim @file{project-name.met.csv} @example MET,FN_CALL,foo,int foo(int),test1.c,1,5,2 MET,FN_CALL,bar,int bar(int),test1.c,3,5,1 MET,FN_CALL,baz,void baz(void),test2.c,3,13,0 @end example @subsection 対応バージョン 1.0.0 @node FN_GOTO @section FN_GOTO @cindex FN_GOTO @subsection メトリック名 関数内の @code{goto} 文の数 @subsection 内容 関数内に記された @code{goto} 文の数を示します。 @subsection サンプルコード @verbatim int foo(int i) { switch (i) { case 0: goto ZERO; /* A goto-statement makes foo's FN_GOTO += 1 */ case 1: goto ONE; /* A goto-statement makes foo's FN_GOTO += 1 */ default: return 0; } ZERO: return 1; ONE: return 2; /* foo's FN_GOTO == 2 */ } @end verbatim @example MET,FN_GOTO,foo,int foo(int),test.c,1,5,2 @end example @subsection 対応バージョン 1.0.0 @node FN_RETN @section FN_RETN @cindex FN_RETN @subsection メトリック名 関数内の戻り点の数 @subsection 内容 実行される @code{return} 文の数、および、関数末尾にある暗黙の @code{return} 文 の数を示します。 @subsection サンプルコード @verbatim void foo(int i) { if (i < 0) { return; /* A return-statement makes foo's FN_RETN += 1 */ } if (i >= 10) { return; /* A return-statement makes foo's FN_RETN += 1 */ } else { for (; i < 10; i++) { printf("%d\n", i); } } /* An implicit return from the function whose return type is void makes foo's FN_RETN * += 1 */ /* foo's FN_RETN == 3 */ } int bar(int i) { if (i < 0) { return -1; /* A return-statement makes bar's FN_RETN += 1 */ } if (i >= 10) { return -1; /* A return-statement makes bar's FN_RETN += 1 */ } else { for (; i < 10; i++) { printf("%d\n", i); } } return 0; /* A return-statement makes bar's FN_RETN += 1 */ /* bar's FN_RETN == 3 */ } @end verbatim @example MET,FN_RETN,foo,void foo(int),test.c,1,6,3 MET,FN_RETN,bar,int bar(int),test.c,20,5,3 @end example @subsection 対応バージョン 1.0.0 @node FN_UELS @section FN_UELS @cindex FN_UELS @subsection メトリック名 関数内の完結していない @code{if-else} 文の数 @subsection 内容 関数内の @code{if-else} 文で、明示的な @code{else} 節を持たないものの数を示しま す。 @subsection サンプルコード @verbatim int foo(int i) { int j; if (i < 0) { return -1; } else { j = i + 1; } if (j % 2) { return -1; } /* A standalone if-statement does nothing to the FN_UELS metric */ if (i == 2) { return 0; } else if (i == 4) { return 1; } /* An implicit else clause makes foo's FN_UELS += 1 */ return 5; /* foo's FN_UELS == 1 */ } @end verbatim @example MET,FN_UELS,foo,int foo(int),test.c,1,5,1 @end example @subsection 対応バージョン 1.0.0 @node FN_NEST @section FN_NEST @cindex FN_NEST @subsection メトリック名 関数内のネスティングの最深段数 @subsection 内容 関数内で制御構造のネストが一番深い部分のネスト段数を示します。 @subsection サンプルコード @verbatim void foo(int i) { /* Nesting level == 0 */ if (i < 0) { /* Nesting level == 1 */ switch (i) { /* Nesting level == 2 */ case -1: return; case -2: puts("A\n"); break; } /* Nesting level == 1 */ } else { /* Nesting level == 1 */ int j; int k; for (j = 0; j < i; j++) { /* Nesting level == 2 */ for (k = 0; k < 10; k++) { /* Nesting level == 3 */ if (j == k) { /* Nesting level == 4 */ puts("B\n"); } } } } /* foo's FN_NEST == 4 */ } @end verbatim @example MET,FN_NEST,foo,void foo(int),test.c,1,6,4 @end example @subsection 対応バージョン 1.0.0 @node FN_PATH @section FN_PATH @cindex FN_PATH @subsection メトリック名 関数内の推定静的パス数 @subsection 内容 関数の制御フロー内で考えられるすべての実行経路の数を示します。 @subsection サンプルコード @verbatim static int foo(int i) { /* A */ if (i == 0) { /* B */ i = 0; } else { /* C */ i = 1; } /* D */ return i; /* Possible execute paths A->B->D and A->C->D makes foo's FN_PATH = 2 */ } static int bar(int i) { /* A */ if (i == 0) { /* B */ i = 0; } /* C */ if (i == 1) { /* D */ i = 1; } /* E */ if (i == 2) { /* F */ i = 2; } /* G */ return i; /* Possible execute paths A->B->C->D->E->F->G, A->B->C->D->E->G, A->B->C->E->F->G, A->B->C->E->G, A->C->D->E->F->G, A->C->D->E->G, A->C->E->F->G, A->C->E->G makes bar's FN_PATH = 8 */ } static int baz(int i) { /* A */ switch (i) { case 0: /* B */ if (rand()) { /* C */ i = 0; } else { /* D */ i = 0; } /* E */ i = 0; break; default: /* F */ if (rand()) { /* G */ i = 1; } else { /* H */ i = 1; } /* I */ i = 1; break; } /* J */ return i; /* Possible execute paths A->B->C->E->J, A->B->D->E->J, A->F->G->I->J, A->F->H->I->J makes baz's FN_PATH = 4 */ } static int qux(int i) { /* A */ while (i < 5) { /* B */ if (i == 0) { /* C */ return 0; } /* D */ if (i == 1) { /* E */ return 1; } } /* F */ if (i == 2) { /* G */ return 2; } /* H */ return 3; /* Possible execute paths A->B->C, A->B->D->E, A->B->D->F->G, A->B->D->F->H, A->F->G, A->F->H makes qux's FN_PATH = 6 */ } @end verbatim @example MET,FN_PATH,foo,int foo(int),test.c,1,12,2 MET,FN_PATH,bar,int bar(int),test.c,18,12,8 MET,FN_PATH,baz,int baz(int),test.c,42,12,4 MET,FN_PATH,qux,int qux(int),test.c,80,12,6 @end example @subsection 対応バージョン 1.0.0 @node FN_CYCM @section FN_CYCM @cindex FN_CYCM @subsection メトリック名 関数の経路複雑度 @subsection 内容 McCabe(マッケーブ)の提唱したメトリックで、プログラムを構成する線上にある独立し たパスの数を示します。 計算式「@verb{.制御フローグラフのエッジ数 - ノード数 + 2.}」で算出し、関数中の分 岐の数に 1 を足したものに等しくなります。 @subsection サンプルコード @verbatim static int foo(int i) { if (i == 0) { /* Complexity += 1 */ i = 0; } else { /* An else branch does not grow the complexity */ i = 1; } return i; /* foo's FN_CYCM == 2 */ } static int bar(int i) { if (i == 0) { /* Complexity += 1 */ i = 0; } if (i == 1) { /* Complexity += 1 */ i = 1; } if (i == 2) { /* Complexity += 1 */ i = 2; } return i; /* bar's FN_CYCM == 4 */ } static int baz(int i) { switch (i) { case 0: /* Complexity += 1 */ if (rand()) { /* Complexity += 1 */ i = 0; } else { /* An else branch does not grow the complexity */ i = 0; } i = 0; break; default: /* A default clause does not grow the complexity */ if (rand()) { /* Complexity += 1 */ i = 1; } else { /* An else branch does not grow the complexity */ i = 1; } i = 1; break; } return i; /* baz's FN_CYCM == 4 */ } static int qux(int i) { while (i < 5) { /* An iteration does not grow the complexity */ if (i == 0) { /* Complexity += 1 */ return 0; } if (i == 1) { /* Complexity += 1 */ return 1; } } if (i == 2) { /* Complexity += 1 */ return 2; } return 3; /* qux's FN_CYCM == 4 */ } @end verbatim @example MET,FN_CYCM,foo,int foo(int),test.c,1,12,2 MET,FN_CYCM,bar,int bar(int),test.c,13,12,4 MET,FN_CYCM,baz,int baz(int),test.c,28,12,4 MET,FN_CYCM,qux,int qux(int),test.c,54,12,4 @end example @subsection 対応バージョン 1.0.0 @node CodeStructures @chapter コード情報一覧 @menu * VER::バージョンレコード * DCL(T)::型宣言レコード * DCL(V)::外部変数宣言レコード * DCL(F)::関数宣言レコード * DEF(V)::変数定義レコード * DEF(F)::関数定義レコード * DEF(M)::マクロ定義レコード * DEF(L)::ラベル定義レコード * INI::初期化レコード * ASN::代入式レコード * DEP(I)::インクルードレコード * DEP(C)::呼び出しレコード * DEP(X)::外部参照レコード * LIT::リテラルレコード * PRE::プリプロセスレコード @end menu @node VER @section VER @cindex VER @subsection コード情報名 バージョンレコード @subsection 内容 解析に使用した AdLint のバージョンや、実行日時を記録します。 @subsection サンプルコード @ref{Output_Metrics_Ver_Sample, バージョンレコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DCL(T) @section DCL(T) @cindex DCL(T) @subsection コード情報名 型宣言レコード @subsection 内容 @code{typedef}、@code{struct}、@code{union}、@code{enum} による型宣言について、 宣言位置、型の種別、型名などを出力します。 @subsection サンプルコード @ref{Output_Metrics_Dcl_Sample, 宣言レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DCL(V) @section DCL(V) @cindex DCL(V) @subsection コード情報名 外部変数宣言レコード @subsection 内容 外部リンケージを持つグローバル変数の宣言について、宣言位置、変数名、変数型を出 力します。 @subsection サンプルコード @ref{Output_Metrics_Dcl_Sample, 宣言レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DCL(F) @section DCL(F) @cindex DCL(F) @subsection コード情報名 関数宣言レコード @subsection 内容 外部リンケージを持つ関数宣言について、宣言位置、関数名、関数シグニチャ情報を出 力します。 @subsection サンプルコード @ref{Output_Metrics_Dcl_Sample, 宣言レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DEF(V) @section DEF(V) @cindex DEF(V) @subsection コード情報名 変数定義レコード @subsection 内容 関数の仮引数を含む全ての変数定義について、定義位置、変数名、変数型などを出力し ます。 @subsection サンプルコード @ref{Output_Metrics_Def_Sample, 定義レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DEF(F) @section DEF(F) @cindex DEF(F) @subsection コード情報名 関数定義レコード @subsection 内容 全ての関数定義について、定義位置、関数名、関数シグニチャなどを出力します。 @subsection サンプルコード @ref{Output_Metrics_Def_Sample, 定義レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DEF(M) @section DEF(M) @cindex DEF(M) @subsection コード情報名 マクロ定義レコード @subsection 内容 すべてのマクロ定義について、定義位置、マクロ名、マクロの種別を出力します。 @subsection サンプルコード @ref{Output_Metrics_Def_Sample, 定義レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DEF(L) @section DEF(L) @cindex DEF(L) @subsection コード情報名 ラベル定義レコード @subsection 内容 関数内の全てのラベルについて、定義位置、ラベル名を出力します。 @subsection サンプルコード @ref{Output_Metrics_Def_Sample, 定義レコードの出力例}を参照。 @cindex INI @subsection 対応バージョン 1.0.0 @node INI @section INI @subsection コード情報名 初期化レコード @subsection 内容 変数定義時の初期化について、初期化位置、初期化する変数名、初期値を出力します。 @subsection サンプルコード @ref{Output_Metrics_Ini_Sample, 初期化レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node ASN @section ASN @cindex ASN @subsection コード情報名 代入式レコード @subsection 内容 変数への代入式について、代入式の位置、代入する変数名、代入値を出力します。 @subsection サンプルコード @ref{Output_Metrics_Asn_Sample, 代入式レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DEP(I) @section DEP(I) @cindex DEP(I) @subsection コード情報名 インクルードレコード @subsection 内容 @code{#include} ディレクティブで他のファイルをインクルードした場合に、 @code{#include} ディレクティブの位置、インクルードするファイルのパス名を出力し ます。 @subsection サンプルコード @ref{Output_Metrics_Dep_Sample, 依存レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DEP(C) @section DEP(C) @cindex DEP(C) @subsection コード情報名 呼び出しレコード @subsection 内容 関数から他の関数を呼び出した場合、呼び出し位置、呼び出し元の関数名、呼び出し先 の関数名などを出力します。 @subsection サンプルコード @ref{Output_Metrics_Dep_Sample, 依存レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node DEP(X) @section DEP(X) @cindex DEP(X) @subsection コード情報名 外部参照レコード @subsection 内容 関数からグローバル変数をアクセス、関数から他の関数のアドレスを参照した場合に、 アクセス位置、アクセス元の関数名、アクセス先のオブジェクト名などを出力します。 @subsection サンプルコード @ref{Output_Metrics_Dep_Sample, 依存レコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node LIT @section LIT @cindex LIT @subsection コード情報名 リテラルレコード @subsection 内容 定数、文字列リテラルを使用した場合、使用した位置、定数や文字列リテラルの内容な どを出力します。 @subsection サンプルコード @ref{Output_Metrics_Lit_Sample, リテラルレコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node PRE @section PRE @cindex PRE @subsection コード情報名 プリプロセスレコード @subsection 内容 プリプロセッサディレクティブについて、使用位置、ディレクティブ名、ディレクティ ブに指定した引数を出力します。 @subsection サンプルコード @ref{Output_Metrics_Pre_Sample, プリプロセスレコードの出力例}を参照。 @subsection 対応バージョン 1.0.0 @node Appendix @appendix 付録 @anchor{Screen Shot} @section スクリーンショット @subsection Adqua との連携 AdLint の静的解析結果を Adqua で処理することにより、ソースコード品質を定量的に 評価することができます。 Adqua は@uref{http://www.ogis-ri.co.jp/, 株式会社オージス総研}から入手可能です 。詳しくは @uref{http://www.ogis-ri.co.jp/product/b-08-000001A6.html, Adqua 製 品情報}をご覧ください。 @image{adlint_on_adqua,,,,png} @subsection テキストエディタ Vim との連携 AdLint は、標準的なコンパイラと同様の形式で警告メッセージを出力するので、テキス トエディタと容易に連携して開発中にコードチェックすることができます。 @image{adlint_on_vim_ja,,,,png} @subsection 統合開発環境 Eclipse との連携 AdLint は、標準的なコンパイラと同様の形式で警告メッセージを出力するので、統合開 発環境と容易に連携して開発中にコードチェックすることができます。 @image{adlint_on_eclipse_ja,,,,png} @anchor{Traits Sample} @section 特性ファイルのサンプル @verbatiminclude samples/adlint_traits.yml @anchor{GNUmakefile Sample} @section 解析手順 @file{GNUmakefile} のサンプル @verbatiminclude samples/GNUmakefile @node Index @unnumbered 索引 @printindex cp @bye @c vim:sw=2:sts=2:et:tw=79:fo+=mM: adlint-3.2.0/share/doc/Makefile0000644000004100000410000000055212224440633016330 0ustar www-datawww-dataMAKEINFO = makeinfo DOT = dot .SUFFIXES : .texi .html .txt .dot .pdf .texi.html : $(MAKEINFO) --html --no-split --css-include=texinfo.css -o $@ $< .texi.txt : $(MAKEINFO) --plaintext -o $@ $< .dot.pdf : $(DOT) -Tpdf -o $@ $< TARGET = users_guide_ja.html users_guide_en.html developers_guide_ja.html c99gram.pdf all : $(TARGET) clean : rm -f $(TARGET) adlint-3.2.0/share/doc/adlint_on_vim_ja.png0000644000004100000410000033265712224440633020710 0ustar www-datawww-dataPNG  IHDRb5sBIT|dtEXtSoftwaregnome-screenshot> IDATx{|W3D" A(RTmݺJ]-[TۥDkmz Uw겭] =d$#1w&'y\3g{D"H$D"H$D"H$D"H$D"HUTv>W"H$DbaJ!UJJ%H$DrVA7b~ %D"HARSS<xMؚ/, ;%D"HU<xo+1D"H$I bs}r1!CD"H$bv \YΈI$4|_裏/ ,, ^޽{iѢE-Xy{}H$wT̆<sR'[۴yÚ_C%I 9]vޭx~Dn BBΝ8zM4rL"##j44 GX]t4lذΝ:9Y1״)eee>>ϙgiݺ5eee̊7~VIrr 0ǏЦMw޼y=m̂ ,{EPp׭G1`gyR><9$od/^Lrr2~~~iğxh4vuY#2%O'pY {}`#}ڭϙkէa4i҄EY˿믿ݝozUI$qvQNAX9k11'RBkT^"TӦ#`ԨQٳsiZlW'GHH111L}}*F ֭0 N8T Ĭߓ'hݺ5,,wň#hڴ)|ooo:vÇgϞn?m4.\HF1bׯgsb„ vuY#22sg!̂$VXofniFÙ3g@Zlϟ>g5D"qΎ=juaUa@W[M&kbvزe LJ1cƐIHHl6sqd͚5ǂ hժẄnj=uTޏ? &rJR0tܙf͚qa+7:u ڵkiذ!̘1۷+eΝ;lwh4OӢE*>ѣy뭷8q"| |,_I&Ve'"Ύ=j3؞hc-Hn?FYfHHH@?wNPPP٪U+dggsrFk49wLyyB\E5bvVO?CѠAFu3b9r 6?[>=SUܬWDz{v9g17_Mbb"}QP\PNL&o\P\ <<{9˩W 6$!!r|}}iҤ BNwmpd69{,-['R,5kЧOn%]ָ ??)S0fBLJ*3dUnZqI-lLٛvVyD-]РAؼy3iii\O?9>t2l3 :Ԣi8Y9 iժ&+ѲeKLf3WҼys^0?ޝ9sm6^yUg3ϰ~zlѬY3N<ɓ'_>c^xr-ZGEaTz=4 t H$ۏc. (ѬX^"摝MDD˗-CxT6mR\\̹3gcoV#?lݺlqQf3  -[Vyߺuk0\tH0twg /l2֯_Onݬ |w}?ؠcFf+ussH-"#",2~<ޞmժ͜,JEVf&999h܈lBqI-أ9gڔ2kFٳnu*QnjlD"H$7Ύ=jͨT*†U|]6*d[^"H$:8;r73bZH$D"TFЌΙ(H$DڏH$D"wMʁD"H$m@,7/6H$D"ghذCYyxxдiS\jD"H$ɽ˗>b}UKD"H$u3wMJ$D"!@L"H$!bZP) 0a.>NsO0|"3 G{fR>RJ2z??sOYT׌"f\+ɭ*FIuq@l񬊉aEv07K7ًYw^S/"4sc9.LbZutmT\yc&^< #tte_C};yeF,`ijQ?[$00cvgHL;@mOJg3GEɔ `juŖ?hz[iܸ_m>HNA1mƒ1̜LÉ VݚY^?am*S,3^O䯘lh322DNv{Nw"wYGZ>'$ʊ/$N̛W-:?L.١乫œ\,\VuBfE9BGD,XKfxҧ@oB1/;K7 !HI1>e喲YWlUO^ ^x(,uJ]}B1o}%;p6Qn4wgbf0bĹ̅L!FO-v*g?{*oRV093cQl(Bnw2eHB.ҳ-WžE!XV|a6 a(-VN؋32QSU>d QֺZ@I(-+ //~".dZX3,0iXclbΪ_DQ܊6>/āSBB zm8xɮ-VSܰrQrLxDXqle )٢6l_IW>)2bdϒdg  z@(.[a6h{a$viSU)z'vֳDЊv+SPjz:>^ קj5Fk׭>gfgVAEl21Ci9Чc$tgsXQQn.gOߖ | yE%*kr VK:ơzyqX sWe4^z}op;n?{?Gxt\r KX9k\EbrjUťG:vץgͤ`T]fgE)?mu=,UԪʗ~B,[X=[ڦ3uch%mTT*z32;smZmNAb"_.W[cOcѸY|.V?F]zq<W}xPf4Rl(tE%9 @MU7wDZ䂎 /Wǣ[4*iYk">Pk쟣\NI_fnK61ғ\o4`\K&#rJ/Я(!vftDrvYuβm+*[TBTXbDLJ '~]LeǑs|2~Cثkq)}g#8Kbd[m^-JYڊQMErwRKIp eϛ` :#FɓW/Ap%= mdyN^B $]&ȿ.!,r!`ωd.e!CrxX戾& ꑒSqZ  hd6sEҲ*.Ov kW(3ո\&URxk7BfP=#G=vOиո9y!*`m߆0& y} nQ V9WcK_h?{KiC&;"=Ԇw\3Y}Ǔ.traz/pGgON[|=G0nh r?%5!4>C^Y0ɇ- l֘?-k54kVVEf-KrPQj/;,$$M{s/4iPN#H*ɦHpppTo\[3!9H$5bͮh(ao/֗徆8% } LfC%݋I$om$Dr#/MJ$D"!@L"H$!b(61xBL˸UXʁ>E'gFS];/2kfXNQn-wIm㒁YÊvX?x0i۷[m~)L [sMgaȾGZۍ|~찧ϖwdTd6etCrx9wSY+%ۅKG<4NEM5q"wB @̧S M( t3Oj@vW«]gIw;kY/naDR۸d ְ=CBp Z-n?5ƄYq?G^dΪݡAx{c ߫sX8)B99HJFZ zE3[a?~>F~uyD7d?̚'-,}Ď7[ba|<~8[5*2 ņR&3{SviNE),fF}jAr iddJNTX0Yz]gӨK{пK+ly[_ O)r9.LbZutmf#5ѧΥ1cFVsλXGF<;MH)ϔ[GdJ_qiX/J;\rV}Ī=ŎqDArr9t>yx ╼*GD?z+]jղr/>EČX {OQ.%WD?O$O!Y_WlFH}&.fէdbȔ"~EzvS.7%b]d6ǓD>zwnBmd632BE?Ե=mH)ϔ[]I,qH8Ya|k%\zqwkBB_%|Cuf#g.7}dH8n@G|PšL{qrI"-rDFF=N@k hZ-0e 4gUq ^]:oXFޓcƨhуPUJk$Sq#+_Ov` ֆ_T*Ѿ9ޞ:ҳ7v}:Ujvk5t EVq%OTl鮥5GpÙ MMh?]ۄDrX';Ѵr=LTX0j\fniY JEr(Ⴅl>iݸc;T8a߭ș\qw$$ =ULJ&G#CBzeL҅i*zF*52_U;y6v:A"r 6$ZEހdvHZVE~l_*s]VZ]ݪZURc4*]f)g(-YSPLoV|F򙿏z彧͎j>#O0;;ONJ|pwk1r&jb sp‚r咥zqܢr ys7Cg]JuH.I$wJJ\/FJFL.W{/]tnnjLPrr,Я(!vftD].3%?IZ0`\jRf6~-9"Fo"Y|໙udȅ\ 7G|R٢&>8#9V˷SPl^v^zs~N{9EՌŖbC,d;mo\VO׎Ķ4_\ݚ/ָ[ژ-\29~eF,`iU?3:6'm\;3V`;lYn;La4aK+΢J&m~v9Y::U|ߥ]d=* 9Y|ߵ81o{￯#NOsxsZv a23Xq!KY*ǿqTI-冽8ny+˱wnB-b},JʅB`lPZ&o=%bT{,LY(qTB,XKt-Y_WlFH}&.f ,0iXclbΪ_tgBg^-6eg^A{9sQ`%Dv(]{yfOKYlD̸Ebilmh_|ZV.ŧ8gJv [la2sř B!Jˍ˟W*)A!:#ƾU;m3v Q_ V&Y>$z(,3s Eٕs#䧫zņ='|vrxʱUex1dBZY"=;aJXH_n [Jjb3m̙~rDFF=N@k hZ-0e 4g0)/.\e3_5$W'9njQ4ȟV(6-RD7#׻x+iS١iݸ@q#+_Ov07Ҳ3 zCRs8s!qCcи k0vH\ZWܣ*|jX]ӝ.G\K@X|?5m:-ukCH/*hoO76!s3'V &˳T™\ {9ն\V9/äIуcխ0hu:;t~TW·+zV\~iZe:kKz{0Wj5F0wN]N'zHEYyxVUls偛k *ecr5 @=/L:t[;B2!bzߜV}5aˁ|jzFV׷37^i5vL;e-tdW?8|>K{q.ڙ7h>^ NR۴i+!>9?oJ%+OOn*[{|qFJ %}̙~ո9 JE^OVPUԨDQq]bgbj\nM2@8B_Q:Cyco^,jJzw3z˱aPZ̚2mp>3 K"& N7cǻ[SKqw"blb'i]gWdzFQʳRDhDQUӲDO}p,jjgAH2-[eӆ$gsyΏ;OPTrqCcj$7.>װ/rBI_Mlns_r55ixĸ8 WPVP@y xzԵ+g/GLǓ{$ :urj6<|=yE%U>oljtvH䐼Ǔ-4nnh5nvKz{/nQt߇Qn4a29r"iY4oT1tt%-YSxlzFv;(i;FaILNFܬܡs*2:M7ĖkD7oDtF [n$4ȟ̌4E@`J$#[ʳR۶y G8f5'/Dub8kgA.-fAuFy &<9hԴkBnaCiTeCm+*o~GQ&k>E)'Ė1g%WcOQjo-B^JO{ekmjBYʵ:o.\G"ݡŝ6E"H$LnN6eFU|j<^]rT.O]w")F~bxƒAO#$DB~8z;"1-Q/o=o9H$#ȁ3=D"H$*w~D"H$9H$D"Cȁ![9C#2]Obơ|U\29~h'sDc6'{" }Ɗcᳬz|=NVM]-H`?`6 ΐvdywM;/ A|!vOnCjFK7Eo&>0]ۄwK\sdD;ƌYhXGF<;];OYȟtfӾEcF{)Pl(h27>og*wGØcd4?&<_BZV>gMTXe=[sG?4ȟ)Eů7XG,S`-?C]-,O_f.chvkވ2#g/^!Iʌ&vH!sL#>^e8ЏgWĔg-!p-|!=z'ei/|ohE7_{57eG/aG5;uZ:` grS28v6欶ԙRN(#%J(bڷh^Iiy9I֗Y\;1g{Xj{r]ۊL_=}`;V;9pWAg۟R9S]\XÔ) #l ɴ;-eyM9zjbCbCY977aIҮbZXmx0_h23`\.ep>6!tZ VC} nш)pB&ƠqSO6a>lW޺=߉kP‚ KfniY JEr(ႥlN- Nƕ<}ņ#q,N8ЏƁ~9O|*'siY_epvT0h;X] G!$ zol69fR9Jqp6oHL;ܵDVlTBq#+_Ov֡}[Ҳ3 znnڙގlm~\Ù~^)m&9e3b:t>>t4=z}Om&ZE㏻J=Ͱʇ mQvxM&z{'/p5g<=j,WB|r:~?JVoVjxY@Necr5jNA1uo<_o@y7ǻq%ZF'^ҝѧc$v6b-de-=Dmn G[$V0[kbN:kߢ9o+5#mƥ:nlv;L%^U;y6v:A"Kii>^V^];88k8+堳V;**rtIf&Ӵi.Ww/]TIH/nj5/,HOӆw"lڐl:!q J2nhCzjřJǔ+*[TBTX0xy̿V[^}_o2r oܷeF#ņ2!#GtF\%1-_~MdgEf nTIًW0[j(-Ųt>3s]uh&̽E~uPr9o+`=- %WDM۴-lE_bmt3}:FBzu*f!PT\Z7PkGb[vd#Xӧhc~\Ù~VVyVRIp eϛ`r 2 ;7rн]3|Lm3-Z r 0$]ʦeӆmҠ)9VT:(+7r'^k0Ch(709s ǺF|A.dk2r KxH˷Ds"KYtlbWZw>\ 55*~%`6_ d6o+.m9bNgPVVFX嚦&U餝AjC@?N$WKrMT6m [vx5nnh5n0f_ݶRkGb[v[SSv1gsL?o+g<ψ4R׬c*-/"sv yj^x$vxmd_g=_7xwh쏵ۄp9vB-,ƽrc(-';_ϴEi5À;G5 ``( }0:v)\!,Öum/J 7|D6i+oCm+*o~GQ;mb "vfo9D73GrhF 8zLv<1 {O2`\t7f:MjYc˶ЬQZC; j33χM]iRrè?tv [WҒJ9ԎEIK.݄|^9kZb ['zGqCeov$m5Ŗ>[ܮ6w8 _EژRݮ݌fddZD"H$AY(vMY(|*8H$=Étr +.5OTxIj\X_"H$;DbZY @@_z%MN"bD"g3=*%ID"H$;I$D"!@w7[wg'gHj,C1>J^ѝ6C"H$5%kvO֑#P7,i<Ɂ)HJ30}B=ϔyk=uBMYog|>ᏄVnS+~9J IDAT|uoz60{u '?U멋xc&^<>'3sFr C&H$ .{|ž7 m6TZ-,@@HL 6oƷysw½^=Zp{ө99u1LJnQlݜb_| ScFp%S1*4gQ4o?DZi6g5C{C0y _lٛmC8Ye vJZԻ]փ ̙G|<,~y3' _ycZ6}"^:KoUhCv[&_o@y}Nj|-SK:LVgcYJiHrtf! fTwuo)@_m>H^Q j|l9^fu<ݫˣZDY9keΞLk47nŢV1e㉛Z,H$JJ\ ) *Oݰ021x.OķeF#ņ2 ?֖C!>?/jiٴ!8uC\eИ[칑"blb'i]mUl6Ђz˄?|[i{qpsSc-J٩QCiED"H~gE0\BYAa4+(JEʚ5 y =KsKxH˷Ds"KYtlRc|HIlvl0@CGфlș5Tpjhǖ <d&R6-6T,g(+Gq#rm_+*rHLN&g`GdZ^q")Rf"j(/OW\r s.2|"vW+H$ψ4R׬c*-/"sXпů~q%jh;7! {CFq"Vp@u`jݭlmbVukZuʰ̊M $9?(~s9={N*MG [c޸P i .Ǣg+!a1&Aq мGk]{"C=!/9_s7;!?F݌lѴ+ܜl+ fR!F}]ʬ0͎jv> tz`7c0]|Yyr%ҲrQ\ !"H&L /髱A_A!D Ya=@ K!b"4#B1?5I BQΈB! !BLbFZ$xaMr x (-Z*0pZ0u8umU߲ݸVꚿ(T+ui2n^,ڗ_e vO'8[vjZի8aaWŒU5LoE?ﴕP Eok~A;Z}[\ChVɦP*4n1y֖x|1I-(ۦ8S~މ9p7%C5X`DXByٶ2+ǖo_s{> ĚڅpPVTEI h9v,oބ!8` oEl>L@vn!vyZU(+c=ۡ%N2[gVޞy^s*+pb thQ+5N.7;a}&DX7@zv&hW(rLԤ[o"Z{zL `r9|v{Hޅ1WqsvYy((.!mp`!chw"!- .6tl>MP$-\dUoݿf?q~& Fx@Vn!~ `cia]'H |yR'ޞ)(ƈ[GW#I((.ŨAJUk~@; I~z!b|8S3$HaaH6Vg}Um+PU,mjj>}0a6 b|6r;1}P[Wk,g6aqĆ7t;F.ƊKdGK$Uӌ13b,.5jv'ᡪ\}=}vRl *e]+_ϡWmԷ 1)g]&liEccH$bZx -n1}wBP\LCӦ#qn0۶A!A!|Uc ATc k")>Y>[mn2%HHpɯ1<]q#mǠ0+B$_&& ό :jњ?V-_a!+*puAƞRazxZY\!+y} UEuԫ}y(PkPPTkKJ00tpo[vjO{p8@W& =;Oc=\=5^z})1-R W>OtmJݶK2P"+á˱H{ Ғ2`Un?{s6a3xݧ-? [Kshz4 lI~13a6,مBǷDf@PﴕH|Lj쩵>A-ptq{F}`iE>BW- ٷo5 ]~7 6m1VuҐnm-;}u'pƼq` ~كB7X[CR Z;3ԳS|J%wD&--w=5%m-[u: KJmw{>{ト!0yhWziU-j]GO?r!>kKeg|Ʊkqz:r r[(\㇭1aPy==meVE߾SX Kp9}fVO>]|,RmP>h)CPǗN: K |H !+BMV홪KqL?.Uy1rpUL F8v_e4C=?[y{sIJ5MAVN!&A-0?7pzzշ nXݿoppPVX?@)aOnpTy~AgRGHJKƐ(TzIAP1waіOd~Q ."7@yZ[TjGusuNވGٮ98ӪbocQcH]o<`N[znӴ Kswqr9jo63+?P%G1p9:}BVtm1OuMC{U<]a"5Cƞ.P*墡O z9:jCW-Gd ouC-hkep,F9W; fozs=Ģni膤l\((.Z;WcSp},4̠6hbXݿK a.H=,/1VA.¥MYx@ks±E VKS(-!G\q!&I^pwCcOl;v0+~| b({^A\R[kPӆ`H7tBgnCV&G\j&bDAm]JBNAgf>L4*#}5DVn*&m2yfhwup#~~ NvzA2d\8_O]ۗ\`omE:S4էKm+A6 YU1Х7B]g"am)P]җC907% CXBt[f\.lq ϜC=W W(0> t*OPK,}V$ӆhXjr|g8<RC?BQZ fmJ-͸x1kր]/68hRgć wMztێ݀5 p n:kCc̰kՓYUY L[h^ _ꣵ&T$0j@,wBʟjA3Ads賦8"bHK-oP H_|nvH[ ݝ#nkhZnNjͰt$& V\п/r-8oXc՚8y#|TO_r8?!s6ª0?<3pt8TU.j[w{Цۦ*Ӈœ c/ruogfwiRmS nJ<ܳTɯ1[)KU_ƞgEkoOH`Tf@, D>miE"LBɋTXa"tj,xZ<>e*c/mjz2ZI{ȫԡ 2߿9:Z%gCV&G)?E.Pb{Kֽ s0RN{SD'쬰b |{ `nF9 H^ h Fu1ujWEBZ joFvi 433ATbᤁG& !B:&fB!!B@B!D:bbVVdgرCAc*i^P\,G8""B1m ƔJZMTH>o,\\0e42NShޫ,bQĥfs 1C B`ˆpw6w!R;6Kܽ.R)JJ3fh>|8dȊ"i=p=ܺ+ā]*M(SxM%!B eXin.l >Rn-\iVl4@~J1M@jv֐+ʿ|Mn݃Z6B!Qb,ȑTHKxKHx!ٺ.53s@Cw' ."iiyB! 5 GpL/ZM׽;7Ν;վRLԡB!@5~JFqf&v_!xRpyq}<ށ-`gmaP!b ._^oKWWl`j^I%2s!kfP!btKQN! C!B5—H7G4ps4uB1:#F!b"4#B1XQa>JK*ЛB!u LHTbՏpx)rm ;q7u.7;;͛7TZy'NTKqܰaׯ֭[!R:bbVV:޺5}1R|wxx uλpB5 ͜9>>>FTU2}t|7zO?a刊24ΝðaТE $''cر.l*7!!YYY4(>B!e v{ >Yv5h /lVm;Q(19s~~~TlذF)_<ѣѼysL>5!b<11DG;,١(e=zG֭akkkruQPPPƍq-ͭ!1x &EN|<__:qύ-ZF)wARRڶm?3x Uw||<|}}M6GJJJB!b@ix8ދUx)x1)P)`Je JKWyD^AB\ر#u,}fܸq'NԚ/_۷2Z^p}v !];v q.@®]5] 0Gުz2( Gފ '\5 ;v}V IDATTHP(ݻw1bBl۶Zewo߮uo+WD`` .]gi밲B```_ v>B!=D2'gZ.55ǝ;wUqfذaxw0dȐj ĤI0zBN"ΆL0Rŏ] buH$ |C~z=pf̘.Ko'b4#B1 ߄B!&B1B!!B@̈qj-7l7n?0Vx"x<ʩn]'nק'$2j,եoxYZնen.ƨ1Il,!fj/s7ӵ+lG}XcVIPP\,G8BUj5AT)WUrB;99Fi{/5Fm s[y'Vk;ږgU}c`H}nkۋԯUS}Iqѫh1T…oҤB= N?~+f}S|[6s#6E\j& ;s~;BiF{XW8x1}:4-yg!9]l뼼B)<]M ˤOjv]+^EF{gpG~r*骿[-[ Ά&ՠT2<yCUi{`᫸uV9RkYYX1DK9&uE+b-?MDNA1F݂?FMl?qٹXi[4HZ B1}iѰnJ,pwr8@f^FΕ!wFH s>C:keӡs6r pwÔ@vp'!<3yC_]TES0pZ7GC_^LM&-ځ\ ķB莰Y3dk|Bw'mn`ɛ/* ' $HO@HG{|n:juYWEۺ_kZ[7֣!+B+Maa6T' iCU}ސe7!/¤6hj>{[u}ɶAZ"{a5N_B$g!S+%MV]+G_$1qvUINd,z*=<{ޝ)r&uz{/WeþȾ^JֲF~~,Y$f>]d0fg%26}lKnz7RقߏsH6u*cp2f?՚l_RɘTbueh0+)ς'-aERcCfco>c,9=OZJeeLP7X͔JV9.b|e2[_a~򋤌11Ml LTQe,P5mESfLz8t9]X׏Ill_OS }ڠ̆\>oV"+cWbծum7}=i껚MESk_|acr XO~QA߾˺UG㊺Q]!b"nh @5F4y{ Mqc|933cTK牛֫]; ݝ0o\(\IN#LL Bw'tlABtk ?n8t0JE%4r9 Jt.3CVn! a!÷nHvjO{p8@W& =;O5W{~ZJ0kkp87^V3V/Weub0O{4||?o#x83SR, \7>'_P|8Z#< /֩ުڠKn n s>ABpփ>і}W׽:ؠUcO\I__zBuqEUdIqL $=y%%8hsIUC~ T^u3.JUmХOT ym$tZĢG[>c]Mj_X=Xԧ/=Ϻv\x*2x &EN|m5FXh˧j^~YXIA1Z[ݗ㊶ѫ%4<ƪ~BBzt^L3ԩPBQZZޓIzSK1IM5i7'[lϬA@],RY<34(𝿓XeIuן6ĢG[>M}W"gnCV&G\j&bDHTS}MaHl`Ԁ Y:u `썐!;ä饐vpr,~vzzҜ}pz<i[!)0uKTCDl>ii^sŜ?.ºcxMI\.ǿ9z.2 1͎jv> tzB;BNA1>/?}쉪֭>1>b۱pƼqF9sPU,UkCh'i>mSMESն=H\wCPϵ>7}RML|H$yprvQ3lJdex˵X0=tlc/mz|9z45atbWcǃQ];UE"ΆL0Rŏ] FψãBعtzwg;:JW Y$B!Q׎G@W@7G4ps4uFBȋ. E1B!8L2F !BLbB!&B18qѼysHR3?ֿ9suB!/$燘իUi?{uk8iNJRKfΜ J .ĨQ`i8EyۏXXlZ2Ғ+>}:O!6cJ%n-\&M*7{=ݵ aϣ{gXՒZ//jdشi^!ľͰoWr(OTݽ{w$''ݻFByQm {7\a-(Vnnf8fTÇ ;;;ԯ_@,~tѣGW]Xt)B!AK7n܀P(O?m۶A(B(g3][[[4h@&/!16 GێPZR<]všg@!EF"nv®py,X< Am2d!qqL2 pvvƆ 0j(a„ 0aSNEJJ ZlY_)))0|p %%VVVy*]ɂR+NEyppv$[Ta-["22R;pkB!&c%K3r$66j̘vQh(n.\+vܽ{ヾ}8Cpp0222W_ޜUH+`5C. G >e 988 ''R͛7T.!22x &$:aaU#iiȾ}jI5ڵkܹs.#N0afKvvv(z~@@R +kLf%4nR+((P;jРпH!o֗"'>TiiN!/!/83BC%GGGũP(0n8|'={6|MXGkѢVXQ!\. S*+΄GS B3bM^l+$LAŋQv#jR)\ڴ1FDG_>ϟL\3g 11˖-ĉ1zhvuuݻwP(*Mر#ӑJT(y$lPi .O>ʔJ8q"gBHP/txHٷBCkW:n+WB`o_5݋WΘ3g'W_0k,dggcqBwň#  m6UC˫Nkkk 6 ;vKF O_k)>s9밲R=0bY7΂!BL&/d>N.[RSSѿܹs2u-Z뫝vY|'4#R'1B!#17!B@B!Dh F!b"431cӦM3u(B1$燘ի5UaDFFbҥ7u8B1 ĘR[ ¾IjM{A ԡB!6Kܽ.ִWÁR4uB1 Jsse |Ǐ4xyyŋB!&`%K3r$66՚Fŋ߇C!BH-3x &$:aa՚F͙3+V@\\C!BH-3[Xc*-)%$ybCݻ޽{: B!hܔ)pEUӫFBN!腮& B TL*zr_#!B)513f Ξ= B!h f"6l0uB11GB!Dh F!b"4#B1=6fxzzbڴiB!4H$ <89T0Il,?VBGN s̄rssagggp!!+# @㟢g~(1SLĭ aߤIi˖38y_^@B!m {7\\iχK,Ri0! 0=b۲ǫ~c<ݽ;|ځڋ /^4uBye v{ Mi~&ǺuY8Jֈŋ߇C!BHg@LIt4NvI͛L'- ko[-,Tx<0 fYK4kqV.<[ѮcԤM6GJJ j!B^LĚixsS&Nw{۶!/ _Hbc4wIKXXZ<ս Ibq.xx Y\ܰx J@t)S\^c&Bi ]g E~.KggGήhնjvBq08#zWsL[p3BԽ/d>N.y*00&MѣM !Bt$gCV&G)?E.PBߚ|}駟кukSB!@ߚ|"44aB!1B!!B@B!Dh 1w3—* 1I"S(0pZ0u8/ ]ًMHR:bbV_J? YK=?Y qXZ(J[ m< ݩ4QW䷃WuR~/+׃8S~މ9p7%(!{i}b1U їbLĭ aߤ*ͱysߺ-0X B`ˆpwDl>L@vn!vyRF{hkjLB^6?n;g{k\6ovUP*M^^mbuCwO9L9x W 0V/=aH5{`᫸uV9Ҡz"7BPdby/ 6}ʿU9{R;annS20c>IK!W(q9;25Rm͸0{A0ip0{hlP~)]3Ixr0U>MRDbDl>,wCбU#@2KH·B$G8y˦E!lz|7vZ5 ]ݝ4]փNi囑yxg[ Q hKc^}g5MN_B$g!S+X.3@5!5/8;$' evvdjUy2x IDATչ3˺}[r_ǯDZQWHo*r^6ۍ LTj-Kdl(cn'J nz74QWWkefJ%cRIJZBdfe;OG25{/X$_5[_a~򋤌1 =\ڴ1FuƟ'nbXvR3s0w4tw¼qr9(j-xZͧ gBdBo#yӲ[(ŐnmN|=`keru@reb`̸;cF .pM`m)@zvXYU,||r9xSSz=!U%SR, \7ӻ}YIxgxf~YuwOLuڧi=ʢ> 6jy>O_.Y +%B0vDUL}'lkKsJ^OTkm[C<"'>TiiN!/!?W˗^`UMݣmg>T fpF<"6EvQmwJpPP\fpay3%tBw@i+P޳k+SS,PW&m, Q$Jz吖Ҝ2Ϝm035c@qLO[۹\^7ū[.yÌEj=]T2=EC7O?m!٦?m-^ֺ0Uw ї=ix8ދUx)A$\۵G9ڋQI)(ia{{u2R{^A\R[ |y8ITP*NeJ]}҆rwCcOl;v0+]ed z-0:}YzNLܾtk{,WbuAbKkol=zrDR?oOlO>s29R3$BF50vV|;i^NPU4vDiis 1{A[z}BƢK/_}Hِ@ O3KnxS;FFtb~c؃a5iriT M )!- Ws7uA!FkR$!BUҤNgk*VB^:իrÇk1B!/OOOJCAHKL!BXP*/#j10uy-[/zq8 bbFY=ܚ2‘#ppUڽKQ sgg43ݺZ޽; {1.RA qv1X5MZT'BVz l\g7jwTL&MTB!ubLDհjذBzlDBB믐ܸoEG??4njk: Tgbs +z=%DWv?slÛ.LǍǏ#55UBg@6ݙ0:mR^'|w>Oض gpthHЫk(n=kh`@@۞deeC1w\E4isb2K \hiݱ;1s)6lFÔ)S3fE/_+Vի zB#VŅ ᏑJ{Hݽ9;cDuڅ?G Ŵ L&}G{)n3iefͷb24C~<T;ObbbJZf_XN']/ 0^#tf3N޻]L#FO?d'NiӦx6mƍ-nBK@ʕx޾LZ.FGk`xmLڦuft @FLaQE7;+S鄣ү(quiQ}=Dn^}i #NlbcxS-[FʼLR2 ŨUj EW/1-.cڴi,XmNe˖8:|-I!wMfjJ"+.<0Ldg^ݢ/-+hB!ĵjyZ7M;LRvrΞ%7.j<[' oX>Ԫ oҧ#Ύ0 Tj 9+]T~ف|:}вZލDEBi|m.T* Ά}Gq1t2-"f60K^f*5~qd7Աmq22d>ls3 6=z(ZB;-UBW^!a:v=1/]czݷ;J"ϓe*t6|omxs'<&n>\Ic\rBnϖ]hߐ1/`6>v-"vLcS*/í i2z2y888Yհay?xpAgN<]z}C˹gK_2Ŕ)SXnUاO8uSN%(( 6zjΞ=[rBN--kM~& co[Y==4;Z}]x뭷ֆhݺ5Ν#88?㺴5{n&MāpvvQYB!nkM*跨|;'W9MjZxZ{F#VkCuy{{믗 ”~z) „@pw߶QXOC' UҳgOҥ GJjԩS:uꖔ]_BJzx$k7OB΢@̫?(ĵf OM !B@L!J ҏg]ǎ[t[ʁlzAww#F~U !BZbfsܪU6cA{^xO?_yyFR !BZbg@Ke>`СRG)$ B! 33Tvz~e;DB!"ou]ZFmcÙ/l4rrEEV!Vq vN#ʤill5>ZAA֩SM!>Ǐq$:v,vaN.>ͽѤ{wBSQմZ!BZƁXѣi}zNߟd$vvvef͚E۰Alڻxwo {3fkgϞ*3l0Z+BXb/\Wp0*tHl?_ixh۶j5M]ǮlqEEEZ_- kVA8УPNK!!!q ڷo_VB!U)64ؠA-M vXrrH=rDjk 0){} _]v]ڻckf* M/8::s ^dJJ QQQDDDT]:ү36 MWTݛ-[T& BE@Pd$_AV\9hۛs璟YJU[kݳڠacй;z3qMĔ;8m4| `݄G\\O?t(O9RŠӤHBkR$8y2}/d0`Gbƍd;C^j>-Tn`M}Z̷5:wǹa#I6FGGӱcG^|EKBB+WK.BFF?m2c <==iBaMb^{Լ9έZI^J h0 8;3 CAWsrr"77W.^Hrr2HWeggW)h裏8|0'33SѶ!֠jZhġiSMPh$9|}V\ǟHYFٳtܙI&IMMU'O_<:uٙxBQ8+HOfdPΑyqq-MCB1 q TVaA>ǎu9cG~tlL%9+ףG  &&Kr!+g601M%&uݻ￿mj *B!45l4rlb1͸d j_}3gyn84kFOUW9Ylju.ո5UMRjooOXXׯgʔ)%11qakk˜9s;ӫW/zEQQQv`'?|DŀO)/At֭ +V1U'Biʛ@Tiqmv$j.!!!CpQwhƨQ>|xv֍ɓ'3~[2!f.QTls]y^>(@JJJ Ng4k֬Zy7m̙3Q|8W!PbB!VR@LB! ĄB!D1!B+@h*00ڋ_H˼r:s/f[9ƈWplRI;-B bƌa맗^*MKزmG. _O%50h ny=׼ⷦ2էXeN8\2233qqq!!Y]V+su|Sr&A[k8||}o*Hyevz63_nwVoW=is:s#UOV궳&>iKM^fw!KI.+8FSpmۦTURO:ކ1E<"6|r ]weqѣGW5qO EF%fF}!%G\v¨>8;ո(dފ2A#g{~X8/2ohԵoNLܮX.DM)u:466e7}0JU'oeԩ\|ѣGdɒ[ZOPUh/֭h `ٲe W*IULf>yIۦ,ڰj}WK9t<8N KJFexH'&=toef'sl27pB*LRZȟ,663/,bKcmʪ-ذ72iȉ##Sjdf.B Fu'6N_HفGYXl`ouZF̊o"t"xWfxcfҲrp0ung"tr6y<@=;Tx+jˈWзk3xrHwFRc}o QSb"#7hؾ=]fy'.q{=ze9y#mg# uEm-`KcOJOxw@X-.DM)rͼY+Vwp :<,\͟?772/Kק(O}ymև\`ӦMnm''e>+a^-!%7~91ZEn~aeT04#ZloQ":.]Vÿgy8y.ըmJYRҳ9xR#Xv /7gT* {;=.״JITJEώ-rsP gl IDATh((*f\^G~Aqu]5,8 _j3r*SU /8СWX_ʐg#:E}%BԔ"Wļz.}AAdҨC%V2qDFUfel6 m@!cXToJ/;wGymbcc+x\iYuۇ ?_W!bx07ቨOkLٛ7FK>bŴlFfN>z*^ XVo;HFvj̜| FS5{Vjc2s+ga0qe)| ;ʗ!7NTy}L\ߵ 9>W}ljE}Heۛ}߅)WVkjr?XtRl4h~TRSXh ?>NU#}:nsO C'xU7g{YSeRҳ)2/,FGH5W45+Hf+(*j+KF{& j4oUUZg[ rJ<\*ZMBr:-0\][ҿYDu>W]; Gg{jkKԤ7V}j*HOfdPΑyqqկ]шɄd*y/AZ3pر2EU/3"1ʤ ?;/Vyl33#F's!5WGZ6uc6?vU.~&=GOSl(9GjhJڙv]լqCҸlᕔ:6 .1 ?M\hƚb6OLxz^-Y /`oc%YҿYDu>W}EbR8~6ͫ}-t]XWF-^LV|"K9b3z3Js/>J~a1:2ʕak^m+Ow5qeجLfoL_;Txk1}Ky%%%uZ\[k٤VzUaϞ=U?(9r$4lذFeKX0|\U7ťW+t0 6}Ցvb#| +@ v#F}ѦM7[Å x7vs=W bF+'e![Mŝe˖$&&ݜri=tP]> y@']j24)B B!$B! Ĭd„ xyy1}tk7E!V=bƌ!-&gPzΝhٳk.._a꫸׾%_n<==T| D!BXGUS @`6;9quzYC>zl ĄBzHIN jt[3pn [WWƏ'?5KSTjXB!j'C|BtDYqq]عɴWy{{o>k7C!VH qd,_N+;8`n,͙CYdX]vnB!n3E1޽qjV$/%tcA}?JTYg̞=E{B!DjZhd0pCxzNbB!DT& I=|]˱qq3988mB4z=ʛ91hBQ80[xf3n,YZ'/% a˖<>Ll6{BzƁ;7l(7?^*ꬫZ%B! &k.~mlll!BXbVrJk7A!V&~ !BXbB!V"B!H &Ba%ܬmbbJ ܹyyRe7ݷ !Bj=5p!^-GhmmIغ/Ȉ{+UB!DX Д3GPP{{//4zuB!D}X v(2_xe 7/MWt:,]VjB!jV%%%uZ\YTH84khe\:z͛Q_Y̺(;˗9f 5kP9!B=i(*69ry( yS8jEPd$y))d\YG@舃7]r.\o)QB!De)VJl4MTPT(]B!DS{ I=|]˱qqϏI>p{ڵqI !Bj5F#/&+>ٌ[@!KQi G/i}wvVB!"7 !Bf}!BQu !BXbB!V"B!H fe9Y[B! Ĭd2^ I3 |f) |yO!_-.ҥKmۖ^`` ;vQŭ3dwʕ4k֌e%QdmcƐSoh(=νnFgCxi gc9swڴExzZwܹ<ٕI5kڵSU}-/S4`ЈiݼF6?~Æ r^!֡H p!^4&ŹU+j5M]ǮlqEEEZ_- ѣPc=o־ojMuџfaڒB\\'N}egg]& 9Bܩ EFUHdŕn/$$ه-7mаtA8&cbbz6mU{n#..~e\u9#ɄsCw~ܼ˸4 Rv |9E|*:u냧w 5۷ȑ#UsiRSSEBq+(24qd5l4r|2 ݼVoU>-b2J|]?0ȱ#?̷u&322prrRL:[[[&Nqtt`[eYSOWQk(.*ὴNgCqQ!;мmA=dEb~?~qƹ{Jpqq!##FǏ3g|B!O@̫wA|DFl,N7Pa'''rss)ŋ$''3l0J0'2jԨ2y{@Z:Ɉm{]ş۔ө[Gu)KgoTwptuiPrWU>iӦѽ{wf̘K噄BY*VJl4Kɓر4Ν\>}{Sjh"E5jO>aҤIF&Lc=LTTT< O?i Qդ&DfZ n%Wr&6|Dط+Z댽stz]˭L]lظ[N)S_璘(,?b6Ⱥα#?ck׀Vj6T=HLL$55ww3Tё"""ػw//f߾}Z2WvELӲ] l_v˧ڟ֮}Ca_.gēWid޽z Bb0nAB*5F#/&+>ٌ[@!Kh_֯V|1[Z[cb~zLRߟ\7n̙3c`'O2pjl6$+>^*k=z= !bZCccs6/d tJdv3Ba#v(2BB +.Qt$l=zu߾ ٷo!B+P$8y2}/d0PKqNy ߵ{9\>sFjycѮ]wB!DH ջ7N͛ܪA䥤шzܻt?R:a,ZXk7E!WZTj5fMKnWplYjkSN1p@k7C!VP@ =;vPAaz:GW??vv4уSk`6I;vi|=JN0hBQ80[xf3n,YZ d/yWqnٲ +f3kB!DQ@ݝ64A&ÚVS']/-B!5ȘL0]vocskB!$+WZ B!2Y[!J$B! ĄB!D={JݶW\ٳiذ!111^!R$6f i ܹd݈et)z)QuӲM8wiok.>Æ !bWĂ.+8dY#a۶>|tSq$}j\&ӧIMM˫F}B! :NLbz1 s;;֩Ujg "#6F:n?a-zHjDom_='Ҽx[`k@c?ll裏6mݻwgƌTKB!ŧPkjFc鶼7PZmW֮A{Vdh0kj>6IKMf~cQԩX !25 I=|]˱qq` nFܻv^m[8z^OJ9<ޤ)n=u}/^͚W 'LW]ZmQjnRB!ĭS@l4rlb1͸duOFkyUv DoϻȽ :(ݧkϾ\H8C̡}=VgVrk@>Ch2+V1 T!)o]RRR^ŵmonݺ1ydƏo!Vz% xzz+k֤(`!5)Jjf!\B! ĄB!D1!B+@ dǎulܛ w|шWplQk1t2M_vs ĶZO/T~8[y]snV%4k,ڵkWg+OlϬ^<>Wֺ $]R9Fx5>y>O ·kU2k7;*{;=ߙ?V~is:s#UO(/Ӟʬ-i\wsd} }09"^{3!~U~z% .]RZQEGۻW3vA{b.4r m&p)3nrN"u :*R֭,S_kvٞN{;2o0Ls V?Y[*bsd}X ؠA}emDDnb"GVZ%7I.n ,^[ /%%("""vZu_gll-[wS)&wàKM݇,ڰpvQ=3qo|ņ+*3!9ZC1hb}Ϣ2%ȫ+,ްbFviЙ"7Kxu&R3sL}m(ͳjzi)#0s '3t2~?`e Jˬ-7SY}ƞc+?P2L/.._ExLYWVX\Ryt*L}wVog9ubi"+{uT{6n IDATޘ3<6zQ:_HD.?s&<q%.;2kKZe,9וw EFUHdŕ|_mT\̅ĦaC\ZVZaiӦOvMXX~~~O[V]OFR駟ָk<| W*G|2 4r`4r(& RԼ;> w&ܫQU2۱Ef^]cT5Ecveы? o݅ G.\Ş%3صhSF敥ߒWPo63Gà$63 [2+jTV$INʢ/wSTlWe1|WWo]|9ߒ[PUv^_c{݅J˳UUrM&ܜwcRqv'#?;߼u+*Uƒs]yH@Y+Vwp :<ӕţΚEwi` ?t{M4JT+nV5v[R_tt4;v_o߾$$$rJtRaZMzڶm?+a^-!%7~91ZEn~aeT04#ZloQ":.]V g}P`̀7_]KL&?VƷ+=:4gg/7gT* {;=.WؖʼY[jjXp6:-A*.fXԇ kz6BӔ滙lN_He{PT/7gŞv*:f)ٜM~]P~]j,R_uYz\n_TV-sbz%Wق}ٱ9kis@JRQ%2;GG̬ջwH> "#6֭9a&H;v] \͕ZB'NdԨQel(f.^Hrr2Æ # GGGjLJXʃa,Cz+Z1<D'ZMy<\PJul`F]p咠㉨OJӲi:mCVX+yԵ2zÕl*냝WjuiGbo/؀ϩJ*:fWk`[R^ᆡﯺ,=.708۲} ؅߿{wb@pڒVu7;GG/qjQ՘F.9CnR- Νqjޜ@Xt)QQQe4Ha&Mhd„ T-EEAGzvI |c[-U` ;#9\hԥkҡGKV,1F,=.7rwFVN /7L&3.frG0dmct.,߸4sEe֖4K\W9>(HOfdPΑyqqϏMR0Ɉ%)||hŞy;VhѢ[V#İtR:Dxxxi1L Ř&LkNH.fdӱ<|u;ddhi5a-pc>EurՑ6Ld\H$VCsϒ=Sڮ:6 .1 lQ5U^}UՉ^n f3YJͤKf.cH˦|af߮݅߯̾ihIߛ5nH\RZ,.Pb+%`4Etr_G[~ơ-2@"W=Ed؀dd2]yoڒVuYU5"f69x1YfY^+Λх 90{66O*vQ撘ȸq㰵eΜ9X!w^zѫW/޼[Qڍ~;{H0 : //KҵkWBBB,n|d{ {# +6ip0nI1g"Ӹ#\Zb3^>TEpƿ%h̃W& dܛőpڷk?ΠjblYS7f,CuDM %j6|7g{"'Vz2N+6 WP~t?:Iv>CeS7硗R[4yCuˌr3} o?Vx\<7Z>yQ}eo[Ci9K0N7-;]ygA]RRR^ŵ[9B-۷ogȑӰaUPTC/-c?,ġ(QTlg箻J _\i#iӬ"0vb#| +@ Ίzo׮]FD"H$){BOZD"H$OyD"H$BbD"H$OiI$D"L^ /+ RJBvD"H$bbޚB8y{cieEڍw7q+nD"H$O=spB&\YRt<.ѨVxnͥePqu:lq_$dH$D"y)sOJիl 14<OL;lx3-Kky׸D"H$7[k\@D"H$O3IP>+,yőD"H$BbD"H$OiI$D"q'$,(SO;ӹimltώ{}#ci'7On4+{>L砎He0WGAIq8=ζ}<*]2)Y%)%bkR._tݷ^~ve8|8%3oB-_*0c.£e۹|"<:Oz~ W"6.7bdO'w3 ^(ܨeg|Ɛen3gd(<"6m 8߻C\ٲZ Mp!*Uq{P8an8u%2KsJ;9Lkcl>/J*0g+Z >λ~A ֜-Č{i'׆&L^`s$)_Շ킙h e6y*5Gk]? mmyRTpZX@P5Yuu;vp#. ;kǰWq)QYKIKiӰg":>!iL_4Z+T]:M#\OLB*9y*LχJM C;iGڽ3>_WX$C" ?O7fBrh}a{!15c{BM_mztɔ,0ն |j7`z}vhV2w 鮂ڕ=Sp#o h (N ?7t$)ѭ ^Yw7C~bۯP7L^_Bɶ5] =(r3z y"zl" ԘMkE%cmk s9UGM\\HJLpuIqnB!$Dچ zNL.MbV{N3V鸝%>Xr1bJ6CĭTV qUb\Pf !xb7EvN-ZFܼ,b Z-Ԧ_4-:>E#U ʳai1#%L+o_B(szXtprBň";'WTj?j7%^f2M! י4Mq'9M4{sqč$Bm΋ž+bSMg>.FKd1EA1s*lSqI⥱ߋ;P;l?rA l-G~#.V8&y+)(JL|QK{~Y9Pً*=CTdf K6+15{0V/({ Ŵe;BħcӖdNœgg`D\\V@#x΀M&s r32ȼ}lN̜݈&\n?}[ԝ oWKK liunZ/XX@Upt%6ֿNjzԫ͑7εkMT˽4'oݧmKSYeKWd`W,"!5Ļo)SRyakcE|JWcHSdѥe],,JT Cv<7z@O<݊>i.$KQwѭVUpImΐz+ eKQ|Y<\HN4+߂`N EyStmQ;kaiiaV;ESkG:EIw)Ĭx%xzMre]ً##R>Ei[s9USo-4-0'K sFh\]ǽ{+͔UM6 4+Y)XZZ$Ou.\Yf(V/ L/evnY9F ٽ 6dЌUZ[-y顺3zq~$OBIYRXZhc-䀕i~JQa|Iwx] ]*HpW4cMKtRV>zW(lxpڬv(,QXlmSJZw(کNfQt)gNA*IPlC ++͢{!@&z񠎍NNr:3Vd}Wh)3 =9yy(9ڎ&9=20t;|(<ظel0м5~fǦh۰V bN*sQM:3fqԦ#5Ҏ%X\]* dq/s){~ɸst(e0(l(*Z-.mѢnnM3~%~p69= G"RIP3ԳJR<]Th҄+k T*Ο'<5@Tj5B|OItkemc(srSc<cxl/9y\khRǟ .Trg]VB* W4+߲ΥZ)ԩEBjz@?xumZVVX[< bNw9JrfaGfq.WsdFnyNMY7EqI?!K0$Ke/wʻ:P՜MLBj+,DQ`JQ3EQd1UۏTʞ}нU}iVh}DO-8Mjh_"UpG>m%eZ]u`y%Ղ}h֙+vfIK;2fiXG.Z[q;5&H'Zjو[Xev.erܘ,ԋ!,--9>[;kݱ̫¦Y҄oc4Qɬ&%=Q_LzgԶ}?]2; >];6֌ւkKQ,_k~|W,G+/c+st(e00,Jً*KAp# fܩ1C>[wFŘ=ڷO~_iֹU%c}&...W7wޒ⒕˫Iink>jh\T}I$ɓE|9+5M?yU%MrR"9yxzz@潏J DF$#>%a]=]ͅy{-ݳYHD"y2#vsFD"yޞUO iI$D'-?܋*H$D򄐆D"H$BbA8yc711իTꞪʟH$YD 1uN'g`cӦoЀ&\}1[d]z׏ J"KI1cÇ.a <q&LœH$乣DkR._ؕ-KZd$BŅ˖a%K80j]\$ϐÊ+Zn͍7x"jzI$DlR1u^62}:.+cW,4[4aTՕo2!ebbڙ5k*UTRԨQ[鉇K,Ѻ_tMDjعsN>^绻;nnndee r׸/}G͚5ӟ|2fO"H$yvpB&\YRt<.ѨBĉ89Q8T٨ѻ9CP`kkK͚5زe :a,X@VVOСCtؑJ*Qvm̙۷A֭ʷ\r\xJפIbcc}zJÇs$D")%rXSIz !!3F'S: eBQ;v};6d}oЀK"ۧ5j0bhݺ5bŊ:aj֬?۷oծ c8991fF "Y5H߾}Y~^'NPT)^x=L/^lt4M"H$a aX&w7>ODEEʙ3g|o߾ݛݻٳg={$22RA@"H$Drr({ߕ@V*y6e޽zȾK|8KS"H$1D"H$0#boD"H$'YSyrH$D"<Ո_:NG*qC3H4Rw%D_P%q˧bkJV_ҷyГ|>3◹_^͊RW+4Magc͖ICQS"H$XvMn|0=ùD2G T{5|8Rj(MGΰE]i2N kWY;|e?s gocM)o&H$'nΎ~uBho˹8&4*F (tSN:Ni9x0\gbWעΥ8u%U*reilWF|2o/.DPדq8p!XrSz̕[d6+7[d_4MQ3>gL`dd2u.U7T8bкʜ\61)֧D"y>)@E2|ATj5_m͖IC:TSc8r9̂{ eb+:nE?\K3ZUW9n%7$ШJ%,--ٶÈa^GC ^aǩKJa==vv06-:5o~yĵhT*Tbc\̓{w6\zt֏#TV v=XA>,x'A}‡ө%S'Uds:~ *2X*p'5ٛ1Ju(egKl]frߎ/,6VV|>3ZSDDgJ 1,@Y4})};i4<\_ަno0~_:#WBҕY\ÆhoKH5?2sŽܒyR蕨u :.DDt}+^iֲr"էD"y~q':ОX:6ǿ+`Ͽj[E~Z7R$z\MHlymc#oƚY6>Ջ#/֮gy{\g.X N\Hd|2vŖ5bs`ȼuTd_8}=QۃcWoa Ex0݌Ӊ;Fl=y7r&2G{[<^l^rX@{1;st%;Oņg֮ϥ=;?y_W>\sQqփA5UOд?lRye"050sRJ\K,Su,w;̚ ZԪLؽ-~HTBNvʒ=G͖אB{.*iwѤ7eDf8uIa,TjIu?RJ.ߺgB[q}T1+tjX6 mXϲ.,w *)g 6&VVK5/,,,s1Zq.1ͮlh(~ލ+32KE}g`meɏkĵ,y{[kT{Y̍;ItEp95bw5۵wy68ʭ|26Z6 u*XZX0],q!to @5qwql1~=vІע1I$mir,VxRjE`pN[#HEQY7$mڊ7ھ7< E &؈_a ĥiÏ{?yPCtx;}t Â{f؂ [MDWot!ߛsWkGNEq;'; fˤT1;doǂ{2e."uJ|mcTjߒMT=֣o>pp8`iaǽoM8u 7?sp mV;Kv$fTK @n+KCae,@D^N %[I~9z& {o6B@`meYdY,,,Pƙ1RF=4.4xIPeofm't3exQ6nuoկη*TEZcceŲ{o${}s~Zz>%.+pV.{;%@ZfU2J[H],=+epHMƏG=_&V<{\J0Ğ3mqgzj7 C8&+'[;O뭂QdΡaG/GMYBb~vhֆ3WhRݏp{apvcl֮ $tVicۧyCc~k:|BYg,,,r-j?e]HWfSўQ3u#Eab-hv[YZ6X;lȼuyc:׋Q3O8~/I/VPo˻{p>^H22lrlmquLɳ?ۢRyV8r1XYZrB'+vk+Kn,w%S"H~TvrQ+wM&'%g@ d(1Iᙻ^X3аi>N\KtQVةc>%8 ڿN^)1nD{J$D"6)R>3j5..] ;WW..YQotO 2e>v=iQMǠUV͛:۷Qӻwo*T@JJ .gϞDDD`mmȑ# իWRMٳtЁ_|'OfÆ %V!seժUlݺ`;;;>|8:3f࣏>Yv"##q۷۷oStiy^xս/_LN;r‚كk׮3:ʿ / 77WZ&88~A'::pAmX?$N|yqF=ݻwl2n:/ƌC޽*Hf;SBj5]ta…XUV齠̟?~I"w5VJ۶mP 8Pߟ;wɴiXlYYY2w\իGJI AW!B|͛ Q~q?qBL!4}}P(b|!4[>}4/ ѤBT*Ď,Z5!\\0A;;!5~11Bt$>>BYq_JuWAWW!+,B1g+j q󦮿w5j fwqrK6b}ÆbG^B'nDkb}ÆbKǎ"AxQv=_81}86eA?S{8ŋuj(]3g+Vzb˖-:a}}}E sO| 7o.ʗ//WP!ܹs{Rlc;&U&J.-&N(t%W.~w믿.̙# ~qQQJ)lllĹsBҥK{cNJÇ빏5Jz4ƱcDfĐ!CDzzѰ bذa:~㤥 ___"ju ! 64[BBBq?J6l( ݹsG01p@1{l1`ѻwo,F)VXa2R)' & ߊӧ>>>&>99Y :TWBѸqc~_@@8r777q%!qYxxxO>D.&&FtI8;; &!p 6VZb,# @̚5K'''ǘ,Cjժ 1a>TԷ ǎ"&&F!ĬYܹsGSNՋ&rss7mTGrssN(1|qiQ^=?t.Ν;'Ě5kETTNܤ'@G3`cq 2j2쟜 0q"deAp&λBPn5bb`L[~K|{k0J} ֐}߿{w$سFk+prc?]+a|M^0oF&^7fRzׯg޽03_d<8q"YYY7Hj؆jرcIIIƆ ͛˗IKpnjոy&OLJSNqMVʍ7ߟwy8T˗=5k4hunH·bƍ4mڔwyKd4mwww/^̊+tW\{'2x`tpww78OtO`o \fkkˀptt4Fݵ^A߾}۷/AAAL>jժ~zʖ-ΈhA : xb*T`4lLL +V4gkkK-ؿׯ_OݺuIIIqƬ^kגQ`CXYYiL4իO?yܽ{7n޽;$%%gF͵31?S;vsαi&>˘,*}2~xRSS̩֢m xbpժUϚ5KyC[o7DJHOOgȑlذZjEV?dٲe(J*UdvvMԬ vv[ ?f -p,XZBh(OYHI ŋp4̚66un:@Rʕ5ƘT~~pNeXB/_7֤k.9ii9~hִ_~V.d޾Mʕ+| ,,-jGoon;f"KHHxxxp9BBB>>F?k aggGRRC ߟ#G_!(0NLL #00Lxx8_}ѩ4֭[Lj#t'%%WWeĉzk BP\/ܣ  IDAT eԩ 4__~-[rY֭۷͒4ӷCW_-p]Kll,J.x"Of֬YPF :t`r=xgok+++bbbLRPyYRRRx뭷KA}kaEo[J˗i֬ԯ__NNNz/\rAa6o |hܸ1_e֬Yڵ]v1sL/^̶m tut q DnGnwc$%Ar M3*۰ ԩe]80t,TYY5ݺQŇLLK=;%+;;lws#;%h="BBB8q"Gˋ={p-1g㱲"11\4 z+q|@Af(^BBڵe˖-pb|lذAk9::+IIIL0'''~l2hV!88SfM#Q撓믿ѣ2:uk׮zu˜9sXtiigff;Q航W΅ ,]TkU\`z}ݻt҅xIHH`4k ///233͖ߜBgۛ+Wa VlYT!M+(? ~E,Hwww>p֟9o5 )))M6ѹsg0׮]L2)T^Clݺ[n?s Ν;=Z9CӫW/VXQy,+49_Ԯ sh5LnSa>n 5krr4ڟj-,7oB*qĻrEɓ5rj5G&NɉơFmܒ.\Z{$_-==)S*/!/2)/w#"NM5VV Uv6BF՚0`ݺuoߞ\Ο?OÆ Q(RfM@3 P伊C:upssӮqnR8;;cee]ԨQ#=JժUqpps|`\\\hҤQ|V\I-ZU*YYY$19K Jő#G;v,/={dɒ%fuj]vѬY3X`Ѱ_|+WеkWB+G;|굶&##3g0ga4iBrrv ?3(J&Nwqq)pMڵk ȑ#ݻ wߑoK/d 4}N||<666baaA`` +Vd̙䐗ǟIUrE3`2^A+ d1G֩Sggg{8>՜z1ƣC‚P͛GJJ saԨQZ4|_4h`pdqz8q^^^ՋC|z}. Lkf,7EϞj/w !C૯4#KaaG4oƀzpȯȑ (~ѴdgOI$$@۶k5kR&$u0˨;ɳ*wFVr2|4\*Ww/9DŽX}r43GgDLժT҅ڶ ߏu"Wׯ6#6n'PGA M6Ν;888PF FAPPԫWŅ!00BAll,:̜9FҒu1p@>#FNCDD:*U h(Y[[k?> Ņ6nܨ58>HOօ 2zhK.e… 7ZťM6\x:u+p%\/?g=}|| nݺW_}E.]]baa?@ǎѣuޞ n޼I޽xyy4iݺ5]t_;0666lݺ^zzj5k իW7iˋ^{Ν;uJ*U!!!|wԪU*UpIhѢݻw7:Y>ˆ xuF>̐!CP(x{{O?i~WF=.((xԮ]RR%,,,uK6X~JA#Xno6Ԯ][g=z1ƣC /gϞ̝;ӧkgL7n\#ݻ(JgO/_^Ν;:a!&...W73$LJG\4ƀ#iiiF)= |׼k&wޥhS\9jԨavvQŲw͍- Yf{ʕ+(J䥗^2zn2F|>|pT* 61f֭)SSQQQک+++|}}СC8I$qy*UT _.]ؼy믿j*rssiڴ)'NԋL=~ lڴIo?@rR"9yxzz@潏J KbOgPyVw*WLYp!V2 Z"H$O'J{{{ie!YYY888)!X$S7t( 7n111dggӾ}{W <2nٲE{r.h%iРUT,-[ƲeK^qqqՋ^zڑ̙3&]zU۷ov;vL۶ݻ;w}R̸ڵklٲŬ?~Ǐڵktp?^}\~d$ٜ;wj`իWk?R޼ywBɑśoY<:vܩw9(J222طoYm_"/O")B-_v-qqq|'z~>ޖHFIvv6eʔrԨQp6okFVV۶m^{JJզSB0ZC@sɓYbjbѢE7c.UVѱcG1P(1ׯop~ZZaaa;vT*T@׮]igEN!W^XAO@@Qr!|MfϞVZl2L/{u5j T2e 111z_z% Ĺsر#(J;ƍ?MʜDXXE_}!@V<[? --MyyydggR$33RJ=srrr kK3>>wq5m4GRȐ24 ]TJƈ4\\Dܮ3\I<| I) t4ܳgwΩNzzuku^ggYχI^cXbPxx8d%AW+''7oqz }}}QH`` 1w&k-@||cG>UUUL:۷oЀrDrmjll, vڴibYPQQ7ҲcZ2MQ̙mmmGfffҒs[n$_QVVBx<8⠦}4fuK? tJ=>11g:u pqqP[[~%%%x" !CիW(..[SRRw܁h+N$ej_qyVVV(//GII Ξ=\|Xv-^uu5~gϞH/_ƣG<'''Z]vѣxYu0o<]v2e ?opqqǏj**ϟ%DuDmܸQl56޽%K`ƌ2eԶvUQs=3Ĥ\梾AVVOOOX,L2eeeKzz:vEEE(**BEE8~8555hjjk͸OB&C͛7ԛs}}=m|>Րϧʯ^?̙3p8x^~+Wm۶0`= ===ڹH~Y[nXji[^~=M411QީS`ee[[[dggcƌI-i=|V۷[bРA,Y-[$%3(}Ց" SLATTl6>^bQj&8fϞz˗/' w[x;,n }}}TUUb3fDFIw A^b deeQ7op! vɁ%ܹCmkrZ pDnQ%vKKK$&& ϟ?ǥK '1ݱcPXX8XYYQbeeez*>|HG iH)]|V={`֭@{6i͸Z׏ៀLXqq1Yv̘13f m޽Xr%|}}'޽{Cuuuz:u>wRm۶mÉ'_?~ůJ>yҗMZi_}CKzkDCCm6;%%%7n:#))С.\ ݻ @ƍÚ5k$f"cǎe1Daa!bccAs砪y!!!aaaР4CfСCΆ9\.phiiAEER]2e )YQtB?~?V^M;vܐLU)++ pttmcXb,wRipHMMEZZDפ' ޽{QUU?%/DDDHt6&""-ѣ2sss>}{1兮]b=%cʕ%Μ9>}Ï :k׮ڵkWWWJXuV|!<<2:w 999,ZR7_Dff&!TKBannm5Z^? 2bl62Z 'jDFFbذaz*3g n={˗/ѳgO|7‘#Gk.4@`2#vZߟ|/>} %%%(**x]Z1HMMř3gZ7555MQF޽{bX^Ĥ49@"o޼ׯ|raڴi3}vٳoT_H4_"cݸxbbXw0gk׮ױ~z$%%I} [[)JQQϟ#G_~Qꥤ`qxzz"((HF) Ib" |10ӐSTTfx<"## .h}aaap8C???ҥKbcǎQ5kJKKammI&رcҥ7`*J8#7xTȑ#iTyy9>| VP---E]][mmi0T])i*_HvvX؃V!&*u͛7Ob]v6 ͛7!//vvv›7ow^8::7l444P'OLUWWcΝ___*H8f{JCUUU7:33SjS !fMLLfD˗/M룖ruX>֬Y#uÇCEEgϞ:LLLO?Q3!ܖ%%%ѣGx< 6 }q-}PSSz部(8;;#** yyyB I$''cŊ3f \.81:zhTVVٳXb^]]<<<\1, B1|x{{Tŋw҂uuuQQQ!""b7ۣʸx"SȫW)vҢ;ߒE]hbOHΝ"V Gk5kၸ8l߾ɕH ++  hBLLL7  99ޔGqZUUrS>L IDATQ'//#GJ =.]*1=CIIĸ)QbGcccdggS^#GP !!HJJիWѥK;IW蘰 O?It'N **ɓ'077f9\]]i '''ASb޿X7CCC3>D۶mѯ_?#22>}>>>ذaccc*Q3bڢ$. . eeetÇGddkhǏ/z ƴv\_֎OBRZRL3}tr]B!ݻw'|>ڦKJ|@89w ȯJɓ' 'O>%w!<]lz|>o߶HB!{!{m9r$IKK#?&;wx C IhhhiddDl6%&&&$--^SSCz!n>}HQQyڴidҤIښX,|%:th'ՕVH8@!dժUO}:@ uPP,YGGGj|%!_-YSS|1B֎k@%㓁B&L{`8~8={ݻc… /]KƵ,K',"-!WBAIIIΖghvŢ0tKo_Rh6& .c0FCL&_W1€ 0!lKw<0ោL _c```````` 1/ //n!2b7nMsPU>|[!]]]|6[]+c⢍ n4v'( _D`` *ٳRE쬮͛7Ŏ߆,J'+5HS|uUdffR kkkHr)((K/7nܠ)ш( t]]9B{!k JxSԴ׬-l17 !bbI= g@&!h7!Zڵs|<_2ʲHeg#n4 XHo`͚5ENKKKUUUdeeA]]fBbb" q1XXXЎ# 2 ֯_ ի(++33&}M6k, jjj16c bu333ksii)uV̟?7ol?)֯_M6tuu-gJofΜ [[[?^{Sۚ#//'O2rhtЁKj̱c,9MwPQQ7I y1%;;;5J9-׽js5А(~%''W^ӑaÆaʕh}KDaزe ,YҪk׮]CLL4Ab5fSq/^@EEiϞ=peQ[­[PUUGe:Gmm-(y+hee%~lݺ4C>|@>}ЧOycɶ?"##W\I륥є}֭[GȊ̆؟*0Yh."yT%,@&]HBۡ!A?#Qoc{!G| ݺuCyy9ׯ_Sy|>~'Z':ܹ͛3n GGG|>_ƹ$^z>>>ϟ-[oX\#:::::ʂ2 )SLj2fQqi:tMtB!ұ#!-k!=zꚛ=}66?Z$u+y/-n˳ѣI6u*),$R5 ff$rRp+.ϙ;?O2v&w/&dI>{V󉆆#[l!=z mڴ!Ɣ^z 2x`Cddذak׮dp`R^oh^JJ ӧ ~~~DEE=Y,166&W^fΜIvEreL Imm-QRR"B\. wܡꇄUVgggV>MR;x{{{pB>LG\\\ 4iT!9snݺI&9s &KKKRRRBbbb$]DMM8;;B!cƌ!$77 ?711!O&gԶ $[liUݣG5k233ĉ !ʈ7'jCK9~87o!gϞ͛7aÆN_ӮgK_Μ9C~7o޼y‚Vvȑ7%%X[[y5b`!{ 4Hbb``@\ض޽{䤄v| %I]]y-xbO***n޼l߾]s #ӧO' , <$QXXHI^^#'+V ҥKT18YYYdÆ dܸq$..ՑUV~Ց{???RWW'Ѳe?M^ee{瀙``n{׼k2<\w֡ >prXMp^y<`4`:׭DL˗籶I ʺv.\>ΟloM[I (A|.1Zo\As}S?sJO01˗9>-Ȯ+*)؝;k|񬬬FvAWWݻwǝ;wлwoDFF>} Ǎ7СC{ aff @UU˖-òeh"բHiӦaʕ?,p*O>x=222t 0FFFx-%O?a044DNNRݻɘ={>|1w.QF6I NBHHPRR]]]|7pss pgg֭,_xx8sΐâENɜ  ((-gQ\\ ==V ޽{no*__xx8V\ KKKXZZ̙3ӧh.СCvZXYY]vpuuEhhTŁ/qqq(..ưaà+Wsы"k̘1|>rrrÅ lDGG#$$ (---V~Il2]8p N EEEjvZR֌j7Ǐ+WACC;vr[7ܢPJӧOOVGrr2%Oi?~<Ӫ =4**ë^%KFyyC]@^[F34>ˁ99` 0=22PRĹ *}}1֥ ЧPUde-pr!!ja˗u8P#_SGá))9nkAٳVVVxMܼyYYYx,4pvvF[ `ɒ%LtZ[zׯTTT``KWSS,\rrr駟%! ʌ ̟?>PSS%%%ԩSprrB۶mQ]] òe˚)//Ǐ?}vmNXtD)>O=HxM` TTT鉠 [Njƌ?/Gfc4N(,,DiiiB`Xw0gk׮ױ~z$%%[nbu>>عsX<ۗÇG(G~~>6n(VgϞ=v^zEż-\PVSuqa'#Bzz:vڅ 6`ŊŐ!C$ƍf|k.]3&MA} JxV "55gΜi={DDD^~-O>aС@MM ,--qiڽX!&j*(&ٓDQѥ)JKΝtǮ7 b± o ̈́S7.A_ې$JJ&A签 **4HS'ԋB|MJP)1xXYY޽;㑟ObΝî]PTTxۚ[4$+..uСCb1brrrضm022\.:vHId]vHMMEjj*G#:899aܹ7m mfRȫW Mŋ1ydZÁ/^ sssZŊ ֔*kH}ws"NJ (Gܹszqqqj&''cŊ3f \.85.GJ={+VիBe\C#ϟooooPQQ+Wзo_Ɂb!99-֯_/f_|>ߏׯ֬Yol2Esss١_~_eq8̜9?Dӧc޼y#44o߾͛xb?^q[;>{ o K^xq:Fvv6V^-q{ff Bx }}}JY+W`ƍ:BCC`ҥ{3glq|`c#99@J_SE `R{MQ e"@uڂY/I3 i}[R < L--4veMM1vi)TD)7R0*p*_]:͛7ȑ#(//ǖ-[yΝ;K.b??! \-%%%Gyyy >} //{HMM=իW066ƣG+W0p\LLhmM1{lcڵ"ҒV`|DDDP !ttÇGddd\:B͛kkk" x2 ˊXlY g"99YYYpwwǏ?\t O>amm-VpvvFQQP\\ݻwE|2llld~Ƚx5552a>744`޼yرcO>r 6Lo۶m1o<+llldꏦǬY``` R$1zhB:uUUU\t 666055Eǎ&ihhB! ZWKK6l65`R344… #G $$HLL EEE%% ];w[,`.1#ߒb@]r]cblp8I/p^J;{˗iiز <x |>/_^ffP# =ggf͂nJ-C'4vJCCCppp$1h ڌBjj*]sN?e:::8p ݺuC=pIp8ܽ{޽)Ul66ԶѣK.x8m@VV&L ܺu f… 1w\Z źu |/>}:\sItKM:gÇT(]QLLLVfի1x` i"#w}2*,յsP%%%@=`mm `ǎ8{oLgLL`Ln%)S\]ӧäsyݻ3K5? 0hF`@NFD? 0 8z7G`}L7w.P\ #]t冇#m `a;zo@"O vYnzySU?zN$ʼnPֻvf4+crrfԛ_+++X,())aСڴi}~+5hXLLLPSS̜9زeK9ٳgcݺuXhTTTh7Tׯ_sdhhsss@T ̚5 ۷.\Ь뮠M[nR ylL  ’%Kb{{{$$$~iM>%@@"@NNϟ… b hkk#$${_f ֈ,$qqqs&&&T.Z7n)ӧfT[Yfo߾ľ}OOOܹbJ+++߿!b`cc)SHLJd|7nz yyyTTTbLj.^ΝaXXX`ԩӧTTTPWWr`bc3999,\SLAAA~w\|YjeYEII ۷ 񨩩٤FgϞapttϛuISbѢEj25͛7prr/FA3f Ǔ'F²e˰a;eee8|0TUUu+))!** SNř3g`mm %%%K] ʕ+Tr8ۇ@QQ;v… ~VIH:Raa!GYI;E"99Yo/l6jjjC4зo_TWW#22,#/^\O>}BBBTUURhhhΝ;iF +(((h933/_F}}=l(CAAz}!@RRо}{D;!HHHwP__UUUhjjB[[Ǐ^TTJRеkBKK .l~Ѐ'JtU6G`` <<<1*//˷Ο?ښy5I2dPSSǏ~뢔xڵk'޾Em<fffbEEEpqq{.]PXagghkkիw=y$v܉Yf!66;wƘ1cJ~z~[nC)))T={ٳgYZZZJ\!RWW5U]]A___NII v___dddmWTTH)о}{1ux!4Fhh(LMM%fCo 6~ǎZO ˗cѢEAEE >`ժUbbΜ9Ą rQWWcٲem?.1Ctff&M?>@NHQQn:#::Z***R Xݛ2ĄI.[^.\&4Ěw-TUU㡡E]]jkkѶm[1AS/_J***Ǔ(bPXXH+ 6 $2;V]]n߾,ظ3 2b;v@LL ***}vxxx| fϞ8hjj-8pm۶ݝwwFWnn. deeAYY”)SPVVFMKKìY}v888wrطoi޽kYhhh)N8AMG%wkv l۶ HKK7BQQQ())M6HIIATT kkk$8p@bׯ֭[gҐ@+{!xA=Ѷ~Y/Eyy9mƍŮ!tZj/D_~ ???9s***Bhܹ3zTUU!77زe 0776{f"..VVV@QQpU<|&L5R ؾ}T ---<׮] %RPP@jj*) ???_QTT[n$311AVVq!_C 9sl6^^^PWW/dJ Á?v"Bkdcl6KKK߿6&D6eee !!A,Hn\v]*gWxxY8B׮]|r8qv20000004 Z&ƶm`gg 66FBuu5GӏCQɷoٳgCvkbbMIIiI"UTTOOOaݺuԶ|L4 >|8N;ށ;Z(wŞ={pa8;Jb*LJ6SU^^.Ejj*Μ9~BjjjބQp=1CW^HKK2#vuA^^wŋ[^ɴ ͛7!//vvv›7ow^8::dٴ'OKsΝ{EL]*rrPVVFǎ1|pDFFR. 6իW2b՘:u*=J|5ӧOb;ҥKV$غrAjq[M}z*9BbR#)) W^E.]0vfW>}>>>ذaccc*>PQQQ&NoA愮֭àA`mm~ mڴ4+agg7o/_ƹsc$%%aر8.z KMMmعsgj͡~ C |Y^^^Xf %WQQxTww}2F$qyף~~~o^ ܹspV^}1bA~:}ܹseeebȑ8q"MӦMC`` ttt/^\>}BBBTUU1iҤ&ԫW0sL$''SeHIIÎ;cvonn.wAuFNN~~~tԉ/^0|p֯_hʕZ4r ƍԔS2o<:u*Cj*Ξ=ÇAW6Z\Ǭ^Z%LΜ9sf͚D"!=={{{jԨAǎbt%''/^p!z 1svT}6;v`ȑ4rԪUKϝ;wϷ~6ӧӫW/ yf={O?(qFڵk>|8bXzͭ[HII!//OUTDmR%89 ŒЦ Š7m,-TZSԶV-AXZ55_?e`b"..pP.^z\MAUֽx!}$ff ;v(˷mFFzooAZUBBn, lۢ ĨרQC-`1p{qݵko̟/̙Spf`ǎžͅ} 9 BƓ'=͛ >P|Y]ɓC+Wi<ѿ…Rە4/%{}2B!XXX… GGGHpuu:oZիW ͚5jԨ!"trrf̘!iFV^؂ ,[LU'~QZ^zW_ *- G $ |-ٳe˖abbw}ǨQJҎٮ]|7[Nܻw=5RRr1XժUY`z*~䉊KXX=zP Y[[̺u밴5t߾}ѣGTV%K@jj*ϟ?gѢE( ^|ɽ{T顥UVQS7]]]-Zİaصk+Vӧ呚J^^h]|u&$1=ZNԩX|rƌvvvv\zQF1uTSuaY$$$ȴi3|j֬IFIΝy ٹs'˗//4SӧyJ=R5Shttx٥K){Ic#F֖ɓ'n T4Y@)xv+ B*K@[w:u9-8ᐖ}ZZ0e }}[y ==7;U c66PdfBDě`:U),ʝep22R*UgR0Qj܄=֭hikc߮&5jBM '::"g.MG.uy&F={ezB|||077ٳg4c&L@?.7Bc100ŋjgMhjCrr2GFKKI&1|vjN...ܺu۷ogqu,,,pqq!''===rrrغu+zؘl233ŋs :wLVJY1KgqXvFs&r9>ub۷EmSSSLMMU8=== tԩCXX-ZM/>]]]5_[[[N:ѣGILLח9sp8r% ZZZҹsgut^_ΪUgƍq}N&M#==P%|f011C\zC-йu]vSzW^Lw:&MR_lbT*QE{@iLIIAW \{Z U)5jci:uDYd qWR~ޙ V\(с,YSu;9YڱxCeyi@jJ qqʿS7@ÆJAнBG#XwAݻ ?/9 . 10P (HK{ $-27QyyyW_=O˗ k.HLLDGGdi5_ۦNW0ij`[Jr\iiih"KLL ... JZ:nڴibllL&cԩЦMZhKJJ;fycl e#9ZsssUlذsss5jDzDXBBM4 qssK.z>7n CCܸqc6n(#~4k֌cǎ{nܹCrr2QQQ|q4SWΎO>___UF^^0+>|YMݛDr ,v⽢p ?\E@{@6|pɓ'Q(-DGGG7ظĶoѣGUhez8|0>>>>|XrssK b} aXp!9/lllԴ9%%ժU#99B6iiiA֫WXA{{{nܸAݩS<|wwwr9QQQRvmtttTMPJ=fy8x m۶qBTZZtCe(,--U8UNk˖->Rccc222TV0GP( iii,_\Lj?rH у>}пoVFΝD"iӦyk77֬YaaaڒJpp-eFGGGN8(M$%%!ɰgݺub?STRCbllL퉌$99'O9X_~Et!FFF/::C3q2M~~~ZJ\:o<Hڵkիi۶-k֬yr9;v 88100sUgq6nܨ|Ϟ=W2gΟ?O ѣХKqmۆ?~-5U.Ç9rzVR6I@jՔ>kkք @) ;*aHÆ`fg*wwGGX$vBOی%&FiDdeB~hҷ4\c{ǡcG/ a\A@P(cb`@{|..<ؼKȎŶXZx?L塤q槦{ iir; KK(FFF899{nuT*%""͛?v!޸aÆXYY~z@Bubbbpvv@ROGGkkk 88ѣ/F*fy111K.\\΍7y&۷|rqodddZҢ{bHƎ+gff2bѷ/_ryZh͛)zʔ)L2aÆӻwo>cccx"1:tGu&n[YY;rà ZlɌ3H$ԩS___"E[[sssMa&f^bbbpppnݺ<{߃!111|Gk׎O?ӦM>#bcc144T{yqttMϟgݺu 8cee_b/'Np Ø1c/BcpMk.77Wc֭ۘ[۹s\ph._2M?‚s1x`FÙ>}:L6Yf;KXp0!ڵ}1c VXAΝy1۷'&&;99q)7nu-Qx gӦML6u֕]*ֈ+Myqq0h\p! Xv[__ضMohLr#G’%JҮ]ektt_R*s``д)QH$J,+Kᐔ:)}ׇ4C…}[\PwoSS9;bL֥O?zb-[0V*1K{NE+f.8:v$b2?G5@29ѪU+^znnnӴiSjԨAƍqtt|!..Aahh… XB[[ݻw3df͚رc100PyI$K.%,,M6Ѹqc233E6VVVIQ*_uVx9ׯgÆ hтÇS&44Hvܩe( ePKXX 4 **ի}*&׿-Zę3gXn-[d2IӦMGL>]%;ݣm۶mۖ3fGqUׯ={62\&OϚ))߮];v,ͣiӦꊋ >SIIIogggN<ɠAu=-^zo_ƍڵcaiiɊ+1bÆ cdggk4W޻wwSΝ;GVV...%]֭3gC !..¸}6ݻwŠבds1;ƁRZxzzL˖--hKtjU[%oj:yĄ@IOO'((/_"177www5-SiDDDPfMPH.]000UVܿ_|p}UV}vӭ[7q,{aԩn???&N2ϤI \97g~-[ eժU垓ɓ'3x`qsse˖L:Ug„ ܾ}[vcǎMXa̪VXAU޽ٳ'l޼cooѣ0sYtuuEMԩS]6~!@.3x`xg2ŋ38V"99kkk7o;gϞw,[ݻwU?o_q޽)((ˋ={ĉ舧'e)((`aiiɰav3n8:vH>}J5KJ$ؘ={T{Ԕd$Rvvv}< ONJAo p _ڵkԭ[[[[֮]˶m E*]CϤUkur\E󓗗("P(jQA/q̙SrݨQo{nO<\gkp>cAIk[0(}xaBV&??^yT aoGFJ*J*'hsURI%TRI%TRn񗄯J*)NA*JTXkҤ gcS04Ë\? ѼxwC#~ﲜmsfؖIi9s?;wr\VfM~p;w^~' V}UjoKQˎٰ;@OdKbb8R2gsx2w$&fe2ΝWxeK1Bs̸Jԩ̙U,y˜?M8N_Oñ`t{d]6cvcŊao9II03{; CC__sT.\GRR&={P.\u)͚ <͵kTG5G$OOWq?x{/ cc}~ {Ou9U/]z 8-|[[ >@UV鋣6͛O1Lx d9r5.u0lDG''fSjʕH֭; WL~_|х.]ԓ]ɼ$͛иq->}psOA[[=ĉ0a3MP(s1}.e8owo6WL^f֭gq~:áiFn89[j 훢VwT8EiZ]hSΟP)J@| T<OK*R7o^?묒"--_3ر+t\fuv_\jǦ|u$&<&4 C& eNO`lT֮ӧGqc^2MdvsFlAxm48AAV AB!_|TK#9.UBʏ?3`@ ۷bbW JA"?~-Sx,Kc RS_?ptԜv8Oº#ϊ ;}[uuȉ( `K#ün5d>M&I9-6:?MhtZQ[yۚe9}/ (U '"b [^"0YԬiŃٳ(Rwc>7ի ڴqc8;׋Wq<_ &(߮/?LjKرܹ(7hi_bzW-;JTO88($ӵ.J\..ՉIŋ9xpvvԮ] TΑ#7u1~7s%(N%#:Ti7Λ3wrSZtVyU]qGϗp\.=ΝDE%P9(}֮aÚ|f$$z4uHf]Bh"6m:OTTXKÆ59r+R0DZZӧo'..}\~5i#ʃ WD2bDσ4oޙ?Ji<~L=9s*U$ԓ^r<'NT}??Jժ%篓˵ߋYO5!EO>iW  [weTLMe} W,BB"X =ȭ3<(+/gbNن+QT1Ŧ)y{wݠ!ױ&%\ԽJm#ŕ{9=}w[FńGagGi]1R\ }"=~!VWŹԮ]CBo^Wę3R Odfs<'11,ҠAMz~7JN ,G-H.HN΢k~g#(ho; G_mxjVj|嵠(-T*/4^F YjfHMx4nmT^FAigZ٥K07W+왤Q 0blm-<[\(YUR;$Xh_?/^]&DQRqr&6֘pK.]@ԩùs6(8g҂)Snܿoۖ;w==nnYx{'pUJ[7SS66ԫMfo<-[j3uC\]Nɞ嚏;6}Lg~ȹ[2]ri=;xFJSKnB&iuRkI KBQ dg~( Ա \/saz(qSoM_pDD4 F<{HFE& 7Bc500ŋ2%) 99ѣŤI=?J;g¯*e..չu)o?:qzƸT''==rrٺ"z؀R67cذX$2rs ~-ʷrq&MvH8<<ٿ*U4hXjj6˗ԩeayϗh^}4RR4ҔFttx>xy`n^KK,g=MRjkkQb]LL2~~˘2GZ7AWWG^>| 'O*ƍ>0 A|/L҃N"ʑHdcddceLQ^I0`;w~Y=:1jT ݿ?޽[I$2t7Λ-btʕ10ߧ6---~̚5ܹgVd^TdwJ{77bDRSP9:Z!+hƍ߯.E녹&&@qttKv&hikkMȑܻ3|4߽CƵK<RP Aĉ;݁~+yx(;*ԫgáxpp()₂JJ/IqE^JB~zhu"ddgg]UHTO}7gAx(':ڸz/pX\$QIњ >i ZZTkyk^?-S36%'NݿFy iv(`PhZZ(d .OOMhjӼy]{,XП Α…ȑkxqhNfv+RUfNrr ii9իgGll ԎWƍ'tތ:ul8DE%j_j@N a\oZdfU|uuUWA>*N cqUg8{J\W^HDD,-c10ãz![ׯ LL IJd͚Qn튽}UrsN۶+122 a o]{eRT.UҮ]} U ڳ'={&2#M:6z~/yy2=_}CXݻ7ǝS@3J>  4mZzxן%..lGNNh-iSV5¢U/^(66ܼDOq+(? Ɯ;= Çw`t6mfBPܹ NN\3gaQ1R9~C̈ȗjc+ kk32IKS4iR[eڍQ*ŋd2݄nAj.›XXszXD[Z`ӂGo]>i9cR45*Pemmm͍6 u 0FQm%/;h֬藩߯Gjj6vi{:={_QP %/OW_oFju}0c+V sF<~OYx+ɖSfq㼩[׶D-<v ʋ Ъ+^e`d[ ҴtjԨJƵމY}299ť2hOpal[bmm-vȐ!5k7cv@O]"+TOXNjW07Su"J;u* #)n"a۶KL| *Y#:ЭBΞ2 `HKxZrs 9Z;ikO[bƍktPڵ+qs1+VcĈ ";;_\O?pvNhSi[>SvӳgsѸ4vmD6hkkCtt2w<СjR9~닇W>a`G^RAjW`„DG'ѳtޔ+ :{?5GwO<}}%ZvCOOWW{zRbo_У" d ͛덍 8~k}nƜ9{2qqi<&,l1o?{8; (59v6ǎ%Sll .8;WeKgbcSB(g\ ^a^󥘘 "3s['#dd䪘jTx9Idr/>̙oD&ƙ*wc8x:R92k"::Çoe*::JۻI~zzAAx2\V;`eeVbLΟ04;;K"_ K R ޅGw)梨W;psAvv>ҵkcyx8Ѿ} rr 8yQQ hӭ[))YKsyfflz;.ի 04#..<ьJmߜ9{嗱*- }Rf,֯?Cdd|Q3_JB\AuU9|&ƴm[}HY,aaXZ3l₅̼R'ЧgfID2(ث2dE~W b3M:/׮=n][lm-X۶]J+H$2љ]cIVL&GD"8ou30gN)@FzCn&OR%_%<z41'O]C+%SIh6cu{Ν\Kzq>ۛ:XZZ2d;wJ݅ HJJgϞ>| .hV;Ɨ_~^: k㪬˾ ) :H.M&*sib2Gf4VZ$͑DMrPLVYDq.\z^\9ý{ygɒ%,[ WFF$$$@UUeeeƒLΝjh$_^^ZVNCӱqF<Ȑ!Ceĉxxx0rH/^Ln/#b׮]i&NʠA &c1ebbb =}|AJJJJFFݛ^zb>tzz:cfi7of,Z,رd]VVJ)ӧI VVVP\\l׿-'L Ucs(NԖ-&I*$D3[)5߿ߐG)`** Vj|wW*0P1c WGݕ SjFe={A)//fPYCZnRC(TPR˗/[T׮J)5lR)ղR]YR*%Em y_l@PzƎU;wٳUFRQJ_XWT{LU)r'ԪH~`uqn|Jmy꩛:r9>A]Z 6gX?nNy{{ڶm\]]UxxZ~ɶj{*00P CBB̙3U޽pc+̙NS[n/##CuAy{{DlrϟW*--͸nܸq*%%E(@]VݻWW*N9RFy{{]vL۷o4^*odڴig1Ygzf̘?0ճgO5bkg̙jΜ9pgΜi>##CEDD\R~{9+4izwժUԂ … UNT\\SÇWVˣRgϞ*%%EUVVbsNi]~~T~9r4h>|ׯW{V}Q'OV7ɛĉ-.jꫯ7|9RYYqO kΝfϞm1J2;qD7JUxx] U^^F(} #6}:;2qQ ;v@b"\o^;7~A[,7 Rx]=p [z;^xJJ 9BBl瞃/\xx3rL #|٭a|ña;{JϞ/ NXA?dD h۷D T7 E(nz,k9ptӧOAPPڵ |MƌCYYVb֭pEEE޽;vȵk>}:ΝV!,嫫cرL6bt:YjN,7ndڵlݺ -[?IBBI0 55589Y&M{IDAT,X{=lnn.m۶C=dVd/:u3gX= ^iym5tΆ*<&NɁÇAhoQa(.ɓ!q4C3s46l-}{C0:Go,K6jYKBmۢz|q?ٵk4~<^ s.Q|.A!׿=0Kkoͭ C̙5kh?|8V@_]⍎oeرm6=Jtt4=hgϞk5:u qKCcNpvv&77P;nlK***(((gٳg 5  M$33ɓ'o> NGEEK.eذaQ^^n3K.G1~xϟoiٲZ*'@TTk֬! qƙ+**weM^C{zN>>>b9vezb=N>OھxӇݻw5=}4iFO͛|2wy5kU^!~,n[ ~V evy\ O;z5[ϰޖBh0jeKd)**KC ^^_jko,yyШ[~kg ZYkʂWuvFq}BgV*.c٢uvƁd}uŷ[7߬hٻw/lٲ .+V˗jV{MXϽэjM/??___c-ZhGpG7x?X#NMM -[4>8c <<P O2Xy/07֪izt2Ojo_۴1Ժ?5n>n, <l8:XlλT4D8 ]+,ĹQqfhj*ux022cǎe^}U>CINN&'''k.ӂ~~~fNwn֭[SPP@]]b>p:t@NNJ)`Ю];9y$zЯ_??WhӦ /ǽp[n)&秔b֬Y 2gTWWĚ5k:t6YYY<9Obbbbb jx"#Oݺuk222ۺN:Ohh(c߾}ѩS'ƌ6KTT 'Z(,,$** _+oHޔ$%%{Y-/o ,<cz!y`:dspp &&yQ\\LJJ >1 &0cƌ&ͦM:t(CeѴoʷ$6647j)-"))1ё_I&l|?///|}}''',|7fgΜIyGb G>J5k1ˬOa+VzjfΜܹs߿?O&!!!l޼C1eڷoo5x;|0-bƌ,XEDdwXD)E7\lߔQ`27;uʼVw 5K+V4] \] T~o ~+裦TY |wS'B*s(=w]?ӫVqQg3W˄51B#VTĶ .-ū}{~;k',ukzԈ>6/F؁F_yi.XMNI}QtٓWWW:vh 2֭mi/2n8\\\HNN6!4 +W$>>^zg}gggjΜ9c0Ahh{TTϟϓO>!!!^Xc+mͼV6,Y^zX+gc&L`l۶ ???&8WWWYz*'N4[[o1j(̙ٳ5~III,^ӧ79ܹ6#GХK~~~,_aÆ1h cMUTTݻwx7xM6W_vzo~Ò%KXnÇ M 8qO?Ԥ؏}ݧOO/̀(**b…ict:RSSyOի:p f}@@O<CǛ(qFիIIIsE2228tİcZ7qߠ{a6l`͒|ABCCyɱ?;'wJPP{/nv7\k׮NiiIϟʕ+&;v4u'=z{׬[D:vHyy9ׯ:kTT?TTTW_Vef2bkΜ9'K.eh4ك /^La$>ccm&0o<ס r <<<2d11164"=='N뉌dՏh*.\ȡCaJKK 4eK\\fjF͵kpsscժU2ث#nfo Ěp܊uoh߾=,[.]ؙ])_ p'UVVjW[[K]]ݏ?f } Sn&A:NII&M /`z]>QJŋHwSt:t x/;&tuʼnşoķ7{Q=r&!&Jxe=ud}rkjzRJJqw3 B,JJ8iaʇ'G ` r.кmZ- uuu_!kz_"oRX| Ƿ5uGO z=^MLi>Bw[lCasx;zvpsuArR>;d}Ӝ!Ct:.4YOwWJh4:Zkqh:mjB!cW8;{x&c㌧и0#8'cE}?}J*U3o麛>nYE%>'PS8TixͲgiOB!~:n ӝGξ j۷d:VUMo'7W K(-jh/Zx{6yC>Cδja0>JJiWg:[dzn=TN{҄Bqӝ[x{51PP|GN'QVqKEV^<}.SgsxOV ͌p)/iՅquv2>5ra }'|9UUVw3`/{iM !îIeI!B暼IwB!D3@L!H &BL)B!nB!h& !B4 ĄB!bB!D1!Bf"B!D3@L!H &BL$B!h& !B4 ĄB!bB!D1!Bf"B!D3@L!H &BL$B!h& ~r!Bub5?d9B!~njE/~B&Gp\lxReB!ɪkKer*k5b CĦZn~B!0W!^;P3rdCuY]}m}AJ^!Bq"C0ָ IDATxw|m靄P @I4QlH)*M'("Gҥ H@Jylv&&l ٹ2ws@ @ @ @ @ @ @ ; +@ @ xv I/V@ @`w0(|WPRP @ v֭[N>=W5K @ңG%!@ @ 3O,ȬZы@ @7 §4<ŴDԪ%P$ ^@ @ xqƠV-za c$I"((T?NժUH70sLz-f͚D$`RRR8vUV}8!!!EN޽{|G;v Zܹsׯgg V P[ݷ_|*j+Vi&_@:u`0:wl j*NƟΡT*m4ZjJ*[,Qn]ݻ?LƍY\r6Z\z޽AhܤIwwww"oD&;w#| Ke)C^2e **̶h;~nݺѬY3=?STY sP--_y{r>c߾}V g$zٳppPQ~d2Ν#l/v6 2:y3x 22JqL0tf2ck8[)޽?mwիGѠR\lE\Fh:~lJAE>\?u1רQd֕˗/PZ5 Y{,Z"))ӧO(WCGdZ-`ڴ-٥zOIdzS_>d+V-:囈w;tH~GsTRkRbEHLH4][mÇ;`qܿ[ŋzKLm۶%LwFR1k,^|E8HM񃃫T*y˗3)???vرc8h ]_VXAdd$^^^?[j} Q)U|>s"#V6q-777dtlݺ˳e]kȼh۶) .uX:;Yx1W\A$ZhukϏ .XLXnk]|5KV-[C(S -[p~9 .h筷bĈֹ4nܘUW/s nܸN/L8(233O-?mK=Lէ]v]64G~jwߋ=%+ Q ɭŔR$Io58!g޽{XpW0y{y̟7~neSؘXt222L?0ű5\QK փP?\AŊIHH`Hz WWW6l@HH ?A`_{.ڵA|>sƍGjj*oZ 2w|e=j4K,ŕ3aZ-xxx %5#F@fḺ2ozK/q-ڵk[ѣTXÇo˷3V3Z| 4؞mQ8!QTY[ا|,0:._2Ç(Wjղz8p7ovZ6olSaÆ5~~ڵPrc.]j:oYfpz#=z4[lᣏ>B&iҤ +W&,,=z0rHo_})KΝ;'88/C… l޼gggvA2ebɒ%ԨQ^ϵkט7oR?;}54h &M[.6l`͚53\n*CAluh{֭[̘1R  Ks_? ֳC$222eV6^ɓ߿?qqqٳ}PTydNMM?v2)F$bNJ^ jϜ϶@zOI+ B +W7np9ի@rr2ׯ_QF;vϳ`$I)`ZO? 9v2Ɍ31c[pׯ_G퍿?W^EI$K ˹B^oW^ݔ1-$0Me2icڷoou LJJ It*GЮ];hj 6NPPnݺf 5[ѣfm-ujپ};ݻw7Y=zdv$ [rL _DDZ___|}}Mmjl7oeߤIyr]njudr9ʕcϞ=(JƎN#i EVRjHr<:ݞƲ$j-QQJ +W4%jLLLrTjS{޽P? wߓ=%(X>-z|qCM޽;>}{tԉ:p?9vC82 dk8 Xf硡דц0ժ^# wfqk֨aGf)[,۷n%6&zjT UٺwJ (V,_NjP*T 6[3/~`Eܸq>{[rաZH 11ǣT(Vj^t)O[:,\ .e+55WGݗ۴n͗SPbEN8]B&+R6Zj5;g:CiFoAi??8@*Uq2׭ z=~JqΙÒ%K e(X`[+K-C)[,c 5۱>X|y\ljOk(}G(S,m (R[رch$YvL d858H ekf!oF_F `L6&.@ozOIˍL&#((gi9~gjB˯ /}4 5jҥKq-m-0bPr媢/E{J:^N6k`h!K #::7ʖ-[ uXddd659uO[$@ Ri%P(@`gZiTZ]!Fԡ@ V%ПA( Vj_#P Tq@ VĒC @ OM,*NNNTX(@ AIlkc*ҽ@ @ (fU @ ?|E@ @ %fs? Tzu]>k4 ׯ`Ѧ HFFo |9tlݶHqWZٳgOfާo_V,_Cc/wfNzhպ ׮]3 >Bk2|G;ڵk?)))\rk9Fll,w--Heٳgoi9s La=Y]R;fj\V>KhZƍ+/l?..~o<~"dpǎѲE >Bxx8m۶5 ߢys>1CK?~\‹ܽMa-wtt4agN mXh{z>l:C̘1+3w<ƎǴSQTIf<;ܿ6 Z,_yK.sbRf>}Ĥ$~gBNtڅ๖-9tEE"'-[]vZnM2֨Aڵ֭1Y+|9Æ-r9ΞeX"r'kݝVZxxzڵm7iJRLƾif[||HĒ%KٴyV#khZ$Iƍd~'Oaz39sfWLd2?;=;D0ع)Sd5;e?ol@pI :d>8֭[熉3g_=>LS9l-\.G$TJg N#%%Ţ پc ?L1RO?yͶķVJy I }8p ;ʁk;yfʖ dt֝ysРAhu)e 4 KF$esaag)[,{ާZ}(gNӠA}$IcөS'qѣx Շ[ns%._DDitx4&R;/'Γѳ+_ 2/Layvm:=?6Ϟ=QF7˟2iD:fԩ_ZLX{1Lb /^d{lܴt~N<ɎLn]v)R$@y6l(fafϞȑ#L/[Sj5>Lٲe ={,Yf̛?VB &&FCxx[TT͚6-ɾ}x(W_U& ;X돒Z-^ '֫[zuZg+0ys|dTʎquuΖr.Zć|]TRfM8 /P`xW/,Y?S3&T*֯[gV:lذ*U*Ś5kMtt7$88Heg6jlv.IyΜ7pAvE֭M~/vfϞUWfDEEѦM'*X a…J.^u^n]nz^7#o>bcb3vFd֬Y8:8_QZ5^x3͛73~b܎?aqMnݚ qFh 2تٳgDDٲeM5jԠs-ƹsfn ʕ\9ج˗gW_&?;-Fz=[jj*۶olJݭ \.GTL=ؾ};`߶t%yt=z, /6'=#CI̴n)||| ,[ ҥ3;w4ٳ|7#oRvm^5k׭fM:r/L19::2jH~-5FfK޽ˮݻ̔jK5m۶;P(,_.QNN`L7(&}>KdeeV\ѣGYd ݺuNER+$I8q Z:vhwpp>`ܹ|hn۷ݧY27ӷzʕ03F1>l`A^.==&M%k׮q%N>SP)ОɟO"LS ҫg/&MhrbfQ#:@kL&38gڴV2(c˓_dC@ (b466wPFuibgvl߆̘믽jvҥ:t[<߶-MϧcRrpJ%$! c ˑdt//orȜ; KBVeUƍOT?G/^lqqqxxxбCuO4hP{Хk7fϞMPP%o`ʧm6qz_#Gݷh4zo:yݣSxxxR-?Đ۫|g IDATq/rY\.Aҷo\Jx%'t:7nd֟˰AVi"wyʁfMҬiS/_;w<мys&OX-EkM,'&&aF-O>cG&Ba򏏏g\K KH5jо];^~M65Pw9~8 8V\er{ȐbZ͐+WXoә0~x x7߼s-j4O PYfӯ?#d2^{ իK\˯խmRjU?U'Ooҥ3`x+'jd?Fa:r%'w/Rܻӱc(//Ks&л6 0),%"Eo *~|]y䉓ԯ_bKʝ׏8}4;vd2p{ :TXwfVyQ/兓3+V֭xyzq%222~:iifqv&[hߡ# ;ʢKnL 6nH۶mLﱽKlܸL ,>e?OsJF iܢp"ڴmcqItЁ/gLh4,ZY}g5ҭ[7\]]\3hTy/dzݺk׮Wl۶ݦ+ۂճ''}ѣ~~}oȐVA:_5 oPyK(Jz~Pj4>Cy-...)c|Jbb"`E hS|AΝ -n֬)W ))壏Fիhh?am۶SJYf5^} Faֹ@~X[ sݷo?,,Lq@` f \bgؽktquuёY}KmҤEy$gZn&<7Ao1OO{ ~0??'JŶQ*^ի\.G&!ˑȐ!IϟgfiϹh???V-оtr9^osnnnfa5-˖-c̙vݘ\.iӦ4mڔ)_|Abb"$k9VP\y4>uחq8q'Ne^ʪի e3)h5IHֲ݃s.d2|駬XyʘɎ;tԮcx78++Gq%jڭ|ֈe!|T*UM0{6dž ٱs'rY-VZO> аaqGƲ~3;v ɐ +nb۶m\fz1jHNF۶mM qIt=' ̿C[-^\(9]?mS$mvV\D^r 4~JƍTtؑ7n(IIع]vqcٿϰ 3gѭ[WzV6jhFzV34ص|F~\WPVM6ohuWR0Lh xv;Z e9If t:'Lȑ߿}I/}p^u^bE$"##pvvf;~W_{?M圿p+T[-կ_ffy|9 f7nw7l2w8i? Ba>nz6mء#[B``ŰNNN|d)[ʢFF}slƤjr4"r*5xi߾`ذ%,,ܹ𩄆 03cW._1X.M-[`xpm~7֬]K˖-rf̘In׷/ڵwҬhԚ<[; ر37okn/^ŋl߶5kqիӱSG9DZVw9f4mjX&{)=?eKfO[)\ 7Z3R}R %-Mu}Jif-ʏG))܊ZjNsr)7n\K.啗_ti<~agҰA3ÇMZRrwQ\}^mIoҼEsGыaڵ;zիWĭ[#Gst:&M_|w%*YBPv|y >Cɦ%öμ7vqlYNms(,@GGG-eʔdGZ@];Ѭ]O>8߁?&6+V0O׌"+/lO~U[Sox->l4dz IYYY?wa JŽg970 AN(@ " w@ @l!#@ a @ (@ "ފYRr@ es|$$@ gT @ Ek @ QT{x>m1l+@@ F,)})h4OI"%P @ (> @ '@? @ V?? ĕi֢IO[@ b៦JFF֠O[E.Tptt|ڢ<I ) ƵBg $/탨GmDJNݻ\ @\;IݑPv]B@=m:Ef R>zFQk{aOQV֩_pLFzZ:OÝ|b=UrP@ /'M.SN]\]]P*-~F8~UC@ ŋ^/smg *B*Q<YY$$$γ23.!!G''ӹE^6g~2S#55Ţ]F i:$ɋZkTX\/1EPѠT*dzU2 LV"G֜ˁkDƧQ݁ۨ< {L]E?xxܰ\~G:yPjuF4|.9qfM2zbokk|[մ'/oYr0]şwnE檣Cڄ4?ӉdHm~2=U _T-GXE&^422_rD ,%!!O/; ,M!!! ˓|$I;w([L 6swwk~hqU{qrz+z׮Kvܾ},LpPPȢhq3~8;9VȤT*pqrAL*?_zȟ.⠢g2iTL4^£nX^䖠dejλ{݋/?-aӽC$!0m.L"1hjUm>)6%˿*(./ӦRdNCJUÑ '7/N'hqgi0a͕y_ j]"؃ٿPW@(+%+LK9>zquHvǨu??By0Hy+]::EOPy$a4w8(8d:qUqsPE%I%)G(@|CĔ7f\&C.jqwuLiwKy2ԠPej Ff4{dp)x{[𤤦8^24\lz"\.hYjxfo\%e2$ \K_Sb#7qqjQ*+W}ʥT*+؇Ji.hS 3Fr7R&l;{,S={:ʅ+ܼK+ŀm~ulb׼-MfL k1*>I lLÊ9 9@77%}Ë~Us.z$=z)w5&jSeWboY] z<ֹr4oDHi,4@" KπLi) @#(*d2B2PqۛSjJ.A)CRnJ("ϑKC1l;d2o‟=5̀3#d>p1lQ;}g%-=ggZMLfѸ<%&&%kr4YY3HM$==oǽaIgZ͠f1*<~TRddd3ãZb!'2 g''\@RP(psuEQge0>%*5.OapF$HҨIUb;8?EކLТADU f0vfbRc ՀLZ8,0)N;ۆy4-ERF_2ФęwCs2_"ݲ{ޖXxz^r3EfJius϶xqI[<|=țԠTO 8e:Ȋ`ĊnO v@{)ȭn.=}z Qq''XT@зJ%e6rYoIXXJZ *`: ϙVǰmHx ysT^I /oCh^IZa5aGDur9uaРhܨ>O79MM"XbJO>j{P_wkӬUf /6q٨uܔQ+"}]-Gb?@ףjMGHHb%ゖd p )vb%'sFF2 VKzz:Z{w ,[4nGEQR%UNsm*^z=YjItrr$55 \;$Vk -#̌xq3*~b,9%J9H-(23) my?dJQVV/Yˆ>*LFsQ9:tu`zJWdKq'&[˕+g}Ĝ!޽{HdHO\@$D~~)eo@rE|Jꊏ}j $ o=VC֢VkҒ֠VkPYLZZIIIz4 n.ȝC$ʖ+o^^\NhHRZu Zˡz=ɏ/\ 55 ))dfe!F&rH#>>779c/Y CDl*ߌcn:(2:^$\wG%.? ڇ>xu VElDI'9=6S0Iyn:m8*oǗlOfX#eHJ͠MseylQJ+{ilZa* Yɰ)Z:5شzI 2IFsBZco+?|uf&+[B/,V@xzc GRRxrϗ0LoFFR98NO\\;:Դ486NJ9˜u}w0/HU֥ۡ {.Q`]hߕ1+Or,{ØK,Yف_s qgHsJҁ}3)ÇmxY22ҳҠh<]ظ`4156|žB2<>W\'Z5n8W ~c#ٟHA$>Ɠh 4 ;0*:Z&KCZ}Y6nnU>11QT8;;Ln}[A'F+^s ɏL@(+wAܸL}7U$i:hiiK @K=eE"q8~*\ e2eB--]i&m:&["9soNn7s"\*{+ \;k4s LIݸ|V f>Y|IǚoPk\ qd6|h!qJhh54Jؼy ]E>@Ug{mm*[3f͚((PnA`^~Es5Xj@m0K o8nV (( 6zp hURaսà(V,k1VzH ݕ^pO?~91YX k`¸ጸ-͏fWIJk{^]7vԼhۦ .^V8~acUBtՖRQAFG)j!!(F%Yf 5 Bh*{e^g53Dx,#u rX,\g_Bo6`P0M˿NGcUȾ^HǸ6ݛt!jbS=&A_'02W !P38j)moS3u7g_b"vlZ!+{7uz9MnA/iIٻ&Pv"q {v}Yշ<[u)ixy[źGօ"synUz<ax}MwaQ-\ˠf75#bMwg$'Hvo<6]DPNp %+!ç;avrv]rnГwEHH,:R7|S0R7Lt"X F)>|%XK]a/:mAPh4QO.BG?;_#0ͪT6%Vj!:: 4,s}=FRDXRRΒ { y`-al+d2?$^Od :soPmVYFZ)Ԟi-[arMZ̅~C0=KKvJ%j4.6t} rKӪ_ew? *t{MvLS½=GOMf[I#wU2R +13Mbb(РA"m۴.9$&z=DK{? Z Ӡ:WPs{qwU4d[5: 7$+βt2O)s1!C^gohhٲGڵҥ% \m+[&-l=4(hh/XQn@j y/7,8uB0y[Z :kCc7As &?lTXX^7!c^qKl ,~Et$$$rYZ2h>2h4$ǐKjE*LaD׈,6?`EТ6چ ˻x[4!N!jxZ^V5,:.>d{)[UeM|ՂhvQ{ mlW$&PVRS@hvϽb:=/Zyy4R6i!EEZԽGٖG#4LڶmUqNAв ,U+>J.v[:^]Ɛr :ڶyƻmKMMUNtt*~ԕ'ȩW?z*di"At5޿5\5Lxpv_h~W|vX*)Bɷ9{;$Űy$Eؾض ذXgHOm,w"Ӆ'oHwU )7-"tI(pYFrrw\ZWPS%_{ t&Jdh4aR96%UVFyQ5"y[GVtD9B|.CѮ.ػQ*˸G]WY@!ai{UMU J`}}vUIWt(B!ĕBwCV^ZZW B!eH+ j"//  5kܙH(B!.3} Za4oތ*9gY-޵kh4Vt*\~r5!Q\ɤWn5$,YPP4#zu6[Kjj"jɵ}ѰUdggWt*\I0Ϝ9c K#(ݾܵ+(B!jZFyyWaF:u rGv繀A"=Q&͚P!^^!#ABQ)ݧ+H.BH!B!pMKٔ3gGECVmVVFڴV:W( !B\zJ'#GUpi+<ѭ?>+eKǯpҽ''|7N85"B+'׾j T9|{%UŖ/oqW{?\.p=|^G$$ B!ĕN͵O#ѡSgl/o~gw[O2Hxy*E!Ww У>i*tYEEtz}c_\تӯ&LW 9)B!]zJ(evHv˖p6LEb!*zҽ|_B!?/"^UP!W}=Ue[+q#i­}B!pL-E~I7RCJLwݘ_}Z6l@Z8p^SZB!(swЊ$ơ,pz}px>_^򋡷/s~*߅mtUR//|XAO||E%B!*^LA` +JЬhQOzCI K cl999?>H^|winW@hlQMI3/5{dE.ϢzJ XI (B׾E)tM9h&dF3CmN`h4 OoeC?~ \LK+M73pnfƌC[ uۙ?'gE/̬h ARKU`bb"s̡C(f=0y.JEO+LA!BTvu[*9:(R-dwi X!8[ z:lڴ#G^FF+Wd tQU VF @ppr5 vεW~ 1[XKٔĤ}Z=Ur!kFBG֭+]XY9}/JyB!v[9fxɌ`}x~ϑޓT?~Rۼy3&LGQ^=fPs-ۼ?Z,5n=z.}V&L@@: !—oI(hbBk3F ϵ纩#[,m6ԫ[WUܜb _j4rsr<*MCod`#B|㾠/Xm-&__ٲe kߦ[n4lؐÇc2xGHIIᦛn"113f8y뭷ر#mڴ`tޝ0϶mhݺ5 4tO:vLTcHڵOhҤ aaapum|+_j۳QeۯGdؤh.S9&e`hXX \MǾbU0Y€hԨgϞܹs;V,yI (BQ?+rhXs۫ `jo{3 ojrp=с>onQg۶m|9}z!Jʋ|<M󛾡_b ,'=0:޻y;VU%qơׯ;vplذ,yZ-;v;d֬Yt֭7l؀`'@ЫW/z7oѣL4 NG\\>(s[o`ĉԨQ5jУGZlI&M6l7o|7n$%%)S8vœs5T!¦E[f-¦ӶqmLlmV@U/6PEQݲ¨Qz"Vbz{GvV꼊4j1ҍ IDATC.l]=w̉_N`g:aK`DDyHHn׉)#ٳԭ[` lݺϞ=KBBSY O:E^^-Zp,3`j\u^^;s /}ٿ/ei  B!*%jU4thՐM ]ӫ#ږFvTlf͚Nj/Ȁ<i4,z{ _fee eѯU_ڷ`hV̞*WK^+βt2O)c}UNj:'NPV-;wiٹsW` j֬ɾ}>/..'ObXj JH (B"8?̊=Dz}KVȺ9iȹ<ն<-R|uV+/رc,\~.]W^!765Ɂx]OҥKkU?<=ަ=+{BQוX?CEjEI[K t һv҅^={R^=H?%G.ZofpvbŇĞŅrr*cj/f tge<L:xX^ς ;v,oQQQ;t޽|z=`ҤIDEE1p@Z%KcQNV+77xܕoΜ9tЁnVˢExG! !C/?AiB!ĕFS1Z&+z/| &ޞ+2J{e5`/ [KѢ.|٨5'aW~gc1AcSRRzȑ9iYuZnͺuTP:}Rߏgܹ%W gvz=vXQ=] hȢE\$~ %I (B+Q ] x?m>wãޫ aB 풏^kņ[E$~3{Vyq@P!Wgb_zcWe祷xOUuàX7@.lL`Ìw=XFguWSN%t͚5ԭ[Kt@P!W*xY6 tʾQ!kƨzxKZB!Dy7n;wd_믳lRv3<[Es"tЭ۫L!/шjEHpP_z<5cJIIѐzj蠢"Cyk֩]Y&̘B>R!k޽]GΞ⵹8q4a!G}tm܆;f_6-6%'Wп^u"""P+5XfME͉Emy!>ŔcYeb`0Xf4  @S/G }/WsFzy쏟(z:7jU(}|i0M\>[T _?).Z:߸V=+[|Bڐ!CZN?kԨP\t (δ*-9m~J{{O[k\Xb4@hˍAhDѐgkh4zZ-yyyX,t:AAA }h %M1; ,8K>§Ⱦ#s}N%ːË>`$ĩ>~y&#-nh237G: n[MͼKj^7& 3^<{f^-LuwP<,>/Gbl<~Wo>_5/Ww痢ݩعcn?_<l7wxK\ߗ2F }-eAQjh4 ";;Nh!j NZqKi 'sgA(>uU( [~?~dɃwh4ޘ> F;Ҭس}Z5yaXO Z|UݕV- m%%#UUZ5v2iTex珙6%֮GѬ?Zw`Á i\P]=$9y[4i8)3C`2|zm/ڶ}}na骏M>R}E_jޑ~g(o_MscZy-޶~L-)Ao208v~8?ՋMDڽl;BFZM]?5f}wBEy~ϯb/7{0:?ꊫ]ܝܝ_qP{~"%p;έh*[YEjߗK@]k9BCCm]HZX,f3ő^<&-cC=lYdr} f;fNyfr3]u<9p4k]5O m~r杨] ڳ` /6<{@H`05#Uo[d63oL4x|(N~Cf{VGmlFj}WWz:3S_Y9z֕ԯYGw,kx]=u7j3,پZK >[*Sӭi;{+|ryw58bլ'RSy_׺+vDU߷sW]qWDƐT.Hʠ^tmb9w)MWWJ|Cݖ ?_Oί{IeZo%eQh462?5bcK-Cj:[@0P'(( 1LzB #''Փ_+i ,?_ʍWwwt;m aᎁa|/.d9YdriX[<ٗ f~!`} m5#^{'`227A\d uo&dDѲN&z}%fOd~ۻ2mTɖr:#,8ģק5Eҳ׀/d]<9c mfen] ؍w1Q{mմړǧsp:4l64!.tߠyswJpVAqw~S?_OgGo+WU dT`4K&q4N|ҦPN{kwfeehv,j\IHH%0""/܍Хq[l6]JhhԜ8ID0BC8z.l9w`j 4"٪(uS6!E>'=TQѴcլOER3m!p)MRl9\VmѿM7BvWE_oz||A8q4Z:1Wsy|Cj_ "MZwU9}<}Z^S+W秦Z﷯>`}:?9Az=FsyY)eR-O(:j?|aǧ-5 z^%OVR/Vkպ$_ no}2hT'wF=MK_<'y E]@jչ0] r=\x7~_6-/qzmפfE"C׷VbmԬO[%şsQ?׮QwG?ç=H>[or:_ǩAtoڎz h]կ>z w z տq $4 _>g;O]]x֠`} ݛcϩCfRsJWo_uW>W5wX~lyĘxz4ʽ|+*3ܦɭ~5JQc >5HS9<^nFEd˦ $5ܻ|HO+0VN޴9e,^e4rsd_TKN>ChXcYvV6qu^˗-xkhA`Zi<Ãno]! 3вUw-]!D%P8&Z/efА- _#8@5O?,12ԩSg ? = >Y|Z{wTYIP=~BO&XD㝄d?igm1[-<| ؇U{7O.9c䴳g{zjԻr,2|x71qL81Q?"XHFnwvȗ#16G?GNjxj2 ٴMhě#6"J]n_>G%!$0t#TcWLFx&mAQz4mϓ&80ՏĘ8KfcG:ᔓ<̇W ;/@$G;~;jꇧߟOfˑݼ󄇄=~OOJ=Ϡ{=;?|EUQwW?˗-" ԯ_.etЊϝ=w8Y7xsD7_1_v^.wDxo #IbFnt?OxlC.)jޑ~kujovZm5O ә7|2/2m|{~x'SiИe㡝L8ՃC7^cyI] %yf}LF\[?~dɃwh4ޘ>س}Z5yaӰv=jՈf\׺+CdX8M<>7盕Y`CBU?o5 XV%z{.mZ#{ܨ YRS>WK?jjbT p/+SFZ+feaD-f72;}jfQ-==;' l|6  IDATS_Y9'e$(u! bΕMg3qpuOl_xNd I,> E&!&s0SG=M$0Ex][WRf?ܱu|(sOMDF|Fлy'Fg,ز‘Wf{VGmlF)bqU?@}qRX}ȰpU7#p<ذ&;/%MbخokljkZO!DŨA+Vr1v2}MlBmiTOd &#r㇬ٿ.0i4" F‚C ;?g2v,gZVO#gOѲU.Ӹ:"ېKxDzغHϾDTXE{>jց'}<FC;-;ʪp؍w1œPt?$%*H3Rиi(]>>M㓨ƖûҲ~#jOi [<~"j)k[\CFN d݁ j׋m;V!*e?߷fGtxinoOV kWX^lrNJ/&ZuF6 ƺ?"6qV\ZQTi]7-{gUvE>'ҽi;l?V]v}/֏FhpG%Ӱ9w`j!BУY;w:=w㎫z=jwuhӃYЭ4UO+չc0nMϟլzDBL<Ԝ*Ҿ]?U VE)#ݷ|x}TK&|jVmՙcZT?oOy ۪3>%zۧj]w緪EO!keK)i4v*v(a-Wzvm gɶ3|0jz><=[aM~qSs* P˶UՊ<3k^`͞~نVm:_c$ӣYVx?@8B>MqWA -9ԊNei=ɿ4>zRð<]ǽWժsa.f"`} SԬtbãypWwW5jg r}k<;xL-7m7FbXh[~45wUYGp'/ kxK$Uww~uEY?S̙3@}A|x!:tLZ+Y!Q5ٲiI m7/_15|oVXC1ëϦ0<3G}%ΰˇ=bykL f{f.?`бV+, Q6O\mm G9< ]iܦB!1_U6tؼq xkП~YTiF:u rGv繀wUwe.>}KLWңމ%4ӹ=6ԝ ̣މ&,)5ڶ-Q<}M^^x(BֻBQewP;{ xaoE09/S0>B h &̴M{IvN۹[b=w{s.҈GP=D 98Юu `tDV?P/hɚi>@˻vd0C#.:lSru=sl6& 3k=lVX<sFd7!}_[F킃^:Q!L[hKƴmɖ[{f##~ݚ!|VVش?iPf53 ;[`:6=Y jq Y缣3!484\]Gm#5'$(dž4~l5~Z}c7sӚy]W4mhRz p8%2۪W3,rcbNΣ(ʝg1Z1Z8E\ehb*CcCdo9FkS;2NSl?}(-B!* ~ ?'ЧQG:ĨKKaɽ,w5;Shg\P+WdaMj5e2 z0^7(`C TQ+% h)/EŚm\yF3r)J[J6:jI6g*Hs!@R/$PKZVy?ɀŪ`4[ -tN:ʝhpP &3ZmyYg2;s1tkCXpV[~!-B!BK_y\r_"*xa%_3Yfee;eLҾQewf*}"r+(r@VVaw]\!3?3~ffylU7=Ӈf> pgb\!fU堺3Sk!"9EPTs ޼Џ|p t:TA]+zIQՁ҇NJx57'{nNvdj[Htǩ{UrAr R?JHB!7X[/%!# D*a݉kf,ou'vQ0@/Q쉑CJS4_n=@Qה'yuNbԹE K6VۀWVT'a.ƣgOFa-.tlр3|5T*hݸ.ZnmZOq;RvVVū#=]*MO1F;L%ul(*֐yVK+?w:U%w0o2Խd:&.n[/Ug V*T5?*3qt\g,'/{hzOͅ d!R/2zλO[kQURW]Nɿx'0|,=[UiXbˏl} ?o7b? JCD5:N1-B{'w`^)$'ܬrWP̒zq,O`'zލ6hgù7īeK4|y,u3Vڞ 61?==r4!FeS4Qs]%qw^ot MrSq&?ٖqiPh_V{s;ûX{}aand\bÁ%[۾V3d!a6n1 8v*DA-/w''fқA%G]S=:KT1䩋nEu~ib^e@3?ImJHӥG*~%y*~1o;hZQP Z`J翹+hrOu-^M]t.F2R𛭍C@0\X\ kPm +aZNFڽ5}0Gj;Y~Q;Yx%ohٟǫ#X'W}Ϗ֡E7WRͪ|c}cuؐmk23 tweVwtr-MF+"89~E]T-N乾C-^ώ '.N6<#(\ůLM%>-SfxBAQ!_[ĎǤchS:x  a1r^WsdĞ?NPƄ6 8}}Ek4o[\Sҡi0owydaqT<v!9<~x?55o ѐ) ) n5#>=u-̍V˞Ӈy3 ZR_Cr y:b_ʷc(wht- U&Qck?q7wn6m?s?.Hi3GK癳W#'5e!AL4) LBKNxB^cde0qtZ6Ǘ>fƨIc|cod.ce~sm񳶳H``%gck#;:{v&g nJȀ=̪}Z4{wsû(,.⍇JU֡.,^coVSdPO.LX8~HV۲ʾJJDSB^t+?r*B䖲/d.,@{?Z?JmeC3{u}TS3gRN%ӭ/Uldeܖ)psrVeKWugHbaϙL{jnWUƟC:fOʽ[]i-!~~Mlh;<]7_eĹԋmI h5,g }ļ=x nz7DSqv W7 o+:dn[[3t>}3Gxmtk Y>|Elunlc,>%r t{FkӅF+ z1Cܝ]$Fa/3Ӷ =9wgWa%1V}ޮQ闩4X" 17>CƾGށMZʷ!JϜkVH$J:66ؒI4l0r;OX#֯ϻAXN3k*^}:}ZtSx4"r 1z:a;Du93<2X35jl|*ISiX4G{{ t3sL.Kvg@hw\\w@I̧6OK~ҎoBbhGO#8ybccCJVu]JOҗ+.RNK3SpUϵ{?x +-+##ziX"*2e1@]ՔT~(پ1bT*!a8;[["u1(~v6T* *0_ W'gΧ%԰|."NsuD/_'`ok7Wߛ:&|dH`C5iVSOi~{T۵1:a`p1Nҏ:g~D̅ `\G>^H`gkcK-8ti-5埸CwMwTD%eN''p(-He)Ğ;ƎmogÝ2sO=sĜ9G|=Zòݛh4fgg u=Q>uQ!%%s,  o~=<>v?hYsqut&\VT~;,JoE寥X;!u:@u+~666z2eq-?W7PJ_n,ܾN''h*b-/uԆ֬Mz(72W.]N#>-ۖ[|c9?,䗱-_Uoswj=kM/YFHݡ_??/&GDHGU\--bf NA#fMbƍ{cx{0a˘#л1zr4T~dg$3' ow"Bn\?qh>Y1_LAztkJ v_.uxPf] "bljXx,_y-|֐go,,_yvL~fmy[Ѱ'tNJ-07?@k׾IKlll())CL~EdꊹO?sIZ >Eaz?oPݪsNc{i lT*B?X|y2c$ۼsIT IDATށ[RGc;?)UY/c["ߖ8~v}c\`x:vһ}{wTz_6oiUsO>L˩˙w5PaqO|i'ҼQkSm]΅d>|ekrۜO?WTŇ!5E>U+h>{lmm ,/fn y>dg2E rG a"=/?G.v(zN\<˾PC]2V#|x_>xם4w}!5tE'=kәG:vz Xi/ڢ2(}vvX7|x|Fү)ooAf !5C_L ؆%Nv+%_ !d$Pz2(D%nXnoBZK:֓{B!A:֓@!B!n{E' %\ǾstTO^D]XW>IӍ` {o}̳{bMZeW&.N6<#|U/#m~"/qN~<>-ZtE'#5ßwQX\DdX/h|y)@@t بn-s),.p9cӅN]:ϋs?$jPY~(Q⯭jgN~Ն?ko: e^ _X>ZOFkqjDHûkC;qبl4SaZ4ή-C2ԢeCCT'k痵qίfNd$к"ÙWEhѲA;Tkbxs?:xݮ$xsh'VM1|7Pٙ#Τ$ЮIK}ԩFa?5u.1xU'楜H:.*~bZp^#PzR/iI7S݃)0w &܂|>L&/PQS+vvMcPnSFЩy;>{uE';iOhV&mcah$]N5oLԱ~޹$c܃qvpRU$,ѾyxWiFgxĜ=JUr1+cE8KaQ~L<>M5?OO5lLh`_ӻH>FPs|ҩ+ o?col5Ɯks_[I ;ZOj]~ DBz #fUB {HJ^!A%'~\ro~嗱Xe_Qos0ZVq_[Dv~.^c{`|K?gS_C=1e,对WK+EZOFMcXHKxpێa܃Í.@]:|7hhx4 /IX`ZȰ^%'Rgm!t>j^N,'x@A䴱\o}/e/ jl>"G7Q9 ޭ;ߠ!=CY gljX'3#*b{{0`tomʯR'7iKS/_ztBfѲMahtS# jE7~-K2gEG= `==p Zq_KoLl<FNz+^V]X|xK68t˼J9Q' m?%ks_P[tE'ZS#{0=Õ&VeBY}&6 y U^xjt%'{E-\Vt:zW8-;/\u>ͼtzW&+n{^TWHG^[_ Qٰa=5(JiO¦0VFC@@CߐS3gRN%իR0c[ؿ 句WS"JS7'g_KoL]p/eB_:hLrV:%wS/ ;J9Q' m?%񧼪_˘s26NQϻhA nz7DS1u]܀|'ʷiٙ$_I;2IV'uK(? YsST FLY^ˍiƾGށMZͯ$~;*WY.`[Iw;C:i4&2>mѓpwvefm\bR9l޿ %ڧ⦶Ui)=MSkn5c}01gڢ=9buc1m?!*o%7+_sϯwj F>|PuU/ A&N4lstjWGg˻8:˗?=!M8llQTT $'~  ^8;h~ uqəiI5,>.D=WeuJEDH;N֖p?f7>$iZoTR2Rzt%qTUeӯ^!Zúz>_H6r֯%/C}?G{{ t3sK_ 1.u]0 ;B®:>|Zsc1ƶR*ߘ޿=1e(]]ۿ&ÈZOFlz|_?ɑ q,۽Ak0/uԆ֬Mi666z2eq-?פ8ˮSʼ-ֲu]N}'9BZeb?S\Cό̜MrriI߶(ޯ]7n_I\rX}}u1Jϐ:uOW뎺-?w]lT*C]THqIތF!5;GT%T뿾;Ğ+ª[UY(mEw"Ng%ovX_%ߣeպ#,#1#sqb⺍mQ㇥TV1սW0e( vmF55WWWիG<ģ]oCFlw@,khyCOv{@!~l;6QJ/S І&1=be} {^sY nl!`qjΤ^ i+xݴ=̜,=QpF<1jm^9ho|?|~1|V =?D&-DqK>g(3.j~#֍?qh>Y1_LAztkJ ߦ+͏owg/0k۲u=ys?VlQ>c_c)l~ğ`#"#Q*n1X~e~;[[o[ʯ0pSWewݘa=9xF򆶏0a 7v_V~cۿ&FBsgбsW.gf(*tÊTh~JUzs=@ۻқGڴ~Mw,exj.3#h,.gfH !&\H'^v(B|hkg7Uf0u9`gǺkJItCԱ~޹$c܃qvpSiܠgS.I+f sc4>hS:@,~enz/iIλ'+qyڴv !wj5<Ժ1/Whx\ʑ|9-T*/9eQ9 ?|ăz0}hHԔF/]?͘>2m,ھ [`ϙL6:N,^÷Ͻo n%Lmh>q|R3-AmF^/-Ku`|4׀OWcq֑ gl)^f=. 5`/3k˩|w&BamƟecmSTk'P@FMcXHKxpێa܃Í.j|xEoz 5?2!r$6*,G= `==p bFA_  rX.]IǷrC9tvj E\r!Azz{0`t@dXOܗQ+޻Mg|=x;?F*ݺ3 3$5Wf|>Mz˗^!\!phz /|a(j= GR]`7z+9W-C:f~+P{r97'gEJq?e9ي:whFV{ ɼ٩K癳y)*T o}/J4%deFt;O[PoRgYo'{])Yh4|uӛyK'P!0B:֓@@wcJ4%z)lTҢ{Y+o3Ҳ3I v6fet9N-k4&2>mѓpwvefm\7_F \ru>4} R~e)B4P`F ۶67OBQ1ZOFkFM^NΜOK"a.D=Wu$:y֤KL<h3^G'xǞ?' {[;~߽ qv5|+d^bX_BF-Ox$lllhTF]ZZ+d9SX\[&3'KqybccCJVu]J;ᗮW8oƵrˏ* !5Eu\itE'#w.JEvX}%M<}Po.л6*ѵe(v6]Ύ;ep'ˏ$6CY?i_Ɩ7NDe}7w\=w%13U1[o ]D,OO_o]ν-;h~@WFkѨ)tpaͼ_֣{t?_PѰ३B!nK?E ZOFlc?W3ah#8 hu]lXD!/{'{>[#9Yx{q!2J^7G Rz G_`ֆe zH~٢7ߠ,^th{7~ğ`#"#Q*.|b.C@:2F+BQE_''':;{r93EVGOM`Psڴ~Mw,exj.3#h,.gfHމ;+һu'zCB!j}VЮ}(*L̞ u}mbϾe  y;P3u$P!BLQ'009ͣBJ B!GogGP. #n6{̻r)B!(霕!\2(B! &=|GcPz(%OB!"SVI."#B!BP NSHNMc`iPhKvc߹c9j1޸G{b0E|JO+G$ʓDj~>m{u;1-ԋo~ 7gWVOR鵥"?!j= 6/LaH>_R +2uGooQtk -۽vѓd6Z;,%;֬5R]L&-ZWGgksרB)d$к"ÙWEhѲA;TѲNc Sh@3oyE|~1OCk#qrp4;˩ -o;5ogO{?Gǻ$Q|:l<^hmDsMK9x u嚡Յ=At}yZ1μ2*4lR3iیwyA3u9`gǺkJItc4B\'c),*"ۏI§ۏoAm߉K|Z.᭷q2! @Ա~޹$c܃qvp2ٔD^;UfɄU>z9⟇w(z5_WsdĞ?NPƄ6 8}}<䗡+?P|X`lkbxs?:xΰ-oB{Y,-BY{3#{ V?qaxHu9~|5mlmM޿l}wpwv5h9c_LcҢΟ`sX5i3S9~&S)'Cnv&.s8x/-Mw9?c{Hd$к1$/1G-8h@K9x/Gpyl"y4$j, jxG3C}hEW9}ةx߿Qy$_I'5;C,q|P}3Rh{IS+P3JhZ>[?`ɤdeк\׌$ry&Ŗq >"4bUV}ߤ\Iųiׂw/FL0h9q OKh֣{t?wM ZZ}3FN"jB8hQShX|t2(j= o6B:a=").)fl;q7>8b;mӬ5[wS{ǴZ-QQ9:#z0l8 @Qq1g# /G9m,[`Joߴ%{U֎CZt'}C~ZTowݷNxWTl<YW(ݾ[wƿACYo:R3hxVatw j7-2G:eAJu gljX( z-sS]X|xK68t˼U/soJ*R*;>[K>Z Yypq, !l8{P\RLdX/<:,WhZR2qk8F^6'/94nЈ^~]Pi~-ݵw3(/sW@N&`h"z@uWl=^;aoW}0}Ƙ{3ǿ@:֓ZS#ΟwQX\=Õ E09l"ɸC:f~+P{Ѥ[;Y99.*J/S2n',s9'IFʘoߣ-]DSBJVވliۅ Њ{[v ](ݾ?t:;ֿReOsw0i9(}(ȜK9tNW) k KAQ!6*9̴&Z|CtJ4%>M|+V5i)(>Kʶ T˱p󡿙q úacSˌWoT()xiPF8>cNkb@ Ӷ s6ʅd|{D,;ǘ>c=_m @QHu}kݘM{JuC߾=_f2G-kU٨?hѿf図zӯ^rN6Z-feWozI=y+v> Z_3Nݧs-C{MM#7c8ݛFa/3Ӷ =9wgWa% G{6iaUܴn*X5U/KPJ3Wej~u)kX OM3}mÚ(vdPX/t衻TҒPDŽ0oogoүyǺ[K4hʷiٙ$_I;2IF_뻺1 [&دNo"+vj*'PzrO`Ԩ>sFՒ_NΜ/7p."Nshf]#ZV,1^(gށT5 C1Kl9vInDu]0 ; ? ͮ&M\>=qw{Wy-a>^H6 JEDH;NgX"u*-J(ޞ"̜S [[퓐WOsۧTUCiو/ 8~,~ -zuaN=x C|GB%ƗvKPx77zѫ9Xhn|.N4=rO@aZM^rmUm_uX|PI'Pz2xg`$şuh郧{}T*uc%'p:9EWѷݭ'}sJ1xF">E_oԗb#e_&>;-빚ó}eT!8z^9;N$f0rmA~s__%ߣ醘}akcK-8t֤껹Lc@U1[MgHGv:ߧЫuG˷!۟vq-ki-5埸CwMo99ڴ~JTأ|`]sOeq&u ɻ;LAQ!2s7+һu'zC xjL> ~@T[s!#xڡZ|EX9?:*AE'Ҩ'tv(rȅ8q,C]X@|ZwI:xt GΓ9:DX;aa5wO {=Bi/ LWfƺfeʣuz=!ܵ&.NRf*/vWdF:֓{lw۰CQ 0!j$ZOFB!A:֓{B!A:֓@!B!nNd$P!B(j= ^2λƃ;oSDB!ZOFǵ\ԅ @ZvoU6rngxB!֓q $l\7)Y=QoW\RX)R!BQZOFGϐp~+9ټt[:QclB!7Nd$l:7vwD [YOvoB!DE(j= >M<}x ~a?xWGgxX)B!Bq3'Pz2X}4n[LCFB!jZԑwvȵB,Τ&/Z;!B9̶h ZǪ}[y(7*ڡ!BhM^tZ/,^(j='+*.fˑ=y)'(Q\DŽ _͛G޽pzdd$U*v0}߯R)))mV:B!v(Z_>4^N- 6NXw֛U|ְz8A7XePTT*\zi&Ly߯_?M{O?lr|oU[ѠRB!#g&@Q xaCr4v68:Br4yyy\X@a&!t~yyW8=tT/y>\<t~yI^v#G~˴{ V˧~ZZ 60p@ڴiCBB]vryUSN;v*STT\!B(j]ƥxhqvK2Xvagiؾi ~2 w?~5F"1z*3gΤe˖ݺu#>>+VЮ];eZMIIa˖-iӦ"B!Dm#@QXK.,y(ۺp$zC)KVÅ%O@rsspvvh-b„ <補;w___֡ pJM0&NhBQH'PR.!p9<#6k+gã6'u!! U RDEDQB)*(bY]q-aqEQQPR$@B%ͼL$$'纸i33)tq;?uR++d,0#;0c'gg6zƍkT9ϪUK.aٲe瓞_֯_O=~~~hZ_(91̌t.^D⎕UL]Ϥa0s[IAf~]Ώ`).6QF1gz cccٳg̤xK.a޼yj*СC O?u:%K0n8-UKQEDD~Q(W$:SN27b4kx9r$O?4۶msζwv]Wv yߎķsN1bD㈌dҥdff.wu(o$3#l}:?s̯.[^+Bh =z4Ĝ1\DDDTJJ+/؉˶>|8cUgZOuiXz5iV."""r:%bx$:,lϞn( S%h@1wߓۇbtYWNJT ?, 7~[!QZ eu'M5K<.f7xsX5akPFO[wٯvǏps׾UY[& -2"'n#[87񿟾@!̾􎽔7& ^2<sѡ8aksx)n.[UD B|xq[40òk)pqsv۷gₗٺo'e4 lO̶ ںz J1_ >8͡>qh~f'n/*䍯ޱ]xd*WS/"8?lFȻ?,eD43<巷|m_X/w_\&8MexT峷~\;r|tdj}xpދ4oҌRI9Q<^ۏ}nPa3οrvS%P O+ZmZFD3 v*"63G>{Hh`Kϟ'oi9[}?oZtUn2{zFѡMY=e>o,gg$?r ZVglt+";?e|J'3c̓|+qMXV)ރX4fDR X/L4ϟEpP#6쵯';?w1W̗[VW֑K籑 @>:<86s}{^ VOυ1m8h ̷%nS3 ^>'_Gu[}̎?~?9vgη9_ub ~YGgΟJ*ΤO=˧Csk %,#vnd YT\̒qatkpiDөE;u[.>\w\ں[t,V+a C'aV#2h,38K=5_y~}w'I/—WO"<Q\uaW3Rj Q g&QCׅ-9/,anjxdڝaU71axLvs#O>ۈ u.nMfq7iFhRst9W%\yai.o~]ёks;t'*4=o&0?KgWGϟU닕 AL[)h$P JaaYj˹^40WLF]1n: xƿq4Cm θ(acf_?x)ұX, oS!Is}ؓ_"OHuҧ^Լmxn69ykCnA>rN n|pt???_ePD-WeY>W/GD\#aO]?'@pJ,%KUDKgWGϟU!7jRbbX(bJb+a:Ƭ$P O@K>ƺ=!3 IDAT}X i)TUYʤ$38V+9NSwh*O9y:yn^eßٴw,x'o.iwZSΤEmiĚ]|QL'1/Sz^w&CyPqշ&N[Jj^*{TUZ>gT|_2UܦG{W86WVOWGΟ՝뛬bJ,V,cX@1>h|muPY8]fm8*:)~Lq, /.W3ky1mQe'iK`"C0UxJ2R]V z7vú_/Q214  1=6k)mMח"[wF1o4Uo_`Jp`O=d/ ~f9CHMsd$G/WeOM?G4>WLoopd;N;}SuOGοrvR(JkkԾ>>f~AL66·?͉lwcLaq ~|"C2Xk3ETL"|v6~OK6z;wW[ְ-~KCLh3 iЈ (MDnyu%,-#3aFnoւQX\,Vls57vCbz2sV|Tbު%Ʊ}Td2ѯ弿s39krMl3CU9xۗ+eOM?GGG8Ϗl[IJOaKٮ3fϺP_}T OW[KЩEZi\[1}F>y_GX rIy/qy w~{mv6}W9S+"u~7VlƮW;|>[)}{)xzUԐ{r1MܽqV:k[mvUSorrrٛ~/}gh}a23J/:u(>.w*Mefk;KXJ5 w+tpjUaqf>δi{e䱅^\cDDӾz\PVο) 2-r 1!?,ZXo¢b"##y@9rP1<h\YxU~>K7O%%%LLMMȑ#) +0qprr y->^yCZrssI\4vo[&O̲eXt);vYfz1||IObb"?7o5`ذaXVNzFm۶ji&V+V˗W/++;vХK srrسg=zѣ{%++¸ݺuرc.u]5\9@1.: MX-tx)((`֬Y̞=ݻs3{l~@޽{뮻{;ݞL%$$`X?==0nVJXXi*j%!!NÛ4% Yyb|ҁ{  QU_'g{K޽B֭xԩEEEŹ=YfնXm۶щTJ ){ѐa6Ώu&tRCK56^+ +/3k,f͚U:xiCBBȩJ=a/? -dxdƂAڶmK@@?s㔔pw2n8z!7PʴjՊ@CBPP\p7n۸q#m۶ݓX&>>L6m*Gzz:N-"""R%R/X99ۃĿfNW^ ":ppJ,VO)N`,_$VXQldffϒ /|7o}UCϞ=+${ef͚Ś5k駟1cs_=zWi #FK.q*n@1̌t.^D⎕UL]Ϥa0:qմi {!99͛3x`o??l`ݛAѵkWbccٳg'%%^ /p}IxBQ3gO=T<[nj2vX}3cɒ%7[^+Bi-/e˖>\DDDJJ+/疜l-1dMSu//38KI3 *疲%F[DDD&h\'B[DDD&(""""RNI*"""""蚒O """"n$P O@ 6vڱxbO"""""nŋ9[ 4,!Uشi?8Æ t8""""q"guJT t]HHٞCDDDĐ{a}~T Od2y:q%bx.88 O!""""nAtO¸[;v,cƌꫯtH""""Q|VGI*{nZ"##=a/bx'u8p'pDDDDJT t]NNAAACDDDD@@BEDDD[GgUU]w^4i0DDDDzCnb%JŊbv~O@1v58mC饠+Wnb) 3AH`mL1 0#q]Yڗ(M;7wד &0sL:tĉFDDDDj@1<#WDuiM~+ֶ{}v揸_־2_3fOЯ_?OO?t""""R;>k^ɫ4;x~ 䤝8<.q^?t}{ׯ;wR;) 3r%0[u{xhvqKgneB< 3s8>f_0BWk`Yd>J\6s}GQ\\ """"NQ(gJ /ɷ-$-g~XD6s^Xz>v#[d[c@Bк_'~[+~eyv sS; ꞅ1+ 3r% 7ϻx׽r׽r{?5O v}{"##Yt){YDDDh _s@1<'\1zh"##]O*EDDDfT 3z%\ի=H$P ȹ6.@1:9y>c8aX ?$2 {₨V3}c&CthSVOϞs2k^|qd˶rW!LGokwcYLMxÙ>fGҟLL&^XsB5]~~Sӓs3d'!P)G>?G_e HJOCLxO-'~"_wl}|iV޺Y6nԸ|}x Ν?*;ԕ%_tNS(J`ؙx_xCsk %,#vnd nlwksӱ:}u28Ӥ)W^؅/7rhVo㑁ch1W̫_DŽwe2ƭ[~z&CO.o١S[Y9 @p`C?Xv`f9zrT7pWߥϧLM/G8z#RiCN燷?BlڸOI*u˹^40V?ꊁ4hwQX\c7'<2&?qo?Gг]g.>y=(2"֯ExTI`$T2_Ty/1,38Q!99~̞C/*pRHGگ.>w Zm}*L_ϧuD 9Ah`[,o&;?T[GÕUά?{T\2mr|)}2 RBʱtBtr珪?"R5%bx־i+ NއthќKI~F݊'ʆ?iY2O|7]ӭrϲs*SΤEmiĚ]|S}Gs3ptLU4jn W{,'&N[S]6xnmvWVe~K)OS-{WV6/G՝Djz:Z>\2t6͚.92 z7vú_.q8^?ڢCΤ?+v(YyT./Ӿk]=._M6 Pٗz?3\!-Ba[S֝}DA +8U}~??Ú>[]":)AtuwSKN;]맺#9@1-kXNdgr%!&CӚ}W\LRz [ΏN-ݮad<_̃rI),De2vf ).)q}wj8|5e2r_9 5Ke/U{d2qE=/w 7~Z>7 8Ŋm?ن9~h׿Hz1rZ>?wAanv$Ƴx÷ rCӺ;̏l[IJOaKٮ3Z߾WrP1<Xں"ԢG'IJOu=Ӊ{x{3of`W{Op/ƽ]}pL݊׏WxcD4 ɇPԐ{r1MܽqVVh#8!;׿ω p}wnqt\q1L?z^G}{kocwosDFpc>ܹ3s IDAT6|h }m-ã}aWVpn<2N^{_wU+}~[/OF1&Vй7]~CӺcwu .}xO=Hkq[ODe㛜\{߯~K_ZD_̌t6Q=|L]T"hoHvwRQ3~rMa <7O"gvn>'P:{>1utO* Ҹ?t̓wwO-ݷLaQ1C< 俜Su9 =YxUz9 8~]=YMל>7='"hR3}ˠQ`CEy:,?"Q({l֥u]'{e@6ɞADRJjx$v ~v_ RDD7({EDDDDʩ(W?.4,쌧٩eD Ay8gJDDDQ%P 0eK #~lcҰvm̀.M E]ߊI3äah*syl(#t"""Зi9Y|tJԺ ;NPTRFyab1y3{>mM&1N-ĎY= k ~~kNMvkMg*"""NQ(W#eK+P)[he0FO=-^w!WR|~^+ 1-:lg등Z <6q*n2AzGO799NO'"""S(wj/gL 7O}/? ]XCW? a/፯Z\~A(EDQ_ڔ2"~؞_) Av~m~ ~HPfI#?nI~l?pf!fBf?s?ϛk;6^&s~[Y ]ú'FMqo+qm\%2\έټiQ: Q&vv|  \>\{1 '_JI^ٽkk%qp&U %l.jш;pU_ڔ6͂ؑpb kgK2ѦY+per46A4 ?g$b G1w o_~(9rnmC09w/`FV!SdAK\9a?lOccQ;Mq8<>OT{څ寣Xs,.PZFV9+c2b3) +3.7Z :ԋmyJ`-fӐF!AX,V69Jډ|M{eP6zFFOFV!HaD7kOOcM|L$?w_­:lӹ @na {Db2aN%1Mo'?w9.]J& kG@ xCn߷t`bE9o'ȎaBQ“5Lv!}] Ҏ8{2դІ~$a‰b2 kÃK͂4]_X:^Bji"vbus+(D̙j#\̲{8A~sCG]B+""R) z!%q/G!7Ӟ}Rs+K'AY||em_[XyT /$3q/G֊.#"""uCI BEf0P; +XdQ?/v%e+) _olMj ;ձ"b>هІG0D_/8Зb ^' '+Af:B_ZTl!#&f)3*" umۘ9ϣ6{m2_w1*%R/X99nd_34w/)e5va ִF ОQ[I=Of{>>npa~1Iy&3`nӜ@oLs0#&+A]"IyкYuicQ^A y]EH_[rȏ@oORb\~A(iX1V|rre7=uVDDDjNI^fF:Ou/t"q*OmW8rU;Ҹ(Ώj=>2rQFn 3XD/SC\ؼ!^^&&n}27uoFT?gSTbYc_<N 7'/JdtiJVlw )}U{Dҿ^˟Gi`ahhL!: &#**ۿ%MY* _/j(""R( +}_iWt8g ĜWEJκݙU/XN|hWV+䞬ٛ^a 6W}aBj.o~SUOU|O>񴸎+ΉiծCVnOcvdkV:xہ}M4 M{9hա*̌t.y5;Pa= ߛ_:Q\buh*x4wv7fQC9[Y( +:8x#iy]w_~%%2 ?X|%Dn1]"""ʞ\{^)oBy8̌t6Q=|qInd4u1o$-u}AW#""R| 3l4.oooشqn˾~hae  'w$Pi$^S@_ʾ¹rP1>]vN󳍷~zzQ3(..Ѵ"""rv;*&) s8iXC>gax%FbΜ9!Ƚr^`DDDSbxz:H9%bxbx'PDDDDf'PNOBI˜8^@u>O]*wz%wn?R1iX;h)))L&q@1i1_/-Es_@@cƌ!((NOҦM|}}iڴ)'NM>ݻ;=]ǎm/OׯྐྵϝXuMڼ)ٵvoeɕ:"m:xz{k\.~L란NcZ#n4^y;l߾\GU9@1{ڑ%(ȃ<,HGh0Uq̟?:oӦMyWY~=3g>gQ[%%%̜9Gyi?^baoGy2pk}=]̈+np{uվTn,'m]FTHb/a΍,zҼ ^k5(,X 7񿟾@!̾􎽔7&9yo]Vֶ#^BzmۅGމߡy|e5CsXn?_mY+84}uHqt\&8Mex/|Fomo_{MWJ")3 K㠆^|L(bDFؖ ?*;HT +0qprr y->^yCZrssI\4vo[bccZ$';?ٳ1L{Wjjϊ++J/?~<>>>7l0V+SNv뮻kFq9+ZmZFD3 v*¹$=ac̾ްbX=e>:qnz{lOgƘ'WʛZm8a޻EB OILOfbj)ރX4fDRcڨJthSVO[> )Y=e~/o}1;ddI>9~P$!_6_~jd[>W/8w#"US%P p-J7^`^lGU#FЫWJEGG;Μ9s?~<X֭[Ν;ol3i/Si_Csk %,#vnd nlwksӱ:}u2VQ-*.fxǸ054"L46M0ެ<.gwYn<QOF,ͣ,3,-5<_f^Yxߒg Hr^3?VVvae/vy|y1CC|Yaʀ/rrO<%H%"OTu[( x@ZN&\ʹ]뎋-`#f/[+Oxc?S(Tp;Tv㥻 Ky`c4S?Dd@{36ĝ@5L]73:Qϣި-V*UftLf#F@XX0c ,[ 'O.~|/^W^ydPS9\egӽmn~W 5(Ay8qN{S~ǡwpGcr=Zeg5~YcIWNc͎͚s2Nb+Je~_iKo4ռUKxEi$z K}1"2I =&@88RGT28CeR'rrrJҥK1p@ԯ_T4GRRj5|}}-o'C(A_oeQ}'8 nή8vY'=kIHpsvAl=報 8Pi4ČT$gadXTq=:س2H$(Kكhp a^ wN.ΨVΎN] WF't'- 7'b7wMo.__y=;5:.R)jU󆋣SsYba$ Z@-sSw% ooR/|4hjժ7n?O?mvXz5Jň#[\v?޵hϳQk"-;cS 1r<ӶZG9jFl]}1{=b}NԨLEv_kZ8~"Fu*{.ϫ^nN.8{jqT*E}:u>/W.?oӧ' \9Іp %=wχ@=o_H==7;)l<BA*b뉽G/[BY<W"9ce}Qq!* &dR჋8Y ܹd^70sh l 1n8$&&C Encʕ BΝKCPP_λ42222;z޾ho+f .Qb7 .Ƚ_ŵ a_}8˝)^<_9 rG,S?^ñ`x}y`P맰?u) IDAT~sq>*j2jFmp)7`YCĶӅ? x oNQU]=j5Pd<^uf>D oiv:Arf>ش "D _Te[?@t{X﫬(!eƾǫ7? ߳=ZUo$'0<&50 c"bn$wPtt4ׯ2U$F `9R(Z*֭[Ç[]Ũ10hjvɴQ' $*[?SMbhhokbq!k;?oC;:hP'O`!%^w9薍 }>@ Ov |N ٽ׺y)HIN7LΫG%99'[`ʕ[.}A:qͪ_iR{*o31UWL(9m8ߕ*NW~Eηis?|x19)lްVoƎ<~.&'%ۜuRu@:\ܳgu\:R߶"QysO/D]2U?*S7'>>^,~h ><șM3' ,I8f*sӜ49MT! =dJrOS{HdJ@""""wL$|[ه'""""̘cO`hZk@DDDD${fСhذ!njPcO`l۶ 6l+ Y@BXvիWGVV """;.o[Gk/+iO̡|CA%8{<՝,>^Jv=eWjU$''[; """"&dxO`y{{g1cpAkCDDDDeA'2]^zڡٕ(LGLL }]kBDDDdW,=9x9(=]vv6ܬY@{'28B(}`Hv=ea@{'l  ̟?ڡ0 $ǞٶmC """" dxO #L'&dHDDDD@{ $""""zI ==${aHv=DDDDD9dHDDDDn}܍o0JI ٽm퐉F?Gt!B<,}k՘cO 'A ćA( P*FY ${aHv=DDDDD0 $Ǟ@""""۷oGjjAYZZvecHv=DDDDTك4 <8h 1 $Ǟ@""""+V@-Tn9kf͚/Z;4L'*T*7+V ,, |-:t耯RiJ{|N UT˗#cG  TBWRRr@""""HRFt=y*gTD{䔨F.H${<8p-OTֽ+I =Qyޣr7o\F)(x1ֳWEh!Ǟq;2bhp[ըbpʝ@ 2(v^0R^^  6$'Y;;ssL+ZK_Tk %TPrc? @ ^JDDDDDaHDDDDDA 6&C.pT )϶ں+KT_.GVv㎈ [%_Y?-ؘh=zm۵GP8::A}9:~߹[[eݕxfU(rp1=zV;""""ҹ[;$OϞ=^Ɇ !"Zˊܢr4g.;:Vz+;QM)< ~~a?B[;H'|?-dBB-Eh-SVڇ1d ]oegaHG9FT4[;H'|?-@A ɠ5pFQqYC-_Do%>[!پ};ك+V@*-<~LV]~vN9g{w>D")?-@I(t<23ܺ m7L+݄g(92{ةS',XoLoL$VQe`*r^^u\x͚M}$rEQK@1~ɞ(Jp2ʓ UVŎTnX|yK+#" , Qew>^\N&s@pD]&Mm"hI D7n\F@՚UU?@G^Y^ʢ{ժUEb7FRtUqGDTX@" |L&C /S5B,wvj(JWRAXtpERSaԨQ2B󭭢;"ʀ=Dd/Ǎj<ON=dgeZ#rgI}}Y4nit4NPQ5$m#ô4 <:v耯\F܊:*KHDThM\Ѩq9ԨY ͚#3#Z!;;IPTpr*0ح`}]S͊%2Eѣh޼9b!ʗsU?2x4:9YJr2ѬEӬ^$P*"##2 *#ZcFj\!z~}9qGDDDD:A zyyׯ6R.gOK$ 1Y'W0ZnQ9:q%}XgBB1qGDDDD:FL?$O[nG" 7oMxz\<8]bT|jp%AXNqvNZ'O=qX9Dd'OXmݕur9 zh{矖dI ;!8kAw۲uriǝDDDDDDd ߳!P%e:k@DDDDTHUr;*Py@./%"""""z0 $"""""z5 \4m#"""""Ӛf-_iI`osF@/oP}Y9KDDD$|n\xM 2Pi8woE ߳J9%"""{gw9lyfJKqqzc&J%"""{R\"hI`^QjU:ޟ};61qLT/ٓAsʛAEh0"+W 1h8l넉>dO`6yd?&eDF|q=1unx g/`A %<m&DDDDDd&h%vNrsgg΀s58gg8;W&OֶV&-[]L8M"dWuPNNmN'<+* B,NZ~j]eD,ɢ1ۼD[^v@QVx4 gkO8Ўp;h@4J‰d‰`nnbP֨q3(rq'6ڠ|!wcϮ? ?7 ݸi0; 6">>ޠVZX`>bt} cǾ3fjU]rjѲUkL6 'h׮-Ӛ5[WWW$HO΂D*T*T{ʤɤdRWٳ1:/3#G3Ѧu+@dd$зOg"## %|-r~nF||<}0d3Fۯ ORA"@-D\T En.J%Z-d2/Y,%@K%o ,  (< GV-'x8WAVnl?߄Ą8}"oO>Zxc3U*!w2EQ>>&c*Çc_x8>;"e9r9J%rrr⢟l)D0uY۲6 bATt.wp C~tfDO ӏ c%)I h)8`Q  B*^`Lny}3'bK HNJ hSLvf7ƺL1Y*,,{"( j>Cr2<{Rku%(L3M_ իW߿ڶmcP7g} }G#D.] /_1pjFG>7'N,"݄ }4 })WT 7nD Ҹ|2 .ppp@B}Z?`VMP(yϓKʕe,OE888@*B"NNNΆL&T*EnnE@~7K$P0pƅ}qI*T&CPw ; !% 2ΝWp.Vj߬GvV&2 滹{#vV=77:\:Q> ww]x~h\o~'/%SCpᰮD'83 }ENJly.YTZ'XpA0adDD܉C} w7}o]FJ322PJwڍ֕( hkh0#K&>~1}y<j@׋yft ;< *ss1 ʍ]M6㇕+1}4̚9̱幹;HR\.VFV7/Y& Bzun2i{? @"NĪ}H]z u׮\ gOi&*3rl_zwD@&aиyKT8b{KB.HJr OꇼHNz5 ԚԒ ^;BCʘ1F_`:''Ϙ W^>>WN>F?pڵm[:Wǎo3tHM ~w VRԏ@v #V?vϿS?P$Aa"˛'"DQD\-\8ssK72g:Z[בWWw6e6]\Ѭe{,_>->2,{uifL%GJwmsrMrv%K%ZpanUH1/ |8JAMctАƍ8v8> ZW_~"7g`ؼe h׮\׮]ܹ!,, = Lx bexWK77t͑-˗coKbKc?U{쁃M_˖c[,HF'UlH%Rdggˤ)222 ZR(GDH%u :ũ/ڠ)$->}OfV8v,E\RڶmlXΠL*uV\#G /2DDDTA4:ݓe;Cn IDATǫ7? ߳OG'X0U$>x5}_=Ú|ۛeqODA].nGU:uNw{vg~nqYWFf&ݍ,;+~}Qã%S6*Py@nay{ f|U#)WS_A(|&1]miݾ).dbGDDDD%Q $&&CRAЊl6 Ԋ4nLaNb mA""""(~,J[^J u[ ~| ͱ$,ijg"HDDDDdl7 ,hYl/^@LȞԢF3/_$""""6$x5^A""""";a=֎޸=|\A"""""eի?`GHVظ"ۘ3S4lu68{Y7h@UL$v s|]Zjhެq۸~MvxeXthּԭpbeЯnƏZ/r^p:wAO`Qxgd|\'iӦ#!!^x!-[aeN>PNBU㮴 QQl> CNN5k/kּ]n 9rp5:xl;uΝwBej^x={DlL4~Z 3gɓ?}4;۷sySRRp Ģihē^rJhܸqddڵ .G]6Ϝ 7n]ٳ~˒'L~mxzz oWI:fl> tws(՗eggh{R*1ڇv@ATxyyZ.YbB"| ԩ[ F7k>>O<mp>nnn߀'|||0~x7LXǎ8z4ǏGǰcy:u[)4k!-[ΏwmtTU}jnݤ$ԪUˠn˒'/*qW^ 'uօsAA񁧗N?'8w,֭u{ wQe^~%<ϝE"_-^lLY&< z@M/1#"##q u숎aq,DXG]x5̝~q%._…Pn]E5l!5q}{Lf_8)=.ϋS<"""""Or9{Y,Z%rrrpUlݺ#F0Zm6^,\uVoӺ5\\\lr/׭[!F_~ϟ pww+APT&ץhT*!h Z(Jh4Q#G $'`ժUݫ:vDѣU(RRRѼysG)8;;^zt޾}Sm۴D"Uܿ~~ieIի!6U㮨$""""* O> 5a0{&Jزy3]M? ''˱qbK/c"4YYYxwX5FBit{.ڶkkr] ~5knzծyϜ5"8%ڶkVZlApssCh?ڷoLhݺ5 Ng?e!˱5X'o/^T;T˲/Krx o]%=N""""0vM<>>^() ߳zȬMiZuÇTZ/y0~8u/ޝ2E> W5}@ß|r'Vd28~IKgΜAJ,""0!K"""""T>zls ^xq4j55ФX`I S@"""""*B;>3/iڬ.GEY,HHDDDD'ڱ3jCyl>wttVk}rI > yeI{Annn Ȥ2(r.;W^sa0`Ec4F[8v~{v7}I9. .7v5k~2W?(m݊AOJġGaPXԭ[ܷlWQI`Jj rr FJjAyRRf̜ȣƓ˗.#5-LBiʷQl2KSq9$ݻvȑ21Lo˫lAx뭷p%}`ܹZ*DQ@[pQ n]$E!))>Ml*"pNQhӺ5:uÇ=#{(|1/,PGQC.*{$|bz^S'Oa+jI$d"{⋨h;&|͜~:4o }z6VѹS'}'Esӭ Zj߿?|edI>kLj3._u0jB^~ ?u>lWDFSNm۶IDDDDdÊJļ$%%z ~ 99 8oݺt4jHL׮O!"cU GL_d w̥@\??==_-^ݻvOMMRiv޼Q-)vT yjժM~3fNPT KgVnz<=hT*DQc_DpppEm(cyF??BuΜ9]vժ ;gΧx1e)%_/ ӧMF16i-4ZZA Jzڴicy^}x)Heq>5%&& -]b늢z Ϙ\899m+-44Pw!1,Yج޷˖!..bu ӦMGZzΟ;q'@L~2]Q,uAw~O/fX+˖~ 9̝i7޽!!=R;쳹o?DQL& 555k֬"""""[Ud!::?nnnE.{U̟_ ʜF=3fb谡x!H闍h4xw~E1L]~k|Rg@zеK]pi" 4F*G(H !-= pttDFF.G]CbPJ|x͉EjP*aCn%""""*DڽիWM>NPgR*^}u,{Y.}x1"""+/wvvƺ?cԨPF 4!6ggg6:_F*?ؾ޳\"\۷ѱz;}b$XF7~M6D`!hpquAӦвeK9F !11l] J_6mַ;вe 6""""=!)1 ^:p$Yf<RǍûSm ׯCvvgVFb{{%^[nx͉(}[dIш#<ׯ3|׮]еk@͚5I%^QhSL6~=̪WR+6qk۵k[.Vv֨Q.0""""xZgI qOjEO"Ak'>/9=F=Fl> ܲDDDDDDA>Oe$""""3c ,XaOINv80 Ud^qU&cVT0[cݰ?R,I J2bOlm?;DAV! " "j-DQV0,8qbgHDDT \]] -J [癹h <-"W ==,nX݆U='VeѦM|^~yU}xbeF&M7ްv(@ƍFi4b޽{s\pTUJQQQsΕ*4$$׮]+䳪8sq~'lذ+Wʕ+MAZZyv28RՈǵke˖a޽믿_ܹs h4!99Ν+P(JQFATbcc1yBqݻOgffO>fشi6mT.m'$$`„ 0aJlll,\br~tt4yumV \>o۶ 7o49?++goX˥}-.Xh$)))7oRSSQi {n~ mzH߹s'|}} :.^GGG޽;|MT*Xt)^}Uxyyߢ~իWR9Gʕ+쌷z | Kc8y$݇eгgO,XؖTݻ7{`QtiuLfP/22j* P(pqq믿@w"|-+)) Ǡ7@\\AVEzz:M!C `صkƍW M.]zjX;w6y_ff&oߎs!##5j@߾}ѵkWz_~7}![n\]]1uT\z&L@͚5󲲲~@ƍm6$$$`ʔ)bлwoV\\fΜ J*U/vڅ!C@Tb߾}prrB.]?۫Q"""n:hB_kעiӦ&M`…ѰaC]Ǐٳ >lݺݻw'999wAbشiSKsA<09OEoAjT*P(?;vOƻヒ>(ŋѶm"ݻwcܹEh'`̘1AFF1:uD2YV#:: _|{ߋ'Ocǎ-[`ŊHMMݻ Ӽ|2! sa߾}h׮ڶmk3gO?~(Fdd$/^lPwL8qgƳ>kp<꪿$>VK:p ӧ֮]-[`ٲe5k`ٲe嘘SNto6N JzaÆ Ò%Kxb(J⋘3g4i^x* ѣԩSǙ[B*W ^~e`׮] AHH;DT^ڶmˬY9r$sER#ȫJRRW&&&-G}/BEE~!f͢Gt҅ɓ'c:u*w^{5 t:s>`<38 Z̞=A-\wu*ZL&L&EEEЮ];+; IDAT9jO?yfGcV)c^K>ONNGe޼y >@4 4L[oEtt4C-Z1FDw=2/$ͦM\\ټy3AAA.եK|}}=֣G3g6l}o{?zhVXA@@xMVVn, =&7h"ɓ{+లΝ;@f8yhyt.IEE*|'iӦa :T޺uk<(mx{{kƊ+X,һwoxgILLDrtmW_]oCȑ#Ź:^ bccyilj܄x~' ߔ:7$^}U֬YCdd$>ݻwgС :xbٳӧ>ȑ#9qswE+cC1rHѪI֭0b~ݎNC.#۷okb6"##-[E.]ovʌ3|}}쟂1aن ؿᆪo߾ 43gp뭷<bvzQQv%\Щ?x`1_ֶ3sLƌW_}dĉBw!|IYx1JTG?RŋYd #Gߦo߾b<|ͬ_8,--_~p.\G}Tի999fĉc2x'9<_} .\ѣcǎN|IƎ˰a\`4S*T*q"66 kljVY.U4>}g}'Nܹs^^駟ԩS1c<III׏>LSSl͛Ǿ}9RS.CCCY|9~ya4= vk8NrrJ4N R\.]z2NV]t٫WfܹӇw}"°Z<̘1|}1uTx'NvZ1!Y;_[*hĉQTݛDzž}8p .לV,z=ݺu޽;+WlRz]VZrܘL&o_͞={?SmYhzj … B=*{Vs]l6[2ͧO?CҡCT*UV5G* [̚5K 띰ٳQ<:w1MR1p@È#\Ҿ{^~eC>}Xf ڵcȑFRO? yOm:ώ; !//Ln{eذa|駔2ydڷo21~G֭[f[o|>Yz#GR|nc:<3DDD0eN|M-ZDdd$సv~g>|GSO=ŢEDILL c∊$99٣;9s뮻Yo^z*7hnX:9]wڵk9z(wqڵ19)s-[شieee3CHNҥK׿լl6 ?JeO6111TUUqK/l2ϣ޽;cƌaܸq ~WnnҐ+Dqn:}&ZB!N77Z_d'//QFGǎY~=3fСCL&|Ad2^{m{&bˣ~Ocwײo>f̘Abb"> |7ⵙ3g7!L#t7^w9O_HOOgȐ!1c4O ""-[\SՔOPPPaØ0atS"xW8uJRIN8x SLqsϽb?$'zGu]Gbbsϑɓ',, Ν;y7ٰaU` 8PTF9BVV< M?&''כGXvii1{lqQb\Pvm>}\X VxPl;wEX9~8/ooo],iii}0sL>o1cÇgҥ=zTo2bj*̙Nc֭ 0iӦW_1{l_|QbbbHKK#&&Ν;3w\~mCpsS,o:uٳgxQQo.?3ZL>{r#*;vѺ{DzeѣGuԩ?dȐ!<;w;vpףHIIa٢7-A333IIIuT*y]ZO?䒧>K'Apy_yZ ##^zb&Lb1nFlޡCtCBB&Mb*ɉM{~agtYƌ#*oͩߑ#G(,,^Wۚ^ y~~>?*km/rvcǎqI2Հ^2@Uy g3V~իW3dqujZ3fP\\LllVe\jiZJKKu5\×_~Iyy9%%%mۖP̙Cyy9gΜAh4^m7ktmЫW/ Bǎ/b#p>|87|pkZ= C'&&r})wMۛzz2oG}Ĝ9sX`Gw}<|Gce111HNN[eUUSNEպ8&SNXCV!x7ٹsg}f̙p bPg^TVVn:qR֭O?4 ϟgذab2\ކWv} "TM[PX]+JKKQ*D檦AcnչzŢ 6N y7x뭷@+W;p ŝwINN=h y_x뭷 Bl6n牌t}v233ٰa , K.e׮]̞=uO?^+VvmѿnfVXAhhdҥb1¬,Qa>|8 bÆ CwP*vGyDLsFtm:̙3n)S) ߊ Sy̟?,\U.6l`d29Œ3HHH`Ȑ! 4222O1bL&ѣGGNǹ%N?NZZڱsN^~ez\Ɗ˗VeС?Ç*\KXb\,ϱ. GuiLNl&h\EZLSbbbPL4Is.}ыRpѲkBLeS</bֳCqMeKm 4lܸ& &JN~~~DDDl2"""ɧUVxyyqimN]EKͪUc~Q^^2<1b6n܈lh4pBN֭[G\\7ndʕ|gXVl AmnݺQsrrضmBRRv___ۗ@~mqMZZWv}/jj pvZN/_18̥ ɸ馛/?vQn;wBN=::<DeѢEz<xb1%8_~={JBB| =z|rQa0]^zQUUŁ8p(9SN`ƍ̛7Enվ6o<6n豏#An:&NxIc:t s{}mǎn5j?hɬLzE^\y;v?hdҤI 1 &矣jҥKINNv9gŊ 2+Wb裏x3o<>Sz){=U̝;s犟'Ofe֬Y <̟?%0kC8/?_ϻ(;hر#y/^,~^|9foVۛɓ9{,]taĈܹo&NW͛'S3|ttۤP^^΂ = SNmۖd8q"Gn>'/2saҥDGGt:|IŽ?8re˖1|vډg4/00cٙ_, aС=aÆC.]D˽Rlpjj8ٴizjҾ /0c ,YO?-ZyV\Ɍ3k}:~yf֬Yb_~.XF͘1c~%%%.0N>MVV#Fd2rJRRR{ugʸ曙>}:X {Wx嗱uرt C (VUU5Y~7Ç裏O܄W^y]v!ˉ#!!kxs矣RxW馛xᇙ3g:u_#:Rg̲e8y$~R}bRJ@S7Rsc9NK]}{׮FC[#s_=M>h]SWa&aJ4HHHHH幸pfM>FBO8{$L&$W(f}TZDR҉ IDAT[ԸZӜޔs,)\iwPiv"11ϮDj[ (!!!!!!!!!q+OKW]6讗JHHHHHHHHH\F$ԕv de"yhmmS +CZ?+>Ϯ -^ ~ ۜ)ɨWϛGWӖ5:B@WBBBBBBBBj% #y (v 1q.?QZ˰[@hۆ7[!y (-G~dlÔ!Y3_0m$HZEᆮ=;X~R`05FMƟ C~>FŅRRe6N>L6rJ0/MvV*d\)ݧJk*@5z+zs V\vw;.9\Ή.W!!G\Xaڂq2b=rۯbKRzc2& d|-VAG@)y쳫N>W)4)B.cX-k&!!!q,|2*c5GNh zpZat \5MW[ڞ@hs׼}'5 +wQmtn6P5llPoSp09ny)BoiRޚPPdֿC 1!Z'Kvm2RrurnJo;ϖq,XzzhӥՉz.j~?U&w]b>ms: &HȄ0UƟgʈ "6P2¿}Y[ZdņZn|XI>{NrhTr)L毦SDz2 d{<t XLqVתL3cFV:c'2lcuo*0Յ6{)tkv:J"95qfR.CpS),$WQȹs ϖ>Aʸs c``@M~ 4JF+%؈:W!*"R{->ZzVʐ_.P)d(-6*B裢zkˆ%_hrJ:*LFʭ\BFL%i󔄄ĕbθvwcZSƺԕ[F-ٟZF%MZr0˵@%Fu Fdk&>*n.J 9%t\Ƅʮf|"5:0*q0Nq#(4ٜf;)C 6 /ExEzc)0lOTь**0 LF}ؖT.0H f;VG)rX^~ɄlO.&؀B.chz`j4P[(|  %u;v%@~nԲd8R#:eѥ LFԬ<9**h鍏VA~GnF8UE(rgr/3"9rA z\,T2:fO.&rʗC~j|JSʰrK ˮ}NŠa12c5|d2%:XKx@z ɆLL+ͤyVxk{+)Yω)gT,ۙC~\,?!~j+ͬOG.մ~JΠn!hprgjfr<`?| F.G .ܛ2#}QU)XOd tFnlO Xv۔h\ѨmHIe'[8[.U2_8y:6$P8ƿnǔ 8!+zQe0{0~jtvo%=[^&0uH iz/(SSi2<>_X-Vjkx ;9zJ0Zl|-Ţ$_Mac)9%B&>՜u|F$q6W\ R> _e&bCb ywùz/Uƚ9*#itAlB %,@lcߙ2Nd6m19KMB b $ 19*}g._/%G+9V>Dj-3qw@sdX ױ9 heϨQ}$Z)#رk /O&v;6V%G _n+Wړvt:B# oz]x‰ nm3es ZɆ\.c܀йrbC5QNs5O۩5+v;KgV=ng0/TJ9ʌDk+3%@ZcXVJ!$~af_[@ _ӫ?=HwUΜ?9O.қk:QVʱuȬLgAWՊ ue7nJ>.n:ky_~=^rOmͽ1 B~2#]b})6oR٥̔AX)l:Xqd2xpD`^!| Zޜ K룱 2E`j93Mi|ٖ\ZFAJq39qPȈԸ=Lv"^j]Ŷ"FćI uuX~ 2&hF%+vaєVE4&'d0q@$ |?/GSRe!fA]7veU+:8 [RekƏg˛U? &^Iz ϓBoqxͯJX0wBSTalmkB.cx|([UxF#HL)#GElM*jk7ni=4-^ l)r@qn:}&ZB!N77ZӴu $5ObB?+'*PR."^k6lv${Q'_ Ty 5u&!L/h#x`j9Jcz@ŎJ)oRzQʀA9SJD>Wϔs\%1!ZLJQd dP>]jU$ `ET&sӨjgdBz+yDT{:ssUk6қJUt՛lI 6ċi"x c!f#8L0<+)2&],.!^nY9se@ 4Oaj4@LV|W|#%Ϩa\~;u ⣟k~tk1sߓ&uu g ȹ l5ʨ@ *2q@->J~;Y @JRZ}D%rf;FŕfJjV5~QAZ|4Jv/ki}J&^)w^5YՔ_ueÃʙ8 "*9UEIwMq:zGVP( IhB&ॖSPf}QBԜϯl7:<&*r̶&-Q}"վ-%&NeUU\V Rӽ/Vl6;v]KUzMΔPRit)fOu-V;vsQX+w |]2,v{;{B=rL?[RA(SJ}#X]cHJ+'|Gzq:ҥ|LlaRcbv0[ߗ̛bXR+ Ұ`yU Jj^U{2P V lv6@o%q5dr>(+3\?q:GzA5r8V^̬dc)6cرX;zgE8\(_=4&ۋrclqh-Gx!O]d UfBV)ױnbt+kN78]%zxMQb2זLDiGcrvc+1]!QXn]PNBy& S?JFނܴNn8^AxW &Gɶ#֒ռ qM?'̈L7t ax~8VBW[žT= C X~^*f=<ߔ\H{jOS*dtC.ƵiZU{8WT/1kl[=ˈ~dѪķ ؀ 6 PeRVPftf,6;ajrkUt2#_|)ZUot_tёb k+vԼ?>VC ]S>Tq|=P5^́eXmc| PnNNdVQɹ|4 ,V;%?'@R!)ڏ"=eM Fq$~ºm'/*ːʌf'HO(NgWѵk^Bvj3ޜM^aƽxvy~ʱRRy`D7Z68n|UhV{hk؞fĭFjw6ƚ :R#/w<`_5^jyFt&64J[]d2=͇or,"46KL|}Ih(j3Jrw%.ܛ<1!^Eg_]\FdpP +LTln;F1ڱ/'!!!qxᎮTy.Uƪ}OъR Fksycrbdꏸ^o69oN*( >D1Ajָrzjg_ U;>*l6v>ޝM\%J 5eo'yt\ZO (v ^Ԁ\l ՠЂLNJv:`<.Bz]4=h2}/yˡ2qk+9\]]FZ.~(2Nd:4Xrˌ S⽙Ev |Ȍ6JnڽϪrvHh@djqͭlM6ٔ(Y: 1L1ЈPOK[  :2H+Zr,6;Rs1lJոx'(гx[SVefo^ LNI.b|r@k Wա>tF%BTd]F <BEV.ĴIF\aX .ݜ U!=8S$.;M;ӯcgD˶."]YĄx9Ɨj#jbG_뫵Vʩ6X.39b࣢ :pˌ]l hrHɩau ļ .F_!>co _ c\** vdCE)'sR#zSVm:KBB++N5,;\Ubk:t ZzgŮz]lhPN.6`0=O` 9H,4uߝ>7V4X8#ĀheXpv/.@t쒆nhJCU]1+ C2VIE>僫6@bƅDmwc.&\-Cϖ1Oے Y;[Gq} fgs݂*ŸQlHtDl:w*>?mI>WNo*92.fEf^7HOAd]pD1wBL;?'^krz_t F!Y_2љ{ Х7ŇR(Hgr\T5iLښ6>-1ѷCrV3TVfJ)Cz6Ϩ`׉bʌ~ƌB=҄lc@`Vu]Q*d➴b;SXiLTJ5,WLN1!ZfjKZ~8ir|TDjY[j]'x`D'(4cQ)h lR9gi 7>'31Ƀb( |(SUy)>.~|kkN{.8 }}@hE٫2XY7;n%5Z N[raϩfq{r!|iW?;*1FS&N1Hͫ&*؋5k{A'֯r݅`-i:F`pPuxi&voDZm ؕm#Οbv@I7Rp,;ǢH:_AN酗jc,,3{(y) ҈ 2ep,_qE(_:Fjw[d(2]b[Aa~kn\U=_jdIdտnX#FdPRicE%8u# -Y܉T/zz8<.x5Ep Wfй2GqJJ)gþܫZOUgV^p<)?JnyWy{h܉X?[J~4܊@-ٸ?IШbJK ɸkOWg54jB.#@JNa|Tt9-YHͫh ZzrŴة4X(0apFA9 9VcyJjn8Ivmϩ,Gm7VUQ)u`MM6-oNqRN?bSjJ)C/*˫_/)Zt|՘vгMXm~^J*9%fz0g常& $:Xˏ==(>P fUnG5G0oBkq6b0md6 l8QeDDFRZ9E5}Q"}L(%9 IDAT8U ˘|}H ߳덢*!!!!#OͭⵉD\&c[RAFcd4鑑?lXwсaPuf+GvcX`5t6&@p@ +&So J!.C.sD,w57UYBBB䥻`ى?+s Wk"WHDb-fZo%P%$$$$$$$$2YQ0R7.$$$$$$$$$$$2LRH0W{7 "+ !!!!!!!!!WjVFH}<$%PBBBBBBBBB2"y:[D!)*uyHJl !!!!!!qRWϛ^a#d|6Cuo۶mׯ._~e.\ؤ$99s]wѭ[7~F8qk9`񔕕Qtcɒ%ddd\[v-˗/rf3k֬ٳZ|ͤRYYIee% 6bj)((pĺu8{lL&ΝHBBBBj1*c5GNh% RVVoo޽WW->:hKxܶ5/AIͺƍDEE]8q;ﰨ(bbǒ"[^a؍^P1J,+(E+4i"(uuãwfܙsϙsf&____-5j]vU!qTXQ-lʔ)tؑ>0yd<<<066fܸqOHW|`` SN O? d*'˗W+!C7onnnl۶Y͛7ӥK7o.9880vX ֭[:u*W\siذJ>|8|իBL %**J%ݩS!11333,--bܹC``fee8Wk)cdWرcŋjihذZSعsJҥKm۶ˆ  X/(|A"P(aT?͛7|XPr1;]]]֭Kf8x sfZb *$Ә 6( RSSu^^^Dɒ%155EPիӶm[yyhLJ rQJ*뱶Yf4k֌ٳgn:ƏdZ/9}4߿G"uVVʮ]oooEdd$...8::gRSS @&ɓ-[}aiiɼyx)+VDWWˀ6m-[e˖ܽ{WcXZZ2yd٣hȲ_nŊSŢǏ֘WXd ?~pk׎vک4iڵS+VE eٲe /_N:ܹsGUXjb={d\B`` ӦM# %J0azk9#""6m^^^3h ~jժپ};ۗC2f|||[.;vH"Z/443gD"u֬]mnbbɌ13g1m%d億*U$rJhժUm *_7'>~Lt%H$:q$Bܜ(PޙÇ0auaժUDGGcjj\.g :!CI߾}JR ˲y󆤤${!?kkkEbb"!!!Z ]]]:t@ _~"Eg9D% LN?@=)R l:4 0߻wA6m022J*8qCMjj*C AGG j\C_aiӦ~Snذ! :/// 9\\\#::: .\?+̌3~x|Ƶ`aaaxzz[[[oߎ9cƌQ[϶m8pVf˗/UG1k,p̙qR6^Q(u%ʖ-KӦMY0gggܹC 9s/#BBB6\b0׿A*ZxzzjwNJcNsM,dvzyy J1,ٹv~~~H$̙)X @#GF"PV-:w̉'rT}}}y SNE*bnn9s挠1ERhQׯOjը\2M>|HTTfgggg{摑 4LF Cv͛7̙3GfffӪU+prrbTR@%D% d2Efć`X RQ`kÇqpp:p!JLL *֖r n"<@__8oРw&>>X*V ƍ#>>O  FT"(zdٳ3gcСeY.]iqaaaBҥ7$Aݻw`nn.99}}}ڵk' F ʕ+@OXUzRO.]4 zaggL&֭[oߞ"E`hhRgTjR$Iŋy)FR Z5rdRʕ+hVΝSѣGz 333LsRJxxxЦM<<<6% 2VvŘ,,,H??KN '55Ue3==]{]*TR }}}᛫M޾}K2e^[8pΝ;sIbԩ*;vL-[BT!/ק/D,;#̀w۳/jm LIIdddPV- s-RBB?Ą{bbb F~f#!! >FFF~ͅlٲ(ɓ'u)x5jq6СCš"JU,R g"E'==L9`ե[nu3f XjZXdI>|齾zh*T'TRÇ{ncVD lmmYjԨQC(wﰵU/Z( j`ʕ,YD-DO>/]+W0{V\۷iѢҥKдi-ׯgڴi,_ʕ+kܵÃ/ҺuWDDDDD.W^B\'^voMJ*Exx֞A .)E[}s n!葖 19$z }hvˍs!Hz*.\… \vsaP(\|\Gi;\\NjjKǧ+V7oިs Z__[[[nݪKzغui^WWN:zj رcº!sS޽{^^^Ĩm-<~X :::ڵ߳yf('&&2a„\1,Z(W\a 0ÇkiӆK.f2;'NdΝO1Rӧ ;>|{bjjD"H"bkd2ݻWEZ*j]h5kԭ[xVZqiHIIaŌ7N722~ĉlݺQF1|~ڵ˜E9p/^ٙ˫}Ȟ777kvژdA.$|lOytN:U&DK #CIgX]W5wPhq>L=(SJ3gf̙l߾ɓ'vZ+Q10aaݻwg͚5ZeԨQ̚5I&1{l飲1L 6ۛz ag׮]jٿ+&M֖"E0c \^ϟg׮]Q^=>Lڰ]v9+旞={һwonܸJ\zlݺUQڙ}Yf1tPnʔ)S?+WrA*l)Ϟ=z.^ TYibb† 8p ͚5f͚@Ǭg1c \իWEC8wkצy 6nܨ맞b:ݸqcΝiڴ)߿}}}6nܨٳ==2ʕ+Ӻuk!9;wprrF700P9ޞ+Wҽ{w"##y!Yd͢ 8!C|y ,[,JPU!++|y_)SŋceeǏpBj< 5))WT*AP߽{9v_p9rcǎ!H8y$ ۷|ʕ+sqV\ڵkUC qqq߿/^PpaZl)lRx񂌌 lllT,<<>}br=s85mlizSħhF]MKcaaHc')(""LRT;K"\Uk kͧi yR$55Ueg/צ~|mDNh흉}0""BeYNvN8hoӣ%1b .kioqwPψ|y6Q sDGls@ψhmwE(Qqqqv1\;DKgDTF#U#vJx*""""DFFDJ}y6Q /^Hђ;Z}\+EN:ٳeX|9WW֭[ѣ?[gذa4jԈI&Օ7oި9sGxOjj*˗/W KJJS-pqww޽{@i ͛7N_w~zV90qDذa?OOOOvܩ1ݝW=rQGq]T=zāTȠw޹>̘1C]-?~~~'7oTKHHPK~wXz5xzzi]?zׯ_ZOwww^ziii̞=,L^VUFNȏ% o~wom.G]gwss\-ٙ@]^ԩV=z4KW>-Z`ݺuԨQCcmfB#ʕS 3f ??~dܹ\zE2|p cǎٱe xbnܸALL e˖eѴi&_[n??\w^ *ĉ' 8r۷O>B qqqaܸqرC9:u"""SX1Ξ=ݻ9x lٲ:u޽7o}v!ynqرc9|P,7Eb``v| F&M",,L%LPѣi׮J\`` gϞ՘WƍWZƍ155Zj*S~]jj*@{ԩZ[QP7;\~GGGSdԩ׍7x@e7qc56ЦJDDAAA$&&"J144Ҿ|R]dqE"##?~|Ç(  r4RRRHMM%99Hbb"6mbܸq+޾}K (_<k֬B ˓'O|2vc'\6~A^lz"99Dشio߾eРABӱcG?N&M夦o>!ϳpBj׮-ܗ˘1cpqqݻw\vM e2ʖ" IDAT*anݢtB(J RT{x-)6 2`TXJ%&&&BXxx8111*Ν;Gll,>|ĄҥK# R755{s!bŊꊢyT9e,Ljcٻw/=~S wvvVPnذ!#GԲ_q$BdYJ 5"Sʮ:",, ___,,,z*[,eСgnݺر R)111r &\.g߾}<|ҥKV^Ƞz,^}}}"##9woĉl߾sAYホF ۷{. ,{JJ`!WKǏovxJѣ5"=J}N*G>%--_?KM6SaLMM(G1_Ri>w`c88Wkkড়:u bccÉ'TǏ3sL"##]6&&&vAmݺ5VF888п\Bll,,]]]],X@ll,GFOOѣGӡC<<ܹZYÆ 1 ㄄0vX!TRM6!U,Xr%QQQ^r&MhU}J5m۶Y$7ЪU+9sкuk1ؘ3g eٽ{7p=!NRWrppo߾\tdN<ϙ?>/^#Fйs2f^r۷o?>*T>}㵃#F`޽DEEѽ{wϴivڬ]… hUp-ZH$4oޜŋK,8qFlmmi֬V'ODD<*&sCTŋ'͉!:2] D\'))7'>T`kS1bRdIr9cǎۗ3|p[ ӧܹ3gʕ+j o&99GGGd2 l[[[s}033S ˲b^:ǏYz57ofs"&&5ƩS;w.cnn?6_gܸq( ڴiÊ+~@GGEqaa9;*Ud۶mL>=e'L2Z̛sα|rlll̙3/_͛[ʍڵkfzE…iݺ5˖-TR* nݺŻwׯ2 \NqvvړoB:::xxxF޽Q*rIKKڵkZYY۷oe۶mܹs!OڶmK:uy&iAӣK.ܽ{gbdd$("111/^T<˗/QrΝ;se/#G*|_~SrBBBrDiժmڴf}|||2;vPQ D~;v,%Kh6l ccobee1N&aggݻwi֬)~FVXAٲeU̚5  ɓ's,mwVƂL}JrFM׮]ٳg?fTPA<;yɉ #GҤI֬YC|||X0`)$\8::X4ɓҥ UV:>'.]q}fSjU]&Gǎ9p@V#FеkWaֿEJJ{Ç)\pmC||59gšOkkkLLLHII۬_}O>?P{9ܹsWF$9ͻ`$&&"puup̛7ҥK`&N(S,H}=Jttښ#G[F-ݻׯ5jĸqX`*TW[eW8r.s<~ݻwa95kTqզvZƌC-^ _x1G%6\^~S[7oި,S e˖SN*ᱱԮ]u֑LϞ=Yd8RP!tuu]6;vQF5 nݺEzHJJ˗ 2D=0w\444/_bii!R5k֨?GEE/Kݺuɺ, SLw={0o<5뜱.>pYzbaNHHq\JNNuҨ^zx{{ J`ҥ>ENܾ}ׯ#H4i[yY?E[+랬ח$ D"Fk׎?3G%0/91 0~R)Ջ A022;;;J˖-MĉyADZ,y7)dY!ƐȔ1-2#?<jȕ[O7Zj%NHH0ZlV]]]zM=4hPe˖]v4h@%N") B&]]]~̚5KؘGGpnݺRq`c4h\NzznQ~}qww&RSS2e ˖-WJ%F{t5_hߏL&coe֬Y4lؐu JU(۷O*eK.OXӨQ#*U63m4飲ё.]ZllٲEwԶT\iӦ1zhacaÆhѢ@DF#;׮]ŋjn=Ϟ=&AV*K~1:<Ȝ)߼y3ܹswww0|pDEEip/LFzzpT*yjeeťK{ _Dx)˗իhтWIJJJ,"6Z "cewY\{_t\-hyɉbr\ɒ%L ;ckSh,,,^[d+K./@d QA`K@ƨi3#Z[SSS9Qd <}THll ?BeZHLLȑ#¬O"E055ȑ# O2eógwooo"##/99tZn-̼r&ORdٲejC7hڴ)Cʕqd /_Ve 2 cccrJ.z...jt%KTv?,,Y?hdd$~y$CFFgΜ<I&ѧOd2/^ٳg<|Pe6m۶|1c!qqq̞=ڵkcff&l:u[ "%%% ܹs\R ̙ĉJ)S̙3ԩS333ӥK1bچJ!**iӦQlY5K&fKKK*VHzdQX1tvvv|w`ӦMgj/iii@ʕ+~~~̟?Ç޽{H$:u TkN[<gttt5kVVV[n1ga"SeX>>\~%JаaK.elذjժQBnW^ڵk4oޜMY~om-D}Ve7"""^r ŊkP򙙙7Gnm8Vr9gΜv n!葖 19$z } ťK"LӧOcggɓ'EPp SдnYڜڇC8 2gquuUHԩi^WWGGG~wy9gΜf:vȹszۗڵk pedd0m4޿ҥKQ( 3y###n޼ɨQ5j'NTlܹCUv{葊ĉܤTRtEȶm۲{n^~\.޽{J*%Ɨ(QvtxM4H"xyy?DΝ~ӧOٽ{J\~Wf8pիU\N)ΪU~ rSSS6mę3gصk?37oޤx4lؐVZ }ݻ[ŋ GX;w Hf͚cmm2k,֭[L&cŊԫWM2i$Nʕ4iSNLԩSo 3gB`„ =w%K\Nll,FFF9nҒ59U0:::3r{_ٹzE^q>}:u$|AHZZ}v;D IDAT .~jJlM'N$55VX!&"(8P*6;s85mlizS ^euKoZ @2?H/D^gE=+Jk?DDDD tREZ)sZEG^moc_u|]&\DDkQ#{D>ע}6Gﱽ{-W*_FDDDDDDDDD?b 4779kioqwPψ|y6Q woχ!*""""""""""*\;5y)"""""""""%A hy\l̿]DKgkVFm(""""""""":CX!vJgDJ}y6Q P(vDDDDD&U#v||kDz'g#j]|[bEJ,СCqqq)ϟ.3f3mٺu+zַN޽??11///tuui֬r RhQƏ/ zr R).\ >>^cNNN\~-Z.(l߾۷ e2\Nٰafff$%%ѫW/>lxٰa}QŋzaÆ ״iS,--QX1t'?Gd|wԯ_M60rHQ- ԫW͛7`<<< 7mǏTR4l0ϴdǏSF TL>UVy""""_#yYVK9k#?86ö#xZnH"" tg2Iy |th>} nݺ -Z0j(v7y| vvvܹ3lxyyo>!qTXQ-lʔ)tؑ>0yd<<<066fܸqO%#GvZBBB(S 6mVZl߾CSzoro^m6>{쌡! ,`ҤI`:vRd׮]ܸqLLLT>}+/^L۶mYr%J6mPvmIHH;;;7n#GqZ7)).\@Vx!>8**D4h@ƍyǎW^?6mpJ(!Ǐ… iݺy;vпܹd*g۶m###ϳSޙ]f̹۶mchтMRH.\Hͱg…ڲzj/^*S}j5?~ӧO3`0z|iѢj:ĬYXh~)cǎU~>}hT^(F%v:iٲ%'O$""B-[PToߞV^ͤIL'Ǝ /[ΎSzueN>mR*uv*k׮aggdzg H"lݺgҢE &L??|h}6#G %jcc/*T0)g$$$0k,lll1c:?PYٳ;vdFo6lHɒ%yd鈋37q,B_䔕zX:N.}~YƎ˴ihժzW?#v0i$={իWs]``0``h4弗I1P)sӇqm>>ӿ BsEm@Nغu+z/`*{u jժʼn'Qԯ_iiYHRR^ժUٸq# իܾ}ڵkL7o^٬r*˂ L֕+WiA̚tpL4{f 8oݺE޽ c߾}\v0|hذ!+S}]΍7pttՕ8"##Yx1믿AI/D^7¸qXd +W$''+ӚΞ=U[Zv,41118::иqc7n[bTGZ'|©S۷/Ç7)kٲe'(ILLL`1;>ߟ#F˯%J(>#4iBѢET~۷?jgVWw9b2-Lbb4**C,Epp0vvv@~*]2&LɉaÆiӋMב*z٭ZNcРAۗm۶q9zEr[ny``xyyrJbccѣ˗W.{n?~L ...ߟk2r|Ȉ#fE\~= 111tЁ>ǏtR֮]KBBM65{{LҤe_d{]ƪUpvvfo=wVZN: 5(;uissRiذ!NbϟYf&}>M?uT\9S~+V2MQN-!5|1*U6ڵFd%Kw^ewaΝ;Jb̙޽;OB7]Nz\ !!!ѣGRpwwk׮ftxY"##>XXX$ҬZH%NFϧ[nz|Q;vq&8rڶ[egGWԅ%&i:e(P͛7ӬY3{NشiC%::%KoJWi`mmMllldCٲe)Z(ƍ#..˗/+M1 ,h$99Y9MHHPxެ\2WA`NVrr2FqDDZvd$y֭R}ʕ)Wuz!ժUSzMM سg7u)avZZZRzu:Ď;x"DDDZ4Hy/ 0EѵkWʔ)CNHLL4pabgQv툎&66'OW_fҜ;IS:0NZ(~7Fsj5j4=mdwnܸAb25Jr8pmڴܽ{,B(9Jd1::WWWJ,ɹs]?ĻwbrQO՚rrrR[YYVF~m`_cŊȱ}TRFHܹI&̔ tppf͚,ZVKjՔz?~5k*?JyޢEflmm ɉ8vڅFŋf̦NJLL :ggg,X쫴'>>^ OOO]Fll,Vmf7oެvuNQQQуѣG+ :4 /;vdժU'N ȵkה&c͚5y._׳m6vťK1bXZZw^9uT+~~~Ycǎ,[q1Zhӧ9x EiӦ6o2e _~%UT|Yj|~yE!tyTVN-ʽ{0 Ju -uwvu}Ņw*㉈x ~ **.]:tUV幼,^#Gˋvڲg^xzVf,0̭@eFciT3k }ğ}Rؿ?ԯ_͛7`СC@j?t(\ϨpDFFL۽{7kkkkj֬M_W˗/7I͛ӥKȥKضm=zPի˗/ӧƲzjŴ mMakk׳"edffF˖-Yj,[A)>}ʄ `ѣԨQCسgO ưaٳ'SN5 ޽aÆnݚ֭[S@7oN˞/+WwwwN>jxzz(Uhh(899RU:O`aay{ܹTRܾ};ieeŝ;w0`קK.tޝz1`޽UxqYѣGY`&MH"|7]}O@@oߞ*ol-ʹs2}7L^߹s___mŋٽ{7W^رcDEEqIe̼eѣt֍^z1rH\]];w. ,qı`eY|9FbΜ94i҄7oҭ[7ܹeyKV"<ҥKggÆ 1\: !ěe9VFذd Νct<<Å pBe7n^^n:eZj_|/s?rA cĈ/-PT|x15РAdN_6 _H+T͘||9XAD\FowՋ%J(#T+V}v 51|:wӳ>aʕ+<>J*)ٙz5hЀhիL_>љgPfM'|bƍqƼ;gn:<==IJJRF,^8^^^888p5F^^^T\%J(Ӯ"e{L2,]Zy|1se̘1C!&aڴi : (M+V>|7۬_7nx!֭[رPϦB J ՕwyVZѲeK5kƲeLjӦ 111xzzRLnݺEڵ}6SL!..Noy)J*|@jS۷o>?η~K޽ٶm رo^z1w\~Gʖ-i_ԭ[???BCCٻw/|L2_6=Nɓ'?>&Mb޼y{.jբL2ԪUw>3B7͜9VFYSbE ̙3MηZy*\;+VdԨQy޽[u\RvZ._Lթ^zEyEPVR?RX,[-G@޽{K7/A{7d91xrj4)lذon'+ M(=8_fuse#ʙBM ݻ hQ`` }`9'Io xI:9B!%zS28quWxSynhٚ#GR8˔EFp3^Z%mB!BD%7Ot2=z?x(* GG5iLex/" !B!ět2J0:-"B!?D@!B!AnEDp/h㽎m !Bڶ35jj;3y\-Hc9r)]柭\ 0$$ Z`iB! ;R K\!g4;gKK+6x=/[LL eʖEyhXшސB!yV_sM^n4nKs?X@ZF˜3 ٵ8.37! !BQD>`4M;v ((ŋjo F#ΆI<5=`gz# B;6o\!| cѸqc/X#.@M3eF#ϝql -[A˺` A"JB'F9~| cQP!~ޱ^^5~/GNd$QoQrz})d #{.ś,DƸpBoߎŋQÆ5.AN#%%EyD2ekTYw0N媓"L& :d;?c׮ۗ]d&WYS\_kr)AFBO]=BD_"?wѣGO6h/ȁ`2YYLYnݼF*MetP!D~զrB72:2Gz.G PRt,],VVhHB!oToѮm[ڵm:/`0 ёGRXlINJr*BfAE~כ?|GGF/&u8reʔzչ$#`B!x$Aj) Pq9""nӨIWPA`2e8x.\u5B!/ԉ]!lْ\/kaaAV(S?Wz-y]_!B!ĿSͼ"/2ӛKQ!B!?&f^ B!N [i B!4B!B B!?D@!B!y (E%hˮB!D&IB7 gcc_f=B!5{lٺ+WzƌH!c+͍quWo/ŋ4S\x0,-s]^Mñ#ӼS&S-WT^cǏiFeZ(Wli|2vٳg?}(\0}4)4?<< }3gquueƌtY?q$ÇqttG̜9sԯ͛X{Nq[=ze4/5#Gt2} 75js ȯ 66d .LLo9gPn6 4u:O2u ݻu3wo۞eY-ZxѸqLLUsU0nFD(cccޣ'3gLgܸnO<`۶ۗ66&ecmmXXa_H (O`͛ t:=zHLJ"))e2tϞ>Ͽ ص{VV Y3/&ߩ`4ܫhBjiҤ ff0v4iݻs.3gq<}ހ^GסIѐHRr2IIaQh4_Nʕ3^d=xd~|θjvZr9z(ʴz O!lnDN@0۷#9B%طw;wz)륔РACz=j8wɴ7oҰAϘA||>~2{>>ChݪjZydl29{j,-&$$}~z-SFYԩSXիVe*Я7(Μ9G,wM0q&M7͍gϞjLZMM2"EjB ﯨP0DmWJ= eZ=<mܸ͚ Ls1jhܹKz(\ G\^6W;*WaĈ۷Rv-.Y'NÇKKKNL^عsnGZhZ.\@͚59~<ƍq+ɴeVeml߶;;;j֬Iٰa=o~XXw ^lق3w<=+ZlYlmmqpt7 $$pq.\8ύ7)Z'b ϤJ*o>˲nߎÇ눈[)]Fy=al̡7o2c4e^xx8U*WfuhZṰtl߻ի([l>_\r]vsAzQ X8tuawK~qlXPZj,߼ys%ـeKP`\)7Otؑ?GebҥTX+W s1ve{=d.̅Ȑ߶};Jb5tscƌS|9-qUW3ۛ>qi':͜5 77 יd5)rO2|g1c)\0gBbŊeZ0WeY]:wfy$$$(Iǎұiqt$ PH|WdR^Gm;B!īʃbX*3l,RKͅX#0&Fv0K;|ƍ4i"~%= V2|0Ʊٳ> ڹڳy×_w߾LA7{XZZcǩY&ǎg\\\L5LFFFHjՔUƺus5h4`fff /;3~'.>S&wr?gѢC>}mڶO^+WJ5kɹlDPtl^j6}{ 3gã6lڼӮm\US^]Λ;mRԩ#˿%J,7ct j{X0UX333&MįQP!ڷzogQԪU녶H6n"??KqT\.Lhhhu:}g4oޜXwBƍoٳ!JM-[tRJJͬ}-,,033\7@fj.~85kݽ{J*f9Ғq䈒d&EEErqᇕ&F1cT̉#G~r7PTxxj榙i6, @ شb2ͨTp ޽K۶mb lٲ#s:$d6Gif֬YS_8vy?&5jȱ1b8>\\\Xf2m8۷#ݻqrr"99_?}{d.\ȪWe|͸qiܨSL\r]>$$U( VVV݇~QɈzF˓'Od]2aG*GOdO~yީ|K tz]s>m8pJRp1&3{6#Fܺu;QQ_[[[RJ@j3f͚eY :/nܸl.1+4&xq/&d L~pT*sa]y!BL<8-˜nɽmGe_U$'W]Wn xyyaozB٥s6lynnn&فfҳSX8qoؠ??&::rQx1hР! b4INNV3[ɓY|o6]v1ij `kk-;wS@@''lEEE=ćQ#Gfv兹.5Јd1lٜ}POWYЯb0,KFO0jH6mVE+kԤIB 󲽝:K 2捛<:P^r.]c~}1cLLꈱ%JY>u҂?N:bggGLRfg T*I(h~.]ćF Z񱴲4h4r!nس{OΝ?kqvqVS|yh׮AAAܹs\uB!ʃ@^0tCo08ݧ\z{咓 ܁^R̐F!>> /T̉huE$;Y5C˨nݺEVSTi 󲽽zv*ZfŸKLLīEL8u$$$$O_G([,]ǁb xa]OEGjr/h4Ԩ捛>~LZ8dkogO|||,X/}3spt$22*z-.]XR2eJeZ__qV[qI؏SѢ4o,یҥK|1>UT孷2mo !"k>:9z3dE  ={P?v#1xzqFxx`08Kj۷# ڿ?S9:呗)RҔ-Νغmwww,YJ,YTR>u_~Dٲe {|Pŋ9{Ro/z߿ӧOٷo6lv⅋^%s]:qY4_DV-?гgD߾};f ŋg֧20 [nl2m[YBXVe޽4kTY֖WfCv&...WaUf2ch*W=SN3zeh9pG u{3ӗ>}=$ˠ}v SԬcIX:(Zmp\jի)T ;;;qtp@XXXP̩W6 @+Uĩӧ2sYk4n:<~7+m۴!0p) ̙3̷ӧ&lݺUWر|4kڌ7nбS'<˖)-a||PLLŋac̘ѬY˗/?B!x1<ѫQjuyoaCɒ%M0eTf͜57n<-H"Y&cƎ5r޽nyرc*sHLLlٲ̛;7[7_߾tѓÿSQysfVY[[dRV^e9IIIOy]R%D|o\^-07Wc0tt{=&NjU2onjA1 oMBXrK>Yx1 J:u| *VHre =s(:ۑKݺumӆӧOӴYsSʭ*x""p?)[ёI?UtܙcieIrR2qqܿY3g*|P"##ۯ[#G`"Et}0ԇ~ߧj*1x@}]߿Ϛkٽ{722y._LJ?>aaʭG-ѯZhA?3vkբF&Μ9qЯy X~{vڴlق3gz˿+aJp>߸q#>6/ϧy=~ڵXY[ZXX~]yfׯ9om۶Usqq{nMJ }f͚|6m`Rv]K^=>!syzÎ&1Op_֬|;wQeRvmܹE!/OV,ݻ>>tp,JlL4UvyzCҸliG³ŘlwV666 °a/6§Ƚ~s1, 帼h$22'OXYnt:/fܸq&5M3GXX8w&EB:uFFFĽ{QUѲEls)ݻ^ΎŋSbE%N/:&#vm ٙ-Z( ܹsr E IDATGǑ#X[Y=7Cze*- Gen9syIHx}Axy5ϲjբQÆ'&&r!nܼZ2hOll, d׮܌֖ 7eT*݃ٳg[lٺ |Yb`u 9mbbb_˕װ-XﴦuV4F'OqU=5kyiQP!0Ih_ /RȾ}VyiWSRR4y2M4cǎXeT=ćdll ry/$!;4Z݀$ GBI@+߿fgL;e.Mr"742h̲ګJTN`x{h4"_ P6|Azsӄo^Z&UyBo:RxχGØV5`os?[uB!BZ H#9ߔ2FRE=PWhsB!B7 0WV0-#h s>uB!Bi < `J,P!B!ě!-~K{eb;.UEFB!B7IZ xL`0}A !B!ě$m$д-. @unnumberedsec Index @menu * Installation:Installation. * Sample session:Sample Session. * Command specification:Command. * Input specification:Input. * Output specification:Output. * Message list:Messages. * Metrics list:Metrics. * Code structure information list:CodeStructures. * Appendix:Appendix. * Index:Index. @end menu @node Installation @chapter Installation @menu * Operation Requirements:Requirements. * Hardware environment:Hardware Environment. * Install on Windows:Install on Windows. * Install on Unix:Install on Unix. * Evaluation test and trial use AdLint:Evaluation. @end menu @node Requirements @section Operation requirements AdLint requires installation of Ruby version 1.9.3-p0 or later. And it recommended to install @uref{http://www.gnu.org/software/make/make.html, GNU Make} version 3 or later to enable to auto analyze by using the @file{GNUmakefile} which created by @ref{AdLintize Command, @command{adlintize}} command. @node Hardware Environment @section Hardware environment For the recommended hardware environment, it can't be completely defined because it depends on the size of software. The following is the test environment of AdLint and the analysis time. @subsection MS Windows @itemize @item Environment @itemize @minus @item OS : MS Windows XP (SP3) @item CPU : Intel Core i5 3.33GHz (660) @item Memory : 2 GB @end itemize @item Tested code : Ruby 1.9.3-p0 (lines of code : 620,000) @itemize @minus @item serial analysis : about 7.9 hour @item run 3 parallel to single module analysis : about 3.7 hour @end itemize @end itemize @subsection GNU/Linux @itemize @item Environment @itemize @minus @item OS : Fedora 14 @item CPU : Intel Core i5 3.33GHz (660) @item Memory : 2 GB @end itemize @item Tested code : Ruby 1.9.3-p0 (lines of code : 620,000) @itemize @minus @item serial analysis : about 6.5 hour @item run 2 parallel to single module analysis : about 4.2 hour @end itemize @end itemize @node Install on Windows @section Installation instructions for MS Windows environment @anchor{install_rubyinstaller} @subsection Install Ruby Get the @uref{http://rubyinstaller.org/, RubyInstaller for Windows} 1.9.3-p0 or later from the @uref{http://rubyinstaller.org/downloads/, download page}. Execute RubyInstaller and install ruby with the instructions in the installer. @anchor{install_devkit} @subsection Install DEVELOPMENT KIT (DevKit) Recommend to install DEVELOPMENT KIT (DevKit) including @uref{http://www.gnu.org/software/make/make.html, GNU Make}. Get the DEVELOPMENT KIT (DevKit) from @uref{http://rubyinstaller.org/downloads/, download page} distributed in @uref{http://rubyinstaller.org/, RubyInstaller for Windows} When user execute the @file{DevKit-*.exe} ,DEVELOPMENT KIT will expand to the specified directory. @subsection Set @code{PATH} environment variable Append the following path to @code{PATH} environment variable : @file{bin} of Ruby directory where @ref{install_rubyinstaller, Install ruby}, @file{bin} @file{mingw\bin} of DevKit directory where @ref{install_devkit, Install DEVELOPMENT KIT (DevKit)} @subsection Install AdLint Start command prompt, and download and install the latest AdLint by the following command. @verbatim > gem install adlint @end verbatim If you have to use HTTP proxy, set @option{--http-proxy http://user name:password@@proxy host:port number} to @command{gem} command as follows. @verbatim > gem install adlint --http-proxy http://user:passwd@proxy:3128 @end verbatim @node Install on Unix @section Installation instructions on Unix environment Install Ruby interpreter by following @uref{http://www.ruby-lang.org/en/downloads/, Download Ruby}. And download and install the latest version of AdLint. @verbatim % gem install adlint @end verbatim or @verbatim % sudo gem install adlint @end verbatim If you have to use HTTP proxy, set @option{--http-proxy http://user name:password@@proxy host:port number} to @command{gem} command. @node Evaluation @section Evaluation test and trial use AdLint AdLint provided with small sample C language projects. Evaluation test can be execute with @code{intro_demo} project by the following procedure. Copy @code{intro_demo} project to user's workspace. @verbatim % cp -r `adlint --prefix`/share/demo/intro_demo . @end verbatim Generate the setting file for static analysis by @ref{AdLintize Command, @command{adlintize}} command @verbatim % cd intro_demo % adlintize @end verbatim The following files will be generated. @itemize @item @file{GNUmakefile} --- Make file for GNU make describing the analysis procedure @item @file{adlint_traits.yml} --- Traits file for customize AdLint analysis behavior @item @file{adlint_pinit.h} --- Initial header file of specific project @item @file{adlint_cinit.h} --- Initial header file of compiler @item @file{adlint_all.sh} --- Shell script describing the analysis procedure @item @file{adlint_all.bat} --- Windows batch file describing the analysis procedure @item @file{adlint_files.txt} --- Analyzed file list for shell script and batch file @end itemize If GNU Make version 3 or later installed, it can analyze by the following commands. @verbatim % make verbose-all adlint --verbose -t adlint_traits.yml -o . intro_demo.c intro_demo.c [fin] |============================| 0.401s intro_demo [fin] |============================| 0.029s 1.125s user, 0.765s system, 00:00:01.89 total @end verbatim If GNU Make doesn't installed, use @ref{AdLint Command,@command{adlint}} command directly as follows. @verbatim % adlint -v -t adlint_traits.yml -l adlint_files.txt intro_demo.c [fin] |============================| 0.401s intro_demo [fin] |============================| 0.029s 1.125s user, 0.765s system, 00:00:01.89 total @end verbatim When the analysis process is finished with no errors, the following file will be generated. @itemize @item @file{intro_demo.i} --- Source files with pre-processed. @item @file{intro_demo.c.met.csv} --- Code information of single module analysis and metric information @item @file{intro_demo.c.msg.csv} --- Warning message list of single module analysis @item @file{intro_demo.met.csv} --- Metric information of cross module analysis @item @file{intro_demo.msg.csv} --- Warning message list of cross module analysis @end itemize The body of @file{intro_demo.c.msg.csv} ,"doesn't reach the control " "divided by zero ". @node Sample Session @chapter Sample session @menu * Analyze GNU Screen:Analyzing Screen. * Distributed parallel analysis with distmake:Dist Analyzing Screen. @end menu @node Analyzing Screen @section Analyze GNU Screen @subsection Preparation for project Download @uref{ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz}, unpack the appropriate directory. @verbatim % wget ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz Length: 840602 (821K) [application/x-tar] Saving to: `screen-4.0.3.tar.gz' 100%[======================================>] 840,602 --.-K/s in 0.1s 2011-09-28 11:41:55 (6.18 MB/s) - `screen-4.0.3.tar.gz' saved [840602/840602] % tar xzf screen-4.0.3.tar.gz % ls -F screen-4.0.3/ screen-4.0.3.tar.gz @end verbatim @anchor{screen_exam} @subsection Investigate project Confirm how to build in analysis runtime environment by building GNU Screen. @verbatim % cd screen-4.0.3 % ./configure this is screen version 4.0.3 checking for prefix by checking for screen... /usr/bin/screen checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes ...snip... configure: creating ./config.status config.status: creating Makefile config.status: creating doc/Makefile config.status: creating config.h config.status: executing default commands Now please check the pathnames in the Makefile and in the user configuration section in config.h. Then type 'make' to make screen. Good luck. % make 2>&1 | tee make.log CPP="gcc -E " srcdir=. sh ./osdef.sh AWK=gawk CC="gcc -g -O2" srcdir=. sh ./comm.sh AWK=gawk srcdir=. sh ./term.sh gcc -c -I. -I. -g -O2 screen.c gcc -c -I. -I. -g -O2 ansi.c gcc -c -I. -I. -g -O2 fileio.c gcc -c -I. -I. -g -O2 mark.c gcc -c -I. -I. -g -O2 misc.c gcc -c -I. -I. -g -O2 resize.c gcc -c -I. -I. -g -O2 socket.c gcc -c -I. -I. -g -O2 search.c sh ./tty.sh tty.c gcc -c -I. -I. -g -O2 tty.c gcc -c -I. -I. -g -O2 term.c gcc -c -I. -I. -g -O2 window.c gcc -c -I. -I. -g -O2 utmp.c gcc -c -I. -I. -g -O2 loadav.c gcc -c -I. -I. -g -O2 putenv.c gcc -c -I. -I. -g -O2 help.c gcc -c -I. -I. -g -O2 termcap.c gcc -c -I. -I. -g -O2 input.c gcc -c -I. -I. -g -O2 attacher.c gcc -c -I. -I. -g -O2 pty.c gcc -c -I. -I. -g -O2 process.c gcc -c -I. -I. -g -O2 display.c gcc -c -I. -I. -g -O2 comm.c gcc -c -I. -I. -g -O2 kmapdef.c gcc -c -I. -I. -g -O2 acls.c gcc -c -I. -I. -g -O2 braille.c gcc -c -I. -I. -g -O2 braille_tsi.c gcc -c -I. -I. -g -O2 logfile.c gcc -c -I. -I. -g -O2 layer.c gcc -c -I. -I. -g -O2 sched.c gcc -c -I. -I. -g -O2 teln.c gcc -c -I. -I. -g -O2 nethack.c gcc -c -I. -I. -g -O2 encoding.c gcc -o screen screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o termcap.o input.o attacher.o pty.o process.o display.o comm.o kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o sched.o teln.o nethack.o encoding.o -lcurses -lcrypt @end verbatim @anchor{screen_prepare} @subsection Preparation static analysis Generate the file template of static analysis by using @ref{AdLintize Command, @command{adlintize}} command. Edit setting file depending on the analyzed project. Investigate computer environment, compiler environment of project build. @verbatim % uname -mo i686 GNU/Linux % gcc --version gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @end verbatim Shows the preset build environment which supports @ref{AdLintize Command, @command{adlintize}} command. Select near the build environment. In this session, GCC 4.5.1 on GNU/Linux i686 architecture is using.So select @code{i686-linux-gcc_4.5.1} . @verbatim % adlintize -L i686-linux-gcc_4.5.1 i686-cygwin-gcc_4.3.4 i686-mingw-gcc_4.5.2 x86_64-ubuntu_12.04-gcc_4.6.3 @end verbatim Generate file template which required static analysis by using @ref{AdLintize Command, @command{adlintize}} command. @verbatim % adlintize -e i686-linux-gcc_4.5.1 -o adlint % cd adlint % ls GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim Compare @file{make.log} file which generated at @ref{screen_exam, Project investigation} and @code{SOURCES} list in @file{GNUmakefile} which generated by @ref{AdLintize Command, @command{adlintize}}, edit equally. @verbatim % cp GNUmakefile GNUmakefile.orig % vi GNUmakefile % diff -u GNUmakefile.orig GNUmakefile --- GNUmakefile.orig 2011-09-28 13:36:24.328078206 +0900 +++ GNUmakefile 2011-09-28 13:36:37.573902006 +0900 @@ -29,8 +29,6 @@ putenv.c \ fileio.c \ kmapdef.c \ - terminfo/checktc.c \ - terminfo/tetris.c \ search.c \ input.c \ ansi.c \ @end verbatim Then find project specific include path from @file{make.log} file which generated @ref{screen_exam, project investigation}. Edit the path to @file{adlint_traits.yml}. @verbatim % cp adlint_traits.yml adlint_traits.yml.orig % vi adlint_traits.yml % diff -u adlint_traits.yml.orig adlint_traits.yml --- adlint_traits.yml.orig 2011-09-28 13:40:10.748222288 +0900 +++ adlint_traits.yml 2011-09-28 13:40:24.105054386 +0900 @@ -25,6 +25,7 @@ # - "../include/bar" # - "/opt/baz/include" include_path: + - ".." # Pathname of the project specific initial header file. # This header file is automatically included above the first line of the @end verbatim @subsection Execute the static analysis Execute static analysis by using @file{GNUmakefile} which generated @ref{screen_prepare, Preparation static analysis}. @verbatim % make --version GNU Make 3.82 Built for i386-redhat-linux-gnu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. % make verbose-all adlint --verbose -t adlint_traits.yml -o . ../braille.c ../acls.c ../putenv.c ../fileio.c ../kmapdef.c ../search.c ../input.c ../ansi.c ../pty.c ../layer.c ../termcap.c ../loadav.c ../comm.c ../screen.c ../term.c ../teln.c ../socket.c ../encoding.c ../utmp.c ../logfile.c ../display.c ../misc.c ../attacher.c ../help.c ../tty.c ../nethack.c ../braille_tsi.c ../sched.c ../process.c ../window.c ../mark.c ../resize.c ../braille.c [fin] |============================| 7.999s ../acls.c [fin] |============================| 12.152s ../putenv.c [fin] |============================| 0.203s ../fileio.c [fin] |============================| 13.013s ...snip... ../window.c [fin] |============================| 22.388s ../mark.c [fin] |============================| 14.827s ../resize.c [fin] |============================| 18.964s screen-4.0.3 [fin] |============================| 58.346s 771.510s user, 2.370s system, 00:12:53.87 total % ls *.{i,msg.csv,met.csv,log} acls.c.log kmapdef.c.log sched.c.log acls.c.met.csv kmapdef.c.met.csv sched.c.met.csv acls.c.msg.csv kmapdef.c.msg.csv sched.c.msg.csv acls.i kmapdef.i sched.i ansi.c.log layer.c.log screen-4.0.3.log ansi.c.met.csv layer.c.met.csv screen-4.0.3.met.csv ansi.c.msg.csv layer.c.msg.csv screen-4.0.3.msg.csv ...snip... input.c.log resize.c.log window.c.met.csv input.c.met.csv resize.c.met.csv window.c.msg.csv input.c.msg.csv resize.c.msg.csv window.i input.i resize.i @end verbatim @node Dist Analyzing Screen @section Distributed parallel analysis with distmake @node Command @chapter Command specification @menu * @command{adlintize} command:AdLintize Command. * @command{adlint} command:AdLint Command. * @command{adlint_sma} command:AdLint SMA Command. * @command{adlint_cma} command:AdLint CMA Command. * @command{adlint_chk} command:AdLint CHK Command. @end menu @node AdLintize Command @section @command{adlintize} command @subsection Function Generate the following files which required static analysis by AdLint. @itemize @item @file{GNUmakefile} --- Make file for GNU make describing the analysis procedure @item @file{adlint_traits.yml} --- Traits file for customize AdLint analysis behavior @item @file{adlint_pinit.h} --- Initial header file of specific project @item @file{adlint_cinit.h} --- Initial header file of compiler @item @file{adlint_all.sh} --- Shell script describing the analysis procedure @item @file{adlint_all.bat} --- Windows batch file describing the analysis procedure @item @file{adlint_files.txt} --- Analyzed file list for shell script and batch file @end itemize When it run a @command{adlintize} command, all @file{*.c} files under the directory will set to @code{SOURCES} variable in @file{GNUmakefile}. @subsection How to use When it run a @command{adlintize} command at the root directory of analyzed project, generate required files for static analysis to @file{adlint} directory. @verbatim % cd project-root % adlintize -o adlint % ls adlint GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim @command{adlintize} command provides some preset build environment. To specify the preset build environment, more information can set automatically to the file templates. @option{-L} option shows the list of preset build environment. @verbatim % adlintize -L i686-linux-gcc_4.5.1 i686-cygwin-gcc_4.3.4 i686-mingw-gcc_4.5.2 x86_64-ubuntu_12.04-gcc_4.6.3 @end verbatim @option{-e} option can set the preset build environment. @verbatim % cd project-root % adlintize -e i686-linux-gcc_4.5.1 -o adlint % ls adlint GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim @subsection Help message @verbatim Usage: adlintize [options] [project-name] Options: -t FILE, --traits FILE Write traits to FILE If omitted, `adlint_traits.yml' will be used -p FILE, --pinit-header FILE Write project initial header to FILE If omitted, `adlint_pinit.h' will be used -c FILE, --cinit-header FILE Write compiler initial header to FILE If omitted, `adlint_cinit.h' will be used -l FILE, --list-file FILE Write list file to FILE If omitted, `adlint_files.txt' will be used -m FILE, --makefile FILE Write analysis procedure GNUmakefile to FILE If omitted, `GNUmakefile' will be used -s FILE, --sh-script FILE Write analysis procedure sh script to FILE If omitted, `adlint_all.sh' will be used -b FILE, --bat-file FILE Write analysis procedure bat file to FILE If omitted, `adlint_all.bat' will be used -o DIR, --output-dir DIR Set output directory If omitted, `.' will be used -e ENV, --environment ENV Assume ENV as target build environment -L, --list-environment List all preset build environments -f, --force Force to overwrite existing files --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint Command @section @command{adlint} command @subsection Function Run both single module analysis ( correspond to the compile phase ) and cross module analysis ( correspond to the link phase ) at once. It supports the following method to specify the analyzed source code : from command line and set to the list file. Its activity is same as the following steps. Run a single module analysis by using @ref{AdLint SMA Command, @command{adlint_sma}} command with specify all analyzed source file. Then run a cross module analysis by using @ref{AdLint CMA Command, @command{adlint_cma}}. The result of single module analysis, the following files will be generated for each source files. @itemize @item @file{*.i} --- The result of preprocessed. @item @file{*.c.msg.csv} --- Output message of single module analysis. @item @file{*.c.met.csv} --- Metric measurement result by single module analysis. @item @file{*.c.log} --- Log message of single module analysis. @end itemize The result of cross module analysis, the following files will be generated. @itemize @item @file{project_name.msg.csv} --- Output message of cross module analysis for whole project. @item @file{project_name.met.csv} --- Metric measurement result by cross module analysis for whole project. @item @file{project_name.log} --- Log message of cross module analysis for whole project. @end itemize @subsection How to use When it run a @command{adlint} command as follows at the directory which generated the template of setting files by @ref{AdLintize Command, @command{adlintize}}, run a single module analysis and cross module analysis at once. @verbatim % cd project-root % adlintize -o adlint % cd adlint % adlint -v -t adlint_traits.yml -o . -p 1 -l adlint_files.txt ../intro_demo.c [fin] |============================| 0.134s intro_demo [fin] |============================| 0.012s 0.718s user, 0.500s system, 00:00:01.21 total @end verbatim When it collaborate with text editor or integrated development environment, the message can output to stderr without display the progress by not specifying the @option{-v,--verbose} option. @verbatim % adlint -t adlint_traits.yml -o . -p 1 -l adlint_files.txt ../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:The same identifier name `i' is also used in the member of structure/union, label, tag or normal identifier. ../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:Comparison operation is being made by pointer variable. ../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:Value of the dereferencing pointer may be NULL. ../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:This controlling expression always makes false. ...snip... ../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:Control never reaches to this statement. ../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:Included "../useless_header.h" is not referenced in the translation unit. It can be removed. ../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:A function `int bar(void)' is defined, but this is not used in this project. @end verbatim @subsection Help message @verbatim Usage: adlint [options] [source-file...] Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -l FILE, --list-file FILE Use FILE as list file -o DIR, --output-dir DIR Output result files to DIR -p NUM, --strip NUM Use source file names from which stripped NUM leading components as the base name of output files -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint SMA Command @section @command{adlint_sma} command @subsection Function Execute only single module analysis (correspond to the compile phase) which specified by command line. @* For the result of single module analysis, generate the following files for each source file. @itemize @item @file{*.i} --- The result of preprocessed. @item @file{*.c.msg.csv} --- Output message of single module analysis. @item @file{*.c.met.csv} --- Metric measurement result by single module analysis. @item @file{*.c.log} --- Log message of single module analysis. @end itemize @subsection How to use When it run a @command{adlint_sma} command as follows at the directory which generated the template of setting files by @ref{AdLintize Command, @command{adlintize}}, run only single module analysis. @verbatim % adlint_sma -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c [fin] |============================| 0.134s 1.062s user, 0.843s system, 00:00:01.90 total @end verbatim When it collaborate with text editor or integrated development environment, the message can output to stderr without display the progress by not specifying the @option{-v,--verbose} option. @verbatim % adlint_sma -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:The same identifier name `i' is also used in the member of structure/union, label, tag or normal identifier. ../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:Comparison operation is being made by pointer variable. ../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:Value of the dereferencing pointer may be NULL. ../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:This controlling expression always makes false. ...snip... ../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:Control never reaches to this statement. ../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:Included "../useless_header.h" is not referenced in the translation unit. It can be removed. ../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:A function `int bar(void)' is defined, but this is not used in this project. @end verbatim @subsection Help message @verbatim Usage: adlint_sma [options] source-file... Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -o DIR, --output-dir DIR Output result files to DIR -p NUM, --strip NUM Use source file names from which stripped NUM leading components as the base name of output files -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint CMA Command @section @command{adlint_cma} command @subsection Function Execute only cross module analysis (correspond to the link phase) which specified by command line. @* For the result of cross module analysis, generate the following files. @itemize @item @file{project_name.msg.csv} --- Output message of cross module analysis for whole project. @item @file{project_name.met.csv} --- Metric measurement result by cross module analysis for whole project. @item @file{project_name.log} --- Log message of cross module analysis for whole project. @end itemize @subsection How to use When it run a @command{adlint_cma} command as follows after finished the single module analysis by @ref{AdLint SMA Command, @command{adlint_sma}} command at the directory which generated the template of setting files by @ref{AdLintize Command, @command{adlintize}}, run only cross module analysis. @verbatim % ls *.c.met.csv intro_demo.c.met.csv % adlint_cma -v -t adlint_traits.yml -o . intro_demo.c.met.csv intro_demo [fin] |============================| 0.011s 1.203s user, 0.843s system, 00:00:02.04 total @end verbatim When it collaborate with text editor or integrated development environment, the message can output to stderr without display the progress by not specifying the @option{-v,--verbose} option. @verbatim % adlint_cma -t adlint_traits.yml -o . intro_demo.c.met.csv ../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:A function `int bar(void)' is defined, but this is not used in this project. @end verbatim @subsection Help message @verbatim Usage: adlint_cma [options] sma-metric-file... Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -o DIR, --output-dir DIR Output result files to DIR -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node AdLint CHK Command @section @command{adlint_chk} command @subsection Function It can validate the body of @ref{Traits, traits file} by execute only preprocessing to analyzed source file which set by command line. @subsection How to use Create the template of setting file by @ref{AdLintize Command, @command{adlintize}}, and edit the @ref{Traits, traits file}. Then run a @command{adlint_chk} command as follows. It can validate the body of @ref{Traits, traits file} by execute preprocessing. @verbatim % adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c [fin] |============================| 0.047s 0.812s user, 0.875s system, 00:00:01.68 total @end verbatim If the include path of header file doesn't set properly,the error occurs as follows. It can check which header file doesn't included by referring the @file{*.c.msg.csv} file which correspond to the source file. @verbatim % adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c ../intro_demo.c [cpp] |======= | 0.006s! An error was occurred while processing `../intro_demo.c'. See `intro_demo.c.msg.csv' and `intro_demo.c.log' for more details. % tail intro_demo.c.msg.csv E,../intro_demo.c,1,1,E0009,A header file of doesn't found. X,../intro_demo.c,1,1,X0003,Analysis processing has been stopped due to unrecoverable error. For the details, refer to `intro_demo.c.msg.csv' and `intro_demo.c.log'. @end verbatim @subsection Help message @verbatim Usage: adlint_chk [options] source-file... Options: -t FILE, --traits FILE Use FILE as traits file (mandatory) -o DIR, --output-dir DIR Output result files to DIR -p NUM, --strip NUM Use source file names from which stripped NUM leading components as the base name of output files -v, --verbose Increase verbosity but suppress message output --version Display version information --copyright Display copyright information --prefix Display prefix directory of AdLint -h, --help Display this message @end verbatim @node Input @chapter Input specification @menu * Input file:Input Files. * Traits file:Traits. * Message definition file:Message Definition. * Source code annotation:Source Code Annotation. @end menu @node Input Files @section Input files Analysis action can set the following two kind of files. @table @var @itemx @ref{Traits, traits file} Describe how to process the analysis. Edit by @uref{http://yaml.org/, YAML style}. @itemx @ref{Message Definition, Message definition file} Describe the message catalog.Edit by @uref{http://yaml.org/, YAML style}. @end table Traits file sets the path by the command option @option{--traits} of @ref{AdLint Command, @command{adlint}} , @ref{AdLint SMA Command, @command{adlint_sma}} , @ref{AdLint CMA Command, @command{adlint_cma}}. Message definition file is installed in @file{etc/mesg.d} at AdLint install path. @ref{AdLint Command, @command{adlint}} , @ref{AdLint SMA Command,@command{adlint_sma}} , @ref{AdLint CMA Command, @command{adlint_cma}} command selects the appropriate the message definition file by following the language which specified in @ref{message_traits:language, @code{language}} of @ref{Message Traits, message traits}. @node Traits @section Traits file @menu * Global Traits:Global Traits. * Project Traits:Project Traits. * Compiler Traits:Compiler Traits. * Linker Traits:Linker Traits. * Message Traits:Message Traits. @end menu Describe @ref{Project Traits, Project Traits} , @ref{Compiler Traits, Compiler Traits} , @ref{Linker Traits, Linker Traits} , @ref{Message Traits, Message Traits} to a single @uref{http://yaml.org/, YAML format} setting file ( @ref{Traits Sample, sample} ). When it run a @command{adlintize} command at the root directory of analyzed project, generate the template of traits file for the project, @file{GNUmakefile} and shell script. @verbatim % cd project % adlintize -o adlint % ls adlint GNUmakefile adlint_all.sh adlint_files.txt adlint_traits.yml adlint_all.bat adlint_cinit.h adlint_pinit.h @end verbatim You can specify environment variable as items in the traits file to be described. For example, specify the environment variable @code{ENV_VAR} as the item @code{item} like below; @verbatim item: $ENV_VAR @end verbatim And embed environment variables in a string value like below; @verbatim item: "prefix${ENV_VAR}suffix" @end verbatim You can also specify multiple values of directory pathname list item by one environment variable like below; @verbatim % export ENV_VAR="/usr/local/include:/usr/include" @end verbatim @verbatim include_path: - $ENV_VAR @end verbatim @node Global Traits @subsection Global Traits @cindex global_traits Global Traits can be configured by root items in traits file. @multitable @columnfractions .01 .3 .1 @headitem No. @tab Items @tab Styles @tab Contents @item 1 @cindex version @anchor{global_traits:version} @tab @code{version} @tab string @tab This item represents the format version of this traits file. You should not edit this item manually. @item 2 @cindex exam_packages @anchor{global_traits:exam_packages} @tab @code{exam_packages} @tab array of string @tab This item represents list of the source code examination package names to be used by AdLint. @code{"c_builtin"} is a builtin examination package name bundled with AdLint core. New optional source code examination packages will be released in the future. For example, If you install @code{adlint-exam-c_ansi} optional examination package which checks whether the source code complies with ANSI C, you can edit @code{exam_packages} item as below; In this case, only ANSI C compliance check will be run. @example exam_packages: - "c_ansi" @end example In this case, both AdLint builtin check and ANSI C compliance check will be run. @example exam_packages: - "c_builtin" - "c_ansi" @end example @end multitable @node Project Traits @subsection Project Traits @cindex project_traits Project Traits can set under the @code{project_traits} in traits file. @multitable @columnfractions .01 .3 .1 @headitem No. @tab Items @tab Styles @tab Contents @item 1 @cindex project_traits:project_name @anchor{project_traits:project_name} @tab @code{project_name} @tab string @tab Set project name. @item 2 @cindex project_traits:project_root @anchor{project_traits:project_root} @tab @code{project_root} @tab string @tab Set pathname of the project root directory. @item 3 @cindex project_traits:target_files:inclusion_paths @anchor{project_traits:target_files:inclusion_paths} @tab @code{target_files:inclusion_paths} @tab array of string @tab Specify directory paths which contain analysis target source files. An entry can have multiple pathnames with @code{`:'} (or @code{`;'} on windows) separators. @item 4 @cindex project_traits:target_files:exclusion_paths @anchor{project_traits:target_files:exclusion_paths} @tab @code{target_files:exclusion_paths} @tab array of string @tab Specify directory paths to eliminate analysis target source files under the directory. If omitted, AdLint will check all the files included by the target source files such as 3rd-party library headers under @ref{project_traits:target_files:inclusion_paths, @code{target_files:inclusion_paths}}. An entry can have multiple pathnames with @code{`:'} (or @code{`;'} on windows) separators. @item 5 @cindex project_traits:initial_header @anchor{project_traits:initial_header} @tab @code{initial_header} @tab string @tab Set the header files which is included at the top of specified source files. For example, project specific macro definition will be described in this file. @item 6 @cindex project_traits:file_search_paths @anchor{project_traits:file_search_paths} @tab @code{file_search_paths} @tab array of string @tab Set project specific include-file search paths. An entry can have multiple pathnames with @code{`:'} (or @code{`;'} on windows) separators. @item 7 @cindex project_traits:coding_style:indent_style @anchor{project_traits:coding_style:indent_style} @tab @code{coding_style:indent_style} @tab string @tab Indent style which is a convention governing the identation of blocks. Select from @code{"K&R"}, @code{"Allman"} and @code{"GNU"}. @code{"K&R"} style is @example int foo(int i) @{ if (i == 0) @{ return 0; @} return i; @} @end example @code{"Allman"} style is @example int foo(int i) @{ if (i == 0) @{ return 0; @} return i; @} @end example @code{"GNU"} style is @example int foo(int i) @{ if (i == 0) @{ return 0; @} return i; @} @end example @item 8 @cindex project_traits:coding_style:tab_width @anchor{project_traits:coding_style:tab_width} @tab @code{coding_style:tab_width} @tab integer value @tab Set the appearance number of digits of tab character @item 9 @cindex project_traits:coding_style:indent_width @anchor{project_traits:coding_style:indent_width} @tab @code{coding_style:indent_width} @tab integer value @tab Set the appearance number of digits of indent @item 10 @cindex project_traits:file_encoding @anchor{project_traits:file_encoding} @tab @code{file_encoding} @tab string @tab Set the character encoding. If the value is not set, process as "ASCII-8BIT". @end multitable @node Compiler Traits @subsection Compiler Traits @cindex compiler_traits Compiler Traits can set under the @code{compiler_traits} in traits file. @multitable @columnfractions .01 .3 .1 @headitem No. @tab Items @tab Styles @tab Contents @item 1 @cindex compiler_traits:initial_header @anchor{compiler_traits:initial_header} @tab @code{initial_header} @tab string @tab Set the header files which is included at the top of specified source files and automatically included before project specific @code{initial_header}. This file describes compiler specific macro, type definition and others. @item 2 @cindex compiler_traits:file_search_paths @anchor{compiler_traits:file_search_paths} @tab @code{file_search_paths} @tab array of string @tab Set the compiler specific include-file search paths. An entry can have multiple pathnames with @code{`:'} (or @code{`;'} on windows) separators. @item 3 @cindex compiler_traits:standard_types:char_size @anchor{compiler_traits:standard_types:char_size} @tab @code{standard_types:char_size} @tab integer value @tab Set the size of @code{char} type family by bit quantities. @item 4 @cindex compiler_traits:standard_types:char_alignment @anchor{compiler_traits:standard_types:char_alignment} @tab @code{standard_types:char_alignment} @tab integer value @tab Set the memory alignment of @code{char} type family by bit quantities. @item 5 @cindex compiler_traits:standard_types:short_size @anchor{compiler_traits:standard_types:short_size} @tab @code{standard_types:short_size} @tab integer value @tab Set the size of @code{short} type family by bit quantities. @item 6 @cindex compiler_traits:standard_types:short_alignment @anchor{compiler_traits:standard_types:short_alignment} @tab @code{standard_types:short_alignment} @tab integer value @tab Set the memory alignment of @code{short} family by bit quantities. @item 7 @cindex compiler_traits:standard_types:int_size @anchor{compiler_traits:standard_types:int_size} @tab @code{standard_types:int_size} @tab integer value @tab Set the size of @code{int} type family by bit quantities. @item 8 @cindex compiler_traits:standard_types:int_alignment @anchor{compiler_traits:standard_types:int_alignment} @tab @code{standard_types:int_alignment} @tab integer value @tab Set the memory alignment of @code{int} type family by bit quantities. @item 9 @cindex compiler_traits:standard_types:long_size @anchor{compiler_traits:standard_types:long_size} @tab @code{standard_types:long_size} @tab integer value @tab Set the size of @code{long int} type family by bit quantities. @item 10 @cindex compiler_traits:standard_types:long_alignment @anchor{compiler_traits:standard_types:long_alignment} @tab @code{standard_types:long_alignment} @tab integer value @tab Set the memory alignment of @code{long int} type family by bit quantities. @item 11 @cindex compiler_traits:standard_types:long_long_size @anchor{compiler_traits:standard_types:long_long_size} @tab @code{standard_types:long_long_size} @tab integer value @tab Set the size of @code{long long int} type family by bit quantities. @item 12 @cindex compiler_traits:standard_types:long_long_alignment @anchor{compiler_traits:standard_types:long_long_alignment} @tab @code{standard_types:long_long_alignment} @tab integer value @tab Set the memory alignment of @code{long long int} type family by bit quantities. @item 13 @cindex compiler_traits:standard_types:float_size @anchor{compiler_traits:standard_types:float_size} @tab @code{standard_types:float_size} @tab integer value @tab Set the size of @code{float} type family by bit quantities. @item 14 @cindex compiler_traits:standard_types:float_alignment @anchor{compiler_traits:standard_types:float_alignment} @tab @code{standard_types:float_alignment} @tab integer value @tab Set the memory alignment of @code{float} type family by bit quantities. @item 15 @cindex compiler_traits:standard_types:double_size @anchor{compiler_traits:standard_types:double_size} @tab @code{standard_types:double_size} @tab integer value @tab Set the size of @code{double} type family by bit quantities. @item 16 @cindex compiler_traits:standard_types:double_alignment @anchor{compiler_traits:standard_types:double_alignment} @tab @code{standard_types:double_alignment} @tab integer value @tab Set the memory alignment of @code{double} type family by bit quantities. @item 17 @cindex compiler_traits:standard_types:long_double_size @anchor{compiler_traits:standard_types:long_double_size} @tab @code{standard_types:long_double_size} @tab integer value @tab Set the size of @code{long double} type family by bit quantities. @item 18 @cindex compiler_traits:standard_types:long_double_alignment @anchor{compiler_traits:standard_types:long_double_alignment} @tab @code{standard_types:long_double_alignment} @tab integer value @tab Set the memory alignment of @code{long double} type family by bit quantities. @item 19 @cindex compiler_traits:standard_types:code_ptr_size @anchor{compiler_traits:standard_types:code_ptr_size} @tab @code{standard_types:code_ptr_size} @tab integer value @tab Set the size of function pointer by bit quantities. @item 20 @cindex compiler_traits:standard_types:code_ptr_alignment @anchor{compiler_traits:standard_types:code_ptr_alignment} @tab @code{standard_types:code_ptr_alignment} @tab integer value @tab Set the memory alignment of function pointer by bit quantities. @item 21 @cindex compiler_traits:standard_types:data_ptr_size @anchor{compiler_traits:standard_types:data_ptr_size} @tab @code{standard_types:data_ptr_size} @tab integer value @tab Set the size of data pointer by bit quantities. @item 22 @cindex compiler_traits:standard_types:data_ptr_alignment @anchor{compiler_traits:standard_types:data_ptr_alignment} @tab @code{standard_types:data_ptr_alignment} @tab integer value @tab Set the memory alignment of data pointer by bit quantities. @item 23 @cindex compiler_traits:standard_types:char_as_unsigned_char @anchor{compiler_traits:standard_types:char_as_unsigned_char} @tab @code{standard_types:char_as_unsigned_char} @tab boolean value @tab If @code{`char'} type treat as @code{`unsigned char'}, set true. @item 24 @cindex compiler_traits:arithmetic:logical_right_shift @anchor{compiler_traits:arithmetic:logical_right_shift} @tab @code{arithmetic:logical_right_shift} @tab boolean value @tab If right shift expression @code{`>>'} treat as logical shift instead of arithmetic shift, set true. @item 25 @cindex compiler_traits:identifier_max @anchor{compiler_traits:identifier_max} @tab @code{identifier_max} @tab integer value @tab Set the maximum number of length which compiler can identifier. @item 26 @cindex compiler_traits:extension_substitutions @anchor{compiler_traits:extension_substitutions} @tab @code{extension_substitutions} @tab map of string @tab Set the token replacement pattern to adjust compiler specific extension. AdLint puts the warning message @ref{W0061} all uses of this extension. If @code{`__attribute__ ( arbitrary token row )'} delete after pre-process and puts the warning @ref{W0061}, set as follows. @example extension_substitutions: "__attribute__(__adlint__any)": "" @end example And if the token @code{`__restrict'} replaces @code{`restrict'} and put the warning @ref{W0061}, set as follows. @example extension_substitutions: "__restrict": "restrict" @end example @item 27 @cindex compiler_traits:arbitrary_substitutions @anchor{compiler_traits:arbitrary_substitutions} @tab @code{arbitrary_substitutions} @tab map of string @tab Same as @ref{compiler_traits:extension_substitutions, @code{extension_substitutions}}, replace the token after pre-process, the difference is doesn't put the warning @ref{W0061}. @end multitable @node Linker Traits @subsection Linker Traits @cindex linker_traits Linker Traits sets under @code{linker_traits} items. @multitable @columnfractions .01 .3 .1 @headitem No. @tab Items @tab Styles @tab Contents @item 1 @cindex linker_traits:identifier_max @anchor{linker_traits:identifier_max} @tab @code{identifier_max} @tab integer value @tab Set the maximum number of length which linker can identifier. @item 2 @cindex linker_traits:identifier_ignore_case @anchor{linker_traits:identifier_ignore_case} @tab @code{identifier_ignore_case} @tab boolean value @tab Set whether check case sensitive by linker when identifier external symbol. @end multitable @node Message Traits @subsection Message Traits @cindex message_traits Message Traits can set under the @code{message_traits} in traits file. . @multitable @columnfractions .01 .3 .1 @headitem No. @tab Items @tab Styles @tab Contents @item 1 @cindex message_traits:language @anchor{message_traits:language} @tab @code{language} @tab string @tab Set the language of message body.(Currently) it available @code{"en_US"} or @code{"ja_JP"}. @item 2 @cindex message_traits:individual_suppression @anchor{message_traits:individual_suppression} @tab @code{individual_suppression} @tab boolean @tab This item enables message suppression by @ref{Source Code Annotation, source code annotations}. In case of @code{true}, message suppression by annotations will be enabled. @item 3 @cindex message_traits:exclusion:categories @anchor{message_traits:exclusion:categories} @tab @code{exclusion:categories} @tab array of string @tab This item represents excluding code checks by its message categories. @item 4 @cindex message_traits:exclusion:severities @anchor{message_traits:exclusion:severities} @tab @code{exclusion:severities} @tab regexp string @tab This item represents excluding code checks by its message severities. @item 5 @cindex message_traits:exclusion:messages @anchor{message_traits:exclusion:messages} @tab @code{exclusion:messages} @tab map of Message ID and string @tab This item represents excluding code checks by its message ID. Because a message ID is not unique in multiple examination packages, you should also specify the name of the examination package including the message. @item 6 @cindex message_traits:inclusion:messages @anchor{message_traits:inclusion:messages} @tab @code{inclusion:messages} @tab map of Message ID and string @tab This item represents messages which is excluded by settings of @code{exclusion} section but will be used by AdLint. For example, you can bring back the specified code checks which is excluded by @ref{message_traits:exclusion:categories, exclusion:categories}. @item 7 @cindex message_traits:change_list @anchor{message_traits:change_list} @tab @code{change_list} @tab map of Message ID and changed contents @tab This item represents overriding contents of existing one in the message definition. For example, you can change contents of @code{W9999} message in @code{"c_builtin"} examination package as below; @example change_list: W9999: package: "c_builtin" classes: - ":" - ":" format: "new message format of this message." @end example @end multitable @node Message Definition @section Message Definition file. Describe all error and warning message to setting file by @uref{http://yaml.org/, format}. Normally this file doesn't edit directly. If it need to change the message body, set the changes to @ref{message_traits:change_list, @code{change_list}} in traits file. @node Source Code Annotation @section Source Code Annotation You can write an annotation which controls AdLint's analysis behavior as an ordinary comment of the programming language. @subsection Warning message suppression annotation An annotation starts with @code{ADLINT:SF} in an ordinary comment specifies that messages listed in the annotation of the annotated file will be suppressed. An annotation starts with @code{ADLINT:SL} in an ordinary comment specifies that messages listed in the annotation of the annotated line will be suppressed. The following describes format and usage of the annotation. @subheading @bullet{ Common definitions} @example @anchor{message_specifier_list} message_specifier_list : @ref{qualified_message_specifier} | @ref{unqualified_message_specifier} | @ref{message_specifier_list} @ref{qualified_message_specifier} | @ref{message_specifier_list} @ref{unqualified_message_specifier} @anchor{qualified_message_specifier} qualified_message_specifier : ':' @ref{package_name} @ref{unqualified_message_specifier} @anchor{unqualified_message_specifier} unqualified_message_specifier : ':' '[' @ref{message_name_list} ']' @anchor{message_name_list} message_name_list : @ref{message_name} | @ref{message_name_list} ',' @ref{message_name} @anchor{message_name} message_name : 'W' [0-9]@{4@} @anchor{package_name} package_name : any string specified in @ref{global_traits:exam_packages, @code{exam_packages}} of the traits file. @end example @subheading @bullet{ File-wise message suppressor} @example @anchor{file_wise_suppressor_annotation} file_wise_suppressor_annotation : "/*" @ref{file_wise_suppressor_head} @ref{message_specifier_list} "*/" | "//" @ref{file_wise_suppressor_head} @ref{message_specifier_list} @anchor{file_wise_suppressor_head} file_wise_suppressor_head : "ADLINT:SF" @end example @subheading @bullet{ Line-wise message suppressor} @example @anchor{line_wise_suppressor_annotation} line_wise_suppressor_annotation : "/*" @ref{line_wise_suppressor_head} @ref{message_specifier_list} "*/" | "//" @ref{line_wise_suppressor_head} @ref{message_specifier_list} @anchor{line_wise_suppressor_head} line_wise_suppressor_head : "ADLINT:SL" @end example @subheading @bullet{ Sample code} @verbatim /* ADLINT:SF:[W0001,W0002] (to suppress W0001 and W0002 of all exam-packages in this file.) */ #include extern int i; /* ADLINT:SL:[W0003] (to suppress W0003 of all exam-packages only at this line.) */ extern int j; /* ADLINT:SL:c_staging:[W2001] (to suppress W2001 of `c_staging' exam-package only at this line.) */ void foo(void) { printf("%d\n", i + j); } @end verbatim @node Output @chapter Output specification @menu * Output file:Output Files. * Common definition:Common. * Metrics file:Metrics File. * Message file:Message File. @end menu @node Output Files @section Output files Print the result of single module analysis to the following four different files. @multitable @columnfractions .01 .2 .2 .3 @headitem No. @tab Name @tab File name @tab Contents @item 1 @tab Preprocessed source @tab @file{.i} @tab The line beginning with # is line marker. @item 2 @tab @ref{Metrics File, metrics file} @tab @file{.met.csv} @tab Print the metrics and the code information by CSV format. @item 3 @tab @ref{Message File, message file} @tab @file{.msg.csv} @tab Print the error and the warning message by CSV format. @item 4 @tab Log file @tab @file{.log} @tab Print the log of single module analysis. @end multitable Print the result of cross module analysis to the following three different files. @multitable @columnfractions .01 .2 .2 .3 @headitem No. @tab Name @tab File name @tab Contents @item 1 @tab @ref{Metrics File, metrics file} @tab @file{.met.csv} @tab Print the metrics information by CSV format. @item 2 @tab @ref{Message File, message file} @tab @file{.msg.csv} @tab Print the warning message by CSV format. @item 3 @tab Log file @tab @file{.log} @tab Print the log of cross module analysis. @end multitable @node Common @section Common definition @example @anchor{version_number} version_number : @ref{major_version} '.' @ref{minor_version} '.' @ref{patch_level} @anchor{major_version} major_version : integer value @anchor{minor_version} minor_version : integer value @anchor{patch_level} patch_level : integer value @anchor{exec_timestamp} exec_timestamp : Year '-' Month '-' Day ' ' Hour ':' Minute ':' Second ':' Time zone @anchor{exec_working_directory} exec_working_directory : Full path name of run the analysis. @anchor{new_line} new_line : line feed string depends on runtime environment. @anchor{file_path} file_path : file path name depends on runtime environment. @anchor{line_no} line_no : integer value @anchor{lines} lines : integer value @anchor{column_no} column_no : integer value @anchor{location} location : @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} @anchor{function_identifier} function_identifier : @ref{function_name} ',' @ref{function_signature} @anchor{function_name} function_name : c_identifier @anchor{function_signature} function_signature : c_declaration_specifiers c_declarator @anchor{function_linkage_type} function_linkage_type : 'I' <- Internal | 'X' <- eXternal @anchor{function_scope_type} function_scope_type : 'F' <- File | 'B' <- Block @anchor{function_declaration_type} function_declaration_type : 'E' <- Explicit | 'I' <- Implicit @anchor{type_name} type_name : c_identifier @anchor{type_rep} type_rep : c_declaration @anchor{variable_name} variable_name : c_identifier @anchor{initializer_rep} initializer_rep : c_initializer @anchor{assignment_rep} assignment_rep : c_assignment_operator c_assignment_expression @anchor{macro_name} macro_name : c_identifier @anchor{macro_value} macro_value : | @ref{pp_tokens} @anchor{pp_tokens} pp_tokens : c_pp_tokens @anchor{exam_package_name} exam_package_name : arbitrary string @anchor{message_id} message_id : 'W' [0-9]@{4@} | 'E' [0-9]@{4@} | 'C' [0-9]@{4@} @anchor{message_category} message_category : [A-Z]@{3@} @anchor{message_severity} message_severity : [A-Z][0-9]@{2@} @anchor{message_text} message_text : arbitrary string @end example @node Metrics File @section metrics file @itemize @item @ref{Output_Metrics_Ver, Version records} @item @ref{Output_Metrics_Dcl, Declaration records} @item @ref{Output_Metrics_Def, Type definition records} @item @ref{Output_Metrics_Ini, Initialize records} @item @ref{Output_Metrics_Asn, Assignment records} @item @ref{Output_Metrics_Dep, Dependency records} @item @ref{Output_Metrics_Lit, Literal records} @item @ref{Output_Metrics_Pre, Preprocess records} @item @ref{Output_Metrics_Met, Metirc value records} @end itemize @anchor{Output_Metrics_Ver} @subsection Version records @example @anchor{metrics_version_record} metrics_version_record : @ref{metrics_version_head} ',' @ref{version_number} ',' @ref{exec_timestamp} ',' @ref{exec_working_directory} @anchor{metrics_version_head} metrics_version_head : "VER" @end example @anchor{Output_Metrics_Ver_Sample} @subheading @bullet{ Output example} @example VER,0.6.4,2012-02-16 14:10:59 +0900,/home/yanoh/intro_demo @end example @anchor{Output_Metrics_Dcl} @subsection Declaration records @example @anchor{declaration_record} declaration_record : @ref{declaration_head} ',' @ref{location} ',' @ref{typedcl_record_body} | @ref{declaration_head} ',' @ref{location} ',' @ref{gvardcl_record_body} | @ref{declaration_head} ',' @ref{location} ',' @ref{funcdcl_record_body} @anchor{declaration_head} declaration_head : "DCL" @end example @subheading @bullet{ Type definition records} @example @anchor{typedcl_record_body} typedcl_record_body : 'T' ',' @ref{typedcl_type} ',' @ref{type_name} ',' @ref{type_rep} @anchor{typedcl_type} typedcl_type : 'T' <- typedef | 'S' <- struct | 'U' <- union | 'E' <- enum @end example @subheading @bullet{ Global variable declaration Record} @example @anchor{gvardcl_record_body} gvardcl_record_body : 'V' ',' @ref{variable_name} ',' @ref{type_rep} @end example @subheading @bullet{ Function declaration record} @example @anchor{funcdcl_record_body} funcdcl_record_body : 'F' ',' @ref{function_linkage_type} ',' @ref{function_scope_type} ',' @ref{function_declaration_type} ',' @ref{function_identifier} @end example @anchor{Output_Metrics_Dcl_Sample} @subheading @bullet{ Output example} @verbatim 1: typedef int *int_ptr; 2: 3: struct Foo { 4: int i; 5: long l; 6: }; 7: 8: union Bar { 9: int i; 10: char c; 11: }; 12: 13: enum Color { 14: RED = 1, 15: GREEN, 16: BLUE 17: }; 18: 19: extern int global_1; 20: 21: extern int foo(long); @end verbatim @example DCL,test.c,1,14,T,T,int_ptr,int * DCL,test.c,3,8,T,S,Foo,struct Foo @{ int i; long l; @} DCL,test.c,8,7,T,U,Bar,union Bar @{ int i; char c; @} DCL,test.c,13,6,T,E,Color,"enum Color @{ RED = 1, GREEN, BLUE @}" DCL,test.c,19,12,V,global_1,int DCL,test.c,21,12,F,X,F,E,foo,int foo(long) @end example @anchor{Output_Metrics_Def} @subsection Declaration records @example @anchor{definition_record} definition_record : @ref{definition_head} ',' @ref{location} ',' @ref{vardef_record_body} | @ref{definition_head} ',' @ref{location} ',' @ref{fundef_record_body} | @ref{definition_head} ',' @ref{location} ',' @ref{macrodef_record_body} | @ref{definition_head} ',' @ref{location} ',' @ref{labeldef_record_body} @anchor{definition_head} definition_head : "DEF" @end example @subheading @bullet{ Variable declaration records} @example @anchor{vardef_record_body} vardef_record_body : 'V' ',' @ref{variable_linkage_type} ',' @ref{variable_scope_type} ',' @ref{storage_class_type} ',' @ref{variable_name} ',' @ref{type_rep} @anchor{variable_linkage_type} variable_linkage_type : 'I' <- Internal | 'X' <- eXternal | 'N' <- None @anchor{variable_scope_type} variable_scope_type : 'F' <- File | 'B' <- Block | 'P' <- Parameter @anchor{storage_class_type} storage_class_type : 'A' <- Auto | 'R' <- Register | 'S' <- Static | 'N' <- None @end example @subheading @bullet{ Function definition records} @example @anchor{fundef_record_body} fundef_record_body : 'F' ',' @ref{function_linkage_type} ',' @ref{function_scope_type} ',' @ref{function_identifier} ',' @ref{lines} @end example @subheading @bullet{ Macro definition records} @example @anchor{macrodef_record_body} macrodef_record_body : 'M' ',' @ref{macro_name} ',' @ref{macro_form_type} @anchor{macro_form_type} macro_form_type : 'O' <- Object | 'F' <- Function @end example @subheading @bullet{ Label definition record} @example @anchor{labeldef_record_body} labeldef_record_body : 'L' ',' @ref{label_name} @anchor{label_name} label_name : c_identifier @end example @anchor{Output_Metrics_Def_Sample} @subheading @bullet{ Output example} @verbatim 1: int global_1; 2: struct { int i; long l; } global_2; 3: 4: static long static_1; 5: static enum { FOO, BAR, BAZ } static_2; 6: 7: int foo(int i, register short s) 8: { 9: static char static_3 = 0; 10: register int local_1 = i + s + static_3; 11: auto int local_2 = 0; 12: int local_3 = 0; 13: goto end; 14: end: 15: return local_1 + local_2 + local_3; 16: } 17: 18: static void bar(void) {} 19: 20: #define OBJ_FORM_MACRO (1 + 2) 21: #define MAX(a, b) ((a) < (b) ? (b) : (a)) @end verbatim @example DEF,test.c,1,5,V,X,F,N,global_1,int DEF,test.c,2,27,V,X,F,N,global_2,struct __adlint__unnamed_1 DEF,test.c,4,13,V,I,F,S,static_1,long DEF,test.c,5,31,V,I,F,S,static_2,enum __adlint__unnamed_2 DEF,test.c,7,13,V,I,P,N,i,int DEF,test.c,7,31,V,I,P,R,s,short DEF,test.c,9,17,V,I,B,S,static_3,char DEF,test.c,10,18,V,I,B,R,local_1,int DEF,test.c,11,14,V,I,B,A,local_2,int DEF,test.c,12,9,V,I,B,N,local_3,int DEF,test.c,7,5,F,X,F,foo,"int foo(int,short)",10 DEF,test.c,18,13,F,I,F,bar,void bar(void),1 DEF,test.c,20,1,M,OBJ_FORM_MACRO,O DEF,test.c,21,1,M,MAX,F DEF,test.c,14,1,L,end @end example @anchor{Output_Metrics_Ini} @subsection Initialization record @example @anchor{initialization_record} initialization_record : @ref{initialization_head} ',' @ref{location} ',' @ref{variable_name} ',' @ref{initializer_rep} @anchor{initialization_head} initialization_head : "INI" @end example @anchor{Output_Metrics_Ini_Sample} @subheading @bullet{ Output example} @verbatim 1: int global_1 = 1; 2: 3: int main(void) 4: { 5: int local_1 = global_1; 6: int local_2 = local_1 + 1; 7: 8: return local_1 + local_2; 9: } @end verbatim @example INI,test.c,1,5,global_1,1 INI,test.c,5,9,local_1,global_1 INI,test.c,6,9,local_2,local_1 + 1 @end example @anchor{Output_Metrics_Asn} @subsection Assignment records @example @anchor{assignment_record} assignment_record : @ref{assignment_head} ',' @ref{location} ',' @ref{variable_name} ',' @ref{assignment_rep} @anchor{assignment_head} assignment_head : "ASN" @end example @anchor{Output_Metrics_Asn_Sample} @subheading @bullet{ Output example} @verbatim 1: int main(void) 2: { 3: int i; 4: 5: for (i = 0; i < 10; i++) { 6: if (i % 2) { 7: i += 1; 8: } 9: } 10: 11: return 0; 12: } @end verbatim @example ASN,test.c,5,12,i,= 0 ASN,test.c,7,15,i,+= 1 @end example @anchor{Output_Metrics_Dep} @subsection Dependency records @example @anchor{dependency_record} dependency_record : @ref{dependency_head} ',' @ref{location} ',' @ref{include_record_body} | @ref{dependency_head} ',' @ref{location} ',' @ref{call_record_body} | @ref{dependency_head} ',' @ref{location} ',' @ref{xref_record_body} @anchor{dependency_head} dependency_head : "DEP" @end example @subheading @bullet{ Include records} @example @anchor{include_record_body} include_record_body : 'I' ',' @ref{included_fpath} @anchor{included_fpath} included_fpath : '<' @ref{file_path} '>' | '"' @ref{file_path} '"' @end example @subheading @bullet{ Caller function records} @example @anchor{call_record_body} call_record_body : 'C' ',' @ref{caller_function} ',' @ref{callee_function} @anchor{caller_function} caller_function : @ref{function_identifier} @anchor{callee_function} callee_function : @ref{function_identifier} @end example @subheading @bullet{ external reference records} @example @anchor{xref_record_body} xref_record_body : 'X' ',' xref_variable_record_body | 'X' ',' xref_function_record_body @anchor{xref_variable_record_body} xref_variable_record_body : 'V' ',' @ref{accessor_function} ',' @ref{access_type} ',' @ref{accessee_variable} @anchor{xref_function_record_body} xref_function_record_body : 'F' ',' @ref{accessor_function} ',' @ref{access_type} ',' @ref{accessee_function} @anchor{accessor_function} accessor_function : @ref{function_identifier} @anchor{access_type} access_type : 'R' | 'W' @anchor{accessee_variable} accessee_variable : @ref{variable_name} @anchor{accessee_function} accessee_function : @ref{function_identifier} @end example @anchor{Output_Metrics_Dep_Sample} @subheading @bullet{ Output example} @verbatim 1: #include 2: #include "test.h" 3: 4: extern int global; 5: 6: int foo(long l) 7: { 8: int i = global; 9: 10: return l - i; 11: } 12: 13: int main(void) 14: { 15: int (*p)(long) = &foo; 16: 17: global = 5; 18: 19: return (*p)(10); 20: } @end verbatim @example DEP,test.c,1,1,I, DEP,test.c,2,1,I,"""test.h""" DEP,test.c,8,13,X,V,foo,int foo(long),R,global DEP,test.c,19,16,C,main,int main(void),foo,int foo(long) DEP,test.c,15,23,X,F,main,int main(void),R,foo,int foo(long) DEP,test.c,17,12,X,V,main,int main(void),W,global @end example @anchor{Output_Metrics_Lit} @subsection Literal records @example @anchor{literal_record} literal_record : @ref{literal_head} ',' @ref{location} ',' @ref{literal_type} ',' @ref{literal_prefix} ',' @ref{literal_suffix} ',' @ref{literal_value} @anchor{literal_head} literal_head : "LIT" @anchor{literal_type} literal_type : 'DN' <- Decimal Number | 'HN' <- Hexadecimal Number | 'ON' <- Octal Number | 'BN' <- Binary Number | 'FN' <- Floating point Number | 'CN' <- Character Narrow | 'SN' <- String Narrow | 'CW' <- Character Wide | 'SW' <- String Wide @anchor{literal_prefix} literal_prefix : | 'l' | 'L' | '0' | '0x' | '0X' | '0b' | '0B' @anchor{literal_suffix} literal_suffix : | 'u' | 'U' | 'l' | 'L' | 'ul' | 'Ul' | 'uL' | 'UL' | 'ull' | 'Ull' | 'uLL' | 'ULL' | 'll' | 'LL' | 'f' | 'F' @anchor{literal_value} literal_value : c_constant | c_string_literal @end example @anchor{Output_Metrics_Lit_Sample} @subheading @bullet{ Output example} @verbatim 1: unsigned int i = 0xFFU; 2: 3: int foo(long l) 4: { 5: const wchar_t *s = L"foobar"; 6: 7: return 0; 8: } @end verbatim @example LIT,test.c,1,18,HN,0x,U,0xFFU LIT,test.c,5,24,SW,L,,"L""foobar""" @end example @anchor{Output_Metrics_Pre} @subsection Preprocess record @example @anchor{preprocess_record} preprocess_record : @ref{preprocess_head} ',' @ref{location} ',' @ref{pp_directive} ',' @ref{pp_tokens} @anchor{preprocess_head} preprocess_head : "PRE" @anchor{pp_directive} pp_directive : "#if" | "#ifdef" | "#ifndef" | "#elif" | "#else" | "#endif" | "#include" | "#define" | "#undef" | "#line" | "#error" | "#pragma" | "#" @end example @anchor{Output_Metrics_Pre_Sample} @subheading @bullet{ Output example} @verbatim 1: #pragma once 2: 3: #if defined(NDEBUG) 4: void debug(const char *msg) {} 5: #else 6: #include 7: void debug(const char *msg) 8: { 9: puts(msg); 10: } 11: #endif @end verbatim @example PRE,test.c,1,1,#pragma,once PRE,test.c,3,1,#if,defined(NDEBUG) PRE,test.c,5,1,#else, PRE,test.c,6,1,#include, PRE,test.c,11,1,#endif, @end example @anchor{Output_Metrics_Met} @subsection Metric value records @example @anchor{metric_record} metric_record : @ref{metric_head} ',' @ref{file_metric_record_body} | @ref{metric_head} ',' @ref{func_metric_record_body} @anchor{metric_head} metric_head : "MET" @anchor{file_metric_record_body} file_metric_record_body : @ref{file_metric_name} ',' @ref{file_path} ',' @ref{metric_value} @anchor{func_metric_record_body} func_metric_record_body : @ref{func_metric_name} ',' @ref{function_identifier} ',' @ref{location} ',' @ref{metric_value} @anchor{file_metric_name} file_metric_name : "FL_STMT" <- Number of statements | "FL_FUNC" <- Number of functions @anchor{func_metric_name} func_metric_name : "FN_STMT" <- Number of statements | "FN_UNRC" <- Number of unreached statements | "FN_LINE" <- Number of lines | "FN_PARA" <- Number of parameters | "FN_UNUV" <- Number of not use /not reuse variables | "FN_CSUB" <- Location number of call function | "FN_CALL" <- Location number of called from function | "FN_GOTO" <- Number of goto statement | "FN_RETN" <- Number of return point in a function | "FN_UELS" <- Number of 'if' statement unless 'else' | "FN_NEST" <- Maximum number of nest of control flow graph | "FN_PATH" <- Presumed number of static path | "FN_CYCM" <- Cyclomatic complexity @anchor{metric_value} metric_value : integer value @end example @node Message File @section message file @example @anchor{message_file} message_file : @ref{message_version_record} | @ref{message_version_record} @ref{new_line} @ref{message_list} @anchor{message_version_record} message_version_record : 'V' ',' @ref{version_number} ',' @ref{exec_timestamp} ',' @ref{exec_working_directory} @anchor{message_list} message_list : @ref{error_record} | @ref{warning_record} | @ref{message_list} @ref{new_line} @ref{error_record} | @ref{message_list} @ref{new_line} @ref{warning_record} @anchor{error_record} error_record : @ref{error_line} @ref{new_line} @ref{context_line_list} @anchor{error_line} error_line : 'E' ',' @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} ',' @ref{exam_package_name} ',' @ref{message_id} ',' @ref{message_category} ',' @ref{message_severity} ',' @ref{message_text} @anchor{warning_record} warning_record : @ref{warning_line} @ref{new_line} @ref{context_line_list} @anchor{warning_line} warning_line : 'W' ',' @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} ',' @ref{exam_package_name} ',' @ref{message_id} ',' @ref{message_category} ',' @ref{message_severity} ',' @ref{message_text} @anchor{context_line_list} context_line_list : | @ref{context_line} @ref{new_line} @ref{context_line_list} @anchor{context_line} context_line : 'C' ',' @ref{file_path} ',' @ref{line_no} ',' @ref{column_no} ',' @ref{exam_package_name} ',' @ref{message_id} ',' @ref{message_category} ',' @ref{message_severity} ',' @ref{message_text} @end example @node Messages @chapter Message list @menu * X0001::An unknown exception `%s' is found. * X0002::An illegal message ID `%s' is found. * X0003::Analysis processing has been stopped due to unrecoverable error. For the details, refer to `%s' and `%s'. * X0004::An illegal message format `%s' is found. * E0004::Corresponding #endif doesn't found. * E0007::Syntax error is found in conditional expression token `%s'. Conditional expression evaluate as false. * E0008::Syntax error is found in token `%s'. * E0009::A header file of <%s> doesn't found. * E0010::A header file of "%s" doesn't found. * E0013::Statement cannot include in syntax. * E0014::'&&' monadic operator to get a label address is GCC original add-on. * E0015::'goto' statement with specified label address is GCC original add-on. * E0016::Unfinished comment block is found. * W0001::Nesting depth of round bracket `()' exceed 32. This program doesn't meet the strict ISO C90 standards of the term. * W0002::Identifier and declaration of formal argument described separately in the definition of function `%s()' is old style. * W0003::This switch statement doesn't have default label. * W0007::'break' or 'return' statement doesn't found in the last 'case' or 'default' section. * W0010::There is a side-effect in this ternary operator (conditional operator). * W0013::'continue' statement is used in repetition statement. * W0016::The field width of conversion specifier exceeds 509 characters in 'printf' function. * W0017::The field width of conversion specifier exceeds 509 characters in 'scanf' function. * W0018::This accuracy width of conversion specifier exceeds 509 characters. * W0019::This pointer cast is danger because it delete const qualifier. * W0021::This pointer cast is danger because it delete volatile qualifier. * W0023::Arithmetic operation is being made by pointer variable. * W0024::Increment or decrement is being made by pointer variable. * W0025::`%s' is already included by this file directly. * W0026::`%s' is already included by this file indirectly. * W0027::Comparison operation is being made by pointer variable. * W0028::Dereferencing a pointer constant of NULL. * W0030::Arithmetic operation is being made by NULL pointer. * W0031::A formal argument `%s' is not used in this function. * W0033::A label of `%s:' is not used in this function. It might be removed. * W0035::Right operand of ``&&' or `||' must arithmetic type or pointer type. * W0036::The number of qualification operator exceeds 12.This program doesn't meet the strict ISO C90 standards of the term. * W0037::Nest of structure or union exceeds 15. This program doesn't meet the strict ISO C90 standards of the term. * W0038::The size of object `%s' exceeds 32767 bytes. This program doesn't meet the strict ISO C90 standards of the term. * W0039::The number of local identifier in the block exceeds 127. This program doesn't meet the strict ISO C90 standards of the term. * W0040::A bit field is declared without 'signed' or 'unsigned'. * W0041::The number of member of structure or union exceeds 127.This program doesn't meet the strict ISO C90 standards of the term. * W0042::The number of enumeration literal exceeds 127. This program doesn't meet the strict ISO C90 standards of the term. * W0043::The initial value of the array is short of declared array's size. The residual array will be initialized by zero. * W0049::Nest of control structure exceeds 15. This program doesn't meet the strict ISO C90 standards of the term. * W0050::The number of 'case' label exceeds 257. This program doesn't meet the strict ISO C90 standards of the term. * W0051::An external identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in linker property. * W0052::An identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in compile property. * W0053::Nest of `#include "%s"' exceeds 8.This program doesn't meet the strict ISO C90 standards of the term. * W0054::The maximum number of `#if...' nest exceeds 8. This program doesn't meet the strict ISO C90 standards of the term. * W0055::The number of macro definition exceeds 1024. This program doesn't meet the strict ISO C90 standards of the term. * W0056::The number of formal argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term. * W0057::The number of actual argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term. * W0058::The number of characters of string literal exceeds 509.This program doesn't meet the strict ISO C90 standards of the term. * W0059::Ctrl-M(^M) control character is found at the end of line. * W0060::Ctrl-Z(^Z) control character is found in this file. * W0061::`%s' is not actual reserved keyword. It will be considered as language extension and ignored. * W0062::`__typeof__' is not supported ISO C standards. It will be considered as language extension. * W0063::`__alignof__'is not supported ISO C standards. It will be considered as language extension.. * W0064::A binary integer literal is used. This is the language extension. * W0065::Must not cast left operand of assignment operator. * W0066::`main()' function must `int (void)' or `int (int, char *[])'. * W0067::Directly access to the member of nested structure. This is the language extension. * W0068::`.' is used to get access to bit. This is the language extension. * W0069::`/*' is found in the beginning with `/*' comments. Nested comment doesn't allowed in ISO C standards. * W0070::Included <%s> is not referenced in the translation unit. It can be removed. * W0071::Included "%s" is not referenced in the translation unit. It can be removed. * W0072::A character except for basic source character is used in header file name. * W0073::No include guard in this include file. * W0076::Hexadecimal constant without `U' or `u' suffix. * W0077::Lower case `l' is added to integer or floating-point number. * W0078::A function is declared without list of formal argument. * W0079::This array cannot keep final character `\0' which initial value of string literal. * W0080::A global object which const qualified is defined without explicitly initialized. * W0081::A monadic operator `-' becomes unsigned type if it use 'unsigned int' type, 'unsigned long' type or 'unsigned long' type operand. * W0082::Unary operator `-' is applied to an operand whose underlying type `%s' is unsigned. * W0084::Left operand of this comma operator `,' doesn't described the statement which has side-effects. * W0085::This statement doesn't have side-effects. It is highly possible that it having error. * W0086::Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator). * W0087::The right side statement of comma operator is verbose statement which doesn't have side-effects. * W0088::The right side statement of logical operator is verbose statement which doesn't have side-effects. * W0093::This expression may cause division-by-zero. * W0096::It divided by a constant expression which definitely zero. * W0097::This expression must cause division-by-zero. * W0100::The variable `%s' has not been reassigned since the initial value is assigned. It may be able to be defined as `const' with an initial value. * W0101::An address of auto variable is substituted for a pointer which has a longer life. This program is danger. * W0102::An address of auto variable is returned via formal argument to functions. This program is danger. * W0103::An address of auto variable is returned as return value from a function. This program is danger. * W0104::The value of formal argument `%s' is not change. It can be declarable with 'const'. * W0105::The object which points the formal argument `%s' is not change. It can be declaring as pointer type which points const object. * W0107::An address of auto variable is substituted for local pointer with 'static' option. This program is danger. * W0108::An assignment-expression appears in the logical expression. * W0109::The definition of this function doesn't found. It consider it was omitted, and insert `extern int %s()'. * W0110::A variable number with floating-point type is used by loop counter in for statement. * W0112::The statement of floating-point compares by equivalent operator. * W0114::This control expression is not explicit logical operation. * W0115::Unsigned left shift operator `<<' drop the high-order bit. * W0116::Unsigned left shift operator `<<' can be drop high-order bit. * W0117::`%s' has external-linkage without any prototype declarations. * W0118::`%s' has external-linkage, but no prototype declaration is in header files. * W0119::An implicit type conversion from char to signed char. * W0120::An implicit type conversion from char to unsigned char. * W0121::An implicit type conversion from char to signed short. * W0122::An implicit type conversion from char to unsigned short. * W0123::An implicit type conversion from char to signed int. * W0124::An implicit type conversion from char to unsigned int. * W0125::An implicit type conversion from char to signed long. * W0126::An implicit type conversion from char to unsigned long. * W0127::An implicit type conversion from char to float. * W0128::An implicit type conversion from char to double. * W0129::An implicit type conversion from char to long double. * W0130::An implicit type conversion from char to signed long long. * W0131::An implicit type conversion from char to unsigned long long. * W0132::An implicit type conversion from unsigned char to char. * W0133::An implicit type conversion from signed char to char. * W0134::An implicit type conversion from signed short to char. * W0135::An implicit type conversion from unsigned short to char. * W0136::An implicit type conversion from signed int to char. * W0137::An implicit type conversion from unsigned int to char. * W0138::An implicit type conversion from signed long to char. * W0139::An implicit type conversion from unsigned long to char. * W0140::An implicit type conversion from signed long long to char. * W0141::An implicit type conversion from unsigned long long to char. * W0142::An implicit type conversion from unsigned char to signed char. * W0143::An implicit type conversion from unsigned short to signed char. * W0144::An implicit type conversion from unsigned short to signed short. * W0145::An implicit type conversion from unsigned int to signed char. * W0146::An implicit type conversion from unsigned int to signed short. * W0147::An implicit type conversion from unsigned int to signed int. * W0148::An implicit type conversion from unsigned long to signed char. * W0149::An implicit type conversion from unsigned long to signed short. * W0150::An implicit type conversion from unsigned long to signed int. * W0151::An implicit type conversion from unsigned long to signed long. * W0152::An implicit type conversion from unsigned long long to signed char. * W0153::An implicit type conversion from unsigned long long to signed short. * W0154::An implicit type conversion from unsigned long long to signed int. * W0155::An implicit type conversion from unsigned long long to signed long. * W0156::An implicit type conversion from unsigned long long to signed long long. * W0157::An implicit type conversion from signed char to unsigned char. * W0158::An implicit type conversion from signed char to unsigned short. * W0159::An implicit type conversion from signed char to unsigned int. * W0160::An implicit type conversion from signed char to unsigned long. * W0161::An implicit type conversion from signed short to unsigned char. * W0162::An implicit type conversion from signed short to unsigned short. * W0163::An implicit type conversion from signed short to unsigned int. * W0164::An implicit type conversion from signed short to unsigned long. * W0165::Implicit conversion from `signed int' to `unsigned char'. * W0166::An implicit type conversion from signed int to unsigned short. * W0167::Implicit conversion from `signed int' to `unsigned int'. * W0168::An implicit type conversion from signed int to unsigned long. * W0169::An implicit type conversion from signed long to unsigned char. * W0170::An implicit type conversion from signed long to unsigned short. * W0171::An implicit type conversion from signed long to unsigned int. * W0172::An implicit type conversion from signed long to unsigned long. * W0173::An implicit type conversion from signed char to unsigned long long. * W0174::An implicit type conversion from signed short to unsigned long long. * W0175::An implicit type conversion from signed int to unsigned long long. * W0176::An implicit type conversion from signed long to unsigned long long. * W0177::An implicit type conversion from signed long long to unsigned char. * W0178::An implicit type conversion from signed long long to unsigned short. * W0179::An implicit type conversion from signed long long to unsigned int. * W0180::An implicit type conversion from signed long long to unsigned long. * W0181::An implicit type conversion from signed long long to unsigned long long. * W0182::An implicit type conversion from unsigned char to float. * W0183::An implicit type conversion from unsigned char to double. * W0184::An implicit type conversion from unsigned char to long double. * W0185::An implicit type conversion from signed char to float. * W0186::An implicit type conversion from signed char to double. * W0187::An implicit type conversion from signed char to long double. * W0188::An implicit type conversion from signed short to float. * W0189::An implicit type conversion from signed short to double. * W0190::An implicit type conversion from signed short to long double. * W0191::An implicit type conversion from unsigned short to float. * W0192::An implicit type conversion from unsigned short to double. * W0193::An implicit type conversion from unsigned short to long double. * W0194::An implicit type conversion from signed int to float. * W0195::An implicit type conversion from signed int to double. * W0196::An implicit type conversion from signed int to long double. * W0197::An implicit type conversion from unsigned int to float. * W0198::An implicit type conversion from unsigned int to double. * W0199::An implicit type conversion from unsigned int to long double. * W0200::An implicit type conversion from signed long to float. * W0201::An implicit type conversion from signed long to double. * W0202::An implicit type conversion from signed long to long double. * W0203::An implicit type conversion from unsigned long to float. * W0204::An implicit type conversion from unsigned long to double. * W0205::An implicit type conversion from unsigned long to long double. * W0206::An implicit type conversion from signed long long to float. * W0207::An implicit type conversion from signed long long to double. * W0208::An implicit type conversion from signed long long to long double. * W0209::An implicit type conversion from unsigned long long to float. * W0210::An implicit type conversion from unsigned long long to double. * W0211::An implicit type conversion from unsigned long long to long double. * W0212::An implicit type conversion from float to char. * W0213::An implicit type conversion from float to signed char. * W0214::An implicit type conversion from float to unsigned char. * W0215::An implicit type conversion from float to signed short. * W0216::An implicit type conversion from float to unsigned short. * W0217::An implicit type conversion from float to signed int. * W0218::An implicit type conversion from float to unsigned int. * W0219::An implicit type conversion from float to signed long. * W0220::An implicit type conversion from float to unsigned long. * W0221::An implicit type conversion from double to char. * W0222::An implicit type conversion from double to signed char. * W0223::An implicit type conversion from double to unsigned char. * W0224::An implicit type conversion from double to signed short. * W0225::An implicit type conversion from double to unsigned short. * W0226::An implicit type conversion from double to signed int. * W0227::An implicit type conversion from double to unsigned int. * W0228::An implicit type conversion from double to signed long. * W0229::An implicit type conversion from double to unsigned long. * W0230::An implicit type conversion from long double to char. * W0231::An implicit type conversion from long double to signed char. * W0232::An implicit type conversion from long double to unsigned char. * W0233::An implicit type conversion from long double to signed short. * W0234::An implicit type conversion from long double to unsigned short. * W0235::An implicit type conversion from long double to signed int. * W0236::An implicit type conversion from long double to unsigned int. * W0237::An implicit type conversion from long double to signed long. * W0238::An implicit type conversion from long double to unsigned long. * W0239::An implicit type conversion from float to signed long long. * W0240::An implicit type conversion from float to unsigned long long. * W0241::An implicit type conversion from double to signed long long. * W0242::An implicit type conversion from double to unsigned long long. * W0243::An implicit type conversion from long double to signed long long. * W0244::An implicit type conversion from long double to unsigned long long. * W0245::An implicit type conversion from unsigned char to signed short. * W0246::Implicit conversion from `unsigned char' to `signed int'. * W0247::An implicit type conversion from unsigned char to signed long. * W0248::An implicit type conversion from unsigned short to signed int. * W0249::An implicit type conversion from unsigned short to signed long. * W0250::An implicit type conversion from unsigned int to signed long. * W0251::An implicit type conversion from unsigned char to signed long long. * W0252::An implicit type conversion from unsigned short to signed long long. * W0253::An implicit type conversion from unsigned int to signed long long. * W0254::An implicit type conversion from unsigned long to signed long long. * W0255::A value of char type is returned from `signed char %s()' function. * W0256::A value of char type is returned from `unsigned char %s()' function. * W0257::A value of char type is returned from `signed short %s()' function. * W0258::A value of char type is returned from `unsigned short %s()' function. * W0259::A value of char type is returned from `signed int %s()' function. * W0260::A value of char type is returned from `unsigned int %s()' function. * W0261::A value of char type is returned from `signed long %s()' function. * W0262::A value of char type is returned from `unsigned long %s()' function. * W0263::A value of char type is returned from `float %s()' function. * W0264::A value of char type is returned from `double %s()' function. * W0265::A value of char type is returned from `long double %s()' function. * W0266::A value of char type is returned from `signed long long %s()' function. * W0267::A value of char type is returned from `unsigned long long %s()' function. * W0268::A value of unsigned char type is returned from `char %s()' function. * W0269::A value of signed char type is returned from `char %s()' function. * W0270::A value of signed short type is returned from `char %s()' function. * W0271::A value of unsigned short type is returned from `char %s()' function. * W0272::A value of signed int type is returned from `char %s()' function. * W0273::A value of unsigned int type is returned from `char %s()' function. * W0274::A value of signed long type is returned from `char %s()' function. * W0275::A value of unsigned long type is returned from `char %s()' function. * W0276::A value of signed long long type is returned from `char %s()' function. * W0277::A value of unsigned long long type is returned from `char %s()' function. * W0278::A value of unsigned char type is returned from `signed char %s()' function. * W0279::A value of unsigned short type is returned from `signed char %s()' function. * W0280::A value of unsigned short type is returned from `signed short %s()' function. * W0281::A value of unsigned int type is returned from `signed char %s()' function. * W0282::A value of unsigned int type is returned from `signed short %s()' function. * W0283::A value of unsigned int type is returned from `signed int %s()' function. * W0284::A value of unsigned long type is returned from `signed char %s()' function. * W0285::A value of unsigned long type is returned from `signed short %s()' function. * W0286::A value of unsigned long type is returned from `signed int %s()' function. * W0287::A value of unsigned long type is returned from `signed long %s()' function. * W0288::A value of unsigned long long type is returned from `signed char %s()' function. * W0289::A value of unsigned long long type is returned from `signed short %s()' function. * W0290::A value of unsigned long long type is returned from `signed int %s()' function. * W0291::A value of unsigned long long type is returned from `signed long %s()' function. * W0292::A value of unsigned long long type is returned from `signed long long %s()' function. * W0293::A value of signed char type is returned from `unsigned char %s()' function. * W0294::A value of signed char type is returned from `unsigned short %s()' function. * W0295::A value of signed char type is returned from `unsigned int %s()' function. * W0296::A value of signed char type is returned from `unsigned long %s()' function. * W0297::A value of signed short type is returned from `unsigned char %s()' function. * W0298::A value of signed short type is returned from `unsigned short %s()' function. * W0299::A value of signed short type is returned from `unsigned int %s()' function. * W0300::A value of signed short type is returned from `unsigned long %s()' function. * W0301::A value of signed int type is returned from `unsigned char %s()' function. * W0302::A value of signed int type is returned from `unsigned short %s()' function. * W0303::A value of signed int type is returned from `unsigned int %s()' function. * W0304::A value of signed int type is returned from `unsigned long %s()' function. * W0305::A value of signed long type is returned from `unsigned char %s()' function. * W0306::A value of signed long type is returned from `unsigned short %s()' function. * W0307::A value of signed long type is returned from `unsigned int %s()' function. * W0308::A value of signed long type is returned from `unsigned long %s()' function. * W0309::A value of signed char type is returned from `unsigned long long %s()' function. * W0310::A value of signed short type is returned from `unsigned long long %s()' function. * W0311::A value of signed int type is returned from `unsigned long long %s()' function. * W0312::A value of signed long type is returned from `unsigned long long %s()' function. * W0313::A value of signed long long type is returned from `unsigned char %s()' function. * W0314::A value of signed long long type is returned from `unsigned short %s()' function. * W0315::A value of signed long long type is returned from `unsigned int %s()' function. * W0316::A value of signed long long type is returned from `unsigned long %s()' function. * W0317::A value of signed long long type is returned from `unsigned long long %s()' function. * W0318::A value of unsigned char type is returned from `float %s()' function. * W0319::A value of unsigned char type is returned from `double %s()' function. * W0320::A value of unsigned char type is returned from `long double %s()' function. * W0321::A value of signed char type is returned from `float %s()' function. * W0322::A value of signed char type is returned from `double %s()' function. * W0323::A value of signed char type is returned from `long double %s()' function. * W0324::A value of signed short type is returned from `float %s()' function. * W0325::A value of signed short type is returned from `double %s()' function. * W0326::A value of signed short type is returned from `long double %s()' function. * W0327::A value of unsigned short type is returned from `float %s()' function. * W0328::A value of unsigned short type is returned from `double %s()' function. * W0329::A value of unsigned short type is returned from `long double %s()' function. * W0330::A value of signed int type is returned from `float %s()' function. * W0331::A value of signed int type is returned from `double %s()' function. * W0332::A value of signed int type is returned from `long double %s()' function. * W0333::A value of unsigned int type is returned from `float %s()' function. * W0334::A value of unsigned int type is returned from `double %s()' function. * W0335::A value of unsigned int type is returned from `long double %s()' function. * W0336::A value of signed long type is returned from `float %s()' function. * W0337::A value of signed long type is returned from `double %s()' function. * W0338::A value of signed long type is returned from `long double %s()' function. * W0339::A value of unsigned long type is returned from `float %s()' function. * W0340::A value of unsigned long type is returned from `double %s()' function. * W0341::A value of unsigned long type is returned from `long double %s()' function. * W0342::A value of signed long long type is returned from `float %s()' function. * W0343::A value of signed long long type is returned from `double %s()' function. * W0344::A value of signed long long type is returned from `long double %s()' function. * W0345::A value of unsigned long long type is returned from `float %s()' function. * W0346::A value of unsigned long long type is returned from `double %s()' function. * W0347::A value of unsigned long long type is returned from `long double %s()' function. * W0348::A value of float type is returned from `char %s()' function. * W0349::A value of float type is returned from `signed char %s()' function. * W0350::A value of float type is returned from `unsigned char %s()' function. * W0351::A value of float type is returned from `signed short %s()' function. * W0352::A value of float type is returned from `unsigned short %s()' function. * W0353::A value of float type is returned from `signed int %s()' function. * W0354::A value of float type is returned from `unsigned int %s()' function. * W0355::A value of float type is returned from `signed long %s()' function. * W0356::A value of float type is returned from `unsigned long %s()' function. * W0357::A value of double type is returned from `char %s()' function. * W0358::A value of double type is returned from `signed char %s()' function. * W0359::A value of double type is returned from `unsigned char %s()' function. * W0360::A value of double type is returned from `signed short %s()' function. * W0361::A value of double type is returned from `unsigned short %s()' function. * W0362::A value of double type is returned from `signed int %s()' function. * W0363::A value of double type is returned from `unsigned int %s()' function. * W0364::A value of double type is returned from `signed long %s()' function. * W0365::A value of double type is returned from `unsigned long %s()' function. * W0366::A value of long double type is returned from `char %s()' function. * W0367::A value of long double type is returned from `signed char %s()' function. * W0368::A value of long double type is returned from `unsigned char %s()' function. * W0369::A value of long double type is returned from `signed short %s()' function. * W0370::A value of long double type is returned from `unsigned short %s()' function. * W0371::A value of long double type is returned from `signed int %s()' function. * W0372::A value of long double type is returned from `unsigned int %s()' function. * W0373::A value of long double type is returned from `signed long %s()' function. * W0374::A value of long double type is returned from `unsigned long %s()' function. * W0375::A value of float type is returned from `signed long long %s()' function. * W0376::A value of float type is returned from `unsigned long long %s()' function. * W0377::A value of double type is returned from `signed long long %s()' function. * W0378::A value of double type is returned from `unsigned long long %s()' function. * W0379::A value of long double type is returned from `signed long long %s()' function. * W0380::A value of long double type is returned from `unsigned long long %s()' function. * W0381::A value of signed short type is returned from `signed char %s()' function. * W0382::A value of unsigned short type is returned from `unsigned char %s()' function. * W0383::A value of signed int type is returned from `signed char %s()' function. * W0384::A value of signed int type is returned from `signed short %s()' function. * W0385::A value of unsigned int type is returned from `unsigned char %s()' function. * W0386::A value of unsigned int type is returned from `unsigned short %s()' function. * W0387::A value of signed long type is returned from `signed char %s()' function. * W0388::A value of signed long type is returned from `signed short %s()' function. * W0389::A value of signed long type is returned from `signed int %s()' function. * W0390::A value of unsigned long type is returned from `unsigned char %s()' function. * W0391::A value of unsigned long type is returned from `unsigned short %s()' function. * W0392::A value of unsigned long type is returned from `unsigned int %s()' function. * W0393::A value of signed long long type is returned from `signed char %s()' function. * W0394::A value of signed long long type is returned from `signed short %s()' function. * W0395::A value of signed long long type is returned from `signed int %s()' function. * W0396::A value of signed long long type is returned from `signed long %s()' function. * W0397::A value of unsigned long long type is returned from `unsigned char %s()' function. * W0398::A value of unsigned long long type is returned from `unsigned short %s()' function. * W0399::A value of unsigned long long type is returned from `unsigned int %s()' function. * W0400::A value of unsigned long long type is returned from `unsigned long %s()' function. * W0401::A value of unsigned char type is returned from `signed short %s()' function. * W0402::A value of unsigned char type is returned from `signed int %s()' function. * W0403::A value of unsigned char type is returned from `signed long %s()' function. * W0404::A value of unsigned short type is returned from `signed int %s()' function. * W0405::A value of unsigned short type is returned from `signed long %s()' function. * W0406::A value of unsigned int type is returned from `signed long %s()' function. * W0407::A value of unsigned char type is returned from `signed long long %s()' function. * W0408::A value of unsigned short type is returned from `signed long long %s()' function. * W0409::A value of unsigned int type is returned from `signed long long %s()' function. * W0410::A value of unsigned long type is returned from `signed long long %s()' function. * W0411::The initialization of enumeration should be only the starting, whole or not at all. * W0413::The body of control statement is unenclosed by curly brace `@{@}' block. * W0414::Body of the controlling statement in a line is not enclosed by `@{@}'. * W0421::Value of the dereferencing pointer must be NULL. * W0422::Value of the dereferencing pointer may be NULL. * W0423::Arithmetic operation is being made to the pointer which its value will be NULL. * W0424::Arithmetic operation is being made to the pointer which its value might be NULL. * W0425::There are several definitions or statements in a line. * W0431::This line begins at more left than previous lines of the same indentation level. * W0432::Indentation of this line does not comply with the project's indent style. * W0440::An indent of this close bracket `@}' is not correspond to the open bracket `@{'. * W0441::The type of integer literal which doesn't have a suffix is not int type. * W0442::A function-like macro is defined. * W0443::This function-like macro might be replaced with a function. * W0444::`#'operator and `##'operator is used in a macro definition. * W0445::Multiple `##'operator is used in a macro definition. * W0446::The result value of assignment operation is used. * W0447::A comma operator is used except 'for' statement. * W0456::An object or a function `%s which has external coupling is defined in a header file. * W0457::The return value doesn't define explicitly in the function declaration or definition. It defined as 'int' implicitly. * W0458::The type doesn't define explicitly in the object declaration or definition. It defined as 'int' implicitly. * W0459::A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. * W0460::A value of variable `%s' wouldn't set when this expression is evaluated. * W0461::A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. * W0462::A pointer which the value will probably not set is used for the actual argument of the function. * W0477::There are unpaired `[]',`()',`@{@}' in macro definition. * W0478::This macro defines scraps of unrecognized codes. * W0479::This macro definition might be replaced with 'typedef' declaration. * W0480::This macro defines keyword of control statement or punctuator. * W0481::This macro defines the block around by `@{@}'. * W0482::This macro defines either type specifier. * W0483::This macro defines the pair of storage class specifier and type specifier. * W0488::A function call `()', array's index operation `[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'. * W0489::A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'. * W0490::A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'. * W0491::The same identifier name `%s' is also used in the declaration of other namespace. * W0492::The same identifier name `%s' is also used in the member of structure/union, label, tag or normal identifier. * W0493::The value of structure or union is passed as the actual argument of the function. * W0495::operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. * W0496::A ternary operator is used several times. It had better clear the coupling by using `()'. * W0497::Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. * W0498::The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. * W0499::The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. * W0500::The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. * W0501::A ternary operator is used with binary operator. It had better clear the coupling by using `()'. * W0502::A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. * W0508::There's a side effect at the right operand of `&&' or `||'operator. * W0511::C++ style comment of `//' is used. * W0512::The result of `++' or `--' operator is used in the statement. * W0525::A field named 1bit is declared by signed type. * W0528::This macro defines octal constant value. * W0529::An octal literal is used. * W0530::An octal escape sequence is used in a character constant or a string literal. * W0532::'break' statement is used to exits 'case' or 'default' section, but it's not described at the end of 'case' section. * W0534::A control variable `%s' is not initialized in this 'for' statement. * W0535::A comma operator is used in a 'for' statement. * W0538::This 'default' label is not final label in this 'switch' statement. * W0540::A function which the blank formal argument list is declared. `void' is omitted. * W0541::Inline assembly code should be encapsulated by macro. * W0542::There are identifiers in the part of formal argument in a function declaration. * W0543::The identifier of formal argument in this function declaration is different from the past declaration of it. * W0544::The identifier of formal argument in the function declaration is different from the declaration of function pointer. * W0546::There is 'case' or 'default' label of switch statement in a nested block. * W0549::A formal argument of macro doesn't enclosed by `()'. * W0551::An union type specifier is defined. * W0552::An union type object is defined. * W0553::A pointer points to the function cast to other function pointer type. * W0554::An actual argument `%s' in `#pragma' is unrecognized. This `#pragma' command will be ignored. * W0555::This function is called recursive with indirectly. * W0556::The function which includes this call is called recursively. * W0559::The operand of `!' operator is the expression of bit operation or arithmetic operation. * W0560::The operand of `~' operator is boolean type expression. * W0561::The meaning of `*p++' is `*(p++)'. It is not `(*p)++'. `*' operator is verbose. * W0562::There are verbose `@{@}' in the initializer. * W0563::If it jumps from outside of this block to `%s' label,the local variable will not be initialized. * W0564::If this 'goto' statement jumps to `%s' label,local variable will not be initialized. * W0565::A volatile integer type cast to volatile pointer type and vice versa. * W0566::A volatile integer type cast to function pointer type and vice versa. * W0567::A volatile integer type cast to pointer to object and vice versa. * W0568::The result of left shift operation against the signed constant expression value is undefined. * W0569::The result of left shift operation against the signed expression value is undefined. * W0570::This signed left shift operation may make undefined value. * W0571::The result of right shift operation against the signed data is a possibility the both logical shift and arithmetic shift by implementation. * W0572::Bitwise operation of signed value causes implementation-defined behavior. * W0573::A `-' character in scanset in `[]' is implementation defined. * W0574::The character except for basic source character is used in the character constant. * W0575::The character except for basic source character is used in the string literal. * W0576::The character except for basic source character is used in the comment of source file `%s'. * W0577::The character except for basic source character is used in preprocessing directive of source file `%s'. * W0578::A generic integer value of the compound expression typed `%s' is implicitly converted into a new value of bigger type `%s'. * W0579::A generic integer value of the compound expression typed `%s' is explicitly converted into a new value of bigger type `%s'. * W0580::An address of local static variable is substituted for a pointer which has a wider scope. * W0581::The number or type of actual argument is different from the past. * W0582::The number or type of actual argument is different from the function prototype declaration at the following. * W0583::The number or type of actual argument is different from the function declaration at the following. * W0584::The type of %s actual argument is different from the type of formal argument in function definition. * W0585::A control variable `%s' doesn't appear increment expression. * W0586::A typedef `%s' is declared in more than one place. * W0589::An object `%s' is only referenced by function `%s' in the defined translation unit. * W0591::A function `%s' is only referenced by the defined translation unit. * W0593::An object `%s' is only referenced by the defined translation unit. * W0597::`%s' is modified more than once between the side-effects completion point. The evaluation order is undefined. * W0598::`%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined. * W0599::`%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined. * W0600::`%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined. * W0605::Multiple break-statements appear to break the same iteration. * W0606::An union has a member which type is floating-point. * W0607::An integer expression which the value which the value is minus converted to unsigned type. * W0608::An integer expression which the value might be minus converted to unsigned type. * W0609::This logical expression always makes true. * W0610::This logical expression always makes false. * W0611::The value of this 'for' control expression is always true. * W0612::The value of this 'if' conditional expression is always true. * W0613::This controlling expression always makes false. * W0614::The value of this "do-while" control expression is always false. The body of repetition statement executed only once. * W0622::A function is declared in the block scope. * W0623::An external coupling object is declared in the block scope. * W0624::There is '#define' or '#undef' in a block. * W0625::`%s' is using in the declaration or definition of external coupling. But its 'typedef' doesn't declare in the header file. * W0626::A wide character or wide string literal is used. * W0627::There is a dead letter (only `;') in the following other code. * W0628::A function `%s' is defined, but this is not used in this project. * W0629::`%s()' has internal-linkage, but it is never called in this translation-unit. * W0632::Using ' or " characters in `#include <%s>' directive makes undefined behavior. * W0633::Using ' character in `#include "%s"' directive makes undefined behavior. * W0634::`\' is used in `#include' line. `/' is recommended for the path delimiter. * W0635::The type doesn't match with %sth conversion specifier and the corresponding actual argument. * W0636::An actual argument doesn't exist correspond to %sth conversion specifier. * W0637::There is more actual argument than the number of conversion specifier in function call. * W0638::This function call requiring at least one actual argument. * W0639::%sth conversion specifier doesn't match with corresponding type of actual argument. * W0640::The actual argument of scanf function have to pass the object pointer to store the data. * W0641::Floating-point number type cast to pointer to object and vice versa. * W0642::Address derivation from the object declared as `register' is prohibited. * W0643::This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end. * W0644::A value in void statement is going to use. 'void' statement doesn't have a value. * W0645::'void' type cannot use in the type of formal argument. * W0646::A normal string literal and a wide string literal are contiguous. * W0649::A right operand value of shift operand is negative constant value. This result is undefined. * W0650::A value of the right operand in a shift expression is bigger than the bit size of the left operand type `%s'. This result is undefined. * W0653::The initial value of an array, structure or union is not enclosed by `@{@}'. * W0654::The initializer of structure or union must the value of the same structure type or union type. * W0655::This is bit field statement which the size is undefined. * W0656::%sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. * W0657::An invalid flag is used in %sth conversion specifier of `i' or 'd'. * W0658::An invalid flag is used in %sth conversion specifier of `o'. * W0659::An invalid flag is used in %sth conversion specifier of `u'. * W0660::An invalid flag is used in %sth conversion specifier of `x'. * W0661::An invalid flag is used in %sth conversion specifier of `X'. * W0662::An invalid flag is used in %sth conversion specifier of `f'. * W0663::An invalid flag is used in %sth conversion specifier of `e'. * W0664::An invalid flag is used in %sth conversion specifier of `E'. * W0665::An invalid flag is used in %sth conversion specifier of `g'. * W0666::An invalid flag is used in %sth conversion specifier of `G'. * W0667::An invalid flag is used in %sth conversion specifier of `c'. * W0668::An invalid flag is used in %sth conversion specifier of `%%'. * W0669::An invalid flag is used in %sth conversion specifier of `s'. * W0670::An invalid flag is used in %sth conversion specifier of `n'. * W0671::An invalid flag is used in %sth conversion specifier of `p'. * W0672::An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. * W0673::%sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. * W0674::An invalid flag is used in %sth conversion specifier of `d/i/n'. * W0675::An invalid flag is used in %sth conversion specifier of `o'. * W0676::An invalid flag is used in %sth conversion specifier of `u'. * W0677::An invalid flag is used in %sth conversion specifier of `x/X'. * W0678::An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. * W0679::An invalid flag is used in %sth conversion specifier of `s'. * W0680::An invalid flag is used in %sth conversion specifier of `p'. * W0681::An invalid flag is used in %sth conversion specifier of `%%'. * W0682::An invalid flag is used in %sth conversion specifier of `['. * W0683::An invalid flag is used in %sth conversion specifier of `c'. * W0684::An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. * W0685::A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. * W0686::The same characters are described in scanset (characters enclosed by `[]'). * W0687::#undef is using to delete #defined operator. * W0688::There is no line number in 1 to 32767 ranges after #line directive. * W0689::#line directive syntax doesn't match `#line integer constant \"string\"'. * W0690::No line number after #line directive. * W0691::The result of `##' operator is not valid preprocessing token. * W0692::A function-like macro `%s' doesn't given an actual argument. * W0693::A function-like macro is called by actual argument which its definition is smaller. * W0694::'assert' macro is inhibited to call the function named `assert'. This result is undefined. * W0695::If #undef the 'assert' macro, and enable to call its name function, the result is undefined. * W0696::This macro using in `#if...' is undefined. * W0697::There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value. * W0698::A `return;' statement is found in a function `%s' which has a return value. * W0699::The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement. * W0700::The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value. * W0703::The tag `%s' hides the declaration of same identifier which has wider scope. * W0704::This `%s' declaration hides the declaration of same identifier which has wider scope. * W0705::This non-constant array subscript may cause out-of-range access. * W0707::This constant array subscript must cause out-of-range access. * W0708::A value of control variable `%s' in 'for' statement is changed in the body of repetition. * W0711::Right operand of relational operator is a substantive 'boolean' expression. * W0712::Left operand of relational operator is a substantive 'boolean' expression. * W0713::Both sides of relational operator is substantive 'boolean' expressions. * W0714::Both sides of `&' operator is substantive 'boolean' expressions. * W0715::Both sides of `|' operator is substantive 'boolean' expressions. * W0716::A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression. * W0717::A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression. * W0718::A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression. * W0719::A value of the right operand in a shift expression is bigger than the bit size of the left operand underlying type `%s'. * W0720::The value with floating-point type doesn't fit in the range of converted type. * W0721::This volatile integer type doesn't have enough size to keep pointer value. * W0722::A value of signed statement is overflow. * W0723::A value of signed statement might be overflow. * W0724::An unrecognized preprocessing directive is ignored by conditional include directive. * W0726::A function `%s()' which return value is declared as qualified void type, `return expression;' is found. * W0727::The value not part of the enumeration type is used. * W0728::Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument. * W0729::An enumeration literal of the other enumeration type is substituted for enumeration type object. * W0730::A function declared return value to enumeration type returned an enumeration literal of the other enumeration type. * W0731::The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement. * W0732::Both operand of `&&'operator is bit operator or arithmetic operator. * W0733::Both operand of `||'operator is bit operator or arithmetic operator. * W0734::A left operand of logical operator is bit operator or arithmetic operator. * W0735::A right operand of logical operator is the expression of bit operator or arithmetic operator. * W0736::A static variable `%s' which declared in file scope is read and write in one function only. * W0737::The content of `enum %s' is unknown. The enumeration tag is declared without define the content. * W0738::An implicit type conversion from positive integer constant expression to smaller unsigned type. The value is rounded. * W0739::The result of unsigned subtraction in constant expression is minus. * W0740::The result of unsigned addition in constant expression beyond the maximum. * W0741::The result of unsigned multiplication in constant expression beyond the maximum. * W0742::A negative integer constant expression converted to unsigned type. * W0743::The value of integer constant expression beyond the range of might be expressed with converted signed type. * W0744::The value of this control expression is constant value to be false. This control statement is not run. * W0745::This non-constant array subscript may cause out-of-range access. * W0747::An implicit type conversion from signed short to signed char. * W0748::An implicit type conversion from unsigned short to unsigned char. * W0749::An implicit type conversion from signed int to signed char. * W0750::An implicit type conversion from signed int to signed short. * W0751::An implicit type conversion from unsigned int to unsigned char. * W0752::An implicit type conversion from unsigned int to unsigned short. * W0753::An implicit type conversion from signed long to signed char. * W0754::An implicit type conversion from signed long to signed short. * W0755::An implicit type conversion from signed long to signed int. * W0756::An implicit type conversion from unsigned long to unsigned char. * W0757::An implicit type conversion from unsigned long to unsigned short. * W0758::An implicit type conversion from unsigned long to unsigned int. * W0759::An implicit type conversion from signed long long to signed char. * W0760::An implicit type conversion from signed long long to signed short. * W0761::An implicit type conversion from signed long long to singed int. * W0762::An implicit type conversion from signed long long to signed long. * W0763::An implicit type conversion from unsigned long long to unsigned char. * W0764::An implicit type conversion from unsigned long long to unsigned short. * W0765::An implicit type conversion from unsigned long long to unsigned int. * W0766::An implicit type conversion from unsigned long long to unsigned long. * W0767::An implicit type conversion from double to float. * W0768::An implicit type conversion from long double to float. * W0769::An implicit type conversion from long double to double. * W0770::A declaration of identifier `%s' which has external coupling exists more than one. * W0771::A global identifier `%s' is declared in more than one file. * W0774::A value of double type is returned from `float %s()'function. * W0775::A value of long double type is returned from `float %s()' function. * W0776::A value of long double type is returned from `double %s()'function. * W0777::An implicit type conversion from compound expression of float to double. * W0778::An implicit type conversion from compound expression of float to long double. * W0779::An implicit type conversion from compound expression of to long double. * W0780::Unsigned left shift operator `<<' in constant expression truncate non-zero high-order bit. * W0781::This 'switch' statement have only one path. It's verbose. * W0783::Cast is being made including the pointer point to incomplete type. This program is not portable. * W0784::The nonstandard escape sequence is used. * W0785::This declaration of `%s' is different from a former declaration. * W0786::A bit field which having the type of except 'int', 'signed int' or 'unsigned int' doesn't support in ISO C standards. * W0787::A type of `%s' is different from the past declaration in the different scope. * W0788::A type of `%s' is different from the past declaration in the same scope. * W0789::A type of `%s' is different from the past declaration in the wider scope. * W0790::An global object or a function `%s' is declared in more than one file. * W0791::An global object or a function `%s' is declared in more than one file. * W0792::A floating point type object cast to function pointer and vice versa. * W0793::A function pointer cast to pointer to point an object and vice versa. * W0794::Left shift operation of signed value causes implementation-defined behavior. * W0795::The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration. * W0796::The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration. * W0797::The number of an actual argument in function call is different from the number of a formal argument in the function declaration. * W0798::Must not use the value with incomplete union object. * W0799::Must not use the value with incomplete structure object. * W0800::`%s' is incomplete type which doesn't have a linkage.This is undefined. * W0801::This structure or union doesn't have a named member. * W0802::A form of after `#include' preprocessing directive is not nor "file name". * W0803::A preprocessing directive is described in actual argument of function-like macro. * W0804::The 'defined' syntax is not `defined (identifier)' nor `defined identifier'. * W0805::An identifier to be actual argument doesn't find in `defined'. * W0806::It is trying to define a macro named `defined'. * W0807::It is trying to delete pre-defined macro `%s'. * W0808::It is trying to redefine pre-defined macro `%s'. * W0809::An identifier `%s' is reserved by the library. * W0810::`@{@}' is required to clarify this structure of `if-if-else' statement. * W0811::The `defined' token which the expanded result of this macro doesn't allowed. * W0827::An initial value of nested structure's element doesn't enclosed in curly brace `@{ @}'. * W0828::An initial value of nested array's element doesn't enclosed in curly brace `@{ @}'. * W0830::There is comma `,' at the end of the enumerator list. * W0831::This is language extension for inline assembly. It will be ignored between #asm and #endasm. * W0832::An inline assembly syntax is using. This is the language extension. This code will be ignored. * W0833::A suffix 'LL' is using. * W0834::A long long type is using. * W0835::A macro which receives variable argument is defined. * W0947::String literal is specified directly. * W0948::Character constant %s is specified directly. * W0949::A value `%s' is used directly for size definition of bit field. * W0950::Integer constant `%s' is specified directly as an array size. * W1026::%sth actual argument is not object type. * W1027::A base type of array is function type. This is meaningless. * W1028::A base type of array is an array with unknown size. Incomplete type of array will not build. * W1029::A base type of array is an obscure structure or union. Incomplete type of array will not build. * W1030::A label `%s' is used more than two times in this function. * W1031::An Object `%s' is declared both external coupling and internal coupling. This action is undefined. * W1032::A tentative definition of variable '%s' which has internal linkage must not incomplete type. * W1033::A 'volatile' or 'const' qualifier is used for the type of function return value. This action is undefined. * W1034::It is declared at function `%s()' with static storage class specifier in block scope. This usage is meaningless. * W1035::`%s' declared typedef. It cannot be redeclared inside an inner scope without using explicit type. * W1036::`%s' declared typedef. It cannot be redeclared as a member of structure or union without using explicit type. * W1037::`%s' which has external coupling is declared more than one, this is incompatible. * W1039::`ll' is used in %sth conversion specifier. * W1040::An unrecognizable string is described after preprocessing directive. * W1041::`%s' is not official preprocessing directive of ISO C standards. * W1042::'sizeof' operator is using in preprocessing directive. This is the language extension. * W1043::`@@ address' is not supported ISO C standards. It will be considered as language extension. * W1045::This `@@ word' syntax will be ignored. * W1046::A space character is ignored between `\' and line feed. * W1047::The struct, union or array's initializer is not literal. * W1048::The multi byte string literal is an implementation defined value. * W1049::The result of conversion to signed integer type in integer expression might not be expressed by a signed type. * W1050::The result of conversion to signed integer type in integer expression is not express by a signed type. * W1051::The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow. * W1052::The result of unsigned arithmetic expression typed `%s' can be going around by overflow. * W1053::A numeric constants is passed to an actual argument which formal argument is enumeration type. * W1054::A non enumeration type expression is substituted for the enumeration type. * W1055::A non enumeration type expression is returned from the function which return value is enumeration type. * W1056::An object of actual argument is different enumeration type which formal argument is enumeration type. * W1057::An enumeration value is substituted for different enumeration type object. * W1058::A different enumeration type of value is returned from a function which return value is enumeration type. * W1059::An enumeration value is passed to actual argument which formal argument is not enumeration type. * W1060::An enumeration value is returned from a function which return value is not enumeration type . * W1061::Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. * W1062::Non constant expression is substituted for the enumeration type object. * W1063::The return value returned from enumeration type function to non constant expression. * W1064::A integer constant is used in switch statement where case label is enumeration type. * W1065::A value of different enumeration type is used in switch statement where case label is an enumeration type. * W1066::A value of the `float' typed compound expression is explicitly converted into a `double' value. * W1067::A value of the `float' typed compound expression is explicitly converted into a `long double' value. * W1068::A value of the `double' typed compound expression is explicitly converted into a `long double' value. * W1069::No trailing `else' clause is found in this `if-else-if' statements chain. * W1070::This `switch' statement can be translated into `if-else' statement because there are only 2 execution paths. * W1071::Function `%s' has multiple termination points. * W1072::`A `goto' statement is found. * W1073::Return value of the function `%s' is discarded. * W1074::Side-effects in `sizeof' operand will not be recorded because the operand will not be executed actually. * W1075::This declaration has no `static' storage-class-specifier while the declaring object has internal-linkage. * W1076::`%s' has internal-linkage without any prototype declarations. * W1077::Declaring array object without a size. * W9001::Control never reaches to this statement. * W9002::There is no line feed character at the end of file. * W9003::An object typed `%s' is implicitly converted into an object of type `%s'. * C0001::A warning is detected as a pair of this identifier `%s'. * C1000::Warning above is detected in the following context. * C1001::This controlling-expression is evaluated to be true. * C1002::This controlling-expression is evaluated to be false. * C1003::The problematic variable is defined here without initializer. * C1004::NULL value is assigned to the the problematic variable. * C1005::A value possibly be NULL is assigned to the problematic variable. * C1006::New value is assigned to the problematic variable. @end menu @node X0001 @section X0001 @cindex X0001 @subsection Message body An unknown exception `%s' is found. @subsection Content If you find this message, please send appropriate source file, @ref{Traits, traits file}, @ref{Message File, message file} and log file to AdLint development team. It will lead to improve quality of AdLint. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node X0002 @section X0002 @cindex X0002 @subsection Message body An illegal message ID `%s' is found. @subsection Content There's a possibility that the message catalog which AdLint using in internal is broken. Please reinstall AdLint. If you still cannot solve this issue, please report it to AdLint development team. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node X0003 @section X0003 @cindex X0003 @subsection Message body Analysis processing has been stopped due to unrecoverable error. For the details, refer to `%s' and `%s'. @subsection Content AdLint cannot process the analysis. This error occurred because it cannot find header file or it cannot parse the source file. This error can be solve by reviewing the @ref{Traits, traits file}. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node X0004 @section X0004 @cindex X0004 @subsection Message body An illegal message format `%s' is found. @subsection Content There's a possibility that the message catalog which AdLint using in internal is broken. Please reinstall AdLint. If you still cannot solve this issue, please report it to AdLint development team. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node E0004 @section E0004 @cindex E0004 @subsection Message body Corresponding #endif doesn't found. @subsection Content This error occurred when it cannot find @code{#endif} directive correspond to @code{#if}, @code{#ifdef}, @code{#ifndef} directive. @subsection Sample code @verbatim #if DEBUG int i = 0; #else int i = 1; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node E0007 @section E0007 @cindex E0007 @subsection Message body Syntax error is found in conditional expression token `%s'. Conditional expression evaluate as false. @subsection Content This message will be output when it find syntax error while evaluating the conditional expression of @code{#if}, @code{#elif} directive. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node E0008 @section E0008 @cindex E0008 @subsection Message body Syntax error is found in token `%s'. @subsection Content This message will be output when it cannot parse preprocessed source file. If you use compiler specific extension to build, it can be solve by deleting specific token row in @ref{Traits, traits file}. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node E0009 @section E0009 @cindex E0009 @subsection Message body A header file of <%s> doesn't found. @subsection Content It includes header file in @code{#include <...>} directive, but it doesn't exist at the include path specified at @ref{Traits, traits file}. This error can be solve by reviewing the setting of include path in @ref{Traits, traits file}. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node E0010 @section E0010 @cindex E0010 @subsection Message body A header file of \%s\ doesn't found. @subsection Content It includes header file in @code{#include "..."} directive, but it doesn't exist at the include path specified at @ref{Traits, traits file}. This error can be solve by reviewing the setting of include path in @ref{Traits, traits file}. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node E0013 @section E0013 @cindex E0013 @subsection Message body Statement cannot include in syntax. @subsection Content This message will be output when GCC extension (Statement Exprs) is using. @subsection Sample code @verbatim #define maxint(a, b) ({int _a = (a), _b = (b); _a > _b ? _a : _b; }) int i = maxint(1, 2); /* E0013 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node E0014 @section E0014 @cindex E0014 @subsection Message body '&&' monadic operator to get a label address is GCC original add-on. @subsection Content This message will be output when GCC extension (Labels as Values) is using. @subsection Sample code @verbatim void *label_ptr = &&foo; /* E0014 */ goto *label_ptr; /* E0015 */ foo:; @end verbatim @subsection Related message @itemize @item @ref{E0015} 'goto' statement with specified label address is GCC original add-on. @end itemize @subsection Since 1.0.0 @node E0015 @section E0015 @cindex E0015 @subsection Message body 'goto' statement with specified label address is GCC original add-on. @subsection Content This message will be output when GCC extension (Labels as Values) is using. @subsection Sample code @verbatim void *label_ptr = &&foo; /* E0014 */ goto *label_ptr; /* E0015 */ foo:; @end verbatim @subsection Related message @itemize @item @ref{E0014} '&&' monadic operator to get a label address is GCC original add-on. @end itemize @subsection Since 1.0.0 @node E0016 @section E0016 @cindex E0016 @subsection Message body Unfinished comment block is found. @subsection Content This message will be output when the block comment begging with @code{/*} is not finished by @code{*/}. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node W0001 @section W0001 @cindex W0001 @subsection Message body Nesting depth of round bracket `()' exceed 32. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim int a = 10; int b = 20; int c = (((((((((((((((((((((((((((((((((a + b))))))))))))))))))))))))))))))))); /* W0001 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0002 @section W0002 @cindex W0002 @subsection Message body Identifier and declaration of formal argument described separately in the definition of function `%s()' is old style. @subsection Content Under construction. @subsection Sample code @verbatim /* function definition in K&R style */ int func(arg) /* W0002 */ char arg; { return 0; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0003 @section W0003 @cindex W0003 @subsection Message body This switch statement doesn't have default label. @subsection Content Under construction. @subsection Sample code @verbatim int value; int number; switch(number) { case 1: value = 1; break; case 2: value = 2; break; case 3: value = 3; break; /* W0003 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0007 @section W0007 @cindex W0007 @subsection Message body 'break' or 'return' statement doesn't found in the last 'case' or 'default' section. @subsection Content Under construction. @subsection Sample code @verbatim int value; int number; switch (number) { case 1: value = 1; break; case 2: value = 2; case 3: /* W0007 */ value = 3; break; default: value = 0; break; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0010 @section W0010 @cindex W0010 @subsection Message body There is a side-effect in this ternary operator (conditional operator). @subsection Content Under construction. @subsection Sample code @verbatim x = (a > 0) ? b++ : b--; /* W0010 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0013 @section W0013 @cindex W0013 @subsection Message body 'continue' statement is used in repetition statement. @subsection Content Under construction. @subsection Sample code @verbatim static void foo(void) { int i; int j; i++; for (i = 1, j = 0; i < 20; i++) { j += 2; if ((j % i) == 3) { continue; /* W0013 */ } } } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0016 @section W0016 @cindex W0016 @subsection Message body The field width of conversion specifier exceeds 509 characters in 'printf' function. @subsection Content Under construction. @subsection Sample code @verbatim printf("%510d\n", a); /* W0016 */ @end verbatim @subsection Related message @itemize @item @ref{W0017} The field width of conversion specifier exceeds 509 characters in 'scanf' function. @end itemize @subsection Since 1.0.0 @node W0017 @section W0017 @cindex W0017 @subsection Message body The field width of conversion specifier exceeds 509 characters in 'scanf' function. @subsection Content Under construction. @subsection Sample code @verbatim scanf("%510d", &a); /* W0017 */ @end verbatim @subsection Related message @itemize @item @ref{W0016} The field width of conversion specifier exceeds 509 characters in 'printf' function. @end itemize @subsection Since 1.0.0 @node W0018 @section W0018 @cindex W0018 @subsection Message body This accuracy width of conversion specifier exceeds 509 characters. @subsection Content Under construction. @subsection Sample code @verbatim printf("%.510f\n", a); /* W0018 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0019 @section W0019 @cindex W0019 @subsection Message body This pointer cast is danger because it delete const qualifier. @subsection Content Under construction. @subsection Sample code @verbatim int *pa; const int *pb; pa = (int *) pb; /* W0019 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0021 @section W0021 @cindex W0021 @subsection Message body This pointer cast is danger because it delete volatile qualifier. @subsection Content Under construction. @subsection Sample code @verbatim int *pa; volatile int *pb; pa = (int *) pb; /* W0021 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0023 @section W0023 @cindex W0023 @subsection Message body Arithmetic operation is being made by pointer variable. @subsection Content Under construction. @subsection Sample code @verbatim int *p; int *q; long r = p + r; /* W0023 */ @end verbatim @subsection Related message @itemize @item @ref{W0024} Increment or decrement is being made by pointer variable. @end itemize @subsection Since 1.0.0 @node W0024 @section W0024 @cindex W0024 @subsection Message body Increment or decrement is being made by pointer variable. @subsection Content Under construction. @subsection Sample code @verbatim int *p; p++; /* W0024 */ @end verbatim @subsection Related message @itemize @item @ref{W0023} Arithmetic operation is being made by pointer variable. @end itemize @subsection Since 1.0.0 @node W0025 @section W0025 @cindex W0025 @subsection Message body `%s' is already included by this file directly. @subsection Content Under construction. @subsection Sample code @verbatim #include "test.h" #include "test2.h" #include "test.h" /* W0025 */ @end verbatim @subsection Related message @itemize @item @ref{W0026} `%s' is already included by this file indirectly. @end itemize @subsection Since 1.0.0 @node W0026 @section W0026 @cindex W0026 @subsection Message body `%s' is already included by this file indirectly. @subsection Content Under construction. @subsection Sample code @file{test.h} @verbatim #include "test2.h" @end verbatim @file{test.c} @verbatim #include "test.h" #include "test2.h" /* W0026 */ @end verbatim @subsection Related message @itemize @item @ref{W0025} `%s' is already included by this file directly. @end itemize @subsection Since 1.0.0 @node W0027 @section W0027 @cindex W0027 @subsection Message body Comparison operation is being made by pointer variable. @subsection Content Under construction. @subsection Sample code @verbatim int *p; int *q; if (p < q) { /* W0027 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0028 @section W0028 @cindex W0028 @subsection Message body Dereferencing a pointer constant of NULL. @subsection Content Under construction. @subsection Sample code @verbatim int i = *(int *) NULL; /* W0028 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0030 @section W0030 @cindex W0030 @subsection Message body Arithmetic operation is being made by NULL pointer. @subsection Content Under construction. @subsection Sample code @verbatim int *p; p = (int *) NULL + 1; /* W0030 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0031 @section W0031 @cindex W0031 @subsection Message body A formal argument `%s' is not used in this function. @subsection Content Under construction. @subsection Sample code @verbatim int func(int num) /* W0031 */ { return 0; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0033 @section W0033 @cindex W0033 @subsection Message body A label of `%s:' is not used in this function. It might be removed. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int num = 0; for (int i =0; i < 10; i++) { num++; } ERROR: /* W0033 */ num = 0; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0035 @section W0035 @cindex W0035 @subsection Message body Right operand of ``&&' or `||' must arithmetic type or pointer type. @subsection Content Under construction. @subsection Sample code @verbatim struct STR { int x; int y; }; extern struct STR str; void func(void) { int x; int y; x = y && str; /* W0035 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0036 @section W0036 @cindex W0036 @subsection Message body The number of qualification operator exceeds 12.This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim int num[1][2][3][4][5][6][7][8][9][10][11][12][13]; /* W0036 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0037 @section W0037 @cindex W0037 @subsection Message body Nest of structure or union exceeds 15. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim struct st1 { struct st2 { struct st3 { struct st4 { struct st5 { struct st6 { struct st7 { struct st8 { struct st9 { struct st10 { struct st11 { struct st12 { struct st13 { struct st14 { struct st15 { struct st16 { /* W0037 */ int i; } st16; } st15; } st14; } st13; } st12; } st11; } st10; } st9; } st8; } st7; } st6; } st5; } st5; } st3; } st2; }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0038 @section W0038 @cindex W0038 @subsection Message body The size of object `%s' exceeds 32767 bytes. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim int num[100][330]; /* W0038 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0039 @section W0039 @subsection Message body The number of local identifier in the block exceeds 127. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int num1, num2, num3, num4, num5, num6, num7, num8, num9, num10; int num11, num12, num13, num14, num15, num16, num17, num18, num19, num20; ...snip... int num111, num112, num113, num114, num115, num116, num117, num118, num119, num120; int num121, num122, num123, num124, num125, num126, num127, num128; /* W0039 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0040 @section W0040 @cindex W0040 @subsection Message body A bit field is declared without 'signed' or 'unsigned'. @subsection Content Under construction. @subsection Sample code @verbatim struct STR { /* W0040 */ int a:5; }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0041 @section W0041 @cindex W0041 @subsection Message body The number of member of structure or union exceeds 127.This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim struct STR { int num1; int num2; int num3; int num4; int num5; ...snip... int num125; int num126; int num127; int num128; /* W0041 */ }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0042 @section W0042 @cindex W0042 @subsection Message body The number of enumeration literal exceeds 127. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim enum ENM { e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...snip... e111, e112, e113, e114, e115, e116, e117, e118, e119, e120, e121, e122, e123, e124, e125, e126, e127, e128 /* W0042 */ }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0043 @section W0043 @cindex W0043 @subsection Message body The initial value of the array is short of declared array's size. The residual array will be initialized by zero. @subsection Content Under construction. @subsection Sample code @verbatim int array[5] = { 1, 2, 3 }; /* W0043 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0049 @section W0049 @cindex W0049 @subsection Message body Nest of control structure exceeds 15. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if(x > 0) { if (x > 0) { if(x > 0) { /* W0049 */ ; } } } } } } } } } } } } } } } } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0050 @section W0050 @cindex W0050 @subsection Message body The number of 'case' label exceeds 257. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim switch (num) { case 1: break; case 2: break; case 3: break; ...snip... case 257: break; case 258: /* W0050 */ break; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0051 @section W0051 @cindex W0051 @subsection Message body An external identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in linker property. @subsection Content Under construction. @subsection Sample code @verbatim extern int very_long_long_long_ ...snip... _long_external_symbol; /* W0051 */ @end verbatim @subsection Related message @itemize @item @ref{C0001} A warning is detected as a pair of this identifier `%s'. @end itemize @subsection Since 1.0.0 @node W0052 @section W0052 @cindex W0052 @subsection Message body An identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in compile property. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int very_long_long_long_long_long_ ...snip... _long_symbol; /* W0052 */ } @end verbatim @subsection Related message @itemize @item @ref{C0001} A warning is detected as a pair of this identifier `%s'. @end itemize @subsection Since 1.0.0 @node W0053 @section W0053 @cindex W0053 @subsection Message body Nest of `#include \%s\' exceeds 8.This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @file{test.c} @verbatim #include "test1.h" @end verbatim @file{test1.h} @verbatim #include "test2.h" @end verbatim @file{test2.h} @verbatim #include "test3.h" @end verbatim @file{test3.h} @verbatim #include "test4.h" @end verbatim @file{test4.h} @verbatim #include "test5.h" @end verbatim @file{test5.h} @verbatim #include "test6.h" @end verbatim @file{test6.h} @verbatim #include "test7.h" @end verbatim @file{test7.h} @verbatim #include "test8.h" @end verbatim @file{test8.h} @verbatim #include "test9.h" @end verbatim @file{test9.h} @verbatim #include "test10.h" /* W0053 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0054 @section W0054 @cindex W0054 @subsection Message body The maximum number of `#if...' nest exceeds 8. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim #if N > 1 #if N > 2 #if N > 3 #if N > 4 #if N > 5 #if N > 6 #if N > 7 #if N > 8 /* W0054 */ #endif #endif #endif #endif #endif #endif #endif #endif @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0055 @section W0055 @cindex W0055 @subsection Message body The number of macro definition exceeds 1024. This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO_1 #define MACRO_2 #define MACRO_3 ...snip... #define MACRO_1023 #define MACRO_1024 #define MACRO_1025 /* W0055 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0056 @section W0056 @cindex W0056 @subsection Message body The number of formal argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO(a1, a2, a3, ...snip... a30, a31, a32) /* W0056 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0057 @section W0057 @cindex W0057 @subsection Message body The number of actual argument of function-like macro exceeds 31.This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim int i = MACRO(1, 2, 3 ...snip... 30, 31, 32); /* W0057 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0058 @section W0058 @cindex W0058 @subsection Message body The number of characters of string literal exceeds 509.This program doesn't meet the strict ISO C90 standards of the term. @subsection Content Under construction. @subsection Sample code @verbatim char buf[] = "very long long long ...snip... long string literal"; /* W0058 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0059 @section W0059 @cindex W0059 @subsection Message body Ctrl-M(^M) control character is found at the end of line. @subsection Content Under construction. @subsection Sample code None. @subsection Related message @itemize @item @ref{W0060} Ctrl-Z(^Z) control character is found in this file. @end itemize @subsection Since 1.0.0 @node W0060 @section W0060 @cindex W0060 @subsection Message body Ctrl-Z(^Z) control character is found in this file. @subsection Content Under construction. @subsection Sample code None. @subsection Related message @itemize @item @ref{W0059} Ctrl-M(^M) control character is found at the end of line. @end itemize @subsection Since 1.0.0 @node W0061 @section W0061 @cindex W0061 @subsection Message body `%s' is not actual reserved keyword. It will be considered as language extension and ignored. @subsection Content Under construction. @subsection Sample code @verbatim extern int func(void) __attribute__ ((__const__)); /* W0061 */ @end verbatim @subsection Related message @itemize @item @ref{W0062} `__typeof__' is not supported ISO C standards. It will be considered as language extension. @item @ref{W0063} `__alignof__'is not supported ISO C standards. It will be considered as language extension.. @end itemize @subsection Since 1.0.0 @node W0062 @section W0062 @cindex W0062 @subsection Message body `__typeof__' is not supported ISO C standards. It will be considered as language extension. @subsection Content Under construction. @subsection Sample code @verbatim #define DEF_FUNPTR(func) __typeof__(func) *ptr_##func = 0 DEF_FUNPTR(main); /* W0062 */ @end verbatim @subsection Related message @itemize @item @ref{W0061} `%s' is not actual reserved keyword. It will be considered as language extension and ignored. @item @ref{W0063} `__alignof__'is not supported ISO C standards. It will be considered as language extension.. @end itemize @subsection Since 1.0.0 @node W0063 @section W0063 @cindex W0063 @subsection Message body `__alignof__'is not supported ISO C standards. It will be considered as language extension.. @subsection Content Under construction. @subsection Sample code @verbatim int a = __alignof__(struct sockaddr *) /* W0063 */ @end verbatim @subsection Related message @itemize @item @ref{W0061} `%s' is not actual reserved keyword. It will be considered as language extension and ignored. @item @ref{W0062} `__typeof__' is not supported ISO C standards. It will be considered as language extension. @end itemize @subsection Since 1.0.0 @node W0064 @section W0064 @cindex W0064 @subsection Message body A binary integer literal is used. This is the language extension. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char c = 0b00000001; /* W0064 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0065 @section W0065 @cindex W0065 @subsection Message body Must not cast left operand of assignment operator. @subsection Content Under construction. @subsection Sample code @verbatim void func(int num) { (unsigned short) num = 100U; /* W0065 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0066 @section W0066 @cindex W0066 @subsection Message body `main()' function must `int (void)' or `int (int, char *[])'. @subsection Content Under construction. @subsection Sample code @verbatim void main(void) {} /* W0066 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0067 @section W0067 @cindex W0067 @subsection Message body Directly access to the member of nested structure. This is the language extension. @subsection Content Under construction. @subsection Sample code @verbatim struct BBB { int mb; struct AAA { int ma; }; } bbb; bbb.ma = 1; /* W0067 */ @end verbatim @subsection Related message @itemize @item @ref{W0068} `.' is used to get access to bit. This is the language extension. @end itemize @subsection Since 1.0.0 @node W0068 @section W0068 @cindex W0068 @subsection Message body `.' is used to get access to bit. This is the language extension. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short a; a.2 = 0; /* W0068 */ @end verbatim @subsection Related message @itemize @item @ref{W0067} Directly access to the member of nested structure. This is the language extension. @end itemize @subsection Since 1.0.0 @node W0069 @section W0069 @cindex W0069 @subsection Message body `/*' is found in the beginning with `/*' comments. Nested comment doesn't allowed in ISO C standards. @subsection Content Under construction. @subsection Sample code @verbatim /* /* W0069 */ */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0070 @section W0070 @cindex W0070 @subsection Message body Included <%s> is not referenced in the translation unit. It can be removed. @subsection Content Under construction. @subsection Sample code None. @subsection Related message @itemize @item @ref{W0071} Included "%s" is not referenced in the translation unit. It can be removed. @end itemize @subsection Since 1.0.0 @node W0071 @section W0071 @cindex W0071 @subsection Message body Included \%s\ is not referenced in the translation unit. It can be removed. @subsection Content Under construction. @subsection Sample code None. @subsection Related message @itemize @item @ref{W0070} Included <%s> is not referenced in the translation unit. It can be removed. @end itemize @subsection Since 1.0.0 @node W0072 @section W0072 @cindex W0072 @subsection Message body A character except for basic source character is used in header file name. @subsection Content Under construction. @subsection Sample code @verbatim #include /* W0072 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0073 @section W0073 @cindex W0073 @subsection Message body No include guard in this include file. @subsection Content Under construction. @subsection Sample code None. @subsection Related message None. @subsection Since 1.0.0 @node W0076 @section W0076 @cindex W0076 @subsection Message body Hexadecimal constant without `U' or `u' suffix. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int num = 0x1234; /* W0076 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0077 @section W0077 @cindex W0077 @subsection Message body Lower case `l' is added to integer or floating-point number. @subsection Content Under construction. @subsection Sample code @verbatim long a = 0x1000l; /* W0077 */ long b = 0x1000L; /* OK */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0078 @section W0078 @cindex W0078 @subsection Message body A function is declared without list of formal argument. @subsection Content Under construction. @subsection Sample code @verbatim int sample() /* W0078 */ { return 0; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0079 @section W0079 @cindex W0079 @subsection Message body This array cannot keep final character `\0' which initial value of string literal. @subsection Content Under construction. @subsection Sample code @verbatim char text[3] = "ABC"; /* W0079 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0080 @section W0080 @cindex W0080 @subsection Message body A global object which const qualified is defined without explicitly initialized. @subsection Content Under construction. @subsection Sample code @verbatim const int num; /* W0080 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0081 @section W0081 @cindex W0081 @subsection Message body A monadic operator `-' becomes unsigned type if it use 'unsigned int' type, 'unsigned long' type or 'unsigned long' type operand. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long num = 0; long val = -num; /* W0081 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0082 @section W0082 @cindex W0082 @subsection Message body Unary operator `-' is applied to an operand whose underlying type `%s' is unsigned. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short num = 20; int val = -num; /* W0082 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0084 @section W0084 @cindex W0084 @subsection Message body Left operand of this comma operator `,' doesn't described the statement which has side-effects. @subsection Content Under construction. @subsection Sample code @verbatim int a = 0; int b = 1; a, b++; /* W0084 */ @end verbatim @subsection Related message @itemize @item @ref{W0085} This statement doesn't have side-effects. It is highly possible that it having error. @item @ref{W0086} Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator). @item @ref{W0087} The right side statement of comma operator is verbose statement which doesn't have side-effects. @item @ref{W0088} The right side statement of logical operator is verbose statement which doesn't have side-effects. @end itemize @subsection Since 1.0.0 @node W0085 @section W0085 @cindex W0085 @subsection Message body This statement doesn't have side-effects. It is highly possible that it having error. @subsection Content Under construction. @subsection Sample code @verbatim a; /* W0085 */ @end verbatim @subsection Related message @itemize @item @ref{W0084} Left operand of this comma operator `,' doesn't described the statement which has side-effects. @item @ref{W0086} Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator). @item @ref{W0087} The right side statement of comma operator is verbose statement which doesn't have side-effects. @item @ref{W0088} The right side statement of logical operator is verbose statement which doesn't have side-effects. @end itemize @subsection Since 1.0.0 @node W0086 @section W0086 @cindex W0086 @subsection Message body Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator). @subsection Content Under construction. @subsection Sample code @verbatim int a; int b; (a < 0) ? b : b++; /* W0086 */ @end verbatim @subsection Related message @itemize @item @ref{W0084} Left operand of this comma operator `,' doesn't described the statement which has side-effects. @item @ref{W0085} This statement doesn't have side-effects. It is highly possible that it having error. @item @ref{W0087} The right side statement of comma operator is verbose statement which doesn't have side-effects. @item @ref{W0088} The right side statement of logical operator is verbose statement which doesn't have side-effects. @end itemize @subsection Since 1.0.0 @node W0087 @section W0087 @cindex W0087 @subsection Message body The right side statement of comma operator is verbose statement which doesn't have side-effects. @subsection Content Under construction. @subsection Sample code @verbatim int a = 0; int b = 1; a++, b; /* W0087 */ @end verbatim @subsection Related message @itemize @item @ref{W0084} Left operand of this comma operator `,' doesn't described the statement which has side-effects. @item @ref{W0085} This statement doesn't have side-effects. It is highly possible that it having error. @item @ref{W0086} Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator). @item @ref{W0088} The right side statement of logical operator is verbose statement which doesn't have side-effects. @end itemize @subsection Since 1.0.0 @node W0088 @section W0088 @cindex W0088 @subsection Message body The right side statement of logical operator is verbose statement which doesn't have side-effects. @subsection Content Under construction. @subsection Sample code @verbatim (a < 0) && func(a) && func(b) && c; /* W0088 */ @end verbatim @subsection Related message @itemize @item @ref{W0084} Left operand of this comma operator `,' doesn't described the statement which has side-effects. @item @ref{W0085} This statement doesn't have side-effects. It is highly possible that it having error. @item @ref{W0086} Second or third operand is verbose statement which doesn't have side-effects in ternary operator (conditional operator). @item @ref{W0087} The right side statement of comma operator is verbose statement which doesn't have side-effects. @end itemize @subsection Since 1.0.0 @node W0093 @section W0093 @cindex W0093 @subsection Message body This expression may cause division-by-zero. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b) { if (b > 0) { return a / b; /* OK */ } return a / b; /* W0093 */ } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0096 @section W0096 @cindex W0096 @subsection Message body It divided by a constant expression which definitely zero. @subsection Content Under construction. @subsection Sample code @verbatim #define A (0) int b = 10 / A; /* W0096 */ @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0097 @section W0097 @cindex W0097 @subsection Message body This expression may cause division-by-zero. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b) { if (a < 0) { ...snip... } else { ...snip... if (a < 1) { return b / a; /* W0097 */ } } } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0100 @section W0100 @cindex W0100 @subsection Message body The variable `%s' has not been reassigned since the initial value is assigned. It may be able to be defined as `const' with an initial value. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a) { int b = a; /* W0100 */ return b; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0101 @section W0101 @cindex W0101 @subsection Message body An address of auto variable is substituted for a pointer which has a longer life. This program is danger. @subsection Content Under construction. @subsection Sample code @verbatim extern long *ptr; void func() { long value = 0; ptr = &value; /* W0101 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0102 @section W0102 @cindex W0102 @subsection Message body An address of auto variable is returned via formal argument to functions. This program is danger. @subsection Content Under construction. @subsection Sample code @verbatim void func(int **ptr) { int num; *ptr = # /* W0102 */ } @end verbatim @subsection Related message @itemize @item @ref{W0103} An address of auto variable is returned as return value from a function. This program is danger. @end itemize @subsection Since 1.0.0 @node W0103 @section W0103 @cindex W0103 @subsection Message body An address of auto variable is returned as return value from a function. This program is danger. @subsection Content Under construction. @subsection Sample code @verbatim char *foo1(void) { char a[3]; return a; /* W0103 */ } @end verbatim @subsection Related message @itemize @item @ref{W0102} An address of auto variable is returned via formal argument to functions. This program is danger. @end itemize @subsection Since 1.0.0 @node W0104 @section W0104 @cindex W0104 @subsection Message body The value of formal argument `%s' is not change. It can be declarable with 'const'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int val) /* W0104 */ { const int num = val + 1; } @end verbatim @subsection Related message @itemize @item @ref{W0105} The object which points the formal argument `%s' is not change. It can be declaring as pointer type which points const object. @end itemize @subsection Since 1.0.0 @node W0105 @section W0105 @cindex W0105 @subsection Message body The object which points the formal argument `%s' is not change. It can be declaring as pointer type which points const object. @subsection Content Under construction. @subsection Sample code @verbatim void func(int *val) /* W0105 */ { const int num = *val; } @end verbatim @subsection Related message @itemize @item @ref{W0104} The value of formal argument `%s' is not change. It can be declarable with 'const'. @end itemize @subsection Since 1.0.0 @node W0107 @section W0107 @cindex W0107 @subsection Message body An address of auto variable is substituted for local pointer with 'static' option. This program is danger. @subsection Content Under construction. @subsection Sample code @verbatim void foo() { static int *p; int b = 100; p = &b; /* W0107 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0108 @section W0108 @cindex W0108 @subsection Message body An assignment-expression appears in the logical expression. @subsection Content Under construction. @subsection Sample code @verbatim int a; int b; if (a = b) { /* W0108 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0109 @section W0109 @subsection Message body The definition of this function doesn't found. It consider it was omitted, and insert `extern int %s()'. @subsection Content Under construction. @subsection Sample code @verbatim void func() { foo(); /* W0109 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0110 @section W0110 @cindex W0110 @subsection Message body A variable number with floating-point type is used by loop counter in for statement. @subsection Content Under construction. @subsection Sample code @verbatim double d; for (d = 0.0; d != 1.0; d += 0.1) { /* W0110 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0112 @section W0112 @cindex W0112 @subsection Message body The statement of floating-point compares by equivalent operator. @subsection Content Under construction. @subsection Sample code @verbatim double a = 0.1; a = (a + 0.1) * 5.0; if (a == 1.0) { /* W0112 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0114 @section W0114 @cindex W0114 @subsection Message body This control expression is not explicit logical operation. @subsection Content Under construction. @subsection Sample code @verbatim int a; if (a != 0) { /* OK */ } if (a) { /* W0114 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0115 @section W0115 @cindex W0115 @subsection Message body Unsigned left shift operator `<<' drop the high-order bit. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(unsigned int a) { if (a > 0x40000000U) { return a << 2; /* W0115 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0116} Unsigned left shift operator `<<' can be drop high-order bit. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0116 @section W0116 @cindex W0116 @subsection Message body Unsigned left shift operator `<<' can be drop high-order bit. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(unsigned int a) { if (a > 0x40000000U) { return a << 1; /* W0116 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0115} Unsigned left shift operator `<<' drop the high-order bit. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0117 @section W0117 @cindex W0117 @subsection Message body `%s' has external-linkage without any prototype declarations. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) /* W0117 */ { ...snip... } @end verbatim @subsection Related message @itemize @item @ref{W0118} `%s' has external-linkage, but no prototype declaration is in header files. @end itemize @subsection Since 1.0.0 @node W0118 @section W0118 @cindex W0118 @subsection Message body `%s' has external-linkage, but no prototype declaration is in header files. @subsection Content Under construction. @subsection Sample code @file{test.c} @verbatim extern int val; /* W0118 */ @end verbatim @subsection Related message @itemize @item @ref{W0117} `%s' has external-linkage without any prototype declarations. @end itemize @subsection Since 1.0.0 @node W0119 @section W0119 @cindex W0119 @subsection Message body An implicit type conversion from char to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(char a) { signed char b = a; /* W0119 */ foo(a); /* W0119 */ } @end verbatim @subsection Related message @itemize @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0120 @section W0120 @cindex W0120 @subsection Message body An implicit type conversion from char to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(char a) { unsigned char b = a; /* W0120 */ foo(a); /* W0120 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0121 @section W0121 @cindex W0121 @subsection Message body An implicit type conversion from char to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(char a) { short b = a; /* W0121 */ foo(a); /* W0121 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0122 @section W0122 @cindex W0122 @subsection Message body An implicit type conversion from char to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(char a) { unsigned short b = a; /* W0122 */ foo(a); /* W0122 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0123 @section W0123 @cindex W0123 @subsection Message body An implicit type conversion from char to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(char a) { int b = a; /* W0123 */ foo(a); /* W0123 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0124 @section W0124 @cindex W0124 @subsection Message body An implicit type conversion from char to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(char a) { unsigned int b = a; /* W0124 */ foo(a); /* W0124 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0125 @section W0125 @cindex W0125 @subsection Message body An implicit type conversion from char to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(char a) { long b = a; /* W0125 */ foo(a); /* W0125 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0126 @section W0126 @cindex W0126 @subsection Message body An implicit type conversion from char to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(char a) { unsigned long b = a; /* W0126 */ foo(a); /* W0126 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0127 @section W0127 @cindex W0127 @subsection Message body An implicit type conversion from char to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(char a) { float b = a; /* W0127 */ foo(a); /* W0127 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0128 @section W0128 @cindex W0128 @subsection Message body An implicit type conversion from char to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(char a) { double b = a; /* W0128 */ foo(a); /* W0128 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0129 @section W0129 @cindex W0129 @subsection Message body An implicit type conversion from char to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(char a) { long double b = a; /* W0129 */ foo(a); /* W0129 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0130} An implicit type conversion from char to signed long long. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize Under construction. @subsection Since 1.0.0 @node W0130 @section W0130 @cindex W0130 @subsection Message body An implicit type conversion from char to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(char a) { long long b = a; /* W0130 */ foo(a); /* W0130 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0131} An implicit type conversion from char to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0131 @section W0131 @cindex W0131 @subsection Message body An implicit type conversion from char to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(char a) { unsigned long long b = a; /* W0131 */ foo(a); /* W0131 */ } @end verbatim @subsection Related message @itemize @item @ref{W0119} An implicit type conversion from char to signed char. @item @ref{W0120} An implicit type conversion from char to unsigned char. @item @ref{W0121} An implicit type conversion from char to signed short. @item @ref{W0122} An implicit type conversion from char to unsigned short. @item @ref{W0123} An implicit type conversion from char to signed int. @item @ref{W0124} An implicit type conversion from char to unsigned int. @item @ref{W0125} An implicit type conversion from char to signed long. @item @ref{W0126} An implicit type conversion from char to unsigned long. @item @ref{W0127} An implicit type conversion from char to float. @item @ref{W0128} An implicit type conversion from char to double. @item @ref{W0129} An implicit type conversion from char to long double. @item @ref{W0130} An implicit type conversion from char to signed long long. @end itemize @subsection Since 1.0.0 @node W0132 @section W0132 @cindex W0132 @subsection Message body An implicit type conversion from unsigned char to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(unsigned char a) { char b = a; /* W0132 */ foo(a); /* W0132 */ } @end verbatim @subsection Related message @itemize @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0133 @section W0133 @cindex W0133 @subsection Message body An implicit type conversion from signed char to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(signed char a) { char b = a; /* W0133 */ foo(a); /* W0133 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0134 @section W0134 @cindex W0134 @subsection Message body An implicit type conversion from signed short to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(short a) { char b = a; /* W0134 */ foo(a); /* W0134 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0135 @section W0135 @cindex W0135 @subsection Message body An implicit type conversion from unsigned short to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(unsigned short a) { char b = a; /* W0135 */ foo(a); /* W0135 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0136 @section W0136 @cindex W0136 @subsection Message body An implicit type conversion from signed int to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(int a) { char b = a; /* W0136 */ foo(a); /* W0136 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0137 @section W0137 @cindex W0137 @subsection Message body An implicit type conversion from unsigned int to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(unsigned int a) { char b = a; /* W0137 */ foo(a); /* W0137 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0138 @section W0138 @cindex W0138 @subsection Message body An implicit type conversion from signed long to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(long a) { char b = a; /* W0138 */ foo(a); /* W0138 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0139 @section W0139 @cindex W0139 @subsection Message body An implicit type conversion from unsigned long to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(unsigned long a) { char b = a; /* W0139 */ foo(a); /* W0139 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0140 @section W0140 @cindex W0140 @subsection Message body An implicit type conversion from signed long long to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(long long a) { char b = a; /* W0140 */ foo(a); /* W0140 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0141} An implicit type conversion from unsigned long long to char. @end itemize @subsection Since 1.0.0 @node W0141 @section W0141 @cindex W0141 @subsection Message body An implicit type conversion from unsigned long long to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(unsigned long long a) { char b = a; /* W0141 */ foo(a); /* W0141 */ } @end verbatim @subsection Related message @itemize @item @ref{W0132} An implicit type conversion from unsigned char to char. @item @ref{W0133} An implicit type conversion from signed char to char. @item @ref{W0134} An implicit type conversion from signed short to char. @item @ref{W0135} An implicit type conversion from unsigned short to char. @item @ref{W0136} An implicit type conversion from signed int to char. @item @ref{W0137} An implicit type conversion from unsigned int to char. @item @ref{W0138} An implicit type conversion from signed long to char. @item @ref{W0139} An implicit type conversion from unsigned long to char. @item @ref{W0140} An implicit type conversion from signed long long to char. @end itemize @subsection Since 1.0.0 @node W0142 @section W0142 @cindex W0142 @subsection Message body An implicit type conversion from unsigned char to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(unsigned char a) { signed char b = a; /* W0142 */ foo(a); /* W0142 */ } @end verbatim @subsection Related message @itemize @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0143 @section W0143 @cindex W0143 @subsection Message body An implicit type conversion from unsigned short to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(unsigned short a) { signed char b = a; /* W0143 */ foo(a); /* W0143 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0144 @section W0144 @cindex W0144 @subsection Message body An implicit type conversion from unsigned short to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(unsigned short a) { short b = a; /* W0144 */ foo(a); /* W0144 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0145 @section W0145 @cindex W0145 @subsection Message body An implicit type conversion from unsigned int to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(unsigned int a) { signed char b = a; /* W0145 */ foo(a); /* W0145 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0146 @section W0146 @cindex W0146 @subsection Message body An implicit type conversion from unsigned int to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(unsigned int a) { short b = a; /* W0146 */ foo(a); /* W0146 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0147 @section W0147 @cindex W0147 @subsection Message body An implicit type conversion from unsigned int to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(unsigned int a) { int b = a; /* W0147 */ foo(a); /* W0147 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0148 @section W0148 @cindex W0148 @subsection Message body An implicit type conversion from unsigned long to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(unsigned long a) { signed char b = a; /* W0148 */ foo(a); /* W0148 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0149 @section W0149 @cindex W0149 @subsection Message body An implicit type conversion from unsigned long to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(unsigned long a) { short b = a; /* W0149 */ foo(a); /* W0149 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0150 @section W0150 @cindex W0150 @subsection Message body An implicit type conversion from unsigned long to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(unsigned long a) { int b = a; /* W0150 */ foo(a); /* W0150 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0151 @section W0151 @cindex W0151 @subsection Message body An implicit type conversion from unsigned long to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(unsigned long a) { long b = a; /* W0151 */ foo(a); /* W0151 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0152 @section W0152 @cindex W0152 @subsection Message body An implicit type conversion from unsigned long long to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(unsigned long long a) { signed char b = a; /* W0152 */ foo(a); /* W0152 */ } @end verbatim. @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0153 @section W0153 @cindex W0153 @subsection Message body An implicit type conversion from unsigned long long to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(unsigned long long a) { short b = a; /* W0153 */ foo(a); /* W0153 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0154 @section W0154 @cindex W0154 @subsection Message body An implicit type conversion from unsigned long long to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(unsigned long long a) { int b = a; /* W0154 */ foo(a); /* W0154 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0155 @section W0155 @cindex W0155 @subsection Message body An implicit type conversion from unsigned long long to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(unsigned long long a) { long b = a; /* W0155 */ foo(a); /* W0155 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0156} An implicit type conversion from unsigned long long to signed long long. @end itemize @subsection Since 1.0.0 @node W0156 @section W0156 @cindex W0156 @subsection Message body An implicit type conversion from unsigned long long to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(unsigned long long a) { long long b = a; /* W0156 */ foo(a); /* W0156 */ } @end verbatim @subsection Related message @itemize @item @ref{W0142} An implicit type conversion from unsigned char to signed char. @item @ref{W0143} An implicit type conversion from unsigned short to signed char. @item @ref{W0144} An implicit type conversion from unsigned short to signed short. @item @ref{W0145} An implicit type conversion from unsigned int to signed char. @item @ref{W0146} An implicit type conversion from unsigned int to signed short. @item @ref{W0147} An implicit type conversion from unsigned int to signed int. @item @ref{W0148} An implicit type conversion from unsigned long to signed char. @item @ref{W0149} An implicit type conversion from unsigned long to signed short. @item @ref{W0150} An implicit type conversion from unsigned long to signed int. @item @ref{W0151} An implicit type conversion from unsigned long to signed long. @item @ref{W0152} An implicit type conversion from unsigned long long to signed char. @item @ref{W0153} An implicit type conversion from unsigned long long to signed short. @item @ref{W0154} An implicit type conversion from unsigned long long to signed int. @item @ref{W0155} An implicit type conversion from unsigned long long to signed long. @end itemize @subsection Since 1.0.0 @node W0157 @section W0157 @cindex W0157 @subsection Message body An implicit type conversion from signed char to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(signed char a) { unsigned char b = a; /* W0157 */ foo(a); /* W0157 */ } @end verbatim @subsection Related message @itemize @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0158 @section W0158 @cindex W0158 @subsection Message body An implicit type conversion from signed char to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(signed char a) { unsigned short b = a; /* W0158 */ foo(a); /* W0158 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize Under construction. @subsection Since 1.0.0 @node W0159 @section W0159 @cindex W0159 @subsection Message body An implicit type conversion from signed char to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(signed char a) { unsigned int b = a; /* W0159 */ foo(a); /* W0159 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0160 @section W0160 @cindex W0160 @subsection Message body An implicit type conversion from signed char to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(signed char a) { unsigned long b = a; /* W0160 */ foo(a); /* W0160 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0161 @section W0161 @cindex W0161 @subsection Message body An implicit type conversion from signed short to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(short a) { unsigned char b = a; /* W0161 */ foo(a); /* W0161 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0162 @section W0162 @cindex W0162 @subsection Message body An implicit type conversion from signed short to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(short a) { unsigned short b = a; /* W0162 */ foo(a); /* W0162 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0163 @section W0163 @cindex W0163 @subsection Message body An implicit type conversion from signed short to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(short a) { unsigned int b = a; /* W0163 */ foo(a); /* W0163 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0164 @section W0164 @cindex W0164 @subsection Message body An implicit type conversion from signed short to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(short a) { unsigned long b = a; /* W0164 */ foo(a); /* W0164 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0165 @section W0165 @cindex W0165 @subsection Message body Implicit conversion from `signed int' to `unsigned char'. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(int a) { unsigned char b = a; /* W0165 */ foo(a); /* W0165 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0166 @section W0166 @cindex W0166 @subsection Message body An implicit type conversion from signed int to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(int a) { unsigned short b = a; /* W0166 */ foo(a); /* W0166 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0167 @section W0167 @cindex W0167 @subsection Message body Implicit conversion from `signed int' to `unsigned int'. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(int a) { unsigned int b = a; /* W0167 */ foo(a); /* W0167 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0168 @section W0168 @cindex W0168 @subsection Message body An implicit type conversion from signed int to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(int a) { unsigned long b = a; /* W0168 */ foo(a); /* W0168 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0169 @section W0169 @cindex W0169 @subsection Message body An implicit type conversion from signed long to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(long a) { unsigned char b = a; /* W0169 */ foo(a); /* W0169 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0170 @section W0170 @cindex W0170 @subsection Message body An implicit type conversion from signed long to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(long a) { unsigned short b = a; /* W0170 */ foo(a); /* W0170 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0171 @section W0171 @cindex W0171 @subsection Message body An implicit type conversion from signed long to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(long a) { unsigned int b = a; /* W0171 */ foo(a); /* W0171 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0172 @section W0172 @cindex W0172 @subsection Message body An implicit type conversion from signed long to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(long a) { unsigned long b = a; /* W0172 */ foo(a); /* W0172 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0173 @section W0173 @cindex W0173 @subsection Message body An implicit type conversion from signed char to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(signed char a) { unsigned long long b = a; /* W0173 */ foo(a); /* W0173 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0174 @section W0174 @cindex W0174 @subsection Message body An implicit type conversion from signed short to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(short a) { unsigned long long b = a; /* W0174 */ foo(a); /* W0174 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0175 @section W0175 @cindex W0175 @subsection Message body An implicit type conversion from signed int to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(int a) { unsigned long long b = a; /* W0175 */ foo(a); /* W0175 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0176 @section W0176 @cindex W0176 @subsection Message body An implicit type conversion from signed long to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(long a) { unsigned long long b = a; /* W0176 */ foo(a); /* W0176 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0177 @section W0177 @cindex W0177 @subsection Message body An implicit type conversion from signed long long to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(long long a) { unsigned char b = a; /* W0177 */ foo(a); /* W0177 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0178 @section W0178 @cindex W0178 @subsection Message body An implicit type conversion from signed long long to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(long long a) { unsigned short b = a; /* W0178 */ foo(a); /* W0178 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0179 @section W0179 @cindex W0179 @subsection Message body An implicit type conversion from signed long long to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(long long a) { unsigned int b = a; /* W0179 */ foo(a); /* W0179 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0180 @section W0180 @cindex W0180 @subsection Message body An implicit type conversion from signed long long to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(long long a) { unsigned long b = a; /* W0180 */ foo(a); /* W0180 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0181} An implicit type conversion from signed long long to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0181 @section W0181 @cindex W0181 @subsection Message body An implicit type conversion from signed long long to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(long long a) { unsigned long long b = a; /* W0181 */ foo(a); /* W0181 */ } @end verbatim @subsection Related message @itemize @item @ref{W0157} An implicit type conversion from signed char to unsigned char. @item @ref{W0158} An implicit type conversion from signed char to unsigned short. @item @ref{W0159} An implicit type conversion from signed char to unsigned int. @item @ref{W0160} An implicit type conversion from signed char to unsigned long. @item @ref{W0161} An implicit type conversion from signed short to unsigned char. @item @ref{W0162} An implicit type conversion from signed short to unsigned short. @item @ref{W0163} An implicit type conversion from signed short to unsigned int. @item @ref{W0164} An implicit type conversion from signed short to unsigned long. @item @ref{W0165} Implicit conversion from `signed int' to `unsigned char'. @item @ref{W0166} An implicit type conversion from signed int to unsigned short. @item @ref{W0167} Implicit conversion from `signed int' to `unsigned int'. @item @ref{W0168} An implicit type conversion from signed int to unsigned long. @item @ref{W0169} An implicit type conversion from signed long to unsigned char. @item @ref{W0170} An implicit type conversion from signed long to unsigned short. @item @ref{W0171} An implicit type conversion from signed long to unsigned int. @item @ref{W0172} An implicit type conversion from signed long to unsigned long. @item @ref{W0173} An implicit type conversion from signed char to unsigned long long. @item @ref{W0174} An implicit type conversion from signed short to unsigned long long. @item @ref{W0175} An implicit type conversion from signed int to unsigned long long. @item @ref{W0176} An implicit type conversion from signed long to unsigned long long. @item @ref{W0177} An implicit type conversion from signed long long to unsigned char. @item @ref{W0178} An implicit type conversion from signed long long to unsigned short. @item @ref{W0179} An implicit type conversion from signed long long to unsigned int. @item @ref{W0180} An implicit type conversion from signed long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0182 @section W0182 @cindex W0182 @subsection Message body An implicit type conversion from unsigned char to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(unsigned char a) { float b = a; /* W0182 */ foo(a); /* W0182 */ } @end verbatim @subsection Related message @itemize @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0183 @section W0183 @cindex W0183 @subsection Message body An implicit type conversion from unsigned char to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(unsigned char a) { double b = a; /* W0183 */ foo(a); /* W0183 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0184 @section W0184 @cindex W0184 @subsection Message body An implicit type conversion from unsigned char to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(unsigned char a) { long double b = a; /* W0184 */ foo(a); /* W0184 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0185 @section W0185 @cindex W0185 @subsection Message body An implicit type conversion from signed char to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(signed char a) { float b = a; /* W0185 */ foo(a); /* W0185 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0186 @section W0186 @cindex W0186 @subsection Message body An implicit type conversion from signed char to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(signed char a) { double b = a; /* W0186 */ foo(a); /* W0186 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0187 @section W0187 @cindex W0187 @subsection Message body An implicit type conversion from signed char to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(signed char a) { long double b = a; /* W0187 */ foo(a); /* W0187 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0188 @section W0188 @cindex W0188 @subsection Message body An implicit type conversion from signed short to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(short a) { float b = a; /* W0188 */ foo(a); /* W0188 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0189 @section W0189 @cindex W0189 @subsection Message body An implicit type conversion from signed short to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(short a) { double b = a; /* W0189 */ foo(a); /* W0189 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0190 @section W0190 @cindex W0190 @subsection Message body An implicit type conversion from signed short to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(short a) { long double b = a; /* W0190 */ foo(a); /* W0190 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0191 @section W0191 @cindex W0191 @subsection Message body An implicit type conversion from unsigned short to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(unsigned short a) { float b = a; /* W0191 */ foo(a); /* W0191 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0192 @section W0192 @cindex W0192 @subsection Message body An implicit type conversion from unsigned short to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(unsigned short a) { double b = a; /* W0192 */ foo(a); /* W0192 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0193 @section W0193 @cindex W0193 @subsection Message body An implicit type conversion from unsigned short to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(unsigned short a) { long double b = a; /* W0193 */ foo(a); /* W0193 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0194 @section W0194 @cindex W0194 @subsection Message body An implicit type conversion from signed int to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(int a) { float b = a; /* W0194 */ foo(a); /* W0194 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0195 @section W0195 @cindex W0195 @subsection Message body An implicit type conversion from signed int to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(int a) { double b = a; /* W0195 */ foo(a); /* W0195 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0196 @section W0196 @cindex W0196 @subsection Message body An implicit type conversion from signed int to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(int a) { long double b = a; /* W0196 */ foo(a); /* W0196 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0197 @section W0197 @cindex W0197 @subsection Message body An implicit type conversion from unsigned int to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(unsigned int a) { float b = a; /* W0197 */ foo(a); /* W0197 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0198 @section W0198 @cindex W0198 @subsection Message body An implicit type conversion from unsigned int to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(unsigned int a) { double b = a; /* W0198 */ foo(a); /* W0198 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0199 @section W0199 @cindex W0199 @subsection Message body An implicit type conversion from unsigned int to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(unsigned int a) { long double b = a; /* W0199 */ foo(a); /* W0199 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0200 @section W0200 @cindex W0200 @subsection Message body An implicit type conversion from signed long to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(long a) { float b = a; /* W0200 */ foo(a); /* W0200 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0201 @section W0201 @cindex W0201 @subsection Message body An implicit type conversion from signed long to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(long a) { double b = a; /* W0201 */ foo(a); /* W0201 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0202 @section W0202 @cindex W0202 @subsection Message body An implicit type conversion from signed long to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(long a) { long double b = a; /* W0202 */ foo(a); /* W0202 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0203 @section W0203 @cindex W0203 @subsection Message body An implicit type conversion from unsigned long to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(unsigned long a) { float b = a; /* W0203 */ foo(a); /* W0203 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0204 @section W0204 @cindex W0204 @subsection Message body An implicit type conversion from unsigned long to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(unsigned long a) { double b = a; /* W0204 */ foo(a); /* W0204 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0205 @section W0205 @cindex W0205 @subsection Message body An implicit type conversion from unsigned long to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(unsigned long a) { long double b = a; /* W0205 */ foo(a); /* W0205 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0206 @section W0206 @cindex W0206 @subsection Message body An implicit type conversion from signed long long to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(long long a) { float b = a; /* W0206 */ foo(a); /* W0206 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0207 @section W0207 @cindex W0207 @subsection Message body An implicit type conversion from signed long long to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(long long a) { double b = a; /* W0207 */ foo(a); /* W0207 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0208 @section W0208 @cindex W0208 @subsection Message body An implicit type conversion from signed long long to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(long long a) { long double b = a; /* W0208 */ foo(a); /* W0208 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0209 @section W0209 @cindex W0209 @subsection Message body An implicit type conversion from unsigned long long to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(unsigned long long a) { float b = a; /* W0209 */ foo(a); /* W0209 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0210 @section W0210 @cindex W0210 @subsection Message body An implicit type conversion from unsigned long long to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(unsigned long long a) { double b = a; /* W0210 */ foo(a); /* W0210 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0211} An implicit type conversion from unsigned long long to long double. @end itemize @subsection Since 1.0.0 @node W0211 @section W0211 @cindex W0211 @subsection Message body An implicit type conversion from unsigned long long to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long double a); void bar(unsigned long long a) { long double b = a; /* W0211 */ foo(a); /* W0211 */ } @end verbatim @subsection Related message @itemize @item @ref{W0182} An implicit type conversion from unsigned char to float. @item @ref{W0183} An implicit type conversion from unsigned char to double. @item @ref{W0184} An implicit type conversion from unsigned char to long double. @item @ref{W0185} An implicit type conversion from signed char to float. @item @ref{W0186} An implicit type conversion from signed char to double. @item @ref{W0187} An implicit type conversion from signed char to long double. @item @ref{W0188} An implicit type conversion from signed short to float. @item @ref{W0189} An implicit type conversion from signed short to double. @item @ref{W0190} An implicit type conversion from signed short to long double. @item @ref{W0191} An implicit type conversion from unsigned short to float. @item @ref{W0192} An implicit type conversion from unsigned short to double. @item @ref{W0193} An implicit type conversion from unsigned short to long double. @item @ref{W0194} An implicit type conversion from signed int to float. @item @ref{W0195} An implicit type conversion from signed int to double. @item @ref{W0196} An implicit type conversion from signed int to long double. @item @ref{W0197} An implicit type conversion from unsigned int to float. @item @ref{W0198} An implicit type conversion from unsigned int to double. @item @ref{W0199} An implicit type conversion from unsigned int to long double. @item @ref{W0200} An implicit type conversion from signed long to float. @item @ref{W0201} An implicit type conversion from signed long to double. @item @ref{W0202} An implicit type conversion from signed long to long double. @item @ref{W0203} An implicit type conversion from unsigned long to float. @item @ref{W0204} An implicit type conversion from unsigned long to double. @item @ref{W0205} An implicit type conversion from unsigned long to long double. @item @ref{W0206} An implicit type conversion from signed long long to float. @item @ref{W0207} An implicit type conversion from signed long long to double. @item @ref{W0208} An implicit type conversion from signed long long to long double. @item @ref{W0209} An implicit type conversion from unsigned long long to float. @item @ref{W0210} An implicit type conversion from unsigned long long to double. @end itemize @subsection Since 1.0.0 @node W0212 @section W0212 @cindex W0212 @subsection Message body An implicit type conversion from unsigned long long to long double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(float a) { char b = a; /* W0212 */ foo(a); /* W0212 */ } @end verbatim @subsection Related message @itemize @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0213 @section W0213 @cindex W0213 @subsection Message body An implicit type conversion from float to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(float a) { signed char b = a; /* W0213 */ foo(a); /* W0213 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0214 @section W0214 @cindex W0214 @subsection Message body An implicit type conversion from float to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(float a) { unsigned char b = a; /* W0214 */ foo(a); /* W0214 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0215 @section W0215 @cindex W0215 @subsection Message body An implicit type conversion from float to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(float a) { short b = a; /* W0215 */ foo(a); /* W0215 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0216 @section W0216 @cindex W0216 @subsection Message body An implicit type conversion from float to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(float a) { unsigned short b = a; /* W0216 */ foo(a); /* W0216 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0217 @section W0217 @cindex W0217 @subsection Message body An implicit type conversion from float to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(float a) { int b = a; /* W0217 */ foo(a); /* W0217 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0218 @section W0218 @cindex W0218 @subsection Message body An implicit type conversion from float to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(float a) { unsigned int b = a; /* W0218 */ foo(a); /* W0218 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0219 @section W0219 @cindex W0219 @subsection Message body An implicit type conversion from float to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(float a) { long b = a; /* W0219 */ foo(a); /* W0219 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0220 @section W0220 @cindex W0220 @subsection Message body An implicit type conversion from float to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(float a) { unsigned long b = a; /* W0220 */ foo(a); /* W0220 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0221 @section W0221 @cindex W0221 @subsection Message body An implicit type conversion from double to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(double a) { char b = a; /* W0221 */ foo(a); /* W0221 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0222 @section W0222 @cindex W0222 @subsection Message body An implicit type conversion from double to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(double a) { signed char b = a; /* W0222 */ foo(a); /* W0222 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0223 @section W0223 @cindex W0223 @subsection Message body An implicit type conversion from double to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(double a) { unsigned char b = a; /* W0223 */ foo(a); /* W0223 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0224 @section W0224 @cindex W0224 @subsection Message body An implicit type conversion from double to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(double a) { short b = a; /* W0224 */ foo(a); /* W0224 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0225 @section W0225 @cindex W0225 @subsection Message body An implicit type conversion from double to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(double a) { unsigned short b = a; /* W0225 */ foo(a); /* W0225 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0226 @section W0226 @cindex W0226 @subsection Message body An implicit type conversion from double to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(double a) { int b = a; /* W0226 */ foo(a); /* W0226 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0227 @section W0227 @cindex W0227 @subsection Message body An implicit type conversion from double to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(double a) { unsigned int b = a; /* W0227 */ foo(a); /* W0227 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0228 @section W0228 @cindex W0228 @subsection Message body An implicit type conversion from double to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(double a) { long b = a; /* W0228 */ foo(a); /* W0228 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0229 @section W0229 @cindex W0229 @subsection Message body An implicit type conversion from double to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(double a) { unsigned long b = a; /* W0229 */ foo(a); /* W0229 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0230 @section W0230 @cindex W0230 @subsection Message body An implicit type conversion from long double to char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(char a); void bar(long double a) { char b = a; /* W0230 */ foo(a); /* W0230 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0231 @section W0231 @cindex W0231 @subsection Message body An implicit type conversion from long double to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(long double a) { signed char b = a; /* W0231 */ foo(a); /* W0231 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0232 @section W0232 @cindex W0232 @subsection Message body An implicit type conversion from long double to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(long double a) { unsigned char b = a; /* W0232 */ foo(a); /* W0232 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0233 @section W0233 @cindex W0233 @subsection Message body An implicit type conversion from long double to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(long double a) { short b = a; /* W0233 */ foo(a); /* W0233 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0234 @section W0234 @cindex W0234 @subsection Message body An implicit type conversion from long double to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(long double a) { unsigned short b = a; /* W0234 */ foo(a); /* W0234 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0235 @section W0235 @cindex W0235 @subsection Message body An implicit type conversion from long double to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(long double a) { int b = a; /* W0235 */ foo(a); /* W0235 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0236 @section W0236 @cindex W0236 @subsection Message body An implicit type conversion from long double to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(long double a) { unsigned int b = a; /* W0236 */ foo(a); /* W0236 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0237 @section W0237 @cindex W0237 @subsection Message body An implicit type conversion from long double to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(long double a) { long b = a; /* W0237 */ foo(a); /* W0237 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0238 @section W0238 @cindex W0238 @subsection Message body An implicit type conversion from long double to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(long double a) { unsigned long b = a; /* W0238 */ foo(a); /* W0238 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0239 @section W0239 @cindex W0239 @subsection Message body An implicit type conversion from float to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(float a) { long long b = a; /* W0239 */ foo(a); /* W0239 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0240 @section W0240 @cindex W0240 @subsection Message body An implicit type conversion from float to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(float a) { unsigned long long b = a; /* W0240 */ foo(a); /* W0240 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0241 @section W0241 @cindex W0241 @subsection Message body An implicit type conversion from double to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(double a) { long long b = a; /* W0241 */ foo(a); /* W0241 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0242 @section W0242 @cindex W0242 @subsection Message body An implicit type conversion from double to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(double a) { unsigned long long b = a; /* W0242 */ foo(a); /* W0242 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0243 @section W0243 @cindex W0243 @subsection Message body An implicit type conversion from long double to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(long double a) { long long b = a; /* W0243 */ foo(a); /* W0243 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0244} An implicit type conversion from long double to unsigned long long. @end itemize @subsection Since 1.0.0 @node W0244 @section W0244 @cindex W0244 @subsection Message body An implicit type conversion from long double to unsigned long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long long a); void bar(long double a) { unsigned long long b = a; /* W0244 */ foo(a); /* W0244 */ } @end verbatim @subsection Related message @itemize @item @ref{W0212} An implicit type conversion from float to char. @item @ref{W0213} An implicit type conversion from float to signed char. @item @ref{W0214} An implicit type conversion from float to unsigned char. @item @ref{W0215} An implicit type conversion from float to signed short. @item @ref{W0216} An implicit type conversion from float to unsigned short. @item @ref{W0217} An implicit type conversion from float to signed int. @item @ref{W0218} An implicit type conversion from float to unsigned int. @item @ref{W0219} An implicit type conversion from float to signed long. @item @ref{W0220} An implicit type conversion from float to unsigned long. @item @ref{W0221} An implicit type conversion from double to char. @item @ref{W0222} An implicit type conversion from double to signed char. @item @ref{W0223} An implicit type conversion from double to unsigned char. @item @ref{W0224} An implicit type conversion from double to signed short. @item @ref{W0225} An implicit type conversion from double to unsigned short. @item @ref{W0226} An implicit type conversion from double to signed int. @item @ref{W0227} An implicit type conversion from double to unsigned int. @item @ref{W0228} An implicit type conversion from double to signed long. @item @ref{W0229} An implicit type conversion from double to unsigned long. @item @ref{W0230} An implicit type conversion from long double to char. @item @ref{W0231} An implicit type conversion from long double to signed char. @item @ref{W0232} An implicit type conversion from long double to unsigned char. @item @ref{W0233} An implicit type conversion from long double to signed short. @item @ref{W0234} An implicit type conversion from long double to unsigned short. @item @ref{W0235} An implicit type conversion from long double to signed int. @item @ref{W0236} An implicit type conversion from long double to unsigned int. @item @ref{W0237} An implicit type conversion from long double to signed long. @item @ref{W0238} An implicit type conversion from long double to unsigned long. @item @ref{W0239} An implicit type conversion from float to signed long long. @item @ref{W0240} An implicit type conversion from float to unsigned long long. @item @ref{W0241} An implicit type conversion from double to signed long long. @item @ref{W0242} An implicit type conversion from double to unsigned long long. @item @ref{W0243} An implicit type conversion from long double to signed long long. @end itemize @subsection Since 1.0.0 @node W0245 @section W0245 @cindex W0245 @subsection Message body An implicit type conversion from unsigned char to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(unsigned char a) { short b = a; /* W0245 */ foo(a); /* W0245 */ } @end verbatim @subsection Related message @itemize @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0246 @section W0246 @cindex W0246 @subsection Message body Implicit conversion from `unsigned char' to `signed int'. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(unsigned char a) { int b = a; /* W0246 */ foo(a); /* W0246 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0247 @section W0247 @cindex W0247 @subsection Message body An implicit type conversion from unsigned char to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(unsigned char a) { long b = a; /* W0247 */ foo(a); /* W0247 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0248 @section W0248 @cindex W0248 @subsection Message body An implicit type conversion from unsigned short to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(unsigned short a) { int b = a; /* W0248 */ foo(a); /* W0248 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0249 @section W0249 @cindex W0249 @subsection Message body An implicit type conversion from unsigned short to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(unsigned short a) { long b = a; /* W0249 */ foo(a); /* W0249 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0250 @section W0250 @cindex W0250 @subsection Message body An implicit type conversion from unsigned int to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(unsigned int a) { long b = a; /* W0250 */ foo(a); /* W0250 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0251 @section W0251 @cindex W0251 @subsection Message body An implicit type conversion from unsigned char to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(unsigned char a) { long long b = a; /* W0251 */ foo(a); /* W0251 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0252 @section W0252 @cindex W0252 @subsection Message body An implicit type conversion from unsigned short to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(unsigned short a) { long long b = a; /* W0252 */ foo(a); /* W0252 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0253 @section W0253 @cindex W0253 @subsection Message body An implicit type conversion from unsigned int to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(unsigned int a) { long long b = a; /* W0253 */ foo(a); /* W0253 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0254} An implicit type conversion from unsigned long to signed long long. @end itemize @subsection Since 1.0.0 @node W0254 @section W0254 @cindex W0254 @subsection Message body An implicit type conversion from unsigned long to signed long long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long long a); void bar(unsigned long a) { long long b = a; /* W0254 */ foo(a); /* W0254 */ } @end verbatim @subsection Related message @itemize @item @ref{W0245} An implicit type conversion from unsigned char to signed short. @item @ref{W0246} Implicit conversion from `unsigned char' to `signed int'. @item @ref{W0247} An implicit type conversion from unsigned char to signed long. @item @ref{W0248} An implicit type conversion from unsigned short to signed int. @item @ref{W0249} An implicit type conversion from unsigned short to signed long. @item @ref{W0250} An implicit type conversion from unsigned int to signed long. @item @ref{W0251} An implicit type conversion from unsigned char to signed long long. @item @ref{W0252} An implicit type conversion from unsigned short to signed long long. @item @ref{W0253} An implicit type conversion from unsigned int to signed long long. @end itemize @subsection Since 1.0.0 @node W0255 @section W0255 @cindex W0255 @subsection Message body A value of char type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { char a = 0; return a; /* W0255 */ } @end verbatim @subsection Related message @itemize @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0256 @section W0256 @cindex W0256 @subsection Message body A value of char type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { char a = 0; return a; /* W0256 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0257 @section W0257 @cindex W0257 @subsection Message body A value of char type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { char a = 0; return a; /* W0257 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0258 @section W0258 @cindex W0258 @subsection Message body A value of char type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { char a = 0; return a; /* W0258 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0259 @section W0259 @cindex W0259 @subsection Message body A value of char type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { char a = 0; return a; /* W0259 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0260 @section W0260 @cindex W0260 @subsection Message body A value of char type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { char a = 0; return a; /* W0260 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0261 @section W0261 @cindex W0261 @subsection Message body A value of char type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { char a = 0; return a; /* W0261 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0262 @section W0262 @cindex W0262 @subsection Message body A value of char type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { char a = 0; return a; /* W0262 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0263 @section W0263 @cindex W0263 @subsection Message body A value of char type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { char a = 0; return a; /* W0263 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0264 @section W0264 @cindex W0264 @subsection Message body A value of char type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { char a = 0; return a; /* W0264 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0265 @section W0265 @cindex W0265 @subsection Message body A value of char type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { char a = 0; return a; /* W0265 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0266 @section W0266 @cindex W0266 @subsection Message body A value of char type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { char a = 0; return a; /* W0266 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0267} A value of char type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0267 @section W0267 @cindex W0267 @subsection Message body A value of char type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { char a = 0; return a; /* W0267 */ } @end verbatim @subsection Related message @itemize @item @ref{W0255} A value of char type is returned from `signed char %s()' function. @item @ref{W0256} A value of char type is returned from `unsigned char %s()' function. @item @ref{W0257} A value of char type is returned from `signed short %s()' function. @item @ref{W0258} A value of char type is returned from `unsigned short %s()' function. @item @ref{W0259} A value of char type is returned from `signed int %s()' function. @item @ref{W0260} A value of char type is returned from `unsigned int %s()' function. @item @ref{W0261} A value of char type is returned from `signed long %s()' function. @item @ref{W0262} A value of char type is returned from `unsigned long %s()' function. @item @ref{W0263} A value of char type is returned from `float %s()' function. @item @ref{W0264} A value of char type is returned from `double %s()' function. @item @ref{W0265} A value of char type is returned from `long double %s()' function. @item @ref{W0266} A value of char type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0268 @section W0268 @cindex W0268 @subsection Message body A value of unsigned char type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { unsigned char a = 0; return a; /* W0268 */ } @end verbatim @subsection Related message @itemize @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0269 @section W0269 @cindex W0269 @subsection Message body A value of signed char type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { signed char a = 0; return a; /* W0269 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0270 @section W0270 @cindex W0270 @subsection Message body A value of signed short type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { short a = 0; return a; /* W0270 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0271 @section W0271 @cindex W0271 @subsection Message body A value of unsigned short type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { unsigned short a = 0; return a; /* W0271 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0272 @section W0272 @cindex W0272 @subsection Message body A value of signed int type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { int a = 0; return a; /* W0272 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0273 @section W0273 @cindex W0273 @subsection Message body A value of unsigned int type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { unsigned int a = 0; return a; /* W0273 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0274 @section W0274 @cindex W0274 @subsection Message body A value of signed long type is returned from `char %s()' function. @subsection Content @subsection Sample code @verbatim char func(void) { long a = 0; return a; /* W0274 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0275 @section W0275 @cindex W0275 @subsection Message body A value of unsigned long type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { unsigned long a = 0; return a; /* W0275 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0276 @section W0276 @cindex W0276 @subsection Message body A value of signed long long type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { long long a = 0; return a; /* W0276 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0277} A value of unsigned long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0277 @section W0277 @cindex W0277 @subsection Message body A value of unsigned long long type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { unsigned long long a = 0; return a; /* W0277 */ } @end verbatim @subsection Related message @itemize @item @ref{W0268} A value of unsigned char type is returned from `char %s()' function. @item @ref{W0269} A value of signed char type is returned from `char %s()' function. @item @ref{W0270} A value of signed short type is returned from `char %s()' function. @item @ref{W0271} A value of unsigned short type is returned from `char %s()' function. @item @ref{W0272} A value of signed int type is returned from `char %s()' function. @item @ref{W0273} A value of unsigned int type is returned from `char %s()' function. @item @ref{W0274} A value of signed long type is returned from `char %s()' function. @item @ref{W0275} A value of unsigned long type is returned from `char %s()' function. @item @ref{W0276} A value of signed long long type is returned from `char %s()' function. @end itemize @subsection Since 1.0.0 @node W0278 @section W0278 @cindex W0278 @subsection Message body A value of unsigned char type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { unsigned char a = 0; return a; /* W0278 */ } @end verbatim @subsection Related message @itemize @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0279 @section W0279 @cindex W0279 @subsection Message body A value of unsigned short type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { unsigned short a = 0; return a; /* W0279 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0280 @section W0280 @cindex W0280 @subsection Message body A value of unsigned short type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { unsigned short a = 0; return a; /* W0280 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0281 @section W0281 @cindex W0281 @subsection Message body A value of unsigned int type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { unsigned int a = 0; return a; /* W0281 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0282 @section W0282 @cindex W0282 @subsection Message body A value of unsigned int type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { unsigned int a = 0; return a; /* W0282 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0283 @section W0283 @cindex W0283 @subsection Message body A value of unsigned int type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { unsigned int a = 0; return a; /* W0283 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0284 @section W0284 @cindex W0284 @subsection Message body A value of unsigned long type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { unsigned long a = 0; return a; /* W0284 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0285 @section W0285 @cindex W0285 @subsection Message body A value of unsigned long type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { unsigned long a = 0; return a; /* W0285 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0286 @section W0286 @cindex W0286 @subsection Message body A value of unsigned long type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { unsigned long a = 0; return a; /* W0286 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0287 @section W0287 @cindex W0287 @subsection Message body A value of unsigned long type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { unsigned long a = 0; return a; /* W0287 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0288 @section W0288 @cindex W0288 @subsection Message body A value of unsigned long long type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { unsigned long long a = 0; return a; /* W0288 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0289 @section W0289 @cindex W0289 @subsection Message body A value of unsigned long long type is returned from `short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { unsigned long long a = 0; return a; /* W0289 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0290 @section W0290 @cindex W0290 @subsection Message body A value of unsigned long long type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { unsigned long long a = 0; return a; /* W0290 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0291 @section W0291 @cindex W0291 @subsection Message body A value of unsigned long long type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { unsigned long long a = 0; return a; /* W0291 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0292} A value of unsigned long long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0292 @section W0292 @cindex W0292 @subsection Message body A value of unsigned long long type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { unsigned long long a = 0; return a; /* W0292 */ } @end verbatim @subsection Related message @itemize @item @ref{W0278} A value of unsigned char type is returned from `signed char %s()' function. @item @ref{W0279} A value of unsigned short type is returned from `signed char %s()' function. @item @ref{W0280} A value of unsigned short type is returned from `signed short %s()' function. @item @ref{W0281} A value of unsigned int type is returned from `signed char %s()' function. @item @ref{W0282} A value of unsigned int type is returned from `signed short %s()' function. @item @ref{W0283} A value of unsigned int type is returned from `signed int %s()' function. @item @ref{W0284} A value of unsigned long type is returned from `signed char %s()' function. @item @ref{W0285} A value of unsigned long type is returned from `signed short %s()' function. @item @ref{W0286} A value of unsigned long type is returned from `signed int %s()' function. @item @ref{W0287} A value of unsigned long type is returned from `signed long %s()' function. @item @ref{W0288} A value of unsigned long long type is returned from `signed char %s()' function. @item @ref{W0289} A value of unsigned long long type is returned from `signed short %s()' function. @item @ref{W0290} A value of unsigned long long type is returned from `signed int %s()' function. @item @ref{W0291} A value of unsigned long long type is returned from `signed long %s()' function. @end itemize @subsection Since 1.0.0 @node W0293 @section W0293 @cindex W0293 @subsection Message body A value of signed char type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { signed char a = 0; return a; /* W0293 */ } @end verbatim @subsection Related message @itemize @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0294 @section W0294 @cindex W0294 @subsection Message body A value of signed char type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { signed char a = 0; return a; /* W0294 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0295 @section W0295 @cindex W0295 @subsection Message body A value of signed char type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { signed char a = 0; return a; /* W0295 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0296 @section W0296 @cindex W0296 @subsection Message body A value of signed char type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { signed char a = 0; return a; /* W0296 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0297 @section W0297 @cindex W0297 @subsection Message body A value of signed short type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { short a = 0; return a; /* W0297 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0298 @section W0298 @cindex W0298 @subsection Message body A value of short type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { short a = 0; return a; /* W0298 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0299 @section W0299 @cindex W0299 @subsection Message body A value of signed short type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { short a = 0; return a; /* W0299 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0300 @section W0300 @cindex W0300 @subsection Message body A value of signed short type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { short a = 0; return a; /* W0300 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0301 @section W0301 @cindex W0301 @subsection Message body A value of signed int type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { int a = 0; return a; /* W0301 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0302 @section W0302 @cindex W0302 @subsection Message body A value of signed int type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { int a = 0; return a; /* W0302 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0303 @section W0303 @cindex W0303 @subsection Message body A value of signed int type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { int a = 0; return a; /* W0303 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0304 @section W0304 @cindex W0304 @subsection Message body A value of signed int type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { int a = 0; return a; /* W0304 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0305 @section W0305 @cindex W0305 @subsection Message body A value of signed long type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { long a = 0; return a; /* W0305 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0306 @section W0306 @cindex W0306 @subsection Message body A value of signed long type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { long a = 0; return a; /* W0306 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0307 @section W0307 @cindex W0307 @subsection Message body A value of signed long type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { long a = 0; return a; /* W0307 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0308 @section W0308 @cindex W0308 @subsection Message body A value of signed long type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { long a = 0; return a; /* W0308 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0309 @section W0309 @cindex W0309 @subsection Message body A value of signed char type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { signed char a = 0; return a; /* W0309 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0310 @section W0310 @cindex W0310 @subsection Message body A value of signed short type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { short a = 0; return a; /* W0310 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0311 @section W0311 @cindex W0311 @subsection Message body A value of signed int type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { int a = 0; return a; /* W0311 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0312 @section W0312 @cindex W0312 @subsection Message body A value of signed long type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { long a = 0; return a; /* W0312 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0313 @section W0313 @cindex W0313 @subsection Message body A value of signed long long type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { long long a = 0; return a; /* W0313 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0314 @section W0314 @cindex W0314 @subsection Message body A value of signed long long type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { long long a = 0; return a; /* W0314 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0315 @section W0315 @cindex W0315 @subsection Message body A value of signed long long type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { long long a = 0; return a; /* W0315 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0316 @section W0316 @cindex W0316 @subsection Message body A value of signed long long type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { long long a = 0; return a; /* W0316 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0317} A value of signed long long type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0317 @section W0317 @cindex W0317 @subsection Message body A value of signed long long type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { long long a = 0; return a; /* W0317 */ } @end verbatim @subsection Related message @itemize @item @ref{W0293} A value of signed char type is returned from `unsigned char %s()' function. @item @ref{W0294} A value of signed char type is returned from `unsigned short %s()' function. @item @ref{W0295} A value of signed char type is returned from `unsigned int %s()' function. @item @ref{W0296} A value of signed char type is returned from `unsigned long %s()' function. @item @ref{W0297} A value of signed short type is returned from `unsigned char %s()' function. @item @ref{W0298} A value of signed short type is returned from `unsigned short %s()' function. @item @ref{W0299} A value of signed short type is returned from `unsigned int %s()' function. @item @ref{W0300} A value of signed short type is returned from `unsigned long %s()' function. @item @ref{W0301} A value of signed int type is returned from `unsigned char %s()' function. @item @ref{W0302} A value of signed int type is returned from `unsigned short %s()' function. @item @ref{W0303} A value of signed int type is returned from `unsigned int %s()' function. @item @ref{W0304} A value of signed int type is returned from `unsigned long %s()' function. @item @ref{W0305} A value of signed long type is returned from `unsigned char %s()' function. @item @ref{W0306} A value of signed long type is returned from `unsigned short %s()' function. @item @ref{W0307} A value of signed long type is returned from `unsigned int %s()' function. @item @ref{W0308} A value of signed long type is returned from `unsigned long %s()' function. @item @ref{W0309} A value of signed char type is returned from `unsigned long long %s()' function. @item @ref{W0310} A value of signed short type is returned from `unsigned long long %s()' function. @item @ref{W0311} A value of signed int type is returned from `unsigned long long %s()' function. @item @ref{W0312} A value of signed long type is returned from `unsigned long long %s()' function. @item @ref{W0313} A value of signed long long type is returned from `unsigned char %s()' function. @item @ref{W0314} A value of signed long long type is returned from `unsigned short %s()' function. @item @ref{W0315} A value of signed long long type is returned from `unsigned int %s()' function. @item @ref{W0316} A value of signed long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0318 @section W0318 @cindex W0318 @subsection Message body A value of unsigned char type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { unsigned char a = 0; return a; /* W0318 */ } @end verbatim @subsection Related message @itemize @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0319 @section W0319 @cindex W0319 @subsection Message body A value of unsigned char type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { unsigned char a = 0; return a; /* W0319 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0320 @section W0320 @cindex W0320 @subsection Message body A value of unsigned char type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { unsigned char a = 0; return a; /* W0320 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0321 @section W0321 @cindex W0321 @subsection Message body A value of signed char type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { unsigned char a = 0; return a; /* W0321 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0322 @section W0322 @cindex W0322 @subsection Message body A value of signed char type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { unsigned char a = 0; return a; /* W0322 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0323 @section W0323 @cindex W0323 @subsection Message body A value of signed char type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { unsigned char a = 0; return a; /* W0323 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0324 @section W0324 @cindex W0324 @subsection Message body A value of signed short type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { short a = 0; return a; /* W0324 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0325 @section W0325 @cindex W0325 @subsection Message body A value of signed short type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { short a = 0; return a; /* W0325 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0326 @section W0326 @cindex W0326 @subsection Message body A value of signed short type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { short a = 0; return a; /* W0326 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0327 @section W0327 @cindex W0327 @subsection Message body A value of unsigned short type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { unsigned short a = 0; return a; /* W0327 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0328 @section W0328 @cindex W0328 @subsection Message body A value of unsigned short type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { unsigned short a = 0; return a; /* W0328 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0329 @section W0329 @cindex W0329 @subsection Message body A value of unsigned short type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { unsigned short a = 0; return a; /* W0329 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0330 @section W0330 @cindex W0330 @subsection Message body A value of signed int type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { int a = 0; return a; /* W0330 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0331 @section W0331 @cindex W0331 @subsection Message body A value of signed int type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { int a = 0; return a; /* W0331 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0332 @section W0332 @cindex W0332 @subsection Message body A value of signed int type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { int a = 0; return a; /* W0332 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0333 @section W0333 @cindex W0333 @subsection Message body A value of unsigned int type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { unsigned int a = 0; return a; /* W0333 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0334 @section W0334 @cindex W0334 @subsection Message body A value of unsigned int type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { unsigned int a = 0; return a; /* W0334 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0335 @section W0335 @cindex W0335 @subsection Message body A value of unsigned int type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { unsigned int a = 0; return a; /* W0335 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0336 @section W0336 @cindex W0336 @subsection Message body A value of signed long type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { long a = 0; return a; /* W0336 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0337 @section W0337 @cindex W0337 @subsection Message body A value of signed long type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { long a = 0; return a; /* W0337 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0338 @section W0338 @cindex W0338 @subsection Message body A value of signed long type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { long a = 0; return a; /* W0338 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0339 @section W0339 @cindex W0339 @subsection Message body A value of unsigned long type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { unsigned long a = 0; return a; /* W0339 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0340 @section W0340 @cindex W0340 @subsection Message body A value of unsigned long type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { unsigned long a = 0; return a; /* W0340 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0341 @section W0341 @cindex W0341 @subsection Message body A value of unsigned long type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { unsigned long a = 0; return a; /* W0341 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0342 @section W0342 @cindex W0342 @subsection Message body A value of signed long long type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { long long a = 0; return a; /* W0342 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0343 @section W0343 @cindex W0343 @subsection Message body A value of signed long long type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { long long a = 0; return a; /* W0343 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0344 @section W0344 @cindex W0344 @subsection Message body A value of signed long long type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { long long a = 0; return a; /* W0344 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0345 @section W0345 @cindex W0345 @subsection Message body A value of unsigned long long type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim float func(void) { unsigned long long a = 0; return a; /* W0345 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0346 @section W0346 @cindex W0346 @subsection Message body A value of unsigned long long type is returned from `double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim double func(void) { unsigned long long a = 0; return a; /* W0346 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0347} A value of unsigned long long type is returned from `long double %s()' function. @end itemize @subsection Since 1.0.0 @node W0347 @section W0347 @subsection Message body A value of unsigned long long type is returned from `long double %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long double func(void) { unsigned long long a = 0; return a; /* W0347 */ } @end verbatim @subsection Related message @itemize @item @ref{W0318} A value of unsigned char type is returned from `float %s()' function. @item @ref{W0319} A value of unsigned char type is returned from `double %s()' function. @item @ref{W0320} A value of unsigned char type is returned from `long double %s()' function. @item @ref{W0321} A value of signed char type is returned from `float %s()' function. @item @ref{W0322} A value of signed char type is returned from `double %s()' function. @item @ref{W0323} A value of signed char type is returned from `long double %s()' function. @item @ref{W0324} A value of signed short type is returned from `float %s()' function. @item @ref{W0325} A value of signed short type is returned from `double %s()' function. @item @ref{W0326} A value of signed short type is returned from `long double %s()' function. @item @ref{W0327} A value of unsigned short type is returned from `float %s()' function. @item @ref{W0328} A value of unsigned short type is returned from `double %s()' function. @item @ref{W0329} A value of unsigned short type is returned from `long double %s()' function. @item @ref{W0330} A value of signed int type is returned from `float %s()' function. @item @ref{W0331} A value of signed int type is returned from `double %s()' function. @item @ref{W0332} A value of signed int type is returned from `long double %s()' function. @item @ref{W0333} A value of unsigned int type is returned from `float %s()' function. @item @ref{W0334} A value of unsigned int type is returned from `double %s()' function. @item @ref{W0335} A value of unsigned int type is returned from `long double %s()' function. @item @ref{W0336} A value of signed long type is returned from `float %s()' function. @item @ref{W0337} A value of signed long type is returned from `double %s()' function. @item @ref{W0338} A value of signed long type is returned from `long double %s()' function. @item @ref{W0339} A value of unsigned long type is returned from `float %s()' function. @item @ref{W0340} A value of unsigned long type is returned from `double %s()' function. @item @ref{W0341} A value of unsigned long type is returned from `long double %s()' function. @item @ref{W0342} A value of signed long long type is returned from `float %s()' function. @item @ref{W0343} A value of signed long long type is returned from `double %s()' function. @item @ref{W0344} A value of signed long long type is returned from `long double %s()' function. @item @ref{W0345} A value of unsigned long long type is returned from `float %s()' function. @item @ref{W0346} A value of unsigned long long type is returned from `double %s()' function. @end itemize @subsection Since 1.0.0 @node W0348 @section W0348 @cindex W0348 @subsection Message body A value of float type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { float a = 0; return a; /* W0348 */ } @end verbatim @subsection Related message @itemize @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0349 @section W0349 @cindex W0349 @subsection Message body A value of float type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { float a = 0; return a; /* W0349 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0350 @section W0350 @cindex W0350 @subsection Message body A value of float type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { float a = 0; return a; /* W0350 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0351 @section W0351 @cindex W0351 @subsection Message body A value of float type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { float a = 0; return a; /* W0351 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0352 @section W0352 @cindex W0352 @subsection Message body A value of float type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { float a = 0; return a; /* W0352 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0353 @section W0353 @cindex W0353 @subsection Message body A value of float type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { float a = 0; return a; /* W0353 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0354 @section W0354 @cindex W0354 @subsection Message body A value of float type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { float a = 0; return a; /* W0354 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0355 @section W0355 @cindex W0355 @subsection Message body A value of float type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { float a = 0; return a; /* W0355 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0356 @section W0356 @cindex W0356 @subsection Message body A value of float type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { float a = 0; return a; /* W0356 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0357 @section W0357 @cindex W0357 @subsection Message body A value of double type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { double a = 0; return a; /* W0357 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0358 @section W0358 @cindex W0358 @subsection Message body A value of double type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { double a = 0; return a; /* W0358 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0359 @section W0359 @cindex W0359 @subsection Message body A value of double type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { double a = 0; return a; /* W0359 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0360 @section W0360 @cindex W0360 @subsection Message body A value of double type is returned from `short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { double a = 0; return a; /* W0360 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0361 @section W0361 @cindex W0361 @subsection Message body A value of double type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { double a = 0; return a; /* W0361 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0362 @section W0362 @cindex W0362 @subsection Message body A value of double type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { double a = 0; return a; /* W0362 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0363 @section W0363 @cindex W0363 @subsection Message body A value of double type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { double a = 0; return a; /* W0363 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0364 @section W0364 @cindex W0364 @subsection Message body A value of double type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { double a = 0; return a; /* W0364 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0365 @section W0365 @cindex W0365 @subsection Message body A value of double type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { double a = 0; return a; /* W0365 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0366 @section W0366 @cindex W0366 @subsection Message body A value of long double type is returned from `char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim char func(void) { long double a = 0; return a; /* W0366 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0367 @section W0367 @cindex W0367 @subsection Message body A value of long double type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { long double a = 0; return a; /* W0367 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0368 @section W0368 @cindex W0368 @subsection Message body A value of long double type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { long double a = 0; return a; /* W0368 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0369 @section W0369 @cindex W0369 @subsection Message body A value of long double type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { long double a = 0; return a; /* W0369 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0370 @section W0370 @cindex W0370 @subsection Message body A value of long double type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { long double a = 0; return a; /* W0370 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0371 @section W0371 @cindex W0371 @subsection Message body A value of long double type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { long double a = 0; return a; /* W0371 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0372 @section W0372 @cindex W0372 @subsection Message body A value of long double type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { long double a = 0; return a; /* W0372 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0373 @section W0373 @cindex W0373 @subsection Message body A value of long double type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { long double a = 0; return a; /* W0373 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0374 @section W0374 @cindex W0374 @subsection Message body A value of long double type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { long double a = 0; return a; /* W0374 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0375 @section W0375 @cindex W0375 @subsection Message body A value of float type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { float a = 0; return a; /* W0375 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0376 @section W0376 @cindex W0376 @subsection Message body A value of float type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { float a = 0; return a; /* W0376 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0377 @section W0377 @cindex W0377 @subsection Message body A value of double type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { double a = 0; return a; /* W0377 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0378 @section W0378 @cindex W0378 @subsection Message body A value of double type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { double a = 0; return a; /* W0378 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0379 @section W0379 @cindex W0379 @subsection Message body A value of long double type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { long double a = 0; return a; /* W0379 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0380} A value of long double type is returned from `unsigned long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0380 @section W0380 @cindex W0380 @subsection Message body A value of long double type is returned from `unsigned long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long long func(void) { long double a = 0; return a; /* W0380 */ } @end verbatim @subsection Related message @itemize @item @ref{W0348} A value of float type is returned from `char %s()' function. @item @ref{W0349} A value of float type is returned from `signed char %s()' function. @item @ref{W0350} A value of float type is returned from `unsigned char %s()' function. @item @ref{W0351} A value of float type is returned from `signed short %s()' function. @item @ref{W0352} A value of float type is returned from `unsigned short %s()' function. @item @ref{W0353} A value of float type is returned from `signed int %s()' function. @item @ref{W0354} A value of float type is returned from `unsigned int %s()' function. @item @ref{W0355} A value of float type is returned from `signed long %s()' function. @item @ref{W0356} A value of float type is returned from `unsigned long %s()' function. @item @ref{W0357} A value of double type is returned from `char %s()' function. @item @ref{W0358} A value of double type is returned from `signed char %s()' function. @item @ref{W0359} A value of double type is returned from `unsigned char %s()' function. @item @ref{W0360} A value of double type is returned from `signed short %s()' function. @item @ref{W0361} A value of double type is returned from `unsigned short %s()' function. @item @ref{W0362} A value of double type is returned from `signed int %s()' function. @item @ref{W0363} A value of double type is returned from `unsigned int %s()' function. @item @ref{W0364} A value of double type is returned from `signed long %s()' function. @item @ref{W0365} A value of double type is returned from `unsigned long %s()' function. @item @ref{W0366} A value of long double type is returned from `char %s()' function. @item @ref{W0367} A value of long double type is returned from `signed char %s()' function. @item @ref{W0368} A value of long double type is returned from `unsigned char %s()' function. @item @ref{W0369} A value of long double type is returned from `signed short %s()' function. @item @ref{W0370} A value of long double type is returned from `unsigned short %s()' function. @item @ref{W0371} A value of long double type is returned from `signed int %s()' function. @item @ref{W0372} A value of long double type is returned from `unsigned int %s()' function. @item @ref{W0373} A value of long double type is returned from `signed long %s()' function. @item @ref{W0374} A value of long double type is returned from `unsigned long %s()' function. @item @ref{W0375} A value of float type is returned from `signed long long %s()' function. @item @ref{W0376} A value of float type is returned from `unsigned long long %s()' function. @item @ref{W0377} A value of double type is returned from `signed long long %s()' function. @item @ref{W0378} A value of double type is returned from `unsigned long long %s()' function. @item @ref{W0379} A value of long double type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0381 @section W0381 @cindex W0381 @subsection Message body A value of signed short type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { short a = 0; return a; /* W0381 */ } @end verbatim @subsection Related message @itemize @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0382 @section W0382 @cindex W0382 @subsection Message body A value of unsigned short type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { unsigned short a = 0; return a; /* W0382 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0383 @section W0383 @cindex W0383 @subsection Message body A value of signed int type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { int a = 0; return a; /* W0383 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0384 @section W0384 @cindex W0384 @subsection Message body A value of signed int type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { int a = 0; return a; /* W0384 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0385 @section W0385 @cindex W0385 @subsection Message body A value of unsigned int type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { unsigned int a = 0; return a; /* W0385 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0386 @section W0386 @cindex W0386 @subsection Message body A value of unsigned int type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { unsigned int a = 0; return a; /* W0386 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0387 @section W0387 @cindex W0387 @subsection Message body A value of signed long type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { long a = 0; return a; /* W0387 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0388 @section W0388 @cindex W0388 @subsection Message body A value of signed long type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { long a = 0; return a; /* W0388 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0389 @section W0389 @cindex W0389 @subsection Message body A value of signed long type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { long a = 0; return a; /* W0389 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0390 @section W0390 @cindex W0390 @subsection Message body A value of unsigned long type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { unsigned long a = 0; return a; /* W0390 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0391 @section W0391 @cindex W0391 @subsection Message body A value of unsigned long type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { unsigned long a = 0; return a; /* W0391 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0392 @section W0392 @cindex W0392 @subsection Message body A value of unsigned long type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { unsigned long a = 0; return a; /* W0392 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0393 @section W0393 @cindex W0393 @subsection Message body A value of signed long long type is returned from `signed char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim signed char func(void) { long long a = 0; return a; /* W0393 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0394 @section W0394 @cindex W0394 @subsection Message body A value of signed long long type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { long long a = 0; return a; /* W0394 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0395 @section W0395 @cindex W0395 @subsection Message body A value of signed long long type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { long long a = 0; return a; /* W0395 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0396 @section W0396 @cindex W0396 @subsection Message body A value of signed long long type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { long long a = 0; return a; /* W0396 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0397 @section W0397 @cindex W0397 @subsection Message body A value of unsigned long long type is returned from `unsigned char %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned char func(void) { unsigned long long a = 0; return a; /* W0397 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0398 @section W0398 @cindex W0398 @subsection Message body A value of unsigned long long type is returned from `unsigned short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned short func(void) { unsigned long long a = 0; return a; /* W0398 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0399 @section W0399 @cindex W0399 @subsection Message body A value of unsigned long long type is returned from `unsigned int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(void) { unsigned long long a = 0; return a; /* W0399 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0400} A value of unsigned long long type is returned from `unsigned long %s()' function. @end itemize @subsection Since 1.0.0 @node W0400 @section W0400 @cindex W0400 @subsection Message body A value of unsigned long long type is returned from `unsigned long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim unsigned long func(void) { unsigned long long a = 0; return a; /* W0400 */ } @end verbatim @subsection Related message @itemize @item @ref{W0381} A value of signed short type is returned from `signed char %s()' function. @item @ref{W0382} A value of unsigned short type is returned from `unsigned char %s()' function. @item @ref{W0383} A value of signed int type is returned from `signed char %s()' function. @item @ref{W0384} A value of signed int type is returned from `signed short %s()' function. @item @ref{W0385} A value of unsigned int type is returned from `unsigned char %s()' function. @item @ref{W0386} A value of unsigned int type is returned from `unsigned short %s()' function. @item @ref{W0387} A value of signed long type is returned from `signed char %s()' function. @item @ref{W0388} A value of signed long type is returned from `signed short %s()' function. @item @ref{W0389} A value of signed long type is returned from `signed int %s()' function. @item @ref{W0390} A value of unsigned long type is returned from `unsigned char %s()' function. @item @ref{W0391} A value of unsigned long type is returned from `unsigned short %s()' function. @item @ref{W0392} A value of unsigned long type is returned from `unsigned int %s()' function. @item @ref{W0393} A value of signed long long type is returned from `signed char %s()' function. @item @ref{W0394} A value of signed long long type is returned from `signed short %s()' function. @item @ref{W0395} A value of signed long long type is returned from `signed int %s()' function. @item @ref{W0396} A value of signed long long type is returned from `signed long %s()' function. @item @ref{W0397} A value of unsigned long long type is returned from `unsigned char %s()' function. @item @ref{W0398} A value of unsigned long long type is returned from `unsigned short %s()' function. @item @ref{W0399} A value of unsigned long long type is returned from `unsigned int %s()' function. @end itemize @subsection Since 1.0.0 @node W0401 @section W0401 @cindex W0401 @subsection Message body A value of unsigned char type is returned from `signed short %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim short func(void) { unsigned char a = 0; return a; /* W0401 */ } @end verbatim @subsection Related message @itemize @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0402 @section W0402 @cindex W0402 @subsection Message body A value of unsigned char type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { unsigned char a = 0; return a; /* W0402 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0403 @section W0403 @cindex W0403 @subsection Message body A value of unsigned char type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { unsigned char a = 0; return a; /* W0403 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0404 @section W0404 @cindex W0404 @subsection Message body A value of unsigned short type is returned from `signed int %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { unsigned short a = 0; return a; /* W0404 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0405 @section W0405 @cindex W0405 @subsection Message body A value of unsigned short type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { unsigned short a = 0; return a; /* W0405 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0406 @section W0406 @cindex W0406 @subsection Message body A value of unsigned int type is returned from `signed long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long func(void) { unsigned int a = 0; return a; /* W0406 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0407 @section W0407 @cindex W0407 @subsection Message body A value of unsigned char type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { unsigned char a = 0; return a; /* W0407 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0408 @section W0408 @cindex W0408 @subsection Message body A value of unsigned short type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { unsigned short a = 0; return a; /* W0408 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0409 @section W0409 @cindex W0409 @subsection Message body A value of unsigned int type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { unsigned int a = 0; return a; /* W0409 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0410} A value of unsigned long type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0410 @section W0410 @cindex W0410 @subsection Message body A value of unsigned long type is returned from `signed long long %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim long long func(void) { unsigned long a = 0; return a; /* W0410 */ } @end verbatim @subsection Related message @itemize @item @ref{W0401} A value of unsigned char type is returned from `signed short %s()' function. @item @ref{W0402} A value of unsigned char type is returned from `signed int %s()' function. @item @ref{W0403} A value of unsigned char type is returned from `signed long %s()' function. @item @ref{W0404} A value of unsigned short type is returned from `signed int %s()' function. @item @ref{W0405} A value of unsigned short type is returned from `signed long %s()' function. @item @ref{W0406} A value of unsigned int type is returned from `signed long %s()' function. @item @ref{W0407} A value of unsigned char type is returned from `signed long long %s()' function. @item @ref{W0408} A value of unsigned short type is returned from `signed long long %s()' function. @item @ref{W0409} A value of unsigned int type is returned from `signed long long %s()' function. @end itemize @subsection Since 1.0.0 @node W0411 @section W0411 @cindex W0411 @subsection Message body The initialization of enumeration should be only the starting, whole or not at all. @subsection Content Under construction. @subsection Sample code @verbatim enum SEASON1 { /* W0411 */ SPRING, SUMMER = 4, AUTUMN = 8, WINTER }; enum SEASON2 { /* OK */ SPRING, SUMMER, AUTUMN, WINTER }; enum SEASON3 { /* OK */ SPRING = 0, SUMMER = 1, AUTUMN = 2, WINTER = 3 }; enum SEASON4 { /* OK */ SPRING = 1, SUMMER, AUTUMN, WINTER }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0413 @section W0413 @cindex W0413 @subsection Message body The body of control statement is unenclosed by curly brace `@{@}' block. @subsection Content Under construction. @subsection Sample code @verbatim if (x > 0) x++; /* W0413 */ @end verbatim @subsection Related message @itemize @item @ref{W0414} Body of the controlling statement in a line is not enclosed by `@{@}'. @end itemize @subsection Since 1.0.0 @node W0414 @section W0414 @cindex W0414 @subsection Message body Body of the controlling statement in a line is not enclosed by `@{@}'. @subsection Content Under construction. @subsection Sample code @verbatim if (x > 0) x++; /* W0414 */ @end verbatim @subsection Related message @itemize @item @ref{W0413} The body of control statement is unenclosed by curly brace `@{@}' block. @end itemize @subsection Since 1.0.0 @node W0421 @section W0421 @cindex W0421 @subsection Message body Value of the dereferencing pointer must be NULL. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int *p) { int b; if (p) { b = *p; /* OK */ } else { b = *p; /* W0421 */ } } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1004} NULL value is assigned to the the problematic variable. @item @ref{C1005} A value possibly be NULL is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0422 @section W0422 @cindex W0422 @subsection Message body Value of the dereferencing pointer may be NULL. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int *p) { int b; if (p) { b = *p; /* OK */ } b = *p; /* W0422 */ } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1004} NULL value is assigned to the the problematic variable. @item @ref{C1005} A value possibly be NULL is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0423 @section W0423 @cindex W0423 @subsection Message body Arithmetic operation is being made to the pointer which its value will be NULL. @subsection Content Under construction. @subsection Sample code @verbatim int *func(int *p) { if (p) { return p + 1; /* OK */ } else { return p + 1; /* W0423 */ } } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1004} NULL value is assigned to the the problematic variable. @item @ref{C1005} A value possibly be NULL is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0424 @section W0424 @cindex W0424 @subsection Message body Arithmetic operation is being made to the pointer which its value might be NULL. @subsection Content Under construction. @subsection Sample code @verbatim int *func(int *p) { int a; if (p) { a = *(p + 1); /* OK */ } return p + 1; /* W0424 */ } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1004} NULL value is assigned to the the problematic variable. @item @ref{C1005} A value possibly be NULL is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0425 @section W0425 @cindex W0425 @subsection Message body There are several definitions or statements in a line. @subsection Content Under construction. @subsection Sample code @verbatim int a, b; /* W0425 */ int a; int b; /* W0425 */ struct C { int i; } c = { 0 }; c.i = a; /* W0425 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0431 @section W0431 @cindex W0431 @subsection Message body This line begins at more left than previous lines of the same indentation level. @subsection Content Under construction. @subsection Sample code @verbatim void func() { int a; int b; /* W0431 */ a = var(); } @end verbatim @subsection Related message @itemize @item @ref{W0432} Indentation of this line does not comply with the project's indent style. @end itemize @subsection Since 1.0.0 @node W0432 @section W0432 @cindex W0432 @subsection Message body Indentation of this line does not comply with the project's indent style. @subsection Content Under construction. @subsection Sample code @verbatim void func() { int a; int b; /* W0432 */ a = var(); } @end verbatim @subsection Related message @itemize @item @ref{W0431} This line begins at more left than previous lines of the same indentation level. @end itemize @subsection Since 1.0.0 @node W0440 @section W0440 @cindex W0440 @subsection Message body An indent of this close bracket `@}' is not correspond to the open bracket `@{'. @subsection Content Under construction. @subsection Sample code @verbatim void func() { if (x == 0) { if (y == 0) { ...snip... } /* W0440 */ } /* W0440 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0441 @section W0441 @cindex W0441 @subsection Message body The type of integer literal which doesn't have a suffix is not int type. @subsection Content Under construction. @subsection Sample code @verbatim int i = 0x1234; /* W0441 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0442 @section W0442 @cindex W0442 @subsection Message body A function-like macro is defined. @subsection Content Under construction. @subsection Sample code @verbatim #define MAX(a, b) (a < b ? b : a) /* W0442 */ @end verbatim @subsection Related message @itemize @item @ref{W0443} This function-like macro might be replaced with a function. @end itemize @subsection Since 1.0.0 @node W0443 @section W0443 @cindex W0443 @subsection Message body This function-like macro might be replaced with a function. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO(a, b) (a * b) /* W0443 */ @end verbatim @subsection Related message @itemize @item @ref{W0442} A function-like macro is defined. @end itemize @subsection Since 1.0.0 @node W0444 @section W0444 @cindex W0444 @subsection Message body `#'operator and `##'operator is used in a macro definition. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO(a) L ## #a /* W0444 */ @end verbatim @subsection Related message @itemize @item @ref{W0445} Multiple `##'operator is used in a macro definition. @end itemize @subsection Since 1.0.0 @node W0445 @section W0445 @cindex W0445 @subsection Message body Multiple `##'operator is used in a macro definition. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO(prefix, name, suffix) int i = prefix##name##suffix /* W0445 */ @end verbatim @subsection Related message @itemize @item @ref{W0444} `#'operator and `##'operator is used in a macro definition. @end itemize @subsection Since 1.0.0 @node W0446 @section W0446 @cindex W0446 @subsection Message body The result value of assignment operation is used. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; int b; a = b += 3; /* W0446 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0447 @section W0447 @cindex W0447 @subsection Message body A comma operator is used except 'for' statement. @subsection Content Under construction. @subsection Sample code @verbatim int a = 1; int b = 0; int c = (b = a, a); /* W0447 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0456 @section W0456 @cindex W0456 @subsection Message body An object or a function `%s which has external coupling is defined in a header file. @subsection Content Under construction. @subsection Sample code @file{test.h} @verbatim int num = 1; /* W0456 */ int func(void) /* W0456 */ { return num; } @end verbatim @file{test.c} @verbatim #include "test.h" @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0457 @section W0457 @cindex W0457 @subsection Message body The return value doesn't define explicitly in the function declaration or definition. It defined as 'int' implicitly. @subsection Content Under construction. @subsection Sample code @verbatim func1(void); /* W0457 */ func2(void) /* W0457 */ { return 0; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0458 @section W0458 @cindex W0458 @subsection Message body The type doesn't define explicitly in the object declaration or definition. It defined as 'int' implicitly. @subsection Content Under construction. @subsection Sample code @verbatim a; /* W0458 */ b = 0; /* W0458 */ extern c; /* W0458 */ static d; /* W0458 */ int func(e) /* W0458 */ { const f = e; /* W0458 */ return f; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0459 @section W0459 @cindex W0459 @subsection Message body A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. @subsection Content Under construction. @subsection Sample code @verbatim int a; if(a > 0) { /* W0459 */ } @end verbatim @subsection Related message @itemize @item @ref{W0460} A value of variable `%s' wouldn't set when this expression is evaluated. @item @ref{W0461} A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. @item @ref{W0462} A pointer which the value will probably not set is used for the actual argument of the function. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1003} The problematic variable is defined here without initializer. @end itemize @subsection Since 1.0.0 @node W0460 @section W0460 @cindex W0460 @subsection Message body A value of variable `%s' wouldn't set when this expression is evaluated. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { int b; if (a == 0) { b = 1; } if (b > 0) { /* W0460 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0459} A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. @item @ref{W0461} A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. @item @ref{W0462} A pointer which the value will probably not set is used for the actual argument of the function. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1003} The problematic variable is defined here without initializer. @end itemize @subsection Since 1.0.0 @node W0461 @section W0461 @subsection Message body A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. @subsection Content Under construction. @subsection Sample code @verbatim extern int func1(const int *); void func2(int a) { int b; func1(&a); /* OK */ func1(&b); /* W0461 */ } @end verbatim @subsection Related message @itemize @item @ref{W0459} A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. @item @ref{W0460} A value of variable `%s' wouldn't set when this expression is evaluated. @item @ref{W0462} A pointer which the value will probably not set is used for the actual argument of the function. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1003} The problematic variable is defined here without initializer. @end itemize @subsection Since 1.0.0 @node W0462 @section W0462 @cindex W0462 @subsection Message body A pointer which the value will probably not set is used for the actual argument of the function. @subsection Content Under construction. @subsection Sample code @verbatim extern int func1(const int *); int func2(int a) { int b; if (a > 10) { b = a + 10; } func1(&b); /* W0462 */ } @end verbatim @subsection Related message @itemize @item @ref{W0459} A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. @item @ref{W0460} A value of variable `%s' wouldn't set when this expression is evaluated. @item @ref{W0461} A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1003} The problematic variable is defined here without initializer. @end itemize @subsection Since 1.0.0 @node W0477 @section W0477 @cindex W0477 @subsection Message body There are unpaired `[]',`()',`@{@}' in macro definition. @subsection Content Under construction. @subsection Sample code @verbatim #define BEGIN { /* W0477 */ #define END } /* W0477 */ void func() BEGIN ...snip... END @end verbatim @subsection Related message @itemize @item @ref{W0478} This macro defines scraps of unrecognized codes. @item @ref{W0479} This macro definition might be replaced with 'typedef' declaration. @item @ref{W0480} This macro defines keyword of control statement or punctuator. @item @ref{W0481} This macro defines the block around by `@{@}'. @item @ref{W0482} This macro defines either type specifier. @item @ref{W0483} This macro defines the pair of storage class specifier and type specifier. @end itemize @subsection Since 1.0.0 @node W0478 @section W0478 @cindex W0478 @subsection Message body This macro defines scraps of unrecognized codes. @subsection Content Under construction. @subsection Sample code @verbatim #define MALLOC_OR_DIE(ptr, size) ptr = malloc(size); if (!ptr) exit(1); /* W0478 */ @end verbatim @subsection Related message @itemize @item @ref{W0477} There are unpaired `[]',`()',`@{@}' in macro definition. @item @ref{W0479} This macro definition might be replaced with 'typedef' declaration. @item @ref{W0480} This macro defines keyword of control statement or punctuator. @item @ref{W0481} This macro defines the block around by `@{@}'. @item @ref{W0482} This macro defines either type specifier. @item @ref{W0483} This macro defines the pair of storage class specifier and type specifier. @end itemize @subsection Since 1.0.0 @node W0479 @section W0479 @cindex W0479 @subsection Message body This macro definition might be replaced with 'typedef' declaration. @subsection Content Under construction. @subsection Sample code @verbatim #define foo unsigned int /* W0479 */ @end verbatim @subsection Related message @itemize @item @ref{W0477} There are unpaired `[]',`()',`@{@}' in macro definition. @item @ref{W0478} This macro defines scraps of unrecognized codes. @item @ref{W0480} This macro defines keyword of control statement or punctuator. @item @ref{W0481} This macro defines the block around by `@{@}'. @item @ref{W0482} This macro defines either type specifier. @item @ref{W0483} This macro defines the pair of storage class specifier and type specifier. @end itemize @subsection Since 1.0.0 @node W0480 @section W0480 @cindex W0480 @subsection Message body This macro defines keyword of control statement or punctuator. @subsection Content Under construction. @subsection Sample code @verbatim #define PLUS + /* W0480 */ #define LOOP while /* W0480 */ @end verbatim @subsection Related message @itemize @item @ref{W0477} There are unpaired `[]',`()',`@{@}' in macro definition. @item @ref{W0478} This macro defines scraps of unrecognized codes. @item @ref{W0479} This macro definition might be replaced with 'typedef' declaration. @item @ref{W0481} This macro defines the block around by `@{@}'. @item @ref{W0482} This macro defines either type specifier. @item @ref{W0483} This macro defines the pair of storage class specifier and type specifier. @end itemize @subsection Since 1.0.0 @node W0481 @section W0481 @cindex W0481 @subsection Message body This macro defines the block around by `@{@}'. @subsection Content Under construction. @subsection Sample code @verbatim #define SETUP(a, b) /* W0481 */ \ { \ if (a) \ b = 0; \ else \ b = 1; \ } @end verbatim @subsection Related message @itemize @item @ref{W0477} There are unpaired `[]',`()',`@{@}' in macro definition. @item @ref{W0478} This macro defines scraps of unrecognized codes. @item @ref{W0479} This macro definition might be replaced with 'typedef' declaration. @item @ref{W0480} This macro defines keyword of control statement or punctuator. @item @ref{W0482} This macro defines either type specifier. @item @ref{W0483} This macro defines the pair of storage class specifier and type specifier. @end itemize @subsection Since 1.0.0 @node W0482 @section W0482 @cindex W0482 @subsection Message body This macro defines either type specifier. @subsection Content Under construction. @subsection Sample code @verbatim #define COMPOSITE struct /* W0482 */ @end verbatim @subsection Related message @itemize @item @ref{W0477} There are unpaired `[]',`()',`@{@}' in macro definition. @item @ref{W0478} This macro defines scraps of unrecognized codes. @item @ref{W0479} This macro definition might be replaced with 'typedef' declaration. @item @ref{W0480} This macro defines keyword of control statement or punctuator. @item @ref{W0481} This macro defines the block around by `@{@}'. @item @ref{W0483} This macro defines the pair of storage class specifier and type specifier. @end itemize @subsection Since 1.0.0 @node W0483 @section W0483 @cindex W0483 @subsection Message body This macro defines the pair of storage class specifier and type specifier. @subsection Content Under construction. @subsection Sample code @verbatim #define PRIVATE_FINAL static const /* W0483 */ @end verbatim @subsection Related message @itemize @item @ref{W0477} There are unpaired `[]',`()',`@{@}' in macro definition. @item @ref{W0478} This macro defines scraps of unrecognized codes. @item @ref{W0479} This macro definition might be replaced with 'typedef' declaration. @item @ref{W0480} This macro defines keyword of control statement or punctuator. @item @ref{W0481} This macro defines the block around by `@{@}'. @item @ref{W0482} This macro defines either type specifier. @end itemize @subsection Since 1.0.0 @node W0488 @section W0488 @cindex W0488 @subsection Message body A function call `()', array's index operation `[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim while (func(&a, &b) < 0 && i > 0) { /* W0488 */ ...snip... } @end verbatim @subsection Related message @itemize @item @ref{W0489} A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'. @item @ref{W0490} A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'. @end itemize @subsection Since 1.0.0 @node W0489 @section W0489 @cindex W0489 @subsection Message body A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int a, unsigned int b) { unsigned int c = !a && b; /* W0489 */ } @end verbatim @subsection Related message @itemize @item @ref{W0488} A function call `()', array's index operation `[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'. @item @ref{W0490} A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'. @end itemize @subsection Since 1.0.0 @node W0490 @section W0490 @cindex W0490 @subsection Message body A binary operator is used with `&&' or `||'. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int a, unsigned int b, unsigned int c) { unsigned int d = a && b || c; /* W0490 */ } @end verbatim @subsection Related message @itemize @item @ref{W0488} A function call `()', array's index operation `[]', or structure/union operation `->' or `.' are used with && or ||. It had better clear the coupling by using `()'. @item @ref{W0489} A monadic operator is used with `&&' or `||'. It had better clear the coupling by using `()'. @end itemize @subsection Since 1.0.0 @node W0491 @section W0491 @cindex W0491 @subsection Message body The same identifier name `%s' is also used in the declaration of other namespace. @subsection Content Under construction. @subsection Sample code @verbatim extern int foo; struct foo { /* W0491 */ int a; int b; }; @end verbatim @subsection Related message @itemize @item @ref{W0492} The same identifier name `%s' is also used in the member of structure/union, label, tag or normal identifier. @end itemize @subsection Since 1.0.0 @node W0492 @section W0492 @cindex W0492 @subsection Message body The same identifier name `%s' is also used in the member of structure/union, label, tag or normal identifier. @subsection Content Under construction. @subsection Sample code @verbatim extern int foo; struct a { int foo; /* W0492 */ int b; }; void func(void) { struct a a; int b; /* W0492 */ } @end verbatim @subsection Related message @itemize @item @ref{W0491} The same identifier name `%s' is also used in the declaration of other namespace. @end itemize @subsection Since 1.0.0 @node W0493 @section W0493 @cindex W0493 @subsection Message body The value of structure or union is passed as the actual argument of the function. @subsection Content Under construction. @subsection Sample code @verbatim struct STR { long a; long b; }; extern int foo(struct STR s); void func(void) { struct STR s = { 0 }; foo(s); /* W0493 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0495 @section W0495 @cindex W0495 @subsection Message body operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { int x = a % b * c; /* W0495 */ } @end verbatim @subsection Related message @itemize @item @ref{W0496} A ternary operator is used several times. It had better clear the coupling by using `()'. @item @ref{W0497} Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @item @ref{W0498} The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0499} The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0500} The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0501} A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @item @ref{W0502} A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @end itemize @subsection Since 1.0.0 @node W0496 @section W0496 @cindex W0496 @subsection Message body A ternary operator is used several times. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c, int d, int e) { int f = a ? b : c ? d : e; /* W0496 */ } @end verbatim @subsection Related message @itemize @item @ref{W0495} operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @item @ref{W0497} Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @item @ref{W0498} The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0499} The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0500} The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0501} A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @item @ref{W0502} A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @end itemize @subsection Since 1.0.0 @node W0497 @section W0497 @cindex W0497 @subsection Message body Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { int d = a << b << c; /* W0497 */ } @end verbatim @subsection Related message @itemize @item @ref{W0495} operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @item @ref{W0496} A ternary operator is used several times. It had better clear the coupling by using `()'. @item @ref{W0498} The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0499} The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0500} The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0501} A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @item @ref{W0502} A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @end itemize @subsection Since 1.0.0 @node W0498 @section W0498 @cindex W0498 @subsection Message body The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { int d = a - b + c; /* W0498 */ } @end verbatim @subsection Related message @itemize @item @ref{W0495} operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @item @ref{W0496} A ternary operator is used several times. It had better clear the coupling by using `()'. @item @ref{W0497} Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @item @ref{W0499} The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0500} The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0501} A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @item @ref{W0502} A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @end itemize @subsection Since 1.0.0 @node W0499 @section W0499 @cindex W0499 @subsection Message body The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { int d = a << b >> c; /* W0499 */ } @end verbatim @subsection Related message @itemize @item @ref{W0495} operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @item @ref{W0496} A ternary operator is used several times. It had better clear the coupling by using `()'. @item @ref{W0497} Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @item @ref{W0498} The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0500} The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0501} A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @item @ref{W0502} A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @end itemize @subsection Since 1.0.0 @node W0500 @section W0500 @cindex W0500 @subsection Message body The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { int d = a * b + c; /* W0500 */ } @end verbatim @subsection Related message @itemize @item @ref{W0495} operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @item @ref{W0496} A ternary operator is used several times. It had better clear the coupling by using `()'. @item @ref{W0497} Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @item @ref{W0498} The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0499} The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0501} A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @item @ref{W0502} A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @end itemize @subsection Since 1.0.0 @node W0501 @section W0501 @cindex W0501 @subsection Message body A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { int d = a ? a : a + c; /* W0501 */ } @end verbatim @subsection Related message @itemize @item @ref{W0495} operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @item @ref{W0496} A ternary operator is used several times. It had better clear the coupling by using `()'. @item @ref{W0497} Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @item @ref{W0498} The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0499} The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0500} The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0502} A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @end itemize @subsection Since 1.0.0 @node W0502 @section W0502 @cindex W0502 @subsection Message body A binary operator other than `+', `-', `*', `/' and `%%' appears with binary operator which has different precedence without expression grouping. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { int d = a != b << c; /* W0502 */ } @end verbatim @subsection Related message @itemize @item @ref{W0495} operator%% is used with other arithmetic operator. It had better clear the coupling by using `()'. @item @ref{W0496} A ternary operator is used several times. It had better clear the coupling by using `()'. @item @ref{W0497} Shift operator, relational operator or equivalent operator is used in several times. It had better clear the coupling by using `()'. @item @ref{W0498} The different operator of same priority in the binary operator '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0499} The different operator of same priority in the binary operator except '+','-', '*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0500} The operator of different priority in the binary operator '+','-','*','/' is used. It had better clear the coupling by using `()'. @item @ref{W0501} A ternary operator is used with binary operator. It had better clear the coupling by using `()'. @end itemize @subsection Since 1.0.0 @node W0508 @section W0508 @cindex W0508 @subsection Message body There's a side effect at the right operand of `&&' or `||'operator. @subsection Content Under construction. @subsection Sample code @verbatim if ((a == b) && ((c = func()) == d)) /* W0508 */ @end verbatim if @code{a==b} is true, the return value of @code{func()} is substituted for the @code{c}. @subsection Related message None. @subsection Since 1.0.0 @node W0511 @section W0511 @cindex W0511 @subsection Message body C++ style comment of `//' is used. @subsection Content Under construction. @subsection Sample code @verbatim // W0511 @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0512 @section W0512 @cindex W0512 @subsection Message body The result of `++' or `--' operator is used in the statement. @subsection Content Under construction. @subsection Sample code @verbatim a = b++ + --c + d++; /* W0512 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0525 @section W0525 @cindex W0525 @subsection Message body A field named 1bit is declared by signed type. @subsection Content Under construction. @subsection Sample code @verbatim struct ST { int bit:1; /* W0525 */ }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0528 @section W0528 @cindex W0528 @subsection Message body This macro defines octal constant value. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO 0123 /* W0528 */ @end verbatim @subsection Related message @itemize @item @ref{W0529} An octal literal is used. @item @ref{W0530} An octal escape sequence is used in a character constant or a string literal. @end itemize @subsection Since 1.0.0 @node W0529 @section W0529 @cindex W0529 @subsection Message body An octal literal is used. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO 0123 int a = 0123; /* W0529 */ int b = MACRO; /* W0529 */ @end verbatim @subsection Related message @itemize @item @ref{W0528} This macro defines octal constant value. @item @ref{W0530} An octal escape sequence is used in a character constant or a string literal. @end itemize @subsection Since 1.0.0 @node W0530 @section W0530 @cindex W0530 @subsection Message body An octal escape sequence is used in a character constant or a string literal. @subsection Content Under construction. @subsection Sample code @verbatim char *s = "\012"; /* W0530 */ @end verbatim @subsection Related message @itemize @item @ref{W0528} This macro defines octal constant value. @item @ref{W0529} An octal literal is used. @end itemize @subsection Since 1.0.0 @node W0532 @section W0532 @cindex W0532 @subsection Message body 'break' statement is used to exits 'case' or 'default' section, but it's not described at the end of 'case' section. @subsection Content Under construction. @subsection Sample code @verbatim switch (x) { case 1: if (y == 0) { break; /* W0532 */ } ...snip... break; case 2: ...snip... break; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0534 @section W0534 @cindex W0534 @subsection Message body A control variable `%s' is not initialized in this 'for' statement. @subsection Content Under construction. @subsection Sample code @verbatim int i = 0; int j; for (; i < 10; i++) { /* W0534 */ } for (j = 0; i < 20; i++) { /* W0534 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0535 @section W0535 @cindex W0535 @subsection Message body A comma operator is used in a 'for' statement. @subsection Content Under construction. @subsection Sample code @verbatim int i, j, k = 0; for (i = 0, j = 0; i < 10; i++, j++, k--) { /* W0535 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0538 @section W0538 @cindex W0538 @subsection Message body This 'default' label is not final label in this 'switch' statement. @subsection Content Under construction. @subsection Sample code @verbatim switch (x) { default: /* W0538 */ ...snip... case 1: ...snip... } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0540 @section W0540 @cindex W0540 @subsection Message body A function which the blank formal argument list is declared. `void' is omitted. @subsection Content Under construction. @subsection Sample code @verbatim void func() /* W0540 */ { ...snip... } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0541 @section W0541 @cindex W0541 @subsection Message body Inline assembly code should be encapsulated by macro. @subsection Content Under construction. @subsection Sample code @verbatim #define ASM_CODE asm("movl %ecx, %eax") void foo(int arg1, int *arg2, int arg3) { asm("movl %ecx, %eax"); /* W0541 */ __asm__("movl %ecx, (%eax)"); /* W0541 */ asm { /* W0541 */ xorl eax, eax } ASM_CODE; /* OK */ __asm__ volatile ( /* W0541 */ "int $0x80" : "=a" (r) "+b" (arg1), "+c" (arg2), "+d" (arg3) : "a" (128) : "memory", "cc"); } @end verbatim @subsection Related message None. @subsection Since 1.6.0 @node W0542 @section W0542 @cindex W0542 @subsection Message body There are identifiers in the part of formal argument in a function declaration. @subsection Content Under construction. @subsection Sample code @verbatim void func(int i, char, int, char c); /* W0542 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0543 @section W0543 @cindex W0543 @subsection Message body The identifier of formal argument in this function declaration is different from the past declaration of it. @subsection Content Under construction. @subsection Sample code @verbatim void func(int i1, int i2); void func(int i2, int i1) /* W0543 */ { ...snip... } @end verbatim @subsection Related message @itemize @item @ref{W0544} The identifier of formal argument in the function declaration is different from the declaration of function pointer. @end itemize @subsection Since 1.0.0 @node W0544 @section W0544 @cindex W0544 @subsection Message body The identifier of formal argument in the function declaration is different from the declaration of function pointer. @subsection Content Under construction. @subsection Sample code @verbatim void func(int i1, int i2); void (*p)(int i2, int i1) = &func; /* W0544 */ @end verbatim @subsection Related message @itemize @item @ref{W0543} The identifier of formal argument in this function declaration is different from the past declaration of it. @end itemize @subsection Since 1.0.0 @node W0546 @section W0546 @cindex W0546 @subsection Message body There is 'case' or 'default' label of switch statement in a nested block. @subsection Content Under construction. @subsection Sample code @verbatim switch (x) { case 1: if (y > 0) { case 2: /* W0546 */ break; } ...snip... break; default: ...snip... } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0549 @section W0549 @cindex W0549 @subsection Message body A formal argument of macro doesn't enclosed by `()'. @subsection Content Under construction. @subsection Sample code @verbatim #define ADD(a, b) a + b /* W0549 */ int x = 3 * ADD(1, 2); @end verbatim @code{(3 * 1) + 2 = 5} is substituted for the @code{x} instead of @code{3 * (1 + 2) = 9}. @subsection Related message None. @subsection Since 1.0.0 @node W0551 @section W0551 @cindex W0551 @subsection Message body An union type specifier is defined. @subsection Content Under construction. @subsection Sample code @verbatim union UNI { /* W0551 */ int a; short b; long c; }; @end verbatim @subsection Related message @itemize @item @ref{W0552} An union type object is defined. @end itemize @subsection Since 1.0.0 @node W0552 @section W0552 @cindex W0552 @subsection Message body An union type object is defined. @subsection Content Under construction. @subsection Sample code @verbatim union UNI { int a; short b; long c; }; union UNI u; /* W0552 */ @end verbatim @subsection Related message @itemize @item @ref{W0551} An union type specifier is defined. @end itemize @subsection Since 1.0.0 @node W0553 @section W0553 @cindex W0553 @subsection Message body A pointer points to the function cast to other function pointer type. @subsection Content Under construction. @subsection Sample code @verbatim extern int func(void); void (*p)(int) = (void (*)(int)) &func; /* W0553 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0554 @section W0554 @cindex W0554 @subsection Message body An actual argument `%s' in `#pragma' is unrecognized. This `#pragma' command will be ignored. @subsection Content Under construction. @subsection Sample code @verbatim #pragma SystemSpecificPragmaName 5 /* W0544 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0555 @section W0555 @cindex W0555 @subsection Message body This function is called recursive with indirectly. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim int func1(int i) /* W0555 */ { if (i < 10) { return i + 1; } else { return func3(i); } } @end verbatim @file{test2.c} @verbatim int func2(int i) /* W0555 */ { return func1(i) + 2; } @end verbatim @file{test3.c} @verbatim int func3(int i) /* W0555 */ { return func2(i) + 3; } @end verbatim @subsection Related message @itemize @item @ref{W0556} The function which includes this call is called recursively. @end itemize @subsection Since 1.0.0 @node W0556 @section W0556 @cindex W0556 @subsection Message body The function which includes this call is called recursively. @subsection Content Under construction. @subsection Sample code @verbatim int func(int i) { if (i == 0) { return 0; } else { return func(i - 1); /* W0556 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0555} This function is called recursive with indirectly. @end itemize @subsection Since 1.0.0 @node W0559 @section W0559 @cindex W0559 @subsection Message body The operand of `!' operator is the expression of bit operation or arithmetic operation. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b) { if (!(a || b)) { return 0; } else { return !(a & b); /* W0559 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0559} The operand of `!' operator is the expression of bit operation or arithmetic operation. @end itemize @subsection Since 1.0.0 @node W0560 @section W0560 @cindex W0560 @subsection Message body The operand of `~' operator is boolean type expression. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b) { return ~((a < b) && (b > 0)); /* W0560 */ } @end verbatim @subsection Related message @itemize @item @ref{W0560} The operand of `~' operator is boolean type expression. @end itemize @subsection Since 1.0.0 @node W0561 @section W0561 @cindex W0561 @subsection Message body The meaning of `*p++' is `*(p++)'. It is not `(*p)++'. `*' operator is verbose. @subsection Content Under construction. @subsection Sample code @verbatim *p++; /* W0561 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0562 @section W0562 @cindex W0562 @subsection Message body There are verbose `@{@}' in the initializer. @subsection Content Under construction. @subsection Sample code @verbatim int ng[3][2] = { { {1, 2}, { 3, 4}, { 5, 6 } } }; /* W0562 */ int ok[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* OK */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0563 @section W0563 @cindex W0563 @subsection Message body If it jumps from outside of this block to `%s' label,the local variable will not be initialized. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b) { if (a == 0) { if (b != 0) { goto ERR; } } else { int c = 0; ERR: /* W0563 */ b = c; } } @end verbatim @subsection Related message @itemize @item @ref{W0564} If this 'goto' statement jumps to `%s' label,local variable will not be initialized. @end itemize @subsection Since 1.0.0 @node W0564 @section W0564 @cindex W0564 @subsection Message body If this 'goto' statement jumps to `%s' label,local variable will not be initialized. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b) { if (a == 0) { int c = 0; RETRY: b = c; } if (b != 0) { goto RETRY; /* W0564 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0563} If it jumps from outside of this block to `%s' label,the local variable will not be initialized. @end itemize @subsection Since 1.0.0 @node W0565 @section W0565 @cindex W0565 @subsection Message body A volatile integer type cast to volatile pointer type and vice versa. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int a = 0xFFFFU; volatile unsigned int *b = (volatile unsigned int *) a; /* W0565 */ unsigned int c = (unsigned int) b; /* W0565 */ @end verbatim @subsection Related message @itemize @item @ref{W0566} A volatile integer type cast to function pointer type and vice versa. @item @ref{W0567} A volatile integer type cast to pointer to object and vice versa. @end itemize @subsection Since 1.0.0 @node W0566 @section W0566 @cindex W0566 @subsection Message body A volatile integer type cast to function pointer type and vice versa. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int addr = 0xFFFFFFFFU; void (*p)(int, long) = (void (*)(int, long)) addr; /* W0566 */ int i = (int) p; /* W0566 */ @end verbatim @subsection Related message @itemize @item @ref{W0565} A volatile integer type cast to volatile pointer type and vice versa. @item @ref{W0567} A volatile integer type cast to pointer to object and vice versa. @end itemize @subsection Since 1.0.0 @node W0567 @section W0567 @cindex W0567 @subsection Message body A volatile integer type cast to pointer to object and vice versa. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int addr = 0xFFFFFFFFU; void (*p)(int, long) = (void (*)(int, long)) addr; /* W0567 */ int i = (int) p; /* W0567 */ @end verbatim @subsection Related message @itemize @item @ref{W0565} A volatile integer type cast to volatile pointer type and vice versa. @item @ref{W0566} A volatile integer type cast to function pointer type and vice versa. @end itemize @subsection Since 1.0.0 @node W0568 @section W0568 @cindex W0568 @subsection Message body The result of left shift operation against the signed constant expression value is undefined. @subsection Content Under construction. @subsection Sample code @verbatim int a = 0x7FFFFFFF << 1; /* W0568 */ int b = -5 << 1; /* W0568 */ @end verbatim @subsection Related message @itemize @item @ref{W0569} The result of left shift operation against the signed expression value is undefined. @item @ref{W0570} This signed left shift operation may make undefined value. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0569 @section W0569 @cindex W0569 @subsection Message body The result of left shift operation against the signed expression value is undefined. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a) { if (a >= 0x40000000) { return a << 1; /* W0569 */ } if (a < 0) { return a << 1; /* W0569 */ } return a << 1; } @end verbatim @subsection Related message @itemize @item @ref{W0568} The result of left shift operation against the signed constant expression value is undefined. @item @ref{W0570} This signed left shift operation may make undefined value. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0570 @section W0570 @cindex W0570 @subsection Message body This signed left shift operation may make undefined value. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a) { if (a >= 0x10000000) { return a << 1; /* W0570 */ } if (a < 10) { return a << 1; /* W0570 */ } return a << 1; } @end verbatim @subsection Related message @itemize @item @ref{W0568} The result of left shift operation against the signed constant expression value is undefined. @item @ref{W0569} The result of left shift operation against the signed expression value is undefined. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0571 @section W0571 @cindex W0571 @subsection Message body The result of right shift operation against the signed data is a possibility the both logical shift and arithmetic shift by implementation. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a) { return a >> 3; /* W0571 */ } @end verbatim @subsection Related message @itemize @item @ref{W0572} Bitwise operation of signed value causes implementation-defined behavior. @end itemize @subsection Since 1.0.0 @node W0572 @section W0572 @cindex W0572 @subsection Message body Bitwise operation of signed value causes implementation-defined behavior. @subsection Content Under construction. @subsection Sample code @verbatim void func(short a) { short b; b = a >> 8; /* W0572 */ b <<= 1; /* W0572 */ b = a & 15; /* W0572 */ b = a | 15; /* W0572 */ b = a ^ 15; /* W0572 */ b = ~a; /* W0572 */ } @end verbatim @subsection Related message @itemize @item @ref{W0571} The result of right shift operation against the signed data is a possibility the both logical shift and arithmetic shift by implementation. @end itemize @subsection Since 1.0.0 @node W0573 @section W0573 @cindex W0573 @subsection Message body A `-' character in scanset in `[]' is implementation defined. @subsection Content Under construction. @subsection Sample code @verbatim char c; scanf("%[a-z]", &c); /* W0573 */ @end verbatim @subsection Related message None. @subsection Since 1.6.0 @node W0574 @section W0574 @cindex W0574 @subsection Message body The character except for basic source character is used in the character constant. @subsection Content Under construction. @subsection Sample code @verbatim const char c = '$'; /* W0574 */ @end verbatim @subsection Related message @itemize @item @ref{W0575} The character except for basic source character is used in the string literal. @item @ref{W0576} The character except for basic source character is used in the comment of source file `%s'. @item @ref{W0577} The character except for basic source character is used in preprocessing directive of source file `%s'. @end itemize @subsection Since 1.0.0 @node W0575 @section W0575 @cindex W0575 @subsection Message body The character except for basic source character is used in the string literal. @subsection Content Under construction. @subsection Sample code @verbatim const char *str = "@$"; /* W0575 */ @end verbatim @subsection Related message @itemize @item @ref{W0574} The character except for basic source character is used in the character constant. @item @ref{W0576} The character except for basic source character is used in the comment of source file `%s'. @item @ref{W0577} The character except for basic source character is used in preprocessing directive of source file `%s'. @end itemize @subsection Since 1.0.0 @node W0576 @section W0576 @cindex W0576 @subsection Message body The character except for basic source character is used in the comment of source file `%s'. @subsection Content Under construction. @subsection Sample code @verbatim /* $ W0576 */ @end verbatim @subsection Related message @itemize @item @ref{W0574} The character except for basic source character is used in the character constant. @item @ref{W0575} The character except for basic source character is used in the string literal. @item @ref{W0577} The character except for basic source character is used in preprocessing directive of source file `%s'. @end itemize @subsection Since 1.0.0 @node W0577 @section W0577 @cindex W0577 @subsection Message body The character except for basic source character is used in preprocessing directive of source file `%s'. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO $ /* W0577 */ @end verbatim @subsection Related message @itemize @item @ref{W0574} The character except for basic source character is used in the character constant. @item @ref{W0575} The character except for basic source character is used in the string literal. @item @ref{W0576} The character except for basic source character is used in the comment of source file `%s'. @end itemize @subsection Since 1.0.0 @node W0578 @section W0578 @cindex W0578 @subsection Message body A generic integer value of the compound expression typed `%s' is implicitly converted into a new value of bigger type `%s'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { long b = a * a; /* W0578 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0579 @section W0579 @cindex W0579 @subsection Message body A generic integer value of the compound expression typed `%s' is explicitly converted into a new value of bigger type `%s'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { long b = (long) (a * a); /* W0579 */ } @end verbatim @subsection Related message None. @subsection Since 1.6.0 @node W0580 @section W0580 @cindex W0580 @subsection Message body An address of local static variable is substituted for a pointer which has a wider scope. @subsection Content Under construction. @subsection Sample code @verbatim int *p; void func(void) { static int i = 0; p = &i; /* W0580 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0581 @section W0581 @cindex W0581 @subsection Message body The number or type of actual argument is different from the past. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, short b, long c) { switch (a) { case 0: return foo(a, b, c); case 1: return foo(a, c, b); /* W0581 */ default: return foo(b, c); /* W0581 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0582} The number or type of actual argument is different from the function prototype declaration at the following. @item @ref{W0583} The number or type of actual argument is different from the function declaration at the following. @item @ref{W0584} The type of %s actual argument is different from the type of formal argument in function definition. @end itemize @subsection Since 1.0.0 @node W0582 @section W0582 @cindex W0582 @subsection Message body The number or type of actual argument is different from the function prototype declaration at the following. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, short b, long c) { switch (a) { case 0: return foo(a, b, c); case 1: return foo(a, c, b); /* W0582 */ default: return foo(b, c); /* W0582 */ } } extern int foo(int, short, long); @end verbatim @subsection Related message @itemize @item @ref{W0581} The number or type of actual argument is different from the past. @item @ref{W0583} The number or type of actual argument is different from the function declaration at the following. @item @ref{W0584} The type of %s actual argument is different from the type of formal argument in function definition. @end itemize @subsection Since 1.0.0 @node W0583 @section W0583 @cindex W0583 @subsection Message body The number or type of actual argument is different from the function declaration at the following. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, short b, long c) { switch (a) { case 0: return foo(a, b, c); case 1: return foo(a, c, b); /* W0583 */ default: return foo(b, c); /* W0583 */ } } int foo(int a, short b, long c) { return a + b + c; } @end verbatim @subsection Related message @itemize @item @ref{W0581} The number or type of actual argument is different from the past. @item @ref{W0582} The number or type of actual argument is different from the function prototype declaration at the following. @item @ref{W0584} The type of %s actual argument is different from the type of formal argument in function definition. @end itemize @subsection Since 1.0.0 @node W0584 @section W0584 @cindex W0584 @subsection Message body The type of %s actual argument is different from the type of formal argument in function definition. @subsection Content Under construction. @subsection Sample code @verbatim extern void func1(a, b) long a; double b; { ...snip... } void func2(void) { int a = 0; long b = 0; func1(a, b); /* W0584 */ } @end verbatim @subsection Related message @itemize @item @ref{W0581} The number or type of actual argument is different from the past. @item @ref{W0582} The number or type of actual argument is different from the function prototype declaration at the following. @item @ref{W0583} The number or type of actual argument is different from the function declaration at the following. @end itemize @subsection Since 1.0.0 @node W0585 @section W0585 @cindex W0585 @subsection Message body A control variable `%s' doesn't appear increment expression. @subsection Content Under construction. @subsection Sample code @verbatim int i, j; for (i = j = 0; i < 10; j++) { /* W0585 */ i++; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0586 @section W0586 @cindex W0586 @subsection Message body A typedef `%s' is declared in more than one place. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim typedef int *INT_PTR; /* W0586 */ void func1(INT_PTR) { ...snip... } @end verbatim @file{test2.c} @verbatim typedef int *INT_PTR; /* W0586 */ void func2(INT_PTR) { ...snip... } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0589 @section W0589 @cindex W0589 @subsection Message body An object `%s' is only referenced by function `%s' in the defined translation unit. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim void func1(void) /* W0589 & W0591 */ { ...snip... } void func2(void) { func1(); } @end verbatim @file{test2.c} @verbatim extern void func2(void); void func3(void) { func2(); } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0591 @section W0591 @cindex W0591 @subsection Message body A function `%s' is only referenced by the defined translation unit. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim void func1(void) /* W0589 & W0591 */ { ...snip... } void func2(void) { func1(); } @end verbatim @file{test2.c} @verbatim extern void func2(void); void func3(void) { func2(); } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0593 @section W0593 @cindex W0593 @subsection Message body An object `%s' is only referenced by the defined translation unit. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim int a = 100; /* W0593 */ void func1(void) { a += 1; } void func2(void) { func1(); a += 2; } @end verbatim @file{test2.c} @verbatim extern void func2(void); void func3(void) { func2(); } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0597 @section W0597 @cindex W0597 @subsection Message body `%s' is modified more than once between the side-effects completion point. The evaluation order is undefined. @subsection Content Under construction. @subsection Sample code @verbatim extern int bar(int *); extern int baz(const int *); void foo(int a, int b) { a = b * a++; /* W0597 */ a = bar(&a) * a++; /* W0597 */ b = bar(&a) * (a++ + --a); /* W0597, W0599 */ } @end verbatim @subsection Related message @itemize @item @ref{W0598} `%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined. @item @ref{W0599} `%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined. @item @ref{W0600} `%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined. @end itemize @subsection Since 1.2.0 @node W0598 @section W0598 @cindex W0598 @subsection Message body `%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined. @subsection Content Under construction. @subsection Sample code @verbatim extern int bar(int *); extern int baz(const int *); void foo(int a, int b) { b = bar(&a) * a++; /* W0598 */ b = bar(&a) + bar(&a); /* W0598 */ b = bar(&a) + baz(&a); /* W0600 */ b = baz(&a) + baz(&a); } @end verbatim @subsection Related message @itemize @item @ref{W0597} `%s' is modified more than once between the side-effects completion point. The evaluation order is undefined. @item @ref{W0599} `%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined. @item @ref{W0600} `%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined. @end itemize @subsection Since 1.2.0 @node W0599 @section W0599 @cindex W0599 @subsection Message body `%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined. @subsection Content Under construction. @subsection Sample code @verbatim extern void bar(int, int, int); void foo(int a, int b, int *c) { b = (a + 1) + a++; /* W0599 */ b = c[a] + c[++a]; /* W0599 */ bar(a, a++, c[a]); /* W0599 */ bar(a, a, c[a++]); /* W0599 */ a = a + b; c[a] = a++ + b; /* W0599 */ } @end verbatim @subsection Related message @itemize @item @ref{W0597} `%s' is modified more than once between the side-effects completion point. The evaluation order is undefined. @item @ref{W0598} `%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined. @item @ref{W0600} `%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined. @end itemize @subsection Since 1.2.0 @node W0600 @section W0600 @cindex W0600 @subsection Message body `%s' is modified and might be referenced between the side-effects completion point. The evaluation order is undefined. @subsection Content Under construction. @subsection Sample code @verbatim extern int bar(int *); extern int baz(const int *); void foo(int a, int b) { b = bar(&a) * a; /* W0600 */ b = baz(&a) * a; } @end verbatim @subsection Related message @itemize @item @ref{W0597} `%s' is modified more than once between the side-effects completion point. The evaluation order is undefined. @item @ref{W0598} `%s' might be modified more than once between the side-effects completion point. The evaluation order is undefined. @item @ref{W0599} `%s' is modified and referenced between the side-effects completion point. The evaluation order is undefined. @end itemize @subsection Since 1.2.0 @node W0605 @section W0605 @cindex W0605 @subsection Message body Multiple break-statements appear to break the same iteration. @subsection Content Under construction. @subsection Sample code @verbatim while (n > 0) { if (n == 1) { break; } if (n == 2) { break; /* W0605 */ } } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0606 @section W0606 @cindex W0606 @subsection Message body An union has a member which type is floating-point. @subsection Content Under construction. @subsection Sample code @verbatim union UNI { /* W0606 */ float a; int b; }; @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0607 @section W0607 @cindex W0607 @subsection Message body An integer expression which the value which the value is minus converted to unsigned type. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { if (a < 0) { unsigned int b = (unsigned int) a; /* W0607 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0608} An integer expression which the value might be minus converted to unsigned type. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.8.0 @node W0608 @section W0608 @cindex W0608 @subsection Message body An integer expression which the value might be minus converted to unsigned type. @subsection Content Under construction. @subsection Sample code @verbatim void fuu(int a) { unsigned char b; if (a < 256) { b = (unsigned char) a; /* W0608 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0607} An integer expression which the value which the value is minus converted to unsigned type. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.8.0 @node W0609 @section W0609 @cindex W0609 @subsection Message body This logical expression always makes true. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { if (a < 0) { if (a != 0) { /* W0609 */ ...snip... } } } @end verbatim @subsection Related message @itemize @item @ref{W0610} This logical expression always makes false. @item @ref{W0611} The value of this 'for' control expression is always true. @item @ref{W0612} The value of this 'if' conditional expression is always true. @item @ref{W0613} This controlling expression always makes false. @item @ref{W0614} The value of this "do-while" control expression is always false. The body of repetition statement executed only once. @end itemize @subsection Since 1.0.0 @node W0610 @section W0610 @cindex W0610 @subsection Message body This logical expression always makes false. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { if (a < 0) { if (a == 0) { /* W0610 */ } } } @end verbatim @subsection Related message @itemize @item @ref{W0609} This logical expression always makes true. @item @ref{W0611} The value of this 'for' control expression is always true. @item @ref{W0612} The value of this 'if' conditional expression is always true. @item @ref{W0613} This controlling expression always makes false. @item @ref{W0614} The value of this "do-while" control expression is always false. The body of repetition statement executed only once. @end itemize @subsection Since 1.0.0 @node W0611 @section W0611 @cindex W0611 @subsection Message body The value of this 'for' control expression is always true. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { if ( a > 0 ) { while (a != 0) { /* W0611 */ ...snip... } } } @end verbatim @subsection Related message @itemize @item @ref{W0609} This logical expression always makes true. @item @ref{W0610} This logical expression always makes false. @item @ref{W0612} The value of this 'if' conditional expression is always true. @item @ref{W0613} This controlling expression always makes false. @item @ref{W0614} The value of this "do-while" control expression is always false. The body of repetition statement executed only once. @end itemize @subsection Since 1.0.0 @node W0612 @section W0612 @cindex W0612 @subsection Message body The value of this 'if' conditional expression is always true. @subsection Content Under construction. @subsection Sample code @verbatim int i; for (i = 0; i < 10; i++) { if (i < 20) { /* W0612 */ ...snip... } } @end verbatim @subsection Related message @itemize @item @ref{W0609} This logical expression always makes true. @item @ref{W0610} This logical expression always makes false. @item @ref{W0611} The value of this 'for' control expression is always true. @item @ref{W0613} This controlling expression always makes false. @item @ref{W0614} The value of this "do-while" control expression is always false. The body of repetition statement executed only once. @end itemize @subsection Since 1.0.0 @node W0613 @section W0613 @cindex W0613 @subsection Message body This controlling expression always makes false. @subsection Content Under construction. @subsection Sample code @verbatim int i; for (i = 0; i < 10; i++) { if (i > 10) { /* W0613 */ ...snip... } } @end verbatim @subsection Related message @itemize @item @ref{W0609} This logical expression always makes true. @item @ref{W0610} This logical expression always makes false. @item @ref{W0611} The value of this 'for' control expression is always true. @item @ref{W0612} The value of this 'if' conditional expression is always true. @item @ref{W0614} The value of this "do-while" control expression is always false. The body of repetition statement executed only once. @end itemize @subsection Since 1.0.0 @node W0614 @section W0614 @cindex W0614 @subsection Message body The value of this \"do-while\" control expression is always false. The body of repetition statement executed only once. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { if (a == 0) { do { } while (a > 0); /* W0614 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0609} This logical expression always makes true. @item @ref{W0610} This logical expression always makes false. @item @ref{W0611} The value of this 'for' control expression is always true. @item @ref{W0612} The value of this 'if' conditional expression is always true. @item @ref{W0613} This controlling expression always makes false. @end itemize @subsection Since 1.0.0 @node W0622 @section W0622 @cindex W0622 @subsection Message body A function is declared in the block scope. @subsection Content Under construction. @subsection Sample code @verbatim int func1(void) { extern int func2(void); /* W0622 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0623 @section W0623 @cindex W0623 @subsection Message body An external coupling object is declared in the block scope. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { extern int i; /* W0623 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0624 @section W0624 @cindex W0624 @subsection Message body There is '#define' or '#undef' in a block. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO 0 int foo(void) { #if defined(MACRO) #undef MACRO /* W0624 */ #define MACRO 1 /* W0624 */ #endif return MACRO; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0625 @section W0625 @cindex W0625 @subsection Message body `%s' is using in the declaration or definition of external coupling. But its 'typedef' doesn't declare in the header file. @subsection Content Under construction. @subsection Sample code @verbatim typedef int *INT_PTR; /* W0625 */ extern INT_PTR func(void); INT_PTR func(void) { return 0; } @end verbatim @subsection Related message None. @subsection Since 1.8.0 @node W0626 @section W0626 @cindex W0626 @subsection Message body A wide character or wide string literal is used. @subsection Content Under construction. @subsection Sample code @verbatim const wchar_t a = L'あ'; /* W0626 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0627 @section W0627 @cindex W0627 @subsection Message body There is a dead letter (only `;') in the following other code. @subsection Content Under construction. @subsection Sample code @verbatim if (0); /* W0627 */ { ...snip... } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0628 @section W0628 @cindex W0628 @subsection Message body A function `%s' is defined, but this is not used in this project. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim int func1(void) { return 0; } void func2(void) /* W0628 */ { ...snip... } @end verbatim @file{test2.c} @verbatim extern int func1(void); int main(void) { return func1(); } @end verbatim @subsection Related message @itemize @item @ref{W0629} `%s()' has internal-linkage, but it is never called in this translation-unit. @end itemize @subsection Since 1.0.0 @node W0629 @section W0629 @cindex W0629 @subsection Message body `%s()' has internal-linkage, but it is never called in this translation-unit. @subsection Content Under construction. @subsection Sample code @verbatim static int func1(void) /* W0629 */ { return 1; } int func2(void) { return 1; } @end verbatim @subsection Related message @itemize @item @ref{W0628} A function `%s' is defined, but this is not used in this project. @end itemize @subsection Since 1.0.0 @node W0632 @section W0632 @cindex W0632 @subsection Message body Using ' or " characters in `@code{#include <%s>}' directive makes undefined behavior. @subsection Content Under construction. @subsection Sample code @verbatim #include /* W0632 */ @end verbatim @subsection Related message @itemize @item @ref{W0633} Using ' character in `#include "%s"' directive makes undefined behavior. @item @ref{W0634} `\' is used in `#include' line. `/' is recommended for the path delimiter. @end itemize @subsection Since 1.8.0 @node W0633 @section W0633 @cindex W0633 @subsection Message body Using ' character in `@code{#include "%s"}' directive makes undefined behavior. @subsection Content Under construction. @subsection Sample code @verbatim #include "NG'_header.h" /* W0633 */ @end verbatim @subsection Related message @itemize @item @ref{W0632} Using ' or " characters in `#include <%s>' directive makes undefined behavior. @item @ref{W0634} `\' is used in `#include' line. `/' is recommended for the path delimiter. @end itemize @subsection Since 1.8.0 @node W0634 @section W0634 @cindex W0634 @subsection Message body `\' is used in `#include' line. `/' is recommended for the path delimiter. @subsection Content Under construction. @subsection Sample code @verbatim #include "..\ng\header.h" /* W0634 */ #include "..\\ng\\header.h" /* W0634 */ @end verbatim @subsection Related message @itemize @item @ref{W0632} Using ' or " characters in `#include <%s>' directive makes undefined behavior. @item @ref{W0633} Using ' character in `#include "%s"' directive makes undefined behavior. @end itemize @subsection Since 1.8.0 @node W0635 @section W0635 @cindex W0635 @subsection Message body The type doesn't match with %sth conversion specifier and the corresponding actual argument. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a) { printf("Apple %f\n", a); /* W0635 */ } @end verbatim @subsection Related message @itemize @item @ref{W0636} An actual argument doesn't exist correspond to %sth conversion specifier. @item @ref{W0637} There is more actual argument than the number of conversion specifier in function call. @item @ref{W0638} This function call requiring at least one actual argument. @item @ref{W0639} %sth conversion specifier doesn't match with corresponding type of actual argument. @item @ref{W0640} The actual argument of scanf function have to pass the object pointer to store the data. @end itemize @subsection Since 1.0.0 @node W0636 @section W0636 @cindex W0636 @subsection Message body An actual argument doesn't exist correspond to %sth conversion specifier. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b, int c) { printf("Banana %d, %d, %d\n", a, b); /* W0636 */ } @end verbatim @subsection Related message @itemize @item @ref{W0635} The type doesn't match with %sth conversion specifier and the corresponding actual argument. @item @ref{W0637} There is more actual argument than the number of conversion specifier in function call. @item @ref{W0638} This function call requiring at least one actual argument. @item @ref{W0639} %sth conversion specifier doesn't match with corresponding type of actual argument. @item @ref{W0640} The actual argument of scanf function have to pass the object pointer to store the data. @end itemize @subsection Since 1.0.0 @node W0637 @section W0637 @cindex W0637 @subsection Message body There is more actual argument than the number of conversion specifier in function call. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b) { printf("Orange %d\n", a, b); /* W0637 */ } @end verbatim @subsection Related message @itemize @item @ref{W0635} The type doesn't match with %sth conversion specifier and the corresponding actual argument. @item @ref{W0636} An actual argument doesn't exist correspond to %sth conversion specifier. @item @ref{W0638} This function call requiring at least one actual argument. @item @ref{W0639} %sth conversion specifier doesn't match with corresponding type of actual argument. @item @ref{W0640} The actual argument of scanf function have to pass the object pointer to store the data. @end itemize @subsection Since 1.0.0 @node W0638 @section W0638 @cindex W0638 @subsection Message body This function call requiring at least one actual argument. @subsection Content Under construction. @subsection Sample code @verbatim printf(); /* W0638 */ @end verbatim @subsection Related message @itemize @item @ref{W0635} The type doesn't match with %sth conversion specifier and the corresponding actual argument. @item @ref{W0636} An actual argument doesn't exist correspond to %sth conversion specifier. @item @ref{W0637} There is more actual argument than the number of conversion specifier in function call. @item @ref{W0639} %sth conversion specifier doesn't match with corresponding type of actual argument. @item @ref{W0640} The actual argument of scanf function have to pass the object pointer to store the data. @end itemize @subsection Since 1.0.0 @node W0639 @section W0639 @cindex W0639 @subsection Message body %sth conversion specifier doesn't match with corresponding type of actual argument. @subsection Content Under construction. @subsection Sample code @verbatim int a; scanf("%f", &a); /* W0639 */ @end verbatim @subsection Related message @itemize @item @ref{W0635} The type doesn't match with %sth conversion specifier and the corresponding actual argument. @item @ref{W0636} An actual argument doesn't exist correspond to %sth conversion specifier. @item @ref{W0637} There is more actual argument than the number of conversion specifier in function call. @item @ref{W0638} This function call requiring at least one actual argument. @item @ref{W0640} The actual argument of scanf function have to pass the object pointer to store the data. @end itemize @subsection Since 1.0.0 @node W0640 @section W0640 @cindex W0640 @subsection Message body %sth conversion specifier doesn't match with corresponding type of actual argument. @subsection Content Under construction. @subsection Sample code @verbatim int a; fscanf(stdin, "%d", a); /* W0640 */ @end verbatim @subsection Related message @itemize @item @ref{W0635} The type doesn't match with %sth conversion specifier and the corresponding actual argument. @item @ref{W0636} An actual argument doesn't exist correspond to %sth conversion specifier. @item @ref{W0637} There is more actual argument than the number of conversion specifier in function call. @item @ref{W0638} This function call requiring at least one actual argument. @item @ref{W0639} %sth conversion specifier doesn't match with corresponding type of actual argument. @end itemize @subsection Since 1.0.0 @node W0641 @section W0641 @cindex W0641 @subsection Message body Floating-point number type cast to pointer to object and vice versa. @subsection Content Under construction. @subsection Sample code @verbatim int *foo(const float f) { return (int *) f; /* W0641 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0642 @section W0642 @cindex W0642 @subsection Message body Address derivation from the object declared as `register' is prohibited. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { register int a[3]; int *p1 = a; /* W0642 */ int *p2 = &a[1]; /* W0642 */ } @end verbatim @subsection Related message @itemize @item @ref{W0643} This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end. @item @ref{W0644} A value in void statement is going to use. 'void' statement doesn't have a value. @item @ref{W0645} 'void' type cannot use in the type of formal argument. @item @ref{W0646} A normal string literal and a wide string literal are contiguous. @end itemize @subsection Since 1.8.0 @node W0643 @section W0643 @cindex W0643 @subsection Message body This string literal constituted by a macro is illegal form unenclosed by `\"'. `#'operator may apply to actual argument which has '\' at the end. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO(x) #x const char *str = MACRO(foo\); /* W0643 */ @end verbatim @subsection Related message @itemize @item @ref{W0642} Address derivation from the object declared as `register' is prohibited. @item @ref{W0644} A value in void statement is going to use. 'void' statement doesn't have a value. @item @ref{W0645} 'void' type cannot use in the type of formal argument. @item @ref{W0646} A normal string literal and a wide string literal are contiguous. @end itemize @subsection Since 1.16.0 @node W0644 @section W0644 @cindex W0644 @subsection Message body A value in void statement is going to use. 'void' statement doesn't have a value. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(void); int bar(void) { return (int) foo(); /* W0644 */ } @end verbatim @subsection Related message @itemize @item @ref{W0642} Address derivation from the object declared as `register' is prohibited. @item @ref{W0643} This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end. @item @ref{W0645} 'void' type cannot use in the type of formal argument. @item @ref{W0646} A normal string literal and a wide string literal are contiguous. @end itemize @subsection Since 1.18.0 @node W0645 @section W0645 @cindex W0645 @subsection Message body `void' cannot be used as the parameter type. @subsection Content Under construction. @subsection Sample code @verbatim extern void func(a) /* W0645 */ void a; { } @end verbatim @subsection Related message @itemize @item @ref{W0642} Address derivation from the object declared as `register' is prohibited. @item @ref{W0643} This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end. @item @ref{W0644} A value in void statement is going to use. 'void' statement doesn't have a value. @item @ref{W0646} A normal string literal and a wide string literal are contiguous. @end itemize @subsection Since 1.14.0 @node W0646 @section W0646 @cindex W0646 @subsection Message body A normal string literal and a wide string literal are contiguous. @subsection Content Under construction. @subsection Sample code @verbatim static const char *str = "foo" L"bar"; /* W0646 */ @end verbatim @subsection Related message @itemize @item @ref{W0642} Address derivation from the object declared as `register' is prohibited. @item @ref{W0643} This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end. @item @ref{W0644} A value in void statement is going to use. 'void' statement doesn't have a value. @item @ref{W0645} 'void' type cannot use in the type of formal argument. @end itemize @subsection Since 1.16.0 @node W0649 @section W0649 @cindex W0649 @subsection Message body A right operand value of shift operand is negative constant value. This result is undefined. @subsection Content Under construction. @subsection Sample code @verbatim int foo(int i) { return i << -1; /* W0649 */ } @end verbatim @subsection Related message @itemize @item @ref{W0650} A value of the right operand in a shift expression is bigger than the bit size of the left operand type `%s'. This result is undefined. @end itemize @subsection Since 1.18.0 @node W0650 @section W0650 @cindex W0650 @subsection Message body A value of the right operand in a shift expression is bigger than the bit size of the left operand type `%s'. This result is undefined. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int foo(unsigned int i) { return i << 32; /* W0650 */ } @end verbatim @subsection Related message @itemize @item @ref{W0649} A right operand value of shift operand is negative constant value. This result is undefined. @end itemize @subsection Since 1.18.0 @node W0653 @section W0653 @subsection Message body The initial value of an array, structure or union is not enclosed by `@{@}'. @subsection Content Under construction. @subsection Sample code @verbatim struct ST { int i; }; int a[3] = 0; /* W0653 */ struct ST s = 0; /* W0653 */ @end verbatim @subsection Related message @itemize @item @ref{W0654} The initializer of structure or union must the value of the same structure type or union type. @end itemize @subsection Since 1.0.0 @node W0654 @section W0654 @cindex W0654 @subsection Message body The initializer of structure or union must the value of the same structure type or union type. @subsection Content Under construction. @subsection Sample code @verbatim struct A { int i; }; struct B { int j; }; struct A a = { 0 }; struct B b = a; /* W0654 */ @end verbatim @subsection Related message @itemize @item @ref{W0653} The initial value of an array, structure or union is not enclosed by `@{@}'. @end itemize @subsection Since 1.0.0 @node W0655 @section W0655 @cindex W0655 @subsection Message body This is bit field statement which the size is undefined. @subsection Content Under construction. @subsection Sample code @verbatim struct ST { unsigned int a:2; unsigned int b:4; }; void func(void) { struct ST s = { 0 }; int i = sizeof(s.a); /* W0655 */ } @end verbatim @subsection Related message @itemize @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0656 @section W0656 @cindex W0656 @subsection Message body %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @subsection Content Under construction. @subsection Sample code @verbatim void func(int count) { printf("There are %Ld apples\n", count); /* W0656 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0657 @section W0657 @cindex W0657 @subsection Message body An invalid flag is used in %sth conversion specifier of `i' or 'd'. @subsection Content Under construction. @subsection Sample code @verbatim void func(int count) { printf("There are %Ld apples\n", count); /* W0657 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0658 @section W0658 @cindex W0658 @subsection Message body An invalid flag is used in %sth conversion specifier of `o'. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int count) { printf("There are %Lo apples\n", count); /* W0658 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0659 @section W0659 @cindex W0659 @subsection Message body An invalid flag is used in %sth conversion specifier of `u'. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int count) { printf("There are %Lu apples\n", count); /* W0659 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0660 @section W0660 @cindex W0660 @subsection Message body An invalid flag is used in %sth conversion specifier of `x'. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int count) { printf("There are %Lx apples\n", count); /* W0660 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0661 @section W0661 @cindex W0661 @subsection Message body An invalid flag is used in %sth conversion specifier of `X'. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int count) { printf("There are %LX apples\n", count); /* W0661 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0662 @section W0662 @cindex W0662 @subsection Message body An invalid flag is used in %sth conversion specifier of `f'. @subsection Content Under construction. @subsection Sample code @verbatim void func(double count) { printf("There are %lf apples\n", count); /* W0662 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0663 @section W0663 @cindex W0663 @subsection Message body An invalid flag is used in %sth conversion specifier of `e'. @subsection Content Under construction. @subsection Sample code @verbatim void func(double count) { printf("There are %le apples\n", count); /* W0663 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0664 @section W0664 @cindex W0664 @subsection Message body An invalid flag is used in %sth conversion specifier of `E'. @subsection Content Under construction. @subsection Sample code @verbatim void func(double count) { printf("There are %lE apples\n", count); /* W0664 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0665 @section W0665 @cindex W0665 @subsection Message body An invalid flag is used in %sth conversion specifier of `g'. @subsection Content Under construction. @subsection Sample code @verbatim void func(double count) { printf("There are %lg apples\n", count); /* W0665 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0666 @section W0666 @cindex W0666 @subsection Message body An invalid flag is used in %sth conversion specifier of `G'. @subsection Content Under construction. @subsection Sample code @verbatim void func(double count) { printf("There are %lG apples\n", count); /* W0666 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0667 @section W0667 @cindex W0667 @subsection Message body An invalid flag is used in %sth conversion specifier of `c'. @subsection Content Under construction. @subsection Sample code @verbatim void func(char count) { printf("There are %hc apples\n", count); /* W0667 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0668 @section W0668 @cindex W0668 @subsection Message body An invalid flag is used in %sth conversion specifier of `%%'. @subsection Content Under construction. @subsection Sample code @verbatim void func(double percent) { printf("There is %f%l% apple juice\n", percent); /* W0668 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0669 @section W0669 @cindex W0669 @subsection Message body An invalid flag is used in %sth conversion specifier of `s'. @subsection Content Under construction. @subsection Sample code @verbatim void func(char *s) { printf("There are %hs apples\n", s); /* W0669 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0670 @section W0670 @cindex W0670 @subsection Message body An invalid flag is used in %sth conversion specifier of `n'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int n; printf("There are %Ln apples\n", &n); /* W0670 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0671 @section W0671 @cindex W0671 @subsection Message body An invalid flag is used in %sth conversion specifier of `p'. @subsection Content Under construction. @subsection Sample code @verbatim void func(char *p) { printf("p points to %lp\n", p); /* W0671 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0672 @section W0672 @cindex W0672 @subsection Message body An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; printf("%0", &a); /* W0672 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0673 @section W0673 @cindex W0673 @subsection Message body %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; scanf("%y", &a); /* W0673 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0674 @section W0674 @cindex W0674 @subsection Message body An invalid flag is used in %sth conversion specifier of `d/i/n'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; scanf("%Ld", &a); /* W0674 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0675 @section W0675 @cindex W0675 @subsection Message body An invalid flag is used in %sth conversion specifier of `o'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; scanf("%Lo", &a); /* W0675 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0676 @section W0676 @cindex W0676 @subsection Message body An invalid flag is used in %sth conversion specifier of `u'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; scanf("%Lu", &a); /* W0676 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0677 @section W0677 @cindex W0677 @subsection Message body An invalid flag is used in %sth conversion specifier of `x/X.' @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; scanf("%Lx", &a); /* W0677 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0678 @section W0678 @cindex W0678 @subsection Message body An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { double a; scanf("%lle", &a); /* W0678 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0679 @section W0679 @cindex W0679 @subsection Message body An invalid flag is used in %sth conversion specifier of `s'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { char a[256]; scanf("%lls", a); /* W0679 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0680 @section W0680 @cindex W0680 @subsection Message body An invalid flag is used in %sth conversion specifier of `p'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { void *a; scanf("%lp", &a); /* W0680 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0681 @section W0681 @cindex W0681 @subsection Message body An invalid flag is used in %sth conversion specifier of `%%'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { int a; scanf("%d%l%", &a); /* W0681 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0682 @section W0682 @cindex W0682 @subsection Message body An invalid flag is used in %sth conversion specifier of `['. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { char buf[256]; scanf("%L[0-9]", buf); /* W0682 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0683 @section W0683 @cindex W0683 @subsection Message body An invalid flag is used in %sth conversion specifier of `c'. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { char a; scanf("%Lc", &a); /* W0683 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0684 @section W0684 @cindex W0684 @subsection Message body An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @subsection Content Under construction. @subsection Sample code @verbatim void func(void) { long a; scanf("%l", &a); /* W0684 */ } @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.0.0 @node W0685 @section W0685 @cindex W0685 @subsection Message body A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @subsection Content Under construction. @subsection Sample code @verbatim char c; scanf("%[z-a]", &c); /* W0685 */ @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0686} The same characters are described in scanset (characters enclosed by `[]'). @end itemize @subsection Since 1.6.0 @node W0686 @section W0686 @cindex W0686 @subsection Message body The same characters are described in scanset (characters enclosed by `[]'). @subsection Content Under construction. @subsection Sample code @verbatim char c; scanf("%[abcda]", &c); /* W0686 */ @end verbatim @subsection Related message @itemize @item @ref{W0655} This is bit field statement which the size is undefined. @item @ref{W0656} %sth conversion specifier in scanf, fscanf or sscanf is not supported by ISO C standards. @item @ref{W0657} An invalid flag is used in %sth conversion specifier of `i' or 'd'. @item @ref{W0658} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0659} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0660} An invalid flag is used in %sth conversion specifier of `x'. @item @ref{W0661} An invalid flag is used in %sth conversion specifier of `X'. @item @ref{W0662} An invalid flag is used in %sth conversion specifier of `f'. @item @ref{W0663} An invalid flag is used in %sth conversion specifier of `e'. @item @ref{W0664} An invalid flag is used in %sth conversion specifier of `E'. @item @ref{W0665} An invalid flag is used in %sth conversion specifier of `g'. @item @ref{W0666} An invalid flag is used in %sth conversion specifier of `G'. @item @ref{W0667} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0668} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0669} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0670} An invalid flag is used in %sth conversion specifier of `n'. @item @ref{W0671} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0672} An invalid flag is used in %sth conversion specifier in scanf, fscanf, sscanf. @item @ref{W0673} %sth conversion specifier in printf, fprintf or sprintf is not supported by ISO C standards. @item @ref{W0674} An invalid flag is used in %sth conversion specifier of `d/i/n'. @item @ref{W0675} An invalid flag is used in %sth conversion specifier of `o'. @item @ref{W0676} An invalid flag is used in %sth conversion specifier of `u'. @item @ref{W0677} An invalid flag is used in %sth conversion specifier of `x/X'. @item @ref{W0678} An invalid flag is used in %sth conversion specifier of `e/E/f/g/G'. @item @ref{W0679} An invalid flag is used in %sth conversion specifier of `s'. @item @ref{W0680} An invalid flag is used in %sth conversion specifier of `p'. @item @ref{W0681} An invalid flag is used in %sth conversion specifier of `%%'. @item @ref{W0682} An invalid flag is used in %sth conversion specifier of `['. @item @ref{W0683} An invalid flag is used in %sth conversion specifier of `c'. @item @ref{W0684} An invalid flag is used in %sth conversion specifier in printf, fprintf, sprintf. @item @ref{W0685} A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'. @end itemize @subsection Since 1.6.0 @node W0687 @section W0687 @cindex W0687 @subsection Message body #undef is using to delete #defined operator. @subsection Content Under construction. @subsection Sample code @verbatim #undef defined /* W0687 */ @end verbatim @subsection Related message @itemize @item @ref{W0688} There is no line number in 1 to 32767 ranges after #line directive. @item @ref{W0689} #line directive syntax doesn't match `#line integer constant \"string\"'. @item @ref{W0690} No line number after #line directive. @item @ref{W0691} The result of `##' operator is not valid preprocessing token. @end itemize @subsection Since 1.4.0 @node W0688 @section W0688 @cindex W0688 @subsection Message body There is no line number in 1 to 32767 ranges after #line directive. @subsection Content Under construction. @subsection Sample code @verbatim #line 35000 "test.c" /* W0688 */ @end verbatim @subsection Related message @itemize @item @ref{W0687} #undef is using to delete #defined operator. @item @ref{W0689} #line directive syntax doesn't match `#line integer constant \"string\"'. @item @ref{W0690} No line number after #line directive. @item @ref{W0691} The result of `##' operator is not valid preprocessing token. @end itemize @subsection Since 1.2.0 @node W0689 @section W0689 @cindex W0689 @subsection Message body #line directive syntax doesn't match `#line integer constant \"string\"'. @subsection Content Under construction. @subsection Sample code @verbatim #line 35 * 100 /* W0689 */ #line 35 * 100 "test.c" /* W0689 */ #line 35 L"あいう.c" /* W0689 */ #line __FILE__ 35 /* W0689 */ @end verbatim @subsection Related message @itemize @item @ref{W0687} #undef is using to delete #defined operator. @item @ref{W0688} There is no line number in 1 to 32767 ranges after #line directive. @item @ref{W0690} No line number after #line directive. @item @ref{W0691} The result of `##' operator is not valid preprocessing token. @end itemize @subsection Since 1.2.0 @node W0690 @section W0690 @cindex W0690 @subsection Message body No line number after #line directive. @subsection Content Under construction. @subsection Sample code @verbatim #line LINE1000 /* W0690 */ #line __FILE__ 35 /* W0690 */ @end verbatim @subsection Related message @itemize @item @ref{W0687} #undef is using to delete #defined operator. @item @ref{W0688} There is no line number in 1 to 32767 ranges after #line directive. @item @ref{W0689} #line directive syntax doesn't match `#line integer constant \"string\"'. @item @ref{W0691} The result of `##' operator is not valid preprocessing token. @end itemize @subsection Since 1.2.0 @node W0691 @section W0691 @cindex W0691 @subsection Message body The result of `##' operator is not valid preprocessing token. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO(a, b) a ## b double d = (double) MACRO(-, 123); /* W0691 */ @end verbatim @subsection Related message @itemize @item @ref{W0687} #undef is using to delete #defined operator. @item @ref{W0688} There is no line number in 1 to 32767 ranges after #line directive. @item @ref{W0689} #line directive syntax doesn't match `#line integer constant \"string\"'. @item @ref{W0690} No line number after #line directive. @end itemize @subsection Since 1.16.0 @node W0692 @section W0692 @cindex W0692 @subsection Message body A function-like macro `%s' doesn't given an actual argument. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO(a) #a const char *s = (char *) MACRO(); /* W0692 */ @end verbatim @subsection Related message @itemize @item @ref{W0693} A function-like macro is called by actual argument which its definition is smaller. @end itemize @subsection Since 1.16.0 @node W0693 @section W0693 @cindex W0693 @subsection Message body A function-like macro is called by actual argument which its definition is smaller. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message @itemize @item @ref{W0692} A function-like macro `%s' doesn't given an actual argument. @end itemize @subsection Since After 2.0.0 (planned) @node W0694 @section W0694 @cindex W0694 @subsection Message body 'assert' macro is inhibited to call the function named `assert'. This result is undefined. @subsection Content Under construction. @subsection Sample code @verbatim #undef assert extern void assert(int); void foo(void) { assert("should not be reached" == ""); /* W0694 */ } @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W0695 @section W0695 @cindex W0695 @subsection Message body If #undef the 'assert' macro, and enable to call its name function, the result is undefined. @subsection Content Under construction. @subsection Sample code @verbatim #undef assert /* W0695 */ extern void assert(int a); @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0696 @section W0696 @cindex W0696 @subsection Message body This macro using in `#if...' is undefined. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO (1) #if MACRO == 1 ...snip... #endif #undef MACRO #if MACRO == 2 /* W0696 */ ...snip... #endif @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0697 @section W0697 @cindex W0697 @subsection Message body There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value. @subsection Content Under construction. @subsection Sample code @verbatim int func(int value) /* W0697 */ { if (value == 0) { return 0; } /* No return statement at the end of this function. */ } @end verbatim @subsection Related message @itemize @item @ref{W0698} A `return;' statement is found in a function `%s' which has a return value. @item @ref{W0699} The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement. @item @ref{W0700} The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value. @end itemize @subsection Since 1.14.0 @node W0698 @section W0698 @cindex W0698 @subsection Message body A `return;' statement is found in a function `%s' which has a return value. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { return; /* W0698 */ } @end verbatim @subsection Related message @itemize @item @ref{W0698} A `return;' statement is found in a function `%s' which has a return value. @item @ref{W0699} The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement. @item @ref{W0700} The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value. @end itemize @subsection Since 1.4.0 @node W0699 @section W0699 @cindex W0699 @subsection Message body The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement. @subsection Content Under construction. @subsection Sample code @verbatim extern func(void) { return; /* W0699 */ } @end verbatim @subsection Related message @itemize @item @ref{W0697} There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value. @item @ref{W0698} A `return;' statement is found in a function `%s' which has a return value. @item @ref{W0700} The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value. @end itemize @subsection Since 1.4.0 @node W0700 @section W0700 @cindex W0700 @subsection Message body The return value of function `%s()' is unspecified. The return value is implicitly int. There is no 'return' statement to return value. @subsection Content Under construction. @subsection Sample code @verbatim extern func(void) /* W0700 */ { } @end verbatim @subsection Related message @itemize @item @ref{W0697} There is a path with exits with an implicit `return;' statement in a function `%s' which has a return value. @item @ref{W0698} A `return;' statement is found in a function `%s' which has a return value. @item @ref{W0699} The return value of function `%s()' is unspecified. The return value is implicitly int. There is no expression to set the value to 'return' statement. @end itemize @subsection Since 1.14.0 @node W0703 @section W0703 @cindex W0703 @subsection Message body The tag `%s' hides the declaration of same identifier which has wider scope. @subsection Content Under construction. @subsection Sample code @verbatim union FOO { ...snip... }; void func(void) { struct FOO { /* W0703 */ ...snip... }; } @end verbatim @subsection Related message @itemize @item @ref{W0704} This `%s' declaration hides the declaration of same identifier which has wider scope. @end itemize @subsection Since 1.0.0 @node W0704 @section W0704 @cindex W0704 @subsection Message body This `%s' declaration hides the declaration of same identifier which has wider scope. @subsection Content Under construction. @subsection Sample code @verbatim int a; void func(void) { double a; /* W0704 */ } @end verbatim @subsection Related message @itemize @item @ref{W0703} The tag `%s' hides the declaration of same identifier which has wider scope. @end itemize @subsection Since 1.0.0 @node W0705 @section W0705 @cindex W0705 @subsection Message body This non-constant array subscript may cause out-of-range access. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int a) { int buf[10]; if (a < 10) { buf[a] = 0; } ...snip... buf[a] = 5; /* W0705 */ } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0707 @section W0707 @cindex W0707 @subsection Message body This constant array subscript must cause out-of-range access. @subsection Content Under construction. @subsection Sample code @verbatim extern int a[5]; int foo(void) { int i = a[5]; /* W0707 */ return i; } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.18.0 @node W0708 @section W0708 @cindex W0708 @subsection Message body A value of control variable `%s' in 'for' statement is changed in the body of repetition. @subsection Content Under construction. @subsection Sample code @verbatim int i, j; for (i = j = 0; i < 10; j++) { i++; /* W0708 */ } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0711 @section W0711 @cindex W0711 @subsection Message body Right operand of relational operator is a substantive 'boolean' expression. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c, int d) { return (a + b) > (c > d); /* W0711 */ } @end verbatim @subsection Related message @itemize @item @ref{W0712} Left operand of relational operator is a substantive 'boolean' expression. @item @ref{W0713} Both sides of relational operator is substantive 'boolean' expressions. @end itemize @subsection Since 1.8.0 @node W0712 @section W0712 @cindex W0712 @subsection Message body Left operand of relational operator is a substantive 'boolean' expression. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c, int d) { return (a > b) > (c + d); /* W0712 */ } @end verbatim @subsection Related message @itemize @item @ref{W0711} Right operand of relational operator is a substantive 'boolean' expression. @item @ref{W0713} Both sides of relational operator is substantive 'boolean' expressions. @end itemize @subsection Since 1.8.0 @node W0713 @section W0713 @cindex W0713 @subsection Message body Both sides of relational operator is substantive 'boolean' expressions. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c, int d) { return (a > b) > (c > d); /* W0713 */ } @end verbatim @subsection Related message @itemize @item @ref{W0711} Right operand of relational operator is a substantive 'boolean' expression. @item @ref{W0712} Left operand of relational operator is a substantive 'boolean' expression. @end itemize @subsection Since 1.8.0 @node W0714 @section W0714 @cindex W0714 @subsection Message body Both sides of `&' operator is substantive 'boolean' expressions. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c, int d) { return (a > b) & (c > d); /* W0714 */ } @end verbatim @subsection Related message @itemize @item @ref{W0715} Both sides of `|' operator is substantive 'boolean' expressions. @item @ref{W0716} A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression. @item @ref{W0717} A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression. @item @ref{W0718} A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression. @end itemize @subsection Since 1.8.0 @node W0715 @section W0715 @cindex W0715 @subsection Message body Both sides of `|' operator is substantive 'boolean' expressions. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c, int d) { return (a > b) | (c > d); /* W0715 */ } @end verbatim @subsection Related message @itemize @item @ref{W0714} Both sides of `&' operator is substantive 'boolean' expressions. @item @ref{W0716} A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression. @item @ref{W0717} A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression. @item @ref{W0718} A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression. @end itemize @subsection Since 1.8.0 @node W0716 @section W0716 @cindex W0716 @subsection Message body A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c, int d) { return (a > b) + (c > d); /* W0716 */ } @end verbatim @subsection Related message @itemize @item @ref{W0714} Both sides of `&' operator is substantive 'boolean' expressions. @item @ref{W0715} Both sides of `|' operator is substantive 'boolean' expressions. @item @ref{W0717} A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression. @item @ref{W0718} A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression. @end itemize @subsection Since 1.10.0 @node W0717 @section W0717 @cindex W0717 @subsection Message body A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c) { return (a > b) + c; /* W0717 */ } @end verbatim @subsection Related message @itemize @item @ref{W0714} Both sides of `&' operator is substantive 'boolean' expressions. @item @ref{W0715} Both sides of `|' operator is substantive 'boolean' expressions. @item @ref{W0716} A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression. @item @ref{W0717} A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression. @end itemize @subsection Since 1.10.0 @node W0718 @section W0718 @cindex W0718 @subsection Message body A bit operator or right side operand of arithmetic operator is a substantive 'boolean' expression. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a, int b, int c) { return a + (b > c); /* W0718 */ } @end verbatim @subsection Related message @itemize @item @ref{W0714} Both sides of `&' operator is substantive 'boolean' expressions. @item @ref{W0715} Both sides of `|' operator is substantive 'boolean' expressions. @item @ref{W0716} A bit operator or both sides operand of arithmetic operator is a substantive 'boolean' expression. @item @ref{W0717} A bit operator or left side operand of arithmetic operator is a substantive 'boolean' expression. @end itemize @subsection Since 1.10.0 @node W0719 @section W0719 @cindex W0719 @subsection Message body A value of the right operand in a shift expression is bigger than the bit size of the left operand underlying type `%s'. @subsection Content Under construction. @subsection Sample code @verbatim int foo(char c) { return c << 31; /* W0719 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0720 @section W0720 @cindex W0720 @subsection Message body The value with floating-point type doesn't fit in the range of converted type. @subsection Content Under construction. @subsection Sample code @verbatim signed char sc1 = (signed char) 127.5; /* OK */ signed char sc2 = (signed char) 128.5; /* W0720 */ signed char sc3 = (signed char) -128.5; /* OK */ signed char sc4 = (signed char) -129.5; /* W0720 */ @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.4.0 @node W0721 @section W0721 @cindex W0721 @subsection Message body This volatile integer type doesn't have enough size to keep pointer value. @subsection Content Under construction. @subsection Sample code @verbatim void func(int *p) { /* when short is 16 bit long and pointer is 32 bit long */ unsigned short us = (unsigned short) p; /* W0721 */ } @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0722 @section W0722 @cindex W0722 @subsection Message body A value of signed statement is overflow. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a) { /* when int is 32 bit long */ if (a < 0) { return a + 1; /* OK */ } else if (a < 2147483647) { return a + 1; /* OK */ } return a + 1; /* W0722 */ } @end verbatim @subsection Related message @itemize @item @ref{W0723} A value of signed statement might be overflow. @end itemize @subsection Since 1.4.0 @node W0723 @section W0723 @cindex W0723 @subsection Message body A value of signed statement might be overflow. @subsection Content Under construction. @subsection Sample code @verbatim int func(int a) { /* when int is 32 bit long */ if (a < 0) { return a + 1; /* OK */ } else if (a < 2000000000) { return a + 1; /* OK */ } return a + 1; /* W0723 */ } @end verbatim @subsection Related message @itemize @item @ref{W0722} A value of signed statement is overflow. @end itemize @subsection Since 1.4.0 @node W0724 @section W0724 @cindex W0724 @subsection Message body An unrecognized preprocessing directive is ignored by conditional include directive. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message None. @subsection Since After 2.0.0 (planned) @node W0726 @section W0726 @cindex W0726 @subsection Message body A function `%s()' which return value is declared as qualified void type, `return expression;' is found. @subsection Content Under construction. @subsection Sample code @verbatim const void func(int a) { if (a == 0) { return 0; /* W0726 */ } } @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0727 @section W0727 @cindex W0727 @subsection Message body The value not part of the enumeration type is used. @subsection Content Under construction. @subsection Sample code @verbatim enum Fruits { APPLE = 1, BANANA, ORANGE }; enum Fruits fruit = 5; /* W0727 */ @end verbatim @subsection Related message @itemize @item @ref{W0728} Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument. @item @ref{W0729} An enumeration literal of the other enumeration type is substituted for enumeration type object. @item @ref{W0730} A function declared return value to enumeration type returned an enumeration literal of the other enumeration type. @item @ref{W0731} The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement. @end itemize @subsection Since 1.4.0 @node W0728 @section W0728 @cindex W0728 @subsection Message body Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE }; extern void func1(enum Color); void func2(void) { func1(ORANGE); /* W0728 */ } @end verbatim @subsection Related message @itemize @item @ref{W0727} The value not part of the enumeration type is used. @item @ref{W0729} An enumeration literal of the other enumeration type is substituted for enumeration type object. @item @ref{W0730} A function declared return value to enumeration type returned an enumeration literal of the other enumeration type. @item @ref{W0731} The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement. @end itemize @subsection Since 1.4.0 @node W0729 @section W0729 @cindex W0729 @subsection Message body An enumeration literal of the other enumeration type is substituted for enumeration type object. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE }; void func(void) { enum Color c; c = ORANGE; /* W0729 */ } @end verbatim @subsection Related message @itemize @item @ref{W0727} The value not part of the enumeration type is used. @item @ref{W0728} Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument. @item @ref{W0730} A function declared return value to enumeration type returned an enumeration literal of the other enumeration type. @item @ref{W0731} The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement. @end itemize @subsection Since 1.4.0 @node W0730 @section W0730 @cindex W0730 @subsection Message body A function declared return value to enumeration type returned an enumeration literal of the other enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE }; enum Color func(void) { return ORANGE; /* W0730 */ } @end verbatim @subsection Related message @itemize @item @ref{W0727} The value not part of the enumeration type is used. @item @ref{W0728} Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument. @item @ref{W0729} An enumeration literal of the other enumeration type is substituted for enumeration type object. @item @ref{W0731} The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement. @end itemize @subsection Since 1.4.0 @node W0731 @section W0731 @cindex W0731 @subsection Message body The value of `%s' in 'case' label of 'switch' statement doesn't belong enumeration type of the control statement. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE, GRAPE }; int func(enum Color c) { switch (c) { case RED: return 1; case GRAPE: /* W0731 */ return 2; } return 0; } @end verbatim @subsection Related message @itemize @item @ref{W0727} The value not part of the enumeration type is used. @item @ref{W0728} Other enumeration literal of enumeration type is passed to enumeration literal of formal argument as actual argument. @item @ref{W0729} An enumeration literal of the other enumeration type is substituted for enumeration type object. @item @ref{W0730} A function declared return value to enumeration type returned an enumeration literal of the other enumeration type. @end itemize @subsection Since 1.4.0 @node W0732 @section W0732 @cindex W0732 @subsection Message body Both operand of `&&'operator is bit operator or arithmetic operator. @subsection Content Under construction. @subsection Sample code @verbatim extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d) { int r; r = (a + b) && (c - d); /* W0732 */ r = (a * b) && (c / d); /* W0732 */ r = (a << b) && (c << d); /* W0732 */ r = (a >> b) && (c >> d); /* W0732 */ } @end verbatim @subsection Related message @itemize @item @ref{W0733} Both operand of `||'operator is bit operator or arithmetic operator. @item @ref{W0734} A left operand of logical operator is bit operator or arithmetic operator. @item @ref{W0735} A right operand of logical operator is the expression of bit operator or arithmetic operator. @end itemize @subsection Since 1.12.0 @node W0733 @section W0733 @cindex W0733 @subsection Message body Both operand of `||'operator is bit operator or arithmetic operator. @subsection Content Under construction. @subsection Sample code @verbatim extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d) { int r; r = (a + b) || (c - d); /* W0733 */ r = (a * b) || (c / d); /* W0733 */ r = (a << b) || (c << d); /* W0733 */ r = (a >> b) || (c >> d); /* W0733 */ } @end verbatim @subsection Related message @itemize @item @ref{W0732} Both operand of `&&'operator is bit operator or arithmetic operator. @item @ref{W0734} A left operand of logical operator is bit operator or arithmetic operator. @item @ref{W0735} A right operand of logical operator is the expression of bit operator or arithmetic operator. @end itemize @subsection Since 1.12.0 @node W0734 @section W0734 @cindex W0734 @subsection Message body A left operand of logical operator is bit operator or arithmetic operator. @subsection Content Under construction. @subsection Sample code @verbatim extern void func(unsigned int a, unsigned int b, unsigned int c) { int r; r = (a + b) && c; /* W0734 */ r = (a - b) && c; /* W0734 */ r = (a << b) || c; /* W0734 */ r = (a >> b) || c; /* W0734 */ } @end verbatim @subsection Related message @itemize @item @ref{W0732} Both operand of `&&'operator is bit operator or arithmetic operator. @item @ref{W0733} Both operand of `||'operator is bit operator or arithmetic operator. @item @ref{W0735} A right operand of logical operator is the expression of bit operator or arithmetic operator. @end itemize @subsection Since 1.12.0 @node W0735 @section W0735 @cindex W0735 @subsection Message body A right operand of logical operator is the expression of bit operator or arithmetic operator. @subsection Content Under construction. @subsection Sample code @verbatim extern void func(unsigned int a, unsigned int b, unsigned int c) { int r; r = a && (b + c); /* W0735 */ r = a && (b - c); /* W0735 */ r = a || (b >> c); /* W0735 */ r = a || (b << c); /* W0735 */ } @end verbatim @subsection Related message @itemize @item @ref{W0732} Both operand of `&&'operator is bit operator or arithmetic operator. @item @ref{W0733} Both operand of `||'operator is bit operator or arithmetic operator. @item @ref{W0734} A left operand of logical operator is bit operator or arithmetic operator. @end itemize @subsection Since 1.12.0 @node W0736 @section W0736 @cindex W0736 @subsection Message body A static variable `%s' which declared in file scope is read and write in one function only. @subsection Content Under construction. @subsection Sample code @verbatim static int a = 10; /* W0736 */ int func1(void) { return 0; } int func2(void) { return ++a; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0737 @section W0737 @cindex W0737 @subsection Message body The content of `enum %s' is unknown. The enumeration tag is declared without define the content. @subsection Content Under construction. @subsection Sample code @verbatim extern enum Foo foo; /* W0737 */ @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0738 @section W0738 @cindex W0738 @subsection Message body An implicit type conversion from positive integer constant expression to smaller unsigned type. The value is rounded. @subsection Content Under construction. @subsection Sample code @verbatim /* when char is 8 bit long */ const unsigned char uc1 = 255; /* OK */ const unsigned char uc2 = 256; /* W0738 */ /* when int is 32 bit long */ const unsigned int ui1 = 4294967295; /* OK */ const unsigned int ui2 = 4294967296; /* W0738 */ @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0739 @section W0739 @cindex W0739 @subsection Message body The result of unsigned subtraction in constant expression is minus. @subsection Content Under construction. @subsection Sample code @verbatim const unsigned int ui1 = 3U - 3U; /* OK */ const unsigned int ui2 = 3U - 5U; /* W0739 */ @end verbatim @subsection Related message @itemize @item @ref{W0740} The result of unsigned addition in constant expression beyond the maximum. @item @ref{W0741} The result of unsigned multiplication in constant expression beyond the maximum. @end itemize @subsection Since 1.4.0 @node W0740 @section W0740 @cindex W0740 @subsection Message body The result of unsigned addition in constant expression beyond the maximum. @subsection Content Under construction. @subsection Sample code @verbatim /* when int is 32 bit long */ const unsigned int ui1 = 4294967294U + 1U; /* OK */ const unsigned int ui2 = 4294967295U + 1U; /* W0740 */ @end verbatim @subsection Related message @itemize @item @ref{W0739} The result of unsigned subtraction in constant expression is minus. @item @ref{W0741} The result of unsigned multiplication in constant expression beyond the maximum. @end itemize @subsection Since 1.4.0 @node W0741 @section W0741 @cindex W0741 @subsection Message body The result of unsigned multiplication in constant expression beyond the maximum. @subsection Content Under construction. @subsection Sample code @verbatim /* when int is 32 bit long */ const unsigned int ui1 = 2000000000U * 2U; /* OK */ const unsigned int ui2 = 3000000000U * 2U; /* W0741 */ @end verbatim @subsection Related message @itemize @item @ref{W0739} The result of unsigned subtraction in constant expression is minus. @item @ref{W0740} The result of unsigned addition in constant expression beyond the maximum. @end itemize @subsection Since 1.4.0 @node W0742 @section W0742 @cindex W0742 @subsection Message body A negative integer constant expression converted to unsigned type. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO (50) unsigned int ui; ui = MACRO - 100; /* W0742 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0743 @section W0743 @cindex W0743 @subsection Message body The value of integer constant expression beyond the range of might be expressed with converted signed type. @subsection Content Under construction. @subsection Sample code @verbatim /* when char is 8 bit long */ const signed char sc1 = 127; /* OK */ const signed char sc2 = 128; /* W0743 */ /* when int is 32 bit long */ const int si1 = 2147483647; /* OK */ const int si2 = 2147483648; /* W0743 */ @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0744 @section W0744 @cindex W0744 @subsection Message body The value of this control expression is constant value to be false. This control statement is not run. @subsection Content Under construction. @subsection Sample code @verbatim #define MACRO1 (0) #define MACRO2 (1) if (MACRO1 == MACRO2) { /* W0744 */ ...snip... } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0745 @section W0745 @cindex W0745 @subsection Message body This non-constant array subscript may cause out-of-range access. @subsection Content Under construction. @subsection Sample code @verbatim void func(unsigned int a) { int buf[10]; if (a > 5 && a < 10) { buf[a + 5] = 0; /* W0745 */ } } @end verbatim @subsection Related message @itemize @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W0747 @section W0747 @cindex W0747 @subsection Message body An implicit type conversion from signed short to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(short a) { signed char b = a; /* W0747 */ foo(a); /* W0747 */ } @end verbatim @subsection Related message @itemize @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0748 @section W0748 @cindex W0748 @subsection Message body An implicit type conversion from unsigned short to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(unsigned short a) { unsigned char b = a; /* W0748 */ foo(a); /* W0748 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0749 @section W0749 @cindex W0749 @subsection Message body An implicit type conversion from signed int to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(int a) { signed char b = a; /* W0749 */ foo(a); /* W0749 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0750 @section W0750 @cindex W0750 @subsection Message body An implicit type conversion from signed int to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(int a) { short b = a; /* W0750 */ foo(a); /* W0750 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0751 @section W0751 @cindex W0751 @subsection Message body An implicit type conversion from unsigned int to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(unsigned int a) { unsigned char b = a; /* W0751 */ foo(a); /* W0751 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0752 @section W0752 @cindex W0752 @subsection Message body An implicit type conversion from unsigned int to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(unsigned int a) { unsigned short b = a; /* W0752 */ foo(a); /* W0752 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0753 @section W0753 @cindex W0753 @subsection Message body An implicit type conversion from signed long to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(long a) { signed char b = a; /* W0753 */ foo(a); /* W0753 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0754 @section W0754 @cindex W0754 @subsection Message body An implicit type conversion from signed long to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(long a) { short b = a; /* W0754 */ foo(a); /* W0754 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0755 @section W0755 @cindex W0755 @subsection Message body An implicit type conversion from signed long to signed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(long a) { int b = a; /* W0755 */ foo(a); /* W0755 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0756 @section W0756 @cindex W0756 @subsection Message body An implicit type conversion from unsigned long to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(unsigned long a) { unsigned char b = a; /* W0756 */ foo(a); /* W0756 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0757 @section W0757 @cindex W0757 @subsection Message body An implicit type conversion from unsigned long to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(unsigned long a) { unsigned short b = a; /* W0757 */ foo(a); /* W0757 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0758 @section W0758 @cindex W0758 @subsection Message body An implicit type conversion from unsigned long to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(unsigned long a) { unsigned int b = a; /* W0758 */ foo(a); /* W0758 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0759 @section W0759 @cindex W0759 @subsection Message body An implicit type conversion from signed long long to signed char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(signed char a); void bar(long long a) { signed char b = a; /* W0759 */ foo(a); /* W0759 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0760 @section W0760 @cindex W0760 @subsection Message body An implicit type conversion from signed long long to signed short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(short a); void bar(long long a) { short b = a; /* W0760 */ foo(a); /* W0760 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0761 @section W0761 @cindex W0761 @subsection Message body An implicit type conversion from signed long long to singed int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int a); void bar(long long a) { int b = a; /* W0761 */ foo(a); /* W0761 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0762 @section W0762 @cindex W0762 @subsection Message body An implicit type conversion from signed long long to signed long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(long a); void bar(long long a) { long b = a; /* W0762 */ foo(a); /* W0762 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0763 @section W0763 @cindex W0763 @subsection Message body An implicit type conversion from unsigned long long to unsigned char. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned char a); void bar(unsigned long long a) { unsigned char b = a; /* W0763 */ foo(a); /* W0763 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0764 @section W0764 @cindex W0764 @subsection Message body An implicit type conversion from unsigned long long to unsigned short. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned short a); void bar(unsigned long long a) { unsigned short b = a; /* W0764 */ foo(a); /* W0764 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0765 @section W0765 @cindex W0765 @subsection Message body An implicit type conversion from unsigned long long to unsigned int. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned int a); void bar(unsigned long long a) { unsigned int b = a; /* W0765 */ foo(a); /* W0765 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0766} An implicit type conversion from unsigned long long to unsigned long. @end itemize @subsection Since 1.0.0 @node W0766 @section W0766 @cindex W0766 @subsection Message body An implicit type conversion from unsigned long long to unsigned long. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(unsigned long a); void bar(unsigned long long a) { unsigned long b = a; /* W0766 */ foo(a); /* W0766 */ } @end verbatim @subsection Related message @itemize @item @ref{W0747} An implicit type conversion from signed short to signed char. @item @ref{W0748} An implicit type conversion from unsigned short to unsigned char. @item @ref{W0749} An implicit type conversion from signed int to signed char. @item @ref{W0750} An implicit type conversion from signed int to signed short. @item @ref{W0751} An implicit type conversion from unsigned int to unsigned char. @item @ref{W0752} An implicit type conversion from unsigned int to unsigned short. @item @ref{W0753} An implicit type conversion from signed long to signed char. @item @ref{W0754} An implicit type conversion from signed long to signed short. @item @ref{W0755} An implicit type conversion from signed long to signed int. @item @ref{W0756} An implicit type conversion from unsigned long to unsigned char. @item @ref{W0757} An implicit type conversion from unsigned long to unsigned short. @item @ref{W0758} An implicit type conversion from unsigned long to unsigned int. @item @ref{W0759} An implicit type conversion from signed long long to signed char. @item @ref{W0760} An implicit type conversion from signed long long to signed short. @item @ref{W0761} An implicit type conversion from signed long long to singed int. @item @ref{W0762} An implicit type conversion from signed long long to signed long. @item @ref{W0763} An implicit type conversion from unsigned long long to unsigned char. @item @ref{W0764} An implicit type conversion from unsigned long long to unsigned short. @item @ref{W0765} An implicit type conversion from unsigned long long to unsigned int. @end itemize @subsection Since 1.0.0 @node W0767 @section W0767 @cindex W0767 @subsection Message body An implicit type conversion from double to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(double a) { float b = a; /* W0767 */ foo(a); /* W0767 */ } @end verbatim @subsection Related message @itemize @item @ref{W0768} An implicit type conversion from long double to float. @item @ref{W0769} An implicit type conversion from long double to double. @end itemize @subsection Since 1.0.0 @node W0768 @section W0768 @cindex W0768 @subsection Message body An implicit type conversion from long double to float. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(float a); void bar(long double a) { float b = a; /* W0768 */ foo(a); /* W0768 */ } @end verbatim @subsection Related message @itemize @item @ref{W0767} An implicit type conversion from double to float. @item @ref{W0769} An implicit type conversion from long double to double. @end itemize @subsection Since 1.0.0 @node W0769 @section W0769 @cindex W0769 @subsection Message body An implicit type conversion from long double to double. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(double a); void bar(long double a) { double b = a; /* W0769 */ foo(a); /* W0769 */ } @end verbatim @subsection Related message @itemize @item @ref{W0767} An implicit type conversion from double to float. @item @ref{W0768} An implicit type conversion from long double to float. @end itemize @subsection Since 1.0.0 @node W0770 @section W0770 @cindex W0770 @subsection Message body A declaration of identifier `%s' which has external coupling exists more than one. @subsection Content Under construction. @subsection Sample code @file{test1.h} @verbatim extern int func(void); /* W0770 */ @end verbatim @file{test2.h} @verbatim extern int func(void); /* W0770 */ @end verbatim @file{test.c} @verbatim #include "test1.h" #include "test2.h" int func(void) { return 0; } @end verbatim @subsection Related message @itemize @item @ref{W0771} A global identifier `%s' is declared in more than one file. @end itemize @subsection Since 1.0.0 @node W0771 @section W0771 @cindex W0771 @subsection Message body A global identifier `%s' is declared in more than one file. @subsection Content Under construction. @subsection Sample code @file{test1.h} @verbatim extern int func(void); /* W0771 */ extern int a; /* W0771 */ @end verbatim @file{test2.h} @verbatim extern int func(void); /* W0771 */ extern int a; /* W0771 */ @end verbatim @file{test.c} @verbatim #include "test1.h" #include "test2.h" @end verbatim @subsection Related message @itemize @item @ref{W0770} A declaration of identifier `%s' which has external coupling exists more than one. @end itemize @subsection Since 1.0.0 @node W0774 @section W0774 @cindex W0774 @subsection Message body A value of double type is returned from `float %s()'function. @subsection Content Under construction. @subsection Sample code @verbatim extern double foo(void); float bar(void) { return foo(); /* W0774 */ } @end verbatim @subsection Related message @itemize @item @ref{W0775} A value of long double type is returned from `float %s()' function. @item @ref{W0776} A value of long double type is returned from `double %s()'function. @end itemize @subsection Since 1.0.0 @node W0775 @section W0775 @cindex W0775 @subsection Message body A value of long double type is returned from `float %s()' function. @subsection Content Under construction. @subsection Sample code @verbatim extern long double foo(void); float bar(void) { return foo(); /* W0775 */ } @end verbatim @subsection Related message @itemize @item @ref{W0774} A value of double type is returned from `float %s()'function. @item @ref{W0776} A value of long double type is returned from `double %s()'function. @end itemize @subsection Since 1.0.0 @node W0776 @section W0776 @cindex W0776 @subsection Message body A value of long double type is returned from `double %s()'function. @subsection Content Under construction. @subsection Sample code @verbatim extern long double foo(void); double bar(void) { return foo(); /* W0776 */ } @end verbatim @subsection Related message @itemize @item @ref{W0774} A value of double type is returned from `float %s()'function. @item @ref{W0775} A value of long double type is returned from `float %s()' function. @end itemize @subsection Since 1.0.0 @node W0777 @section W0777 @cindex W0777 @subsection Message body An implicit type conversion from compound expression of float to double. @subsection Content Under construction. @subsection Sample code @verbatim void func(float a, float b) { double c = a + b; /* W0777 */ } @end verbatim @subsection Related message @itemize @item @ref{W0778} An implicit type conversion from compound expression of float to long double. @item @ref{W0779} An implicit type conversion from compound expression of to long double. @end itemize @subsection Since 1.0.0 @node W0778 @section W0778 @cindex W0778 @subsection Message body An implicit type conversion from compound expression of float to long double. @subsection Content Under construction. @subsection Sample code @verbatim void func(float a, float b) { long double c = a + b; /* W0778 */ } @end verbatim @subsection Related message @itemize @item @ref{W0777} An implicit type conversion from compound expression of float to double. @item @ref{W0779} An implicit type conversion from compound expression of to long double. @end itemize @subsection Since 1.0.0 @node W0779 @section W0779 @cindex W0779 @subsection Message body An implicit type conversion from compound expression of to long double. @subsection Content Under construction. @subsection Sample code @verbatim void func(double a, double b) { long double c = a + b; /* W0779 */ } @end verbatim @subsection Related message @itemize @item @ref{W0777} An implicit type conversion from compound expression of float to double. @item @ref{W0778} An implicit type conversion from compound expression of float to long double. @end itemize @subsection Since 1.0.0 @node W0780 @section W0780 @cindex W0780 @subsection Message body Unsigned left shift operator `<<' in constant expression truncate non-zero high-order bit. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int foo(void) { return 0x08000000U << 5; /* W0780 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0781 @section W0781 @cindex W0781 @subsection Message body This 'switch' statement have only one path. It's verbose. @subsection Content Under construction. @subsection Sample code @verbatim int foo(const int i) { if (i > 5) { switch (i) { /* W0781 */ case 0: return 1; case 5: return 2; default: return 3; } } switch (i) { /* OK */ case 0: return 4; default: switch (i) { /* W0781 */ case 10: return 5; default: return 6; } } } @end verbatim @subsection Related message None. @subsection Since 1.6.0 @node W0783 @section W0783 @cindex W0783 @subsection Message body Cast is being made including the pointer point to incomplete type. This program is not portable. @subsection Content Under construction. @subsection Sample code @verbatim extern struct Foo *gp; void foo(int *p) { gp = (struct Foo *) p; /* W0783 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0784 @section W0784 @cindex W0784 @subsection Message body The nonstandard escape sequence is used. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message None. @subsection Since After 2.0.0 (planned) @node W0785 @section W0785 @cindex W0785 @subsection Message body This declaration of `%s' is different from a former declaration @subsection Content Under construction. @subsection Sample code @verbatim struct AAA { int a; }; union AAA { /* W0785 */ long a; int b; }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0786 @section W0786 @cindex W0786 @subsection Message body A bit field which having the type of except 'int', 'signed int' or 'unsigned int' doesn't support in ISO C standards @subsection Content Under construction. @subsection Sample code @verbatim struct ST { /* W0786 */ unsigned int a:3; unsigned long b:1; }; @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0787 @section W0787 @cindex W0787 @subsection Message body A type of `%s' is different from the past declaration in the different scope. @subsection Content Under construction. @subsection Sample code @verbatim void func1(void) { extern int num; extern void func3(void); } void func2(void) { extern double num; /* W0787 */ extern void func3(int); /* W0787 */ } @end verbatim @subsection Related message @itemize @item @ref{W0788} A type of `%s' is different from the past declaration in the same scope. @item @ref{W0789} A type of `%s' is different from the past declaration in the wider scope. @end itemize @subsection Since 1.6.0 @node W0788 @section W0788 @cindex W0788 @subsection Message body A type of `%s' is different from the past declaration in the same scope. @subsection Content Under construction. @subsection Sample code @verbatim extern int func(void); void func(void) /* W0788 */ { typedef int num; double num; /* W0788 */ } @end verbatim @subsection Related message @itemize @item @ref{W0787} A type of `%s' is different from the past declaration in the different scope. @item @ref{W0789} A type of `%s' is different from the past declaration in the wider scope. @end itemize @subsection Since 1.6.0 @node W0789 @section W0789 @cindex W0789 @subsection Message body A type of `%s' is different from the past declaration in the wider scope. @subsection Content Under construction. @subsection Sample code @verbatim int num = 0; extern int func1(void); void func2(void) { extern double num; /* W0789 */ extern void func1(void); /* W0789 */ } @end verbatim @subsection Related message @itemize @item @ref{W0788} A type of `%s' is different from the past declaration in the same scope. @item @ref{W0789} A type of `%s' is different from the past declaration in the wider scope. @end itemize @subsection Since 1.6.0 @node W0790 @section W0790 @cindex W0790 @subsection Message body An global object or a function `%s' is declared in more than one file. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { return 0; } int a = 0; int func(void) /* W0790 */ { return 1; } int a = 1; /* W0790 */ @end verbatim @subsection Related message @itemize @item @ref{W0791} An global object or a function `%s' is declared in more than one file. @end itemize @subsection Since 1.0.0 @node W0791 @section W0791 @cindex W0791 @subsection Message body An global object or a function `%s' is declared in more than one file. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim int func(void) /* W0791 */ { return 0; } int a = 0; /* W0791 */ @end verbatim @file{test2.c} @verbatim int func(void) /* W0791 */ { return 1; } int a = 1; /* W0791 */ @end verbatim @subsection Related message @itemize @item @ref{W0790} An global object or a function `%s' is declared in more than one file. @end itemize @subsection Since 1.0.0 @node W0792 @section W0792 @cindex W0792 @subsection Message body A floating point type object cast to function pointer and vice versa. @subsection Content Under construction. @subsection Sample code @verbatim int (*foo(const float f))(void) { return (int (*)(void)) f; /* W0792 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0793 @section W0793 @cindex W0793 @subsection Message body A function pointer cast to pointer to point an object and vice versa. @subsection Content Under construction. @subsection Sample code @verbatim typedef int (*funptr_t)(void); funptr_t foo(float *p) { return (funptr_t) p; /* W0793 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0794 @section W0794 @cindex W0794 @subsection Message body Left shift operation of signed value causes implementation-defined behavior. @subsection Content Under construction. @subsection Sample code @verbatim int func(int i) { return i << 1; /* W0794 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0795 @section W0795 @cindex W0795 @subsection Message body The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int, int, int); static void bar(void) { foo(1, 2); /* W0795 */ } @end verbatim @subsection Related message @itemize @item @ref{W0796} The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration. @item @ref{W0797} The number of an actual argument in function call is different from the number of a formal argument in the function declaration. @end itemize @subsection Since 1.0.0 @node W0796 @section W0796 @cindex W0796 @subsection Message body The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration. @subsection Content Under construction. @subsection Sample code @verbatim extern void foo(int, int); static void bar(void) { foo(1, 2, 3); /* W0796 */ } @end verbatim @subsection Related message @itemize @item @ref{W0795} The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration. @item @ref{W0797} The number of an actual argument in function call is different from the number of a formal argument in the function declaration. @end itemize @subsection Since 1.0.0 @node W0797 @section W0797 @cindex W0797 @subsection Message body The number of an actual argument in function call is different from the number of a formal argument in the function declaration. @subsection Content Under construction. @subsection Sample code @verbatim static int foo(int, int); static int bar(void) { int a = foo(1); /* W0795 */ int b = foo(1, 2); int c = foo(1, 2, 3); /* W0795 */ } static int foo(int a, int b) { return a + b; } @end verbatim @subsection Related message @itemize @item @ref{W0795} The number of an actual argument in function call is smaller than the number of a formal argument in the function prototype declaration. @item @ref{W0796} The number of an actual argument in function call is bigger than the number of a formal argument in the function prototype declaration. @end itemize @subsection Since 1.0.0 @node W0798 @section W0798 @cindex W0798 @subsection Message body Must not use the value with incomplete union object. @subsection Content Under construction. @subsection Sample code @verbatim extern union UN *p; void func(void) { int i = 0; if (p) { i = p->i; /* W0798 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0799} Must not use the value with incomplete structure object. @item @ref{W0800} `%s' is incomplete type which doesn't have a linkage.This is undefined. @end itemize @subsection Since 1.0.0 @node W0799 @section W0799 @cindex W0799 @subsection Message body Must not use the value with incomplete structure object. @subsection Content Under construction. @subsection Sample code @verbatim extern struct ST *p; void func(void) { int i = 0; if (p) { i = p->i; /* W0799 */ } } @end verbatim @subsection Related message @itemize @item @ref{W0798} Must not use the value with incomplete union object. @item @ref{W0800} `%s' is incomplete type which doesn't have a linkage.This is undefined. @end itemize @subsection Since 1.0.0 @node W0800 @section W0800 @cindex W0800 @subsection Message body `%s' is incomplete type which doesn't have a linkage.This is undefined. @subsection Content Under construction. @subsection Sample code @verbatim int a[]; /* W0800 */ struct ST s = { 0 }; /* W0800 */ @end verbatim @subsection Related message @itemize @item @ref{W0798} Must not use the value with incomplete union object. @item @ref{W0799} Must not use the value with incomplete structure object. @end itemize @subsection Since 1.0.0 @node W0801 @section W0801 @cindex W0801 @subsection Message body This structure or union doesn't have a named member. @subsection Content Under construction. @subsection Sample code @verbatim struct foo { /* W0801 */ }; struct bar { /* W0801 */ int; int :1; long; double; }; @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W0802 @section W0802 @cindex W0802 @subsection Message body A form of after `#include' preprocessing directive is not nor \"file name\". @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim #include fruits.h /* W0802 */ #define MACRO 1 #include MACRO /* W0802 */ @end verbatim @subsection Related message None. @subsection Since After 2.0.0 (planned) @node W0803 @section W0803 @cindex W0803 @subsection Message body A preprocessing directive is described in actual argument of function-like macro. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message None. @subsection Since After 2.0.0 (planned) @node W0804 @section W0804 @cindex W0804 @subsection Message body The 'defined' syntax is not `defined (identifier)' nor `defined identifier'. @subsection Content Under construction. @subsection Sample code @verbatim #if defined "MACRO" /* W0804 */ #endif @end verbatim @subsection Related message @itemize @item @ref{W0805} An identifier to be actual argument doesn't find in `defined'. @end itemize @subsection Since 1.0.0 @node W0805 @section W0805 @cindex W0805 @subsection Message body An identifier to be actual argument doesn't find in `defined'. @subsection Content Under construction. @subsection Sample code @verbatim #if defined "foo" /* W0805 */ int i = 0; #endif @end verbatim @subsection Related message @itemize @item @ref{W0804} The 'defined' syntax is not `defined (identifier)' nor `defined identifier'. @end itemize @subsection Since 1.16.0 @node W0806 @section W0806 @cindex W0806 @subsection Message body It is trying to define a macro named `defined'. @subsection Content Under construction. @subsection Sample code @verbatim #define defined !defined /* W0806 */ @end verbatim @subsection Related message @itemize @item @ref{W0807} It is trying to delete pre-defined macro `%s'. @item @ref{W0808} It is trying to redefine pre-defined macro `%s'. @end itemize @subsection Since 1.4.0 @node W0807 @section W0807 @cindex W0807 @subsection Message body It is trying to delete pre-defined macro `%s'. @subsection Content Under construction. @subsection Sample code @verbatim #undef __STDC_VERSION__ /* W0807 */ @end verbatim @subsection Related message @itemize @item @ref{W0806} It is trying to define a macro named `defined'. @item @ref{W0808} It is trying to redefine pre-defined macro `%s'. @end itemize @subsection Since 1.6.0 @node W0808 @section W0808 @cindex W0808 @subsection Message body It is trying to redefine pre-defined macro `%s'. @subsection Content Under construction. @subsection Sample code @verbatim #define __FILE__ "test.c" /* W0808 */ @end verbatim @subsection Related message @itemize @item @ref{W0806} It is trying to define a macro named `defined'. @item @ref{W0807} It is trying to delete pre-defined macro `%s'. @end itemize @subsection Since 1.6.0 @node W0809 @section W0809 @cindex W0809 @subsection Message body An identifier `%s' is reserved by the library. @subsection Content Under construction. @subsection Sample code @verbatim extern int __value; /* W0809 */ int _VAL = 10; /* W0809 */ static void _func(void); /* W0809 */ @end verbatim @subsection Related message None. @subsection Since 1.6.0 @node W0810 @section W0810 @cindex W0810 @subsection Message body `@{@}' is required to clarify this structure of `if-if-else' statement. @subsection Content Under construction. @subsection Sample code @verbatim int foo(int i, int j) { if (i < 0) /* W0810 */ if (j > 0) { return 0; } else { return 1; } if (i > 0) /* W0810 */ if (j < 0) { return 2; } else { return 3; } return 4; } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W0811 @section W0811 @cindex W0811 @subsection Message body The `defined' token which the expanded result of this macro doesn't allowed. @subsection Content Under construction. @subsection Sample code @verbatim #define COND defined(FOO) #if COND /* W0811 */ int i = 0; #endif @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W0827 @section W0827 @cindex W0827 @subsection Message body An initial value of nested structure's element doesn't enclosed in curly brace `@{@}'. @subsection Content Under construction. @subsection Sample code @verbatim struct ST { int i; int j; }; struct ST a[2] = { 10, 20, 30, 40 }; /* W0827 */ @end verbatim @subsection Related message @itemize @item @ref{W0828} An initial value of nested array's element doesn't enclosed in curly brace `@{ @}'. @end itemize @subsection Since 1.0.0 @node W0828 @section W0828 @cindex W0828 @subsection Message body An initial value of nested array's element doesn't enclosed in curly brace `@{@}'. @subsection Content Under construction. @subsection Sample code @verbatim int a[3][2] = { {1, 2}, {3, 4}, {5, 6} }; int b[3][2] = { 1, 2, 3, 4, 5, 6 }; /* W0828 */ @end verbatim @subsection Related message @itemize @item @ref{W0827} An initial value of nested structure's element doesn't enclosed in curly brace `@{ @}'. @end itemize @subsection Since 1.0.0 @node W0830 @section W0830 @cindex W0830 @subsection Message body There is comma `,' at the end of the enumerator list. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { Red, Green, Blue, }; /* W0830 */ @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W0831 @section W0831 @cindex W0831 @subsection Message body This is language extension for inline assembly. It will be ignored between #asm and #endasm. @subsection Content Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message @itemize @item @ref{W0832} An inline assembly syntax is using. This is the language extension. This code will be ignored. @end itemize @subsection Since 1.0.0 @node W0832 @section W0832 @cindex W0832 @subsection Message body An inline assembly syntax is using. This is the language extension. This code will be ignored. @subsection Content Under construction. @subsection Sample code @verbatim #define ASM_CODE asm("movl %ecx, %eax") void foo(int arg1, int *arg2, int arg3) { asm("movl %ecx, %eax"); /* W0832 */ __asm__("movl %ecx, (%eax)"); /* W0832 */ asm { /* W0832 */ xorl eax, eax } ASM_CODE; /* W0832 */ __asm__ volatile ( /* W0832 */ "int $0x80" : "=a" (r) "+b" (arg1), "+c" (arg2), "+d" (arg3) : "a" (128) : "memory", "cc"); } @end verbatim @subsection Related message @itemize @item @ref{W0831} This is language extension for inline assembly. It will be ignored between #asm and #endasm. @end itemize @subsection Since 1.8.0 @node W0833 @section W0833 @cindex W0833 @subsection Message body A suffix 'LL' is using. @subsection Content Under construction. @subsection Sample code @verbatim long long ll = 123LL; /* W0833 */ @end verbatim @subsection Related message @itemize @item @ref{W0834} A long long type is using. @end itemize @subsection Since 1.18.0 @node W0834 @section W0834 @cindex W0834 @subsection Message body A long long type is using. @subsection Content Under construction. @subsection Sample code @verbatim extern long long ll; /* W0834 */ @end verbatim @subsection Related message @itemize @item @ref{W0833} A suffix 'LL' is using. @end itemize @subsection Since 1.18.0 @node W0835 @section W0835 @cindex W0835 @subsection Message body A macro which receives variable argument is defined. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message None. @subsection Since After 2.0.0 (planned) @node W0947 @section W0947 @cindex W0947 @subsection Message body String literal is specified directly. @subsection Content Under construction. @subsection Sample code @verbatim func("Apple, Banana, Chocolate"); /* W0947 */ @end verbatim @subsection Related message @itemize @item @ref{W0948} Character constant %s is specified directly. @item @ref{W0949} A value `%s' is used directly for size definition of bit field. @item @ref{W0950} Integer constant `%s' is specified directly as an array size. @end itemize @subsection Since 1.0.0 @node W0948 @section W0948 @cindex W0948 @subsection Message body Character constant %s is specified directly. @subsection Content Under construction. @subsection Sample code @verbatim func('a'); /* W0948 */ @end verbatim @subsection Related message @itemize @item @ref{W0947} String literal is specified directly. @item @ref{W0949} A value `%s' is used directly for size definition of bit field. @item @ref{W0950} Integer constant `%s' is specified directly as an array size. @end itemize @subsection Since 1.0.0 @node W0949 @section W0949 @cindex W0949 @subsection Message body A value `%s' is used directly for size definition of bit field. @subsection Content Under construction. @subsection Sample code @verbatim struct ST { unsigned int a:1; unsigned int a:2; /* W0949 */ unsigned int a:3; /* W0949 */ }; @end verbatim @subsection Related message @itemize @item @ref{W0947} String literal is specified directly. @item @ref{W0948} Character constant %s is specified directly. @item @ref{W0950} Integer constant `%s' is specified directly as an array size. @end itemize @subsection Since 1.0.0 @node W0950 @section W0950 @cindex W0950 @subsection Message body Integer constant `%s' is specified directly as an array size. @subsection Content Under construction. @subsection Sample code @verbatim int a[10]; /* W0950 */ @end verbatim @subsection Related message @itemize @item @ref{W0947} String literal is specified directly. @item @ref{W0948} Character constant %s is specified directly. @item @ref{W0949} A value `%s' is used directly for size definition of bit field. @end itemize @subsection Since 1.0.0 @node W1026 @section W1026 @cindex W1026 @subsection Message body %sth actual argument is not object type. @subsection Content Under construction. @subsection Sample code @verbatim extern struct st s; extern void foo(struct st); void bar(void) { foo(s); /* W1026 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W1027 @section W1027 @cindex W1027 @subsection Message body A base type of array is function type. This is meaningless. @subsection Content Under construction. @subsection Sample code @verbatim int (fun_tbl[20])(void); /* W1027 */ @end verbatim @subsection Related message @itemize @item @ref{W1028} A base type of array is an array with unknown size. Incomplete type of array will not build. @item @ref{W1029} A base type of array is an obscure structure or union. Incomplete type of array will not build. @end itemize @subsection Since 1.0.0 @node W1028 @section W1028 @cindex W1028 @subsection Message body A base type of array is an array with unknown size. Incomplete type of array will not build. @subsection Content Under construction. @subsection Sample code @verbatim int a[4][]; /* W1028 */ @end verbatim @subsection Related message @itemize @item @ref{W1027} A base type of array is function type. This is meaningless. @item @ref{W1029} A base type of array is an obscure structure or union. Incomplete type of array will not build. @end itemize @subsection Since 1.0.0 @node W1029 @section W1029 @cindex W1029 @subsection Message body A base type of array is an obscure structure or union. Incomplete type of array will not build. @subsection Content Under construction. @subsection Sample code @verbatim struct ST a[5]; /* W1029 */ @end verbatim @subsection Related message @itemize @item @ref{W1027} A base type of array is function type. This is meaningless. @item @ref{W1028} A base type of array is an array with unknown size. Incomplete type of array will not build. @end itemize @subsection Since 1.0.0 @node W1030 @section W1030 @cindex W1030 @subsection Message body A label `%s' is used more than two times in this function. @subsection Content Under construction. @subsection Sample code @verbatim void func(int a, int b) { if (a == 0) { int c = 0; RETRY: b = 10; } if (b != 0) { goto RETRY; } RETRY: /* W1030 */ b = 1; ...snip... } @end verbatim @subsection Related message None. @subsection Since 1.6.0 @node W1031 @section W1031 @cindex W1031 @subsection Message body An Object `%s' is declared both external coupling and internal coupling. This action is undefined. @subsection Content Under construction. @subsection Sample code @file{test.h} @verbatim extern int a; @end verbatim @file{test.c} @verbatim #include "test.h" static int a; /* W1031 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W1032 @section W1032 @cindex W1032 @subsection Message body A tentative definition of variable '%s' which has internal linkage must not incomplete type. @subsection Content Under construction. @subsection Sample code @verbatim static struct ST a[3]; /* W1032 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W1033 @section W1033 @cindex W1033 @subsection Message body A 'volatile' or 'const' qualifier is used for the type of function return value. This action is undefined. @subsection Content Under construction. @subsection Sample code @verbatim extern const int func1(int); /* W1033 */ const int func2(int i) /* W1033 */ { return i + 1; } const int *func3(int i) /* OK */ { static int j; j = i; return &j; } @end verbatim @subsection Related message None. @subsection Since 1.4.0 @node W1034 @section W1034 @cindex W1034 @subsection Message body It is declared at function `%s()' with static storage class specifier in block scope. This usage is meaningless. @subsection Content Under construction. @subsection Sample code @verbatim int func(void) { static int func1(void); /* W1034 */ extern int func2(void); } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W1035 @section W1035 @cindex W1035 @subsection Message body `%s' declared typedef. It cannot be redeclared inside an inner scope without using explicit type. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message @itemize @item @ref{W1036} `%s' declared typedef. It cannot be redeclared as a member of structure or union without using explicit type. @end itemize @subsection Since After 2.0.0 (planned) @node W1036 @section W1036 @cindex W1036 @subsection Message body `%s' declared typedef. It cannot be redeclared as a member of structure or union without using explicit type. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message @itemize @item @ref{W1035} `%s' declared typedef. It cannot be redeclared inside an inner scope without using explicit type. @end itemize @subsection Since After 2.0.0 (planned) @node W1037 @section W1037 @cindex W1037 @subsection Message body `%s' which has external coupling is declared more than one, this is incompatible. @subsection Content Under construction. @subsection Sample code @file{test1.c} @verbatim extern void func(void); /* W1037 */ extern int a; /* W1037 */ @end verbatim @file{test2.c} @verbatim extern int func(int); /* W1037 */ extern long a; /* W1037 */ @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W1039 @section W1039 @cindex W1039 @subsection Message body `ll' is used in %sth conversion specifier. @subsection Content Under construction. @subsection Sample code @verbatim extern int printf(const char *, ...); void foo(long long ll) { printf("%lld", ll); /* W1039 */ } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W1040 @section W1040 @cindex W1040 @subsection Message body An unrecognizable string is described after preprocessing directive. @subsection Content Under construction. @subsection Sample code @verbatim #define TEST #ifdef TEST #if defined(CASE_1) int i = 1; #elif defined(CASE_2) int i = 2; #endif CASE /* W1040 */ #else int i = 0; #endif TEST /* W1040 */ @end verbatim @subsection Related message @itemize @item @ref{W1041} `%s' is not official preprocessing directive of ISO C standards. @item @ref{W1042} 'sizeof' operator is using in preprocessing directive. This is the language extension. @end itemize @subsection Since 1.16.0 @node W1041 @section W1041 @cindex W1041 @subsection Message body `%s' is not official preprocessing directive of ISO C standards. @subsection Content Under construction. @subsection Sample code @verbatim #compiler_specific_extension 1 2.3 "4" /* W1041 */ @end verbatim @subsection Related message @itemize @item @ref{W1040} An unrecognizable string is described after preprocessing directive. @item @ref{W1042} 'sizeof' operator is using in preprocessing directive. This is the language extension. @end itemize @subsection Since 1.16.0 @node W1042 @section W1042 @cindex W1042 @subsection Message body 'sizeof' operator is using in preprocessing directive. This is the language extension. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message @itemize @item @ref{W1040} An unrecognizable string is described after preprocessing directive. @item @ref{W1041} `%s' is not official preprocessing directive of ISO C standards. @end itemize @subsection Since After 2.0.0 (planned) @node W1043 @section W1043 @cindex W1043 @subsection Message body `@@ address' is not supported ISO C standards. It will be considered as language extension. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message @itemize @item @ref{W1045} This `@@ word' syntax will be ignored. @end itemize @subsection Since After 2.0.0 (planned) @node W1045 @section W1045 @cindex W1045 @subsection Message body This `@@ word' syntax will be ignored. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message @itemize @item @ref{W1043} `@@ address' is not supported ISO C standards. It will be considered as language extension. @end itemize @subsection Since After 2.0.0 (planned) @node W1046 @section W1046 @cindex W1046 @subsection Message body A space character is ignored between `\' and line feed. @subsection Content Under construction. @subsection Sample code @verbatim #define FOO(a, b) /* OK */ \ ( /* W1046 */ \ (a) + (b) /* W1046 */ \ ) @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W1047 @section W1047 @cindex W1047 @subsection Message body The struct, union or array's initializer is not literal. @subsection Content Under construction. @subsection Sample code @verbatim int foo(int i, int j) { int a[] = { 0, i, j }; /* W1047 */ return a[1]; } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W1048 @section W1048 @cindex W1048 @subsection Message body The multi byte string literal is an implementation defined value. @subsection Content @b{This message will be supported after AdLint 2.0.0} Under construction. @subsection Sample code @verbatim /* will be added */ @end verbatim @subsection Related message None. @subsection Since After 2.0.0 (planned) @node W1049 @section W1049 @cindex W1049 @subsection Message body The result of conversion to signed integer type in integer expression might not be expressed by a signed type. @subsection Content Under construction. @subsection Sample code example 1 @verbatim void func1(signed int si) { signed char sc = (signed char) si + 10; /* W1049 */ } @end verbatim example 2 @verbatim void func(unsigned int ui) { unsigned int a = ui * ui; } @end verbatim @subsection Related message @itemize @item @ref{W1050} The result of conversion to signed integer type in integer expression is not express by a signed type. @item @ref{W1051} The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow. @item @ref{W1052} The result of unsigned arithmetic expression typed `%s' can be going around by overflow. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W1050 @section W1050 @cindex W1050 @subsection Message body The result of conversion to signed integer type in integer expression is not express by a signed type. @subsection Content Under construction. @subsection Sample code example 1 @verbatim void func(signed int si) { signed char sc = 0; if (si > 127) { sc = (signed char) si + 1; /* W1050 */ } } @end verbatim example 2 @verbatim void func(unsigned int ui) { unsigned int a = ui * ui; } @end verbatim @subsection Related message @itemize @item @ref{W1049} The result of conversion to signed integer type in integer expression might not be expressed by a signed type. @item @ref{W1051} The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow. @item @ref{W1052} The result of unsigned arithmetic expression typed `%s' can be going around by overflow. @item @ref{C1000} Warning above is detected in the following context. @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 1.0.0 @node W1051 @section W1051 @cindex W1051 @subsection Message body The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(unsigned int ui) { if (ui > 0xEFFFFFFFU) { return ui + 0x10000000U; /* W1051 */ } return 0U; } @end verbatim @subsection Related message @itemize @item @ref{W1049} The result of conversion to signed integer type in integer expression might not be expressed by a signed type. @item @ref{W1050} The result of conversion to signed integer type in integer expression is not express by a signed type. @item @ref{W1052} The result of unsigned arithmetic expression typed `%s' can be going around by overflow. @end itemize @subsection Since 1.0.0 @node W1052 @section W1052 @cindex W1052 @subsection Message body The result of unsigned arithmetic expression typed `%s' can be going around by overflow. @subsection Content Under construction. @subsection Sample code @verbatim unsigned int func(unsigned int a, unsigned int b) { if (a > 0xEFFFFFFFU && b < 0x20000000U) { return a + b; /* W1052 */ } return 0U; } @end verbatim @subsection Related message @itemize @item @ref{W1049} The result of conversion to signed integer type in integer expression might not be expressed by a signed type. @item @ref{W1050} The result of conversion to signed integer type in integer expression is not express by a signed type. @item @ref{W1051} The result of unsigned arithmetic expression typed `%s' is going around 0 by overflow. @end itemize @subsection Since 1.0.0 @node W1053 @section W1053 @cindex W1053 @subsection Message body A numeric constants is passed to an actual argument which formal argument is enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern void func1(enum Color); void func2(void) { func1(4); /* W1053 */ } @end verbatim @subsection Related message @itemize @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1054 @section W1054 @cindex W1054 @subsection Message body A non enumeration type expression is substituted for the enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern enum Color col; void func2(void) { col = 4; /* W1054 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1055 @section W1055 @cindex W1055 @subsection Message body A non enumeration type expression is returned from the function which return value is enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Color func(void) { return 4; /* W1055 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1056 @section W1056 @cindex W1056 @subsection Message body An object of actual argument is different enumeration type which formal argument is enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN= 2, BLUE = 4 }; enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER }; extern void func1(enum Color); void func2(enum Season ssn) { func1(ssn); /* W1056 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1057 @section W1057 @cindex W1057 @subsection Message body An enumeration value is substituted for different enumeration type object. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER }; extern enum Color col; void func(enum Season ssn) { col = ssn; /* W1057 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1058 @section W1058 @cindex W1058 @subsection Message body A different enumeration type of value is returned from a function which return value is enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER }; enum Color func(enum Season ssn) { return ssn; /* W1058 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1059 @section W1059 @cindex W1059 @subsection Message body An enumeration value is passed to actual argument which formal argument is not enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern void func1(int num); void func2(enum Color col) { func1(col); /* W1059 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1060 @section W1060 @cindex W1060 @subsection Message body An enumeration value is returned from a function which return value is not enumeration type . @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; int func2(enum Color col) { return col; /* W1060 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1061 @section W1061 @cindex W1061 @subsection Message body Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern void func1(enum Color); void func2(int num) { func1(num); /* W1061 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1062 @section W1062 @cindex W1062 @subsection Message body Non constant expression is substituted for the enumeration type object. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; extern enum Color col; void func(int num) { col = num + 1; /* W1062 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1063 @section W1063 @cindex W1063 @subsection Message body The return value returned from enumeration type function to non constant expression. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED = 1, GREEN = 2, BLUE = 4 }; enum Color func(int num) { return num / 2; /* W1063 */ } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.6.0 @node W1064 @section W1064 @cindex W1064 @subsection Message body A integer constant is used in switch statement where case label is enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED, BLUE, GREEN }; int func(enum Color c) { switch (c) { case RED: /* OK */ return 1; case 1: /* W1064 */ return 2; } return 0; } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1065} A value of different enumeration type is used in switch statement where case label is an enumeration type. @end itemize @subsection Since 1.4.0 @node W1065 @section W1065 @cindex W1065 @subsection Message body A value of different enumeration type is used in switch statement where case label is an enumeration type. @subsection Content Under construction. @subsection Sample code @verbatim enum Color { RED, BLUE, GREEN }; enum Fruits { APPLE, BANANA, ORANGE, GRAPE }; int func(enum Color c) { switch (c) { case RED: /* OK */ return 1; case ORANGE: /* W1065 */ return 2; } return 0; } @end verbatim @subsection Related message @itemize @item @ref{W1053} A numeric constants is passed to an actual argument which formal argument is enumeration type. @item @ref{W1054} A non enumeration type expression is substituted for the enumeration type. @item @ref{W1055} A non enumeration type expression is returned from the function which return value is enumeration type. @item @ref{W1056} An object of actual argument is different enumeration type which formal argument is enumeration type. @item @ref{W1057} An enumeration value is substituted for different enumeration type object. @item @ref{W1058} A different enumeration type of value is returned from a function which return value is enumeration type. @item @ref{W1059} An enumeration value is passed to actual argument which formal argument is not enumeration type. @item @ref{W1060} An enumeration value is returned from a function which return value is not enumeration type . @item @ref{W1061} Non constant expression of non enumeration type is passed to actual argument which formal argument is enumeration type. @item @ref{W1062} Non constant expression is substituted for the enumeration type object. @item @ref{W1063} The return value returned from enumeration type function to non constant expression. @item @ref{W1064} A integer constant is used in switch statement where case label is enumeration type. @end itemize @subsection Since 1.4.0 @node W1066 @section W1066 @cindex W1066 @subsection Message body A value of the `float' typed compound expression is explicitly converted into a `double' value. @subsection Content Under construction. @subsection Sample code @verbatim void func(float a) { double b = (double) (a * a); } @end verbatim @subsection Related message @itemize @item @ref{W1067} A value of the `float' typed compound expression is explicitly converted into a `long double' value. @item @ref{W1068} A value of the `double' typed compound expression is explicitly converted into a `long double' value. @end itemize @subsection Since 1.14.0 @node W1067 @section W1067 @cindex W1067 @subsection Message body A value of the `float' typed compound expression is explicitly converted into a `long double' value. @subsection Content Under construction. @subsection Sample code @verbatim void func(float a) { long double b = (long double) (a * a); } @end verbatim @subsection Related message @itemize @item @ref{W1066} A value of the `float' typed compound expression is explicitly converted into a `double' value. @item @ref{W1068} A value of the `double' typed compound expression is explicitly converted into a `long double' value. @end itemize @subsection Since 1.14.0 @node W1068 @section W1068 @cindex W1068 @subsection Message body A value of the `double' typed compound expression is explicitly converted into a `long double' value. @subsection Content Under construction. @subsection Sample code @verbatim void func(double a) { long double b = (long double) (a * a); } @end verbatim @subsection Related message @itemize @item @ref{W1066} A value of the `float' typed compound expression is explicitly converted into a `double' value. @item @ref{W1067} A value of the `float' typed compound expression is explicitly converted into a `long double' value. @end itemize @subsection Since 1.14.0 @node W1069 @section W1069 @cindex W1069 @subsection Message body No trailing `else' clause is found in this `if-else-if' statements chain. @subsection Content Under construction. @subsection Sample code @verbatim static int func(int i) { if (i == 2) { /* W1069 */ return 0; } else if (i == 4) { return 1; } return 2; } @end verbatim @subsection Related message None. @subsection Since 1.14.0 @node W1070 @section W1070 @cindex W1070 @subsection Message body This `switch' statement can be translated into `if-else' statement because there are only 2 execution paths. @subsection Content Under construction. @subsection Sample code @verbatim switch (x) { case 1: ... break; default: ... } @end verbatim @subsection Related message None. @subsection Since 1.14.0 @node W1071 @section W1071 @cindex W1071 @subsection Message body Function `%s' has multiple termination points. @subsection Content Under construction. @subsection Sample code @verbatim void foo(int i) /* W1071 */ { if (i == 0) { return; } } @end verbatim @subsection Related message None. @subsection Since 1.18.0 @node W1072 @section W1072 @cindex W1072 @subsection Message body `A `goto' statement is found. @subsection Content Under construction. @subsection Sample code @verbatim static int func(int i) { if (i == 1) { goto Label1; /* W1072 */ } goto Label2; /* W1072 */ Label1: i = 10; Label2: i = 20; return i; } @end verbatim @subsection Related message None. @subsection Since 1.14.0 @node W1073 @section W1073 @cindex W1073 @subsection Message body Return value of the function `%s' is discarded. @subsection Content Under construction. @subsection Sample code @verbatim extern int bar(void); static void foo(void) { int i; int j; for (i = 0, bar(); i < 10; i++) { /* W1073 */ j = bar(); /* OK */ } } @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W1074 @section W1074 @cindex W1074 @subsection Message body Side-effects in `sizeof' operand will not be recorded because the operand will not be executed actually. @subsection Content Under construction. @subsection Sample code @verbatim static int foo(void) { int i = 0; if (sizeof(i++) == 4) { /* W1074 */ return 0; } else { return 1; } } @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W1075 @section W1075 @cindex W1075 @subsection Message body This declaration has no `static' storage-class-specifier while the declaring object has internal-linkage. @subsection Content Under construction. @subsection Sample code @verbatim static int func(void); int func(void) /* W1075 */ { ... } @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W1076 @section W1076 @cindex W1076 @subsection Message body `%s' has internal-linkage without any prototype declarations. @subsection Content Under construction. @subsection Sample code @verbatim static int func(void) /* W1076 */ { return 0; } @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W1077 @section W1077 @cindex W1077 @subsection Message body Declaring array object without a size. @subsection Content Under construction. @subsection Sample code @verbatim extern int a[]; /* W1077 */ @end verbatim @subsection Related message None. @subsection Since 1.16.0 @node W9001 @section W9001 @subsection Message body Control never reaches to this statement. @subsection Content Under construction. @subsection Sample code @verbatim extern int all_possible_values_of_int(void); extern unsigned int zero_if_succeeded(void); void func(void) { int i = all_possible_values_of_int(); if (i < 0) { unsigned int ui = zero_if_succeeded(); if (ui > 0) { return; } /* "ui" is equal to zero at this point */ /* Always be true? No, it'll be false all the time */ if (i < ui) { return; /* W9001: Control never reaches here! */ } /* * ISO standard says; * Usual Arithmetic Conversion performed before evaluating * the expression "i < ui". * Usual Arithmetic Conversion makes "i < ui" into * "(unsigned int) i < ui" and then the value of "i" which * is less than 0 will be converted into a new value which * is greater than 0 because of the wrap-around. * So, the expression ("a value greater than 0" < 0) makes * always false. */ } } @end verbatim @subsection Related message None. @subsection Since 1.0.0 @node W9002 @section W9002 @cindex W9002 @subsection Message body There is no line feed character at the end of file. @subsection Content Under construction. @subsection Sample code Under construction. @subsection Related message None. @subsection Since 1.0.0 @node W9003 @section W9003 @cindex W9003 @subsection Message body An object typed `%s' is implicitly converted into an object of type `%s'. @subsection Content This message indicates that an implicit conversion from or to an object of the non-standard type will occur. @subsection Sample code @verbatim enum Color { RED, BLUE, GREEN }; enum Fruit { APPLE, BANANA, ORANGE }; extern void foo(enum Color); static void bar(void) { int i = RED; /* W9003 */ foo(ORANGE); /* W9003 */ } @end verbatim @subsection Related message None. @subsection Since 1.12.0 @node C0001 @section C0001 @cindex C0001 @subsection Message body A warning is detected as a pair of this identifier `%s'. @subsection Content Under construction. @subsection Sample code @verbatim int very_long_long_long_long_long_long_long_identifier_1 = 0; /* C0001 */ int very_long_long_long_long_long_long_long_identifier_2 = 1; /* W0052 */ @end verbatim @subsection Related message @itemize @item @ref{W0051} An external identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in linker property. @item @ref{W0052} An identifier `%s' cannot distinguish other identifier name from the range of number of characters defined in compile property. @end itemize @subsection Since 1.0.0 @node C1000 @section C1000 @cindex C1000 @subsection Message body Warning above is detected in the following context. @subsection Content This message indicates that the above @ref{W0093,W0093}, @ref{W0096,W0096}, @ref{W0097,W0097}, @ref{W0115,W0115}, @ref{W0116,W0116}, @ref{W0421,W0421}, @ref{W0422,W0422}, @ref{W0423,W0423}, @ref{W0424,W0424}, @ref{W0459,W0459}, @ref{W0460,W0460}, @ref{W0461,W0461}, @ref{W0462,W0462}, @ref{W0568,W0568}, @ref{W0569,W0569}, @ref{W0570,W0570}, @ref{W0607,W0607}, @ref{W0608,W0608}, @ref{W0705,W0705}, @ref{W0707,W0707}, @ref{W0720,W0720}, @ref{W0745,W0745}, @ref{W1049,W1049} and @ref{W1050,W1050} warnings are detected in the context described by the following messages. @subsection Sample code @verbatim 1: int foo(int i) 2: { 3: int j; /* C1003 */ 4: 5: if (i < 0) { /* C1001 */ 6: if (i < -10) { /* C1002 */ 7: j = 2; 8: } 9: else if (i < -5) { /* C1002 */ 10: j = 3; 11: } 12: } 13: else { 14: j = 1; 15: } 16: 17: return j; /* W0460 */ 18: } a.c:17:12:warning:c_builtin:W0460:UNC:X99:A value of variable `j' wouldn't set when this expression is evaluated. :::context:c_builtin:C1000:INF:X99:Warning above is detected in the following context. a.c:3:9:context:c_builtin:C1003:INF:X99:The problematic variable is defined here without initializer. a.c:5:11:context:c_builtin:C1001:INF:X99:This controlling-expression is evaluated to be true. a.c:6:15:context:c_builtin:C1002:INF:X99:This controlling-expression is evaluated to be false. a.c:9:20:context:c_builtin:C1002:INF:X99:This controlling-expression is evaluated to be false. @end verbatim @subsection Related message @itemize @item @ref{C1001} This controlling-expression is evaluated to be true. @item @ref{C1002} This controlling-expression is evaluated to be false. @item @ref{C1003} The problematic variable is defined here without initializer. @item @ref{C1004} NULL value is assigned to the the problematic variable. @item @ref{C1005} A value possibly be NULL is assigned to the problematic variable. @item @ref{C1006} New value is assigned to the problematic variable. @end itemize @subsection Since 3.2.0 @node C1001 @section C1001 @cindex C1001 @subsection Message body This controlling-expression is evaluated to be true. @subsection Content This message indicates that the controlling-expression was evaluated as true in the context of detecting @ref{W0093,W0093}, @ref{W0096,W0096}, @ref{W0097,W0097}, @ref{W0115,W0115}, @ref{W0116,W0116}, @ref{W0421,W0421}, @ref{W0422,W0422}, @ref{W0423,W0423}, @ref{W0424,W0424}, @ref{W0459,W0459}, @ref{W0460,W0460}, @ref{W0461,W0461}, @ref{W0462,W0462}, @ref{W0568,W0568}, @ref{W0569,W0569}, @ref{W0570,W0570}, @ref{W0607,W0607}, @ref{W0608,W0608}, @ref{W0705,W0705}, @ref{W0707,W0707}, @ref{W0720,W0720}, @ref{W0745,W0745}, @ref{W1049,W1049} and @ref{W1050,W1050} warnings. @subsection Sample code @verbatim int foo(int i) { int j; /* C1003 */ if (i < 0) { /* C1001 */ if (i < -10) { /* C1002 */ j = 2; } else if (i < -5) { /* C1002 */ j = 3; } } else { j = 1; } return j; /* W0460 */ } @end verbatim @subsection Related message @itemize @item @ref{W0093} This expression may cause division-by-zero. @item @ref{W0096} It divided by a constant expression which definitely zero. @item @ref{W0097} This expression must cause division-by-zero. @item @ref{W0115} Unsigned left shift operator `<<' drop the high-order bit. @item @ref{W0116} Unsigned left shift operator `<<' can be drop high-order bit. @item @ref{W0421} Value of the dereferencing pointer must be NULL. @item @ref{W0422} Value of the dereferencing pointer may be NULL. @item @ref{W0423} Arithmetic operation is being made to the pointer which its value will be NULL. @item @ref{W0424} Arithmetic operation is being made to the pointer which its value might be NULL. @item @ref{W0459} A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. @item @ref{W0460} A value of variable `%s' wouldn't set when this expression is evaluated. @item @ref{W0461} A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. @item @ref{W0462} A pointer which the value will probably not set is used for the actual argument of the function. @item @ref{W0568} The result of left shift operation against the signed constant expression value is undefined. @item @ref{W0569} The result of left shift operation against the signed expression value is undefined. @item @ref{W0570} This signed left shift operation may make undefined value. @item @ref{W0607} An integer expression which the value which the value is minus converted to unsigned type. @item @ref{W0608} An integer expression which the value might be minus converted to unsigned type. @item @ref{W0705} This non-constant array subscript may cause out-of-range access. @item @ref{W0707} This constant array subscript must cause out-of-range access. @item @ref{W0720} The value with floating-point type doesn't fit in the range of converted type. @item @ref{W0745} This non-constant array subscript may cause out-of-range access. @item @ref{W1049} The result of conversion to signed integer type in integer expression might not be expressed by a signed type. @item @ref{W1050} The result of conversion to signed integer type in integer expression is not express by a signed type. @end itemize @subsection Since 3.2.0 @node C1002 @section C1002 @cindex C1002 @subsection Message body This controlling-expression is evaluated to be false. @subsection Content This message indicates that the controlling-expression was evaluated as false in the context of detecting @ref{W0093,W0093}, @ref{W0096,W0096}, @ref{W0097,W0097}, @ref{W0115,W0115}, @ref{W0116,W0116}, @ref{W0421,W0421}, @ref{W0422,W0422}, @ref{W0423,W0423}, @ref{W0424,W0424}, @ref{W0459,W0459}, @ref{W0460,W0460}, @ref{W0461,W0461}, @ref{W0462,W0462}, @ref{W0568,W0568}, @ref{W0569,W0569}, @ref{W0570,W0570}, @ref{W0607,W0607}, @ref{W0608,W0608}, @ref{W0705,W0705}, @ref{W0707,W0707}, @ref{W0720,W0720}, @ref{W0745,W0745}, @ref{W1049,W1049} and @ref{W1050,W1050} warnings. @subsection Sample code @verbatim int foo(int i) { int j; /* C1003 */ if (i < 0) { /* C1001 */ if (i < -10) { /* C1002 */ j = 2; } else if (i < -5) { /* C1002 */ j = 3; } } else { j = 1; } return j; /* W0460 */ } @end verbatim @subsection Related message @itemize @item @ref{W0093} This expression may cause division-by-zero. @item @ref{W0096} It divided by a constant expression which definitely zero. @item @ref{W0097} This expression must cause division-by-zero. @item @ref{W0115} Unsigned left shift operator `<<' drop the high-order bit. @item @ref{W0116} Unsigned left shift operator `<<' can be drop high-order bit. @item @ref{W0421} Value of the dereferencing pointer must be NULL. @item @ref{W0422} Value of the dereferencing pointer may be NULL. @item @ref{W0423} Arithmetic operation is being made to the pointer which its value will be NULL. @item @ref{W0424} Arithmetic operation is being made to the pointer which its value might be NULL. @item @ref{W0459} A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. @item @ref{W0460} A value of variable `%s' wouldn't set when this expression is evaluated. @item @ref{W0461} A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. @item @ref{W0462} A pointer which the value will probably not set is used for the actual argument of the function. @item @ref{W0568} The result of left shift operation against the signed constant expression value is undefined. @item @ref{W0569} The result of left shift operation against the signed expression value is undefined. @item @ref{W0570} This signed left shift operation may make undefined value. @item @ref{W0607} An integer expression which the value which the value is minus converted to unsigned type. @item @ref{W0608} An integer expression which the value might be minus converted to unsigned type. @item @ref{W0705} This non-constant array subscript may cause out-of-range access. @item @ref{W0707} This constant array subscript must cause out-of-range access. @item @ref{W0720} The value with floating-point type doesn't fit in the range of converted type. @item @ref{W0745} This non-constant array subscript may cause out-of-range access. @item @ref{W1049} The result of conversion to signed integer type in integer expression might not be expressed by a signed type. @item @ref{W1050} The result of conversion to signed integer type in integer expression is not express by a signed type. @end itemize @subsection Since 3.2.0 @node C1003 @section C1003 @cindex C1003 @subsection Message body The problematic variable is defined here without initializer. @subsection Content This message indicates where the problematic variable is defined in the context of detecting @ref{W0459,W0459}, @ref{W0460,W0460}, @ref{W0461,W0461} and @ref{W0462,W0462} warnings. @subsection Sample code @verbatim int foo(int i) { int j; /* C1003 */ if (i < 0) { /* C1001 */ if (i < -10) { /* C1002 */ j = 2; } else if (i < -5) { /* C1002 */ j = 3; } } else { j = 1; } return j; /* W0460 */ } @end verbatim @subsection Related message @itemize @item @ref{W0459} A value of variable `%s' doesn't set when this expression is evaluated. This program is danger. @item @ref{W0460} A value of variable `%s' wouldn't set when this expression is evaluated. @item @ref{W0461} A pointer which points the undetermined variable is used for the actual argument of the function. This program is danger. @item @ref{W0462} A pointer which the value will probably not set is used for the actual argument of the function. @end itemize @subsection Since 3.2.0 @node C1004 @section C1004 @cindex C1004 @subsection Message body NULL value is assigned to the the problematic variable. @subsection Content This message indicates where the NULL value was assigned to the problematic variable in the context of detecting @ref{W0421,W0421}, @ref{W0422,W0422}, @ref{W0423,W0423} and @ref{W0424,W0424} warnings. @subsection Sample code @verbatim extern int *bar(void); extern int *baz(void); void foo(int i) { int *p = NULL; /* C1004 */ if (i < 0) { /* C1002 */ p = bar(); if (!p) { return; } } else { p = baz(); /* C1005 */ } *p += 2; /* W0422 */ } @end verbatim @subsection Related message @itemize @item @ref{W0421} Value of the dereferencing pointer must be NULL. @item @ref{W0422} Value of the dereferencing pointer may be NULL. @item @ref{W0423} Arithmetic operation is being made to the pointer which its value will be NULL. @item @ref{W0424} Arithmetic operation is being made to the pointer which its value might be NULL. @end itemize @subsection Since 3.2.0 @node C1005 @section C1005 @cindex C1005 @subsection Message body A value possibly be NULL is assigned to the problematic variable. @subsection Content This message indicates where the value possibly be NULL was assigned to the problematic variable in the context of detecting @ref{W0421,W0421}, @ref{W0422,W0422}, @ref{W0423,W0423} and @ref{W0424,W0424} warnings. @subsection Sample code @verbatim extern int *bar(void); extern int *baz(void); void foo(int i) { int *p = NULL; /* C1004 */ if (i < 0) { /* C1002 */ p = bar(); if (!p) { return; } } else { p = baz(); /* C1005 */ } *p += 2; /* W0422 */ } @end verbatim @subsection Related message @itemize @item @ref{W0421} Value of the dereferencing pointer must be NULL. @item @ref{W0422} Value of the dereferencing pointer may be NULL. @item @ref{W0423} Arithmetic operation is being made to the pointer which its value will be NULL. @item @ref{W0424} Arithmetic operation is being made to the pointer which its value might be NULL. @end itemize @subsection Since 3.2.0 @node C1006 @section C1006 @cindex C1006 @subsection Message body New value is assigned to the problematic variable. @subsection Content This message indicates where a value was assigned to the problematic variable in the context of detecting @ref{W0093,W0093}, @ref{W0096,W0096}, @ref{W0097,W0097}, @ref{W0115,W0115}, @ref{W0116,W0116}, @ref{W0568,W0568}, @ref{W0569,W0569}, @ref{W0570,W0570}, @ref{W0607,W0607}, @ref{W0608,W0608}, @ref{W0705,W0705}, @ref{W0707,W0707}, @ref{W0720,W0720}, @ref{W0745,W0745}, @ref{W1049,W1049} and @ref{W1050,W1050} warnings. @subsection Sample code @verbatim int foo(int i) { int j = 0; /* C1006 */ if (i < 0) { /* C1002 */ j = -i; } else if (i > 0) { /* C1002 */ j = i; } return 5 / j; /* W0093 */ } @end verbatim @subsection Related message @itemize @item @ref{W0093} This expression may cause division-by-zero. @item @ref{W0096} It divided by a constant expression which definitely zero. @item @ref{W0097} This expression must cause division-by-zero. @item @ref{W0115} Unsigned left shift operator `<<' drop the high-order bit. @item @ref{W0116} Unsigned left shift operator `<<' can be drop high-order bit. @item @ref{W0568} The result of left shift operation against the signed constant expression value is undefined. @item @ref{W0569} The result of left shift operation against the signed expression value is undefined. @item @ref{W0570} This signed left shift operation may make undefined value. @item @ref{W0607} An integer expression which the value which the value is minus converted to unsigned type. @item @ref{W0608} An integer expression which the value might be minus converted to unsigned type. @item @ref{W0705} This non-constant array subscript may cause out-of-range access. @item @ref{W0707} This constant array subscript must cause out-of-range access. @item @ref{W0720} The value with floating-point type doesn't fit in the range of converted type. @item @ref{W0745} This non-constant array subscript may cause out-of-range access. @item @ref{W1049} The result of conversion to signed integer type in integer expression might not be expressed by a signed type. @item @ref{W1050} The result of conversion to signed integer type in integer expression is not express by a signed type. @end itemize @subsection Since 3.2.0 @node Metrics @chapter Metrics List @menu * FL_STMT::Number of statements * FL_FUNC::Number of functions * FN_STMT::Number of statements * FN_UNRC::Number of unreached statements * FN_LINE::Number of lines * FN_PARA::Number of parameters * FN_UNUV::Number of not use /not reuse variables * FN_CSUB::Location number of call function * FN_CALL::Location number of called from function * FN_GOTO::Number of goto statement * FN_RETN::Number of return point in a function * FN_UELS::Number of 'if' statement unless 'else' * FN_NEST::Maximum number of nest of control flow graph * FN_PATH::Presumed number of static path * FN_CYCM::Cyclomatic complexity @end menu @node FL_STMT @section FL_STMT @cindex FL_STMT @subsection Metric name Number of statements @subsection Content The number which it recognized as statements by syntax rule in a file. @subsection Sample code @verbatim int foo(int a) { int i = 0; /* A declaration is not a statement */ if (a > 0) { /* An if-else-statement makes FL_STMT += 1 */ i = a + 1; /* An expression-statement makes FL_STMT += 1 */ } else { ; /* An empty expression-statement makes FL_STMT += 1 */ } return i; /* A jump-statement makes FL_STMT += 1 */ } /* Now, FL_STMT == 4 */ void bar(int a) { struct { /* A declaration is not a statement */ int i; } s; /* A for-statement which has 2 expression-statements (`s.i=0;' and `s.i 0) { /* An if-else-statement makes foo's FN_STMT += 1 */ i = a + 1; /* An expression-statement makes foo's FN_STMT += 1 */ } else { ; /* An empty expression-statement makes foo's FN_STMT += 1 */ } return i; /* A jump-statement makes foo's FN_STMT += 1 */ /* foo's FN_STMT == 4 */ } void bar(int a) { struct { /* A declaration is not a statement */ int i; } s; /* A for-statement which has 2 expression-statements (`s.i=0;' and * `s.i int foo(int i) { unsigned int ui; if (i < 0) { switch (i) { case -3: ui = 0; break; /* Control never reaches to this "case 3:" clause because "i" is less than 0 at this point */ case 3: /* This label is part of an unreachable labeled-statement, but it makes foo's FN_UNRC += 1 */ ui = 1; /* An unreachable labeled expression-statement makes FN_UNRC += 1 */ break; /* An unreachable jump-statement makes FN_UNRC += 1 */ default: ui = 0; } /* "ui" is equal to 0 at this point */ /* * The usual-arithmetic-conversion makes "i < ui" into "(unsigned int) i < ui". * Then, the value of "i" which is less than 0 will be converted into the new value which is greater than 0 * because of the wrap-around. * So, "(value which is greater than 0) < 0" makes false at all times. */ if (i < ui) { exit(0); /* An unreachable expression-statement makes FN_UNRC += 1 */ } } else { /* "i" is greater than or equal to 0 at this point */ abort(); /* The abort() standard function terminates this execution path */ } /* "i" is less than 0 at this point */ if (i == 3) { /* "(value which is less than 0) == 3" makes false at all times */ return -1; /* An unreachable jump-statement makes FN_UNRC += 1 */ } return 0; /* foo's FN_UNRC == 5 */ } @end verbatim @example MET,FN_UNRC,foo,int foo(int),test.c,3,5,5 @end example @subsection Since 1.0.0 @node FN_LINE @section FN_LINE @cindex FN_LINE @subsection Metric name Number of lines @subsection Content Physical lines from the beginning of a line to the end of a line in a function definition. @subsection Sample code @verbatim int foo(void) /* foo's function definition starts here */ { return 0; } /* foo's function definition ends here */ /* foo's FN_LINE == 3 */ int bar /* bar's function definition starts here */ (void) { return 0; } /* bar's function definition ends here */ /* bar's FN_LINE == 5 */ int baz /* baz's old style function definition starts here */ (a) int a; { return 0; } /* baz's old style function definition ends here */ /* baz's FN_LINE == 6 */ @end verbatim @example MET,FN_LINE,foo,int foo(void),test.c,1,5,3 MET,FN_LINE,bar,int bar(void),test.c,8,1,5 MET,FN_LINE,baz,int baz(int),test.c,17,1,6 @end example @subsection Since 1.0.0 @node FN_PARA @section FN_PARA @cindex FN_PARA @subsection Metric name Number of parameters @subsection Content The number of formal arguments in the argument list of function declaration. @subsection Sample code @verbatim int foo(int a, long b, char *p) { return 0; } /* foo's FN_PARA == 3 */ int bar(a, b, p) /* An old style function definition */ long b; /* A type-specifier of "a" is omitted */ char *p; { return 0; } /* bar's FN_PARA == 3 */ @end verbatim @example MET,FN_PARA,foo,"int foo(int,long,char *)",test.c,1,5,3 MET,FN_PARA,bar,"int bar(int,long,char *)",test.c,6,5,3 @end example @subsection Since 1.0.0 @node FN_UNUV @section FN_UNUV @cindex FN_UNUV @subsection Metric name Number of not use /not reuse variables @subsection Content The number of not used function and variables which assigned the value. @subsection Sample code @verbatim void foo(int i, int j) /* A useless declaration of "j" makes FN_UNUV += 1 */ { int a; int b; int c = 0; /* A useless declaration of "c" makes FN_UNUV += 1 */ if (i < 0) { a = -i; } else { a = i; } b = a * 2; /* A useless assignment to "b" makes FN_UNUV += 1 */ printf("%d\n", a); /* foo's FN_UNUV == 3 */ } @end verbatim @example MET,FN_UNUV,foo,"void foo(int,int)",test.c,1,6,3 @end example @subsection Since 1.0.0 @node FN_CSUB @section FN_CSUB @cindex FN_CSUB @subsection Metric name Location number of call function @subsection Content The number of calling other function in a function, @subsection Sample code @verbatim extern int foo(int); static int bar(int); int baz(int i) { int j = foo(i); /* A function-call-expression makes baz's FN_CSUB += 1 */ return foo(bar(j)); /* 2 function-call-expressions makes baz's FN_CSUB += 2 */ /* baz's FN_CSUB == 3 */ } @end verbatim @example MET,FN_CSUB,baz,int baz(int),test.c,5,5,3 @end example @subsection Since 1.0.0 @node FN_CALL @section FN_CALL @subsection Metric name Location number of called from function @subsection Content The number of called from other function of the project. @subsection Sample code @file{test1.c} @verbatim int foo(int i) { return i + 1; } int bar(int i) { return foo(i) + 1; /* A function-call-expression makes foo's FN_CALL += 1 */ } @end verbatim @file{test2.c} @verbatim extern int bar(int); static void baz(void) { int i = bar(0); /* A function-call-expression makes bar's FN_CALL += 1 and foo's FN_CALL += 1 */ } @end verbatim @file{project-name.met.csv} @example MET,FN_CALL,foo,int foo(int),test1.c,1,5,2 MET,FN_CALL,bar,int bar(int),test1.c,3,5,1 MET,FN_CALL,baz,void baz(void),test2.c,3,13,0 @end example @subsection Since 1.0.0 @node FN_GOTO @section FN_GOTO @cindex FN_GOTO @subsection Metric name Number of @code{goto} statement @subsection Content The number of @code{goto} statement in a function. @subsection Sample code @verbatim int foo(int i) { switch (i) { case 0: goto ZERO; /* A goto-statement makes foo's FN_GOTO += 1 */ case 1: goto ONE; /* A goto-statement makes foo's FN_GOTO += 1 */ default: return 0; } ZERO: return 1; ONE: return 2; /* foo's FN_GOTO == 2 */ } @end verbatim @example MET,FN_GOTO,foo,int foo(int),test.c,1,5,2 @end example @subsection Since 1.0.0 @node FN_RETN @section FN_RETN @cindex FN_RETN @subsection Metric name Number of return point in a function @subsection Content The number of executable return-statements and implicit return-statements at the end of a function. @subsection Sample code @verbatim void foo(int i) { if (i < 0) { return; /* A return-statement makes foo's FN_RETN += 1 */ } if (i >= 10) { return; /* A return-statement makes foo's FN_RETN += 1 */ } else { for (; i < 10; i++) { printf("%d\n", i); } } /* An implicit return from the function whose return type is void makes foo's FN_RETN * += 1 */ /* foo's FN_RETN == 3 */ } int bar(int i) { if (i < 0) { return -1; /* A return-statement makes bar's FN_RETN += 1 */ } if (i >= 10) { return -1; /* A return-statement makes bar's FN_RETN += 1 */ } else { for (; i < 10; i++) { printf("%d\n", i); } } return 0; /* A return-statement makes bar's FN_RETN += 1 */ /* bar's FN_RETN == 3 */ } @end verbatim @example MET,FN_RETN,foo,void foo(int),test.c,1,6,3 MET,FN_RETN,bar,int bar(int),test.c,20,5,3 @end example @subsection Since 1.0.0 @node FN_UELS @section FN_UELS @cindex FN_UELS @subsection Metric name Number of if-statement without else-clause @subsection Content The number of if-statements which have no explicit else-clause. @subsection Sample code @verbatim int foo(int i) { int j; if (i < 0) { return -1; } else { j = i + 1; } if (j % 2) { return -1; } /* A standalone if-statement does nothing to the FN_UELS metric */ if (i == 2) { return 0; } else if (i == 4) { return 1; } /* An implicit else clause makes foo's FN_UELS += 1 */ return 5; /* foo's FN_UELS == 1 */ } @end verbatim @example MET,FN_UELS,foo,int foo(int),test.c,1,5,1 @end example @subsection Since 1.0.0 @node FN_NEST @section FN_NEST @cindex FN_NEST @subsection Metric name Maximum number of nest of control flow graph @subsection Content The deepest nesting of control structure in a function. @subsection Sample code @verbatim void foo(int i) { /* Nesting level == 0 */ if (i < 0) { /* Nesting level == 1 */ switch (i) { /* Nesting level == 2 */ case -1: return; case -2: puts("A\n"); break; } /* Nesting level == 1 */ } else { /* Nesting level == 1 */ int j; int k; for (j = 0; j < i; j++) { /* Nesting level == 2 */ for (k = 0; k < 10; k++) { /* Nesting level == 3 */ if (j == k) { /* Nesting level == 4 */ puts("B\n"); } } } } /* foo's FN_NEST == 4 */ } @end verbatim @example MET,FN_NEST,foo,void foo(int),test.c,1,6,4 @end example @subsection Since 1.0.0 @node FN_PATH @section FN_PATH @cindex FN_PATH @subsection Metric name Presumed number of static path @subsection Content The number of possible execute paths in a function. @subsection Sample code @verbatim static int foo(int i) { /* A */ if (i == 0) { /* B */ i = 0; } else { /* C */ i = 1; } /* D */ return i; /* Possible execute paths A->B->D and A->C->D makes foo's FN_PATH = 2 */ } static int bar(int i) { /* A */ if (i == 0) { /* B */ i = 0; } /* C */ if (i == 1) { /* D */ i = 1; } /* E */ if (i == 2) { /* F */ i = 2; } /* G */ return i; /* Possible execute paths A->B->C->D->E->F->G, A->B->C->D->E->G, A->B->C->E->F->G, A->B->C->E->G, A->C->D->E->F->G, A->C->D->E->G, A->C->E->F->G, A->C->E->G makes bar's FN_PATH = 8 */ } static int baz(int i) { /* A */ switch (i) { case 0: /* B */ if (rand()) { /* C */ i = 0; } else { /* D */ i = 0; } /* E */ i = 0; break; default: /* F */ if (rand()) { /* G */ i = 1; } else { /* H */ i = 1; } /* I */ i = 1; break; } /* J */ return i; /* Possible execute paths A->B->C->E->J, A->B->D->E->J, A->F->G->I->J, A->F->H->I->J makes baz's FN_PATH = 4 */ } static int qux(int i) { /* A */ while (i < 5) { /* B */ if (i == 0) { /* C */ return 0; } /* D */ if (i == 1) { /* E */ return 1; } } /* F */ if (i == 2) { /* G */ return 2; } /* H */ return 3; /* Possible execute paths A->B->C, A->B->D->E, A->B->D->F->G, A->B->D->F->H, A->F->G, A->F->H makes qux's FN_PATH = 6 */ } @end verbatim @example MET,FN_PATH,foo,int foo(int),test.c,1,12,2 MET,FN_PATH,bar,int bar(int),test.c,18,12,8 MET,FN_PATH,baz,int baz(int),test.c,42,12,4 MET,FN_PATH,qux,int qux(int),test.c,80,12,6 @end example @subsection Since 1.0.0 @node FN_CYCM @section FN_CYCM @cindex FN_CYCM @subsection Metric name Cyclomatic complexity @subsection Content The number of linearly independent paths through a program's source code. It was developed by McCabe. @* calculating formula is @verb{.(the number of edges of the graph) - (the number of nodes of the graph) + 2.}. It equals the number of branch in a function + 1. @subsection Sample code @verbatim static int foo(int i) { if (i == 0) { /* Complexity += 1 */ i = 0; } else { /* An else branch does not grow the complexity */ i = 1; } return i; /* foo's FN_CYCM == 2 */ } static int bar(int i) { if (i == 0) { /* Complexity += 1 */ i = 0; } if (i == 1) { /* Complexity += 1 */ i = 1; } if (i == 2) { /* Complexity += 1 */ i = 2; } return i; /* bar's FN_CYCM == 4 */ } static int baz(int i) { switch (i) { case 0: /* Complexity += 1 */ if (rand()) { /* Complexity += 1 */ i = 0; } else { /* An else branch does not grow the complexity */ i = 0; } i = 0; break; default: /* A default clause does not grow the complexity */ if (rand()) { /* Complexity += 1 */ i = 1; } else { /* An else branch does not grow the complexity */ i = 1; } i = 1; break; } return i; /* baz's FN_CYCM == 4 */ } static int qux(int i) { while (i < 5) { /* An iteration does not grow the complexity */ if (i == 0) { /* Complexity += 1 */ return 0; } if (i == 1) { /* Complexity += 1 */ return 1; } } if (i == 2) { /* Complexity += 1 */ return 2; } return 3; /* qux's FN_CYCM == 4 */ } @end verbatim @example MET,FN_CYCM,foo,int foo(int),test.c,1,12,2 MET,FN_CYCM,bar,int bar(int),test.c,13,12,4 MET,FN_CYCM,baz,int baz(int),test.c,28,12,4 MET,FN_CYCM,qux,int qux(int),test.c,54,12,4 @end example @subsection Since 1.0.0 @node CodeStructures @chapter Code structure list @menu * VER::Version records * DCL(T)::Type declaration records * DCL(V)::Global variable declaration records * DCL(F)::Function declaration records * DEF(V)::Variable definition records * DEF(F)::Function definition records * DEF(M)::Macro definition records * DEF(L)::Label definition records * INI::Initialize records * ASN::Assignment records * DEP(I)::Include records * DEP(C)::Caller records * DEP(X)::Dependency records * LIT::Literal records * PRE::Preprocess records @end menu @node VER @section VER @cindex VER @subsection Code structure information name Version Records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Ver_Sample,output example of Version Records.} @subsection Since 1.0.0 @node DCL(T) @section DCL(T) @cindex DCL(T) @subsection Code structure information name Type declaration records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Dcl_Sample,output example of Type declaration records}. @subsection Since 1.0.0 @node DCL(V) @section DCL(V) @cindex DCL(V) @subsection Code structure information name Variable declaration records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Dcl_Sample,output example of Variable declaration records}. @subsection Since 1.0.0 @node DCL(F) @section DCL(F) @cindex DCL(F) @subsection Code structure information name Function declaration records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Dcl_Sample,output example of Function declaration records}. @subsection Since 1.0.0 @node DEF(V) @section DEF(V) @cindex DEF(V) @subsection Code structure information name Variable definition records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Def_Sample,output example of Variable definition records}. @subsection Since 1.0.0 @node DEF(F) @section DEF(F) @cindex DEF(F) @subsection Code structure information name Function definition records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Def_Sample,output example of Function definition records}. @subsection Since 1.0.0 @node DEF(M) @section DEF(M) @cindex DEF(M) @subsection Code structure information name Macro definition records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Def_Sample,Macro definition records}. @subsection Since 1.0.0 @node DEF(L) @section DEF(L) @cindex DEF(L) @subsection Code structure information name Label definition records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Def_Sample,output example of Lael definition records}. @subsection Since 1.0.0 @node INI @section INI @cindex INI @subsection Code structure information name Initialize records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Ini_Sample,output example of Initialize records}. @subsection Since 1.0.0 @node ASN @section ASN @cindex ASN @subsection Code structure information name Assignment records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Asn_Sample,output example of Assignment records}. @subsection Since 1.0.0 @node DEP(I) @section DEP(I) @cindex DEP(I) @subsection Code structure information name Include record @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Dep_Sample,output example of include records}. @subsection Since 1.0.0 @node DEP(C) @section DEP(C) @cindex DEP(C) @subsection Code structure information name Caller function records @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Dep_Sample, output example of caller records}. @subsection Since 1.0.0 @node DEP(X) @section DEP(X) @cindex DEP(X) @subsection Code structure information name ... @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Dep_Sample,output example of Dependency records}. @subsection Since 1.0.0 @node LIT @section LIT @cindex LIT @subsection Code structure information name ... @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Lit_Sample, output example of Literal records}. @subsection Since 1.0.0 @node PRE @section PRE @cindex PRE @subsection Code structure information name ... @subsection Content Under construction. @subsection Sample code Refer to @ref{Output_Metrics_Pre_Sample, output example of preprocessed records}. @subsection Since 1.0.0 @node Appendix @appendix Appendix @anchor{Screen Shot} @section Screen shot @subsection Collaboration with Adqua Static analysis result of AdLint can use measure the source quality by processing @uref{http://www.ogis-ri.co.jp/product/b-08-000001A6.html, Adqua}. (Adqua supports only Japanese) @image{adlint_on_adqua,,,,png} @subsection Collaboration with Vim - text editor Adlint p The format of AdLint's warning message is same as the standard compiler, so it's easy to collaborate with text editor. It will be able to check easily the code quality during development. @image{adlint_on_vim_en,,,,png} @subsection Collaborate with Eclipse - integrated development environment The format of AdLint's warning message is same as the standard compiler, so it's easy to collaborate with integrated development environment. It will be able to check easily the code quality during development. @image{adlint_on_eclipse_en,,,,png} @anchor{Traits Sample} @section Sample of traits file @verbatiminclude samples/adlint_traits.yml @anchor{GNUmakefile Sample} @section Sample of analysis order of @file{GNUmakefile} @verbatiminclude samples/GNUmakefile @node Index @unnumbered Index @printindex cp @bye @c vim:sw=2:sts=2:et:tw=79:fo+=mM: adlint-3.2.0/share/doc/users_guide_ja.html0000644000004100000410001010346112224440633020552 0ustar www-datawww-data AdLint 3.2.0 利用者ガイド

AdLint 3.2.0 利用者ガイド


Next: , Up: (dir)

導入

AdLint とは

AdLint は、オープンソースのソースコード静的解析ツールです。

AdLint は、ソースコード中の安全性や移植性に欠ける部分について警告メッセージを出 力し、また、同時にさまざまな品質メトリクスを測定することができます。

活用事例の一部は、付録のスクリーンショットでご確認いただけま す。

AdLint は、(現時点では) ANSI C89 / ISO C90 / 一部 ISO C99 規格に準拠した C 言語 のソースコードを解析することができます。

AdLint は Ruby で実装されているため、Windows、 Mac OS X、GNU/Linux、FreeBSD など Ruby がサポートする全てのプラットフォームで利 用することができます。

ライセンス

Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.

AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with AdLint. If not, see <http://www.gnu.org/licenses/>.

目次


Next: , Previous: Top, Up: Top

1 インストール

1.1 動作要件

AdLint の使用には、Ruby バージョン 1.9.3-p0 以降のインストールが必要です。

また、adlintize コマンドによって作成する解析 自動化 GNUmakefile を使用するために、GNU Make バージョン 3 以降のインス トールをお勧めします。


Next: , Previous: Requirements, Up: Installation

1.2 ハードウェア環境

推奨ハードウェア環境は、解析対象ソフトウェアの規模により一概には規定できません が、参考情報として AdLint のテスト環境と実際に計測した解析時間を紹介します。

1.2.1 MS Windows

MS Windows XP (SP3) 上でのテストは Intel Core i5 3.33GHz (660)、物理メモリ 2 GB の環境で行っています。

この環境で Ruby 1.9.3-p0 (ビルド対象の総物理行数 62 万行) を解析した場合、下記 の解析時間を要しました。

  • すべてシリアルに解析 — 約 7.9 時間
  • シングルモジュール解析を 3 並走させて解析 — 約 3.7 時間

1.2.2 GNU/Linux

Fedora 14 上でのテストは Intel Core2 Duo 2.20GHz (E4500)、物理メモリ 3.4 GB の 環境で行っています。

この環境で Ruby 1.9.3-p0 (ビルド対象の総物理行数 62 万行) を解析した場合、下記 の解析時間を要しました。

  • すべてシリアルに解析 — 約 6.5 時間
  • シングルモジュール解析を 2 並走させて解析 — 約 4.2 時間

1.3 MS Windows 環境へのインストール手順

1.3.1 Ruby のインストール

RubyInstaller for Windowsダウンロードページから 1.9.3-p0 以 降のバージョンの RubyInstaller を入手します。

RubyInstaller を実行し、インストーラの指示に従い Ruby をインストールします。

1.3.2 DEVELOPMENT KIT (DevKit) のインストール

GNU Make を含む DEVELOPMENT KIT (DevKit) のインストールを推奨します。

RubyInstaller for Windows で配布されている DEVELOPMENT KIT (DevKit) をダウンロ ードページから入手します。

DevKit-*.exe を実行すると、DEVELOPMENT KIT が指定したディレクトリに展開 されます。

1.3.3 PATH 環境変数の設定

Ruby のインストール でインストールした Ruby ディレ クトリ中の binDEVELOPMENT KIT (DevKit) のインスト ール で展開した DevKit ディレクトリ中の binmingw\binPATH 環境変数に追加してください。

1.3.4 AdLint のインストール

コマンドプロンプトを起動し、下記のコマンドにより AdLint の最新バージョンをダウ ンロードしインストールします。

> gem install adlint --no-rdoc --no-ri

HTTP プロキシを使用する場合は、下記のように gem コマンドに --http-proxy http://ユーザ:パスワード@プロキシホスト:ポート番号 を指 定します。

> gem install adlint --no-rdoc --no-ri --http-proxy http://user:passwd@proxy:3128


Next: , Previous: Install On Windows, Up: Installation

1.4 Unix 環境へのインストール手順

Ruby インストールガイド に従い、Ruby インタプリタをインストールします。

その後、下記のコマンドにより AdLint の最新バージョンをダウンロードしインストー ルします。

% gem install adlint
または、
% sudo gem install adlint

HTTP プロキシを使用する場合は、gem コマンドに --http-proxy http://ユーザ:パスワード@プロキシホスト:ポート番号 を指定します。


Previous: Install On Unix, Up: Installation

1.5 動作テストと AdLint の試用

AdLint には小さなサンプルの C 言語プロジェクトが付属しています。 下記の手順で、intro_demo プロジェクトを用いて AdLint の動作テストを行っ てください。

intro_demo プロジェクトをユーザのワークスペースへコピーします。

% cp -r `adlint --prefix`/share/demo/intro_demo .

adlintize コマンドにより、静的解析のための設 定ファイルを生成します。

% cd intro_demo
% adlintize

下記のファイルが出力されます。

  • GNUmakefile — 解析手順が記述された GNU Make 用のメイクファイル
  • adlint_traits.yml — AdLint 解析動作をカスタマイズする特性ファイ ル
  • adlint_pinit.h — プロジェクト固有のイニシャルヘッダファイル
  • adlint_cinit.h — コンパイラ固有のイニシャルヘッダファイル
  • adlint_all.sh — 解析手順が記述されたシェルスクリプト
  • adlint_all.bat — 解析手順が記述された MS Windows 用バッチファイ ル
  • adlint_files.txt — シェルスクリプトとバッチファイルで使用する解 析対象ファイルのリスト

GNU Make バージョン 3 以降がインストール済みの場合、下記のコマンドにより解析す ることができます。

% make verbose-all
adlint --verbose -t adlint_traits.yml -o . intro_demo.c
                  intro_demo.c [fin] |============================| 0.401s
                    intro_demo [fin] |============================| 0.029s
  1.125s user, 0.765s system, 00:00:01.89 total

GNU Make をインストールしていない場合は、下記のように直接 adlint コマンドを使用してください。

% adlint -v -t adlint_traits.yml -l adlint_files.txt
                  intro_demo.c [fin] |============================| 0.401s
                    intro_demo [fin] |============================| 0.029s
  1.125s user, 0.765s system, 00:00:01.89 total

解析処理が正常に終了すると、下記のファイルが出力されます。

  • intro_demo.i — プリプロセス済みソースファイル
  • intro_demo.c.met.csv — シングルモジュール解析結果のコード情報と メトリクス情報
  • intro_demo.c.msg.csv — シングルモジュール解析結果の警告メッセー ジ
  • intro_demo.met.csv — クロスモジュール解析結果のメトリクス情報
  • intro_demo.msg.csv — クロスモジュール解析結果の警告メッセージ

intro_demo.c.msg.csv の内容は、「いくつかの文に制御が到達しないこと」と 「いくつかの文でゼロによる除算が発生すること」などを示しているはずです。


Next: , Previous: Installation, Up: Top

2 サンプルセッション

2.1 GNU Screen の解析

2.1.1 プロジェクトの準備

ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz をダウンロードし、適当 なディレクトリに展開します。

% wget ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz
Length: 840602 (821K) [application/x-tar]
Saving to: `screen-4.0.3.tar.gz'

100%[======================================>] 840,602     --.-K/s   in 0.1s

2011-09-28 11:41:55 (6.18 MB/s) - `screen-4.0.3.tar.gz' saved [840602/840602]

% tar xzf screen-4.0.3.tar.gz
% ls -F
screen-4.0.3/   screen-4.0.3.tar.gz

2.1.2 プロジェクトの調査

GNU Screen を実際にビルドすることで、解析を実行する環境でどのようにビルドされる かを確認します。

% cd screen-4.0.3
% ./configure
this is screen version 4.0.3
checking for prefix by checking for screen... /usr/bin/screen
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
...snip...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing default commands

Now please check the pathnames in the Makefile and in the user
configuration section in config.h.
Then type 'make' to make screen. Good luck.

% make 2>&1 | tee make.log
CPP="gcc -E " srcdir=. sh ./osdef.sh
AWK=gawk CC="gcc -g -O2" srcdir=. sh ./comm.sh
AWK=gawk srcdir=. sh ./term.sh
gcc -c -I. -I.    -g -O2 screen.c
gcc -c -I. -I.    -g -O2 ansi.c
gcc -c -I. -I.    -g -O2 fileio.c
gcc -c -I. -I.    -g -O2 mark.c
gcc -c -I. -I.    -g -O2 misc.c
gcc -c -I. -I.    -g -O2 resize.c
gcc -c -I. -I.    -g -O2 socket.c
gcc -c -I. -I.    -g -O2 search.c
sh ./tty.sh tty.c
gcc -c -I. -I.    -g -O2 tty.c
gcc -c -I. -I.    -g -O2 term.c
gcc -c -I. -I.    -g -O2 window.c
gcc -c -I. -I.    -g -O2 utmp.c
gcc -c -I. -I.    -g -O2 loadav.c
gcc -c -I. -I.    -g -O2 putenv.c
gcc -c -I. -I.    -g -O2 help.c
gcc -c -I. -I.    -g -O2 termcap.c
gcc -c -I. -I.    -g -O2 input.c
gcc -c -I. -I.    -g -O2 attacher.c
gcc -c -I. -I.    -g -O2 pty.c
gcc -c -I. -I.    -g -O2 process.c
gcc -c -I. -I.    -g -O2 display.c
gcc -c -I. -I.    -g -O2 comm.c
gcc -c -I. -I.    -g -O2 kmapdef.c
gcc -c -I. -I.    -g -O2 acls.c
gcc -c -I. -I.    -g -O2 braille.c
gcc -c -I. -I.    -g -O2 braille_tsi.c
gcc -c -I. -I.    -g -O2 logfile.c
gcc -c -I. -I.    -g -O2 layer.c
gcc -c -I. -I.    -g -O2 sched.c
gcc -c -I. -I.    -g -O2 teln.c
gcc -c -I. -I.    -g -O2 nethack.c
gcc -c -I. -I.    -g -O2 encoding.c
gcc  -o screen screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o
search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o termcap.o
input.o attacher.o pty.o process.o display.o comm.o kmapdef.o acls.o braille.o
braille_tsi.o logfile.o layer.o sched.o teln.o nethack.o encoding.o -lcurses
-lcrypt

2.1.3 静的解析の準備

adlintize コマンドを使い、静的解析に必要なフ ァイルの雛形を作成し、対象プロジェクトに応じて設定ファイルを編集します。

プロジェクトのビルドに使用したコンピュータ環境、コンパイラ環境を調査します。

% uname -mo
i686 GNU/Linux
% gcc --version
gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

adlintize コマンドがサポートするプリセットの ビルド環境を表示し、プロジェクトのビルド環境に近いものを選択します。 このセッションでは i686 アーキテクチャ上の GNU/Linux で GCC 4.5.1 を使用してい るので、i686-linux-gcc_4.5.1 を選択することになります。

% adlintize -L
i686-linux-gcc_4.5.1
i686-cygwin-gcc_4.3.4
i686-mingw-gcc_4.5.2
x86_64-ubuntu_12.04-gcc_4.6.3

adlintize コマンドで静的解析に必要なファイル の雛形を生成します。

% adlintize -e i686-linux-gcc_4.5.1 -o adlint
% cd adlint
% ls
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

プロジェクトの調査で作成した make.log ファイルと adlintize コマンドが生成した GNUmakefile 中の SOURCES 値を比較して、静的解析の対象ソースファイ ルの過不足を修正します。

% cp GNUmakefile GNUmakefile.orig
% vi GNUmakefile
% diff -u GNUmakefile.orig GNUmakefile
--- GNUmakefile.orig    2011-09-28 13:36:24.328078206 +0900
+++ GNUmakefile 2011-09-28 13:36:37.573902006 +0900
@@ -29,8 +29,6 @@
   putenv.c \
   fileio.c \
   kmapdef.c \
-  terminfo/checktc.c \
-  terminfo/tetris.c \
   search.c \
   input.c \
   ansi.c \

次に、プロジェクトの調査で作成した make.log ファイル 中でコンパイラに指定されたオプションから、プロジェクト固有のインクルードパスを 洗い出し adlint_traits.yml ファイルに追記します。

% cp adlint_traits.yml adlint_traits.yml.orig
% vi adlint_traits.yml
% diff -u adlint_traits.yml.orig adlint_traits.yml
--- adlint_traits.yml.orig      2011-09-28 13:40:10.748222288 +0900
+++ adlint_traits.yml   2011-09-28 13:40:24.105054386 +0900
@@ -25,6 +25,7 @@
   #     - "../include/bar"
   #     - "/opt/baz/include"
   include_path:
+    - ".."

   # Pathname of the project specific initial header file.
   # This header file is automatically included above the first line of the

2.1.4 静的解析の実行

静的解析の準備で作成した GNUmakefile を使い、静的 解析を実行します。

% make --version
GNU Make 3.82
Built for i386-redhat-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

% make verbose-all
adlint --verbose -t adlint_traits.yml -o . ../braille.c ../acls.c ../putenv.c
../fileio.c ../kmapdef.c ../search.c ../input.c ../ansi.c ../pty.c ../layer.c
../termcap.c ../loadav.c ../comm.c ../screen.c ../term.c ../teln.c ../socket.c
../encoding.c ../utmp.c ../logfile.c ../display.c ../misc.c ../attacher.c
../help.c ../tty.c ../nethack.c ../braille_tsi.c ../sched.c ../process.c
../window.c ../mark.c ../resize.c
                  ../braille.c [fin] |============================| 7.999s
                     ../acls.c [fin] |============================| 12.152s
                   ../putenv.c [fin] |============================| 0.203s
                   ../fileio.c [fin] |============================| 13.013s
...snip...
                   ../window.c [fin] |============================| 22.388s
                     ../mark.c [fin] |============================| 14.827s
                   ../resize.c [fin] |============================| 18.964s
                  screen-4.0.3 [fin] |============================| 58.346s
  771.510s user, 2.370s system, 00:12:53.87 total

% ls *.{i,msg.csv,met.csv,log}
acls.c.log             kmapdef.c.log      sched.c.log
acls.c.met.csv         kmapdef.c.met.csv  sched.c.met.csv
acls.c.msg.csv         kmapdef.c.msg.csv  sched.c.msg.csv
acls.i                 kmapdef.i          sched.i
ansi.c.log             layer.c.log        screen-4.0.3.log
ansi.c.met.csv         layer.c.met.csv    screen-4.0.3.met.csv
ansi.c.msg.csv         layer.c.msg.csv    screen-4.0.3.msg.csv
...snip...
input.c.log            resize.c.log       window.c.met.csv
input.c.met.csv        resize.c.met.csv   window.c.msg.csv
input.c.msg.csv        resize.c.msg.csv   window.i
input.i                resize.i


Previous: Analyzing Screen, Up: Sample Session

2.2 distmake を用いた高速な分散並列解析

追記予定。


Next: , Previous: Sample Session, Up: Top

3 コマンド仕様


Next: , Up: Command

3.1 adlintize コマンド

3.1.1 機能

AdLint による静的解析に必要な下記ファイルの雛形を作成します。

  • GNUmakefile — 解析手順が記述された GNU Make 用のメイクファイル
  • adlint_traits.yml — AdLint 解析動作をカスタマイズする特性ファイ ル
  • adlint_pinit.h — プロジェクト固有のイニシャルヘッダファイル
  • adlint_cinit.h — コンパイラ固有のイニシャルヘッダファイル
  • adlint_all.sh — 解析手順が記述されたシェルスクリプト
  • adlint_all.bat — 解析手順が記述された MS Windows 用バッチファイ ル
  • adlint_files.txt — シェルスクリプトとバッチファイルで使用する解 析対象ファイルのリスト

GNUmakefile 中の SOURCES 変数には、adlintize コマンドを 実行したディレクトリ配下にある全ての *.c ファイルが設定されます。

3.1.2 使用方法

解析対象プロジェクトのルートディレクトリで、下記のように adlintize コ マンドを実行すると、adlint ディレクトリ中に静的解析に必要なファイルを作 成します。

% cd project-root
% adlintize -o adlint
% ls adlint
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

adlintize コマンドには、プリセットのビルド環境がいくつか用意されてい ます。 プリセットのビルド環境を指定することで、設定ファイルの雛形により多くの情報を自 動生成することができます。

用意されているプリセットのビルド環境は、下記のコマンドにより一覧を確認すること ができます。

% adlintize -L
i686-linux-gcc_4.5.1
i686-cygwin-gcc_4.3.4
i686-mingw-gcc_4.5.2
x86_64-ubuntu_12.04-gcc_4.6.3

プリセットのビルド環境は、-e オプションで指定します。

% cd project-root
% adlintize -e i686-linux-gcc_4.5.1 -o adlint
% ls adlint
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

3.1.3 ヘルプメッセージ

Usage: adlintize [options] [project-name]
Options:
  -t FILE, --traits FILE         Write traits to FILE
                                 If omitted, `adlint_traits.yml' will be used
  -p FILE, --pinit-header FILE   Write project initial header to FILE
                                 If omitted, `adlint_pinit.h' will be used
  -c FILE, --cinit-header FILE   Write compiler initial header to FILE
                                 If omitted, `adlint_cinit.h' will be used
  -l FILE, --list-file FILE      Write list file to FILE
                                 If omitted, `adlint_files.txt' will be used
  -m FILE, --makefile FILE       Write analysis procedure GNUmakefile to FILE
                                 If omitted, `GNUmakefile' will be used
  -s FILE, --sh-script FILE      Write analysis procedure sh script to FILE
                                 If omitted, `adlint_all.sh' will be used
  -b FILE, --bat-file FILE       Write analysis procedure bat file to FILE
                                 If omitted, `adlint_all.bat' will be used
  -o DIR, --output-dir DIR       Set output directory
                                 If omitted, `.' will be used
  -e ENV, --environment ENV      Assume ENV as target build environment
  -L, --list-environment         List all preset build environments
  -f, --force                    Force to overwrite existing files
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: AdLintize Command, Up: Command

3.2 adlint コマンド

3.2.1 機能

一括でシングルモジュール解析 (コンパイルフェーズに対応する解析) とクロスモジュ ール解析 (リンクフェーズに対応する解析) を実行します。

解析対象のソースファイルをコマンドラインで指定する方法と、リストファイルにより 指定する方法をサポートします。

動作内容は、解析対象のソースファイルを全て指定して adlint_sma コマンドによりシングルモジュール解析を実行し、 adlint_cma コマンドによりクロスモジュール解 析を実行する場合と同等です。

シングルモジュール解析結果として、ソースファイル毎に下記のファイルを作成します 。

  • *.i — プリプロセス結果
  • *.c.msg.csv — シングルモジュール解析によるメッセージ出力結果
  • *.c.met.csv — シングルモジュール解析によるメトリクス測定結果
  • *.c.log — シングルモジュール解析時のログメッセージ

クロスモジュール解析結果として、下記のファイルを作成します。

  • project_name.msg.csv — プロジェクト全体のクロスモジュール解析に よるメッセージ出力結果
  • project_name.met.csv — プロジェクト全体のクロスモジュール解析に よるメトリクス測定結果
  • project_name.log — プロジェクト全体のクロスモジュール解析時のロ グメッセージ

3.2.2 使用方法

adlintize コマンドにより設定ファイルの雛形を 作成したディレクトリで、下記のように adlint コマンドを起動するとシン グルモジュール解析とクロスモジュール解析を一括で実行可能です。

% cd project-root
% adlintize -o adlint
% cd adlint
% adlint -v -t adlint_traits.yml -o . -p 1 -l adlint_files.txt
               ../intro_demo.c [fin] |============================| 0.134s
                    intro_demo [fin] |============================| 0.012s
  0.718s user, 0.500s system, 00:00:01.21 total

テキストエディタや統合開発環境などと連携する場合、下記のように -v,--verbose オプションを指定しないことで、進捗表示を行わずメッセージ を stderr に出力することができます。

% adlint -t adlint_traits.yml -o . -p 1 -l adlint_files.txt
../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:同じ識別子名 `i' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。
../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:ポインタ型の変数に対して比較演算が行われています。
../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:値が NULL になることがあるポインタに対して間接参照が行われています。
../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:この制御式の値は常に偽になります。
...snip...
../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:この文には制御が到達しません。
../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:インクルードされている "../useless_header.h" の内容は翻訳単位の中で全く参照されていません。削除することができます。
../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:関数 `int bar(void)' が定義されていますが、このプロジェクトでは使われていません。

3.2.3 ヘルプメッセージ

Usage: adlint [options] [source-file...]
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -l FILE, --list-file FILE      Use FILE as list file
  -o DIR, --output-dir DIR       Output result files to DIR
  -p NUM, --strip NUM            Use source file names from which stripped NUM
                                 leading components as the base name of output
                                 files
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: AdLint Command, Up: Command

3.3 adlint_sma コマンド

3.3.1 機能

コマンドラインで指定した解析対象ソースファイルのシングルモジュール解析 (コンパ イルフェーズに対応する解析) のみを実行します。

シングルモジュール解析結果として、ソースファイル毎に下記のファイルを作成します 。

  • *.i — プリプロセス結果
  • *.c.msg.csv — シングルモジュール解析によるメッセージ出力結果
  • *.c.met.csv — シングルモジュール解析によるメトリクス測定結果
  • *.c.log — シングルモジュール解析時のログメッセージ

3.3.2 使用方法

adlintize コマンドにより設定ファイルの雛形を 作成したディレクトリで、下記のように adlint_sma コマンドを起動すると シングルモジュール解析のみを実行可能です。

% adlint_sma -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c
               ../intro_demo.c [fin] |============================| 0.134s
  1.062s user, 0.843s system, 00:00:01.90 total

テキストエディタや統合開発環境などと連携する場合、下記のように -v,--verbose オプションを指定しないことで、進捗表示を行わずコンパイラ と同じようにメッセージを stderr に出力することがきます。

% adlint_sma -t adlint_traits.yml -o . -p 1 ../intro_demo.c
../intro_demo.c:6:9:warning:c_builtin:W0492:UNC:X99:同じ識別子名 `i' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。
../intro_demo.c:12:13:warning:c_builtin:W0027:UNC:X99:ポインタ型の変数に対して比較演算が行われています。
../intro_demo.c:16:14:warning:c_builtin:W0422:UNC:X99:値が NULL になることがあるポインタに対して間接参照が行われています。
../intro_demo.c:31:13:warning:c_builtin:W0613:UNC:X99:この制御式の値は常に偽になります。
...snip...
../intro_demo.c:55:9:warning:c_builtin:W9001:UNC:X99:この文には制御が到達しません。
../intro_demo.c:2:1:warning:c_builtin:W0071:UNC:X99:インクルードされている "../useless_header.h" の内容は翻訳単位の中で全く参照されていません。削除することができます。

3.3.3 ヘルプメッセージ

Usage: adlint_sma [options] source-file...
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -o DIR, --output-dir DIR       Output result files to DIR
  -p NUM, --strip NUM            Use source file names from which stripped NUM
                                 leading components as the base name of output
                                 files
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: AdLint SMA Command, Up: Command

3.4 adlint_cma コマンド

3.4.1 機能

コマンドラインで指定した全シングルモジュール解析のメトリクス測定結果をもとに、 クロスモジュール解析 (リンクフェーズに対応する解析) のみを実行します。

クロスモジュール解析結果として、下記のファイルを作成します。

  • project_name.msg.csv — プロジェクト全体のクロスモジュール解析に よるメッセージ出力結果
  • project_name.met.csv — プロジェクト全体のクロスモジュール解析に よるメトリクス測定結果
  • project_name.log — プロジェクト全体のクロスモジュール解析時のロ グメッセージ

3.4.2 使用方法

adlintize コマンドにより設定ファイルの雛形を 作成したディレクトリで、adlint_sma コマンド によるシングルモジュール解析を実行後に下記のように adlint_cma コマン ドを起動するとクロスモジュール解析のみを実行可能です。

% ls *.c.met.csv
intro_demo.c.met.csv
% adlint_cma -v -t adlint_traits.yml -o . intro_demo.c.met.csv
                    intro_demo [fin] |============================| 0.011s
  1.203s user, 0.843s system, 00:00:02.04 total

テキストエディタや統合開発環境などと連携する場合、下記のように -v,--verbose オプションを指定しないことで、進捗表示を行わずリンカと同 じようにメッセージを stderr に出力することができます。

% adlint_cma -t adlint_traits.yml -o . intro_demo.c.met.csv
../intro_demo.c:61:19:warning:c_builtin:W0628:UNC:X99:関数 `int bar(void)' が定義されていますが、このプロジェクトでは使われていません。

3.4.3 ヘルプメッセージ

Usage: adlint_cma [options] sma-metric-file...
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -o DIR, --output-dir DIR       Output result files to DIR
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Previous: AdLint CMA Command, Up: Command

3.5 adlint_chk コマンド

3.5.1 機能

コマンドラインで指定した解析対象ソースファイルの前処理のみを実行することで、 特性ファイル の内容を検証します。

3.5.2 使用方法

adlintize コマンドにより設定ファイルの雛形を 作成し、解析対象プロジェクトに合わせて 特性ファイル を編集した後 で、下記のように adlint_chk コマンドを起動すると前処理を実行し 特性ファイル の内容を検証可能です。

% adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c
               ../intro_demo.c [fin] |============================| 0.047s
  0.812s user, 0.875s system, 00:00:01.68 total

ヘッダファイルのインクルードパスが正しく設定されていない場合は、下記のようにエ ラーが発生し、ソースファイルに該当する *.c.msg.csv ファイルを確認するこ とで、どのヘッダファイルがインクルードできなかったかを確認可能です。

% adlint_chk -v -t adlint_traits.yml -o . -p 1 ../intro_demo.c
               ../intro_demo.c [cpp] |=======                     | 0.006s!
An error was occurred while processing `../intro_demo.c'.
See `intro_demo.c.msg.csv' and `intro_demo.c.log' for more details.

% tail intro_demo.c.msg.csv
E,../intro_demo.c,1,1,E0009,ヘッダファイル <stdio.h> が見つかりません。
X,../intro_demo.c,1,1,X0003,回復不能なエラーにより解析処理を中断しました。詳細は `intro_demo.c.msg.csv' 及び `intro_demo.c.log' を確認して下さい。

3.5.3 ヘルプメッセージ

Usage: adlint_chk [options] source-file...
Options:
  -t FILE, --traits FILE         Use FILE as traits file (mandatory)
  -o DIR, --output-dir DIR       Output result files to DIR
  -p NUM, --strip NUM            Use source file names from which stripped NUM
                                 leading components as the base name of output
                                 files
  -v, --verbose                  Increase verbosity but suppress message output
      --version                  Display version information
      --copyright                Display copyright information
      --prefix                   Display prefix directory of AdLint
  -h, --help                     Display this message


Next: , Previous: Command, Up: Top

4 入力仕様


Next: , Up: Input

4.1 入力ファイル

下記 2 種類のファイルにより解析動作を設定します。

特性ファイル
解析処理の方法を YAML 形式で記述します。
メッセージ定義ファイル
メッセージカタログを YAML 形式で記述します。

特性ファイルは、adlintadlint_smaadlint_cma コマンドのオプション --traits でパス名を指定します。

メッセージ定義ファイルは、AdLint インストールパス内の etc/mesg.d 内にイ ンストールされます。 adlintadlint_smaadlint_cma コマンド は、メッセージ特性language 項目で指定した言語に従い、適切なメッセージ定義ファイルを選択し ます。


Next: , Previous: Input Files, Up: Input

4.2 特性ファイル

プロジェクト特性コンパイラ特性リンカ特性メッセージ特性 を 単一の YAML 形式の設定ファイル(サンプル) に記述します。

下記のように解析対象プロジェクトのルートディレクトリで adlintize コマンドを実行すると、そのプロジェクト用の特性ファイル adlint_traits.yml の雛形、および、解析手順を自動化する GNUmakefile やシェルスクリプトなどを生成することができます。

% cd project
% adlintize -o adlint
% ls adlint
GNUmakefile     adlint_all.sh   adlint_files.txt  adlint_traits.yml
adlint_all.bat  adlint_cinit.h  adlint_pinit.h

後述の特性ファイルの各設定項目には、環境変数を指定することもできます。

例えば、設定項目 item に、環境変数 ENV_VAR の値を指定する場合は下 記のように記述します。

  item: $ENV_VAR

また、文字列形式の設定項目に、環境変数の値を埋め込んだ文字列を指定する場合は下 記のように記述します。

  item: "prefix${ENV_VAR}suffix"

ディレクトリパス名の配列を指定する項目では、下記のように一つの環境変数の値によ り複数のパス名を指定することもできます。

% export ENV_VAR="/usr/local/include:/usr/include"
  include_path:
    - $ENV_VAR


Next: , Up: Traits

4.2.1 グローバル特性

グローバル特性は、特性ファイルのルート項目で設定します。

No. 項目名 形式 内容
1 version 文字列 特性ファイルフォーマットのバージョンを表します。この項目は編集してはいけません 。
2 exam_packages 文字列の配列 静的解析に用いるソースコード検査パッケージの名前を列挙します。

"c_builtin" は AdLint 本体に組み込み済みの検査パッケージ名です。 また、今後さまざまな用途に特化したオプションのソースコード検査パッケージを開発 する予定です。

例えば、adlint-exam-c_ansi という、ソースコードが ANSI C に準拠している かを検査するパッケージをインストールした場合、exam_packages を下記のよう に編集して解析することができます。

以下の場合は、ANSI C 準拠の検査パッケージのみが実行されます。

     exam_packages:
       - "c_ansi"

以下の場合は、AdLint 組み込みの検査パッケージと、ANSI C 準拠の検査パッケージが実 行されます。

     exam_packages:
       - "c_builtin"
       - "c_ansi"



Next: , Previous: Global Traits, Up: Traits

4.2.2 プロジェクト特性

プロジェクト特性は、特性ファイルの project_traits 配下の項目で設定します 。

No. 項目名 形式 内容
1 project_name 文字列 プロジェクト名を設定します。
2 project_root 文字列 解析対象プロジェクトのルートディレクトリを設定します。
3 target_files:inclusion_paths 文字列の配列 解析対象ソースファイルが存在する上位ディレクトリのパス名を設定します。 各エントリの文字列は、`:' (Windows 環境では `;') を区切り文字とし て複数のパス名を設定できます。
4 target_files:exclusion_paths 文字列の配列 target_files:inclusion_paths で指定したディレクトリ配下のファイルで、解析対象から除外するソースファイルが存在するディレクトリを設定します。 解析対象プロジェクト中にサードパーティ製ライブラリのソースコードを含み、それら のソースファイルに関するコードチェックを行いたくない場合などに指定します。 各エントリの文字列は、`:' (Windows 環境では `;') を区切り文字とし て複数のパス名を設定できます。
5 initial_header 文字列 解析対象ソースファイルの先頭に自動でインクルードされるヘッダファイルを指定しま す。このファイルには、プロジェクト固有のマクロ定義などを記述します。
6 file_search_paths 文字列の配列 プロジェクト固有のインクルードファイルの探索パスを設定します。 各エントリの文字列は、`:' (Windows 環境では `;') を区切り文字とし て複数のパス名を設定できます。
7 coding_style:indent_style 文字列 コードの字下げスタイルを "K&R""Allman""GNU" から選択し て設定します。

"K&R" スタイルは、

     int foo(int i)
     {
         if (i == 0) {
             return 0;
         }
         return i;
     }

となります。

"Allman" スタイルは、

     int foo(int i)
     {
         if (i == 0)
         {
             return 0;
         }
         return i;
     }

となります。

"GNU" スタイルは、

     int
     foo(int i)
     {
       if (i == 0)
         {
           return 0;
         }
       return i;
     }

となります。

8 coding_style:tab_width 整数値 タブ文字の見た目上の桁数を設定します。
9 coding_style:indent_width 整数値 インデントの見た目上の桁数を設定します。
10 file_encoding 文字列 ソースファイルの文字エンコーディングを設定します。値が設定されていない場合は "ASCII-8BIT" として処理します。


Next: , Previous: Project Traits, Up: Traits

4.2.3 コンパイラ特性

コンパイラ特性は、compiler_traits 配下の項目で設定します。

No. 項目名 形式 内容
1 initial_header 文字列 解析対象ソースファイルの先頭、かつ、プロジ ェクト固有の initial_header より前に自動でインクルードされるヘッダファ イルを指定します。このファイルには、コンパイラ固有の定義済みマクロや型定義など を記述します。
2 file_search_paths 文字列の配列 コンパイラ固有のインクルードファイルの探索パスを設定します。 各エントリの文字列は、`:' (Windows 環境では `;') を区切り文字とし て複数のパス名を設定できます。
3 standard_types:char_size 整数値 char 型ファミリのサイズをビット単位で設定します。
4 standard_types:char_alignment 整数値 char 型ファミリのメモリアライメントをビット単位で設定します。
5 standard_types:short_size 整数値 short 型ファミリのサイズをビット単位で設定します。
6 standard_types:short_alignment 整数値 short 型ファミリのメモリアライメントをビット単位で設定します。
7 standard_types:int_size 整数値 int 型ファミリのサイズをビット単位で設定します。
8 standard_types:int_alignment 整数値 int 型ファミリのメモリアライメントをビット単位で設定します。
9 standard_types:long_size 整数値 long int 型ファミリのサイズをビット単位で設定します。
10 standard_types:long_alignment 整数値 long int 型ファミリのメモリアライメントをビット単位で設定します。
11 standard_types:long_long_size 整数値 long long int 型ファミリのサイズをビット単位で設定します。
12 standard_types:long_long_alignment 整数値 long long int 型ファミリのメモリアライメントをビット単位で設定します。
13 standard_types:float_size 整数値 float 型のサイズをビット単位で設定します。
14 standard_types:float_alignment 整数値 float 型のメモリアライメントをビット単位で設定します。
15 standard_types:double_size 整数値 double 型のサイズをビット単位で設定します。
16 standard_types:double_alignment 整数値 double 型のメモリアライメントをビット単位で設定します。
17 standard_types:long_double_size 整数値 long double 型のサイズをビット単位で設定します。
18 standard_types:long_double_alignment 整数値 long double 型のメモリアライメントをビット単位で設定します。
19 standard_types:code_ptr_size 整数値 関数へのポインタ型のサイズをビット単位で設定します。
20 standard_types:code_ptr_alignment 整数値 関数へのポインタ型のメモリアライメントをビット単位で設定します。
21 standard_types:data_ptr_size 整数値 データへのポインタ型のサイズをビット単位で設定します。
22 standard_types:data_ptr_alignment 整数値 データへのポインタ型のメモリアライメントをビット単位で設定します。
23 standard_types:char_as_unsigned_char 真偽値 `char' 型を `unsigned char' 型として扱う場合 true を指定します。
24 arithmetic:logical_right_shift 真偽値 右シフト式 `>>' を算術シフトではなく、論理シフトとして扱う場合 true を指 定します。
25 identifier_max 整数値 コンパイラにより識別可能なシンボルの最大長を指定します。
26 extension_substitutions 文字列のマップ コンパイラ固有の拡張機能を調整するためのトークン置換パターンを指定します。 AdLint は、ここで指定した拡張機能の使用箇所を W0061 メッセージによって警 告します。

`__attribute__ ( 任意のトークン列 )' というトークン列をプリプロセス後に 削除しつつ W0061 メッセージによる警告を出力する場合は、下記のように指定し ます。

     extension_substitutions:
       "__attribute__(__adlint__any)": ""

また、`__restrict' というトークンを `restrict' に置換しつつ W0061 メッセージによる警告を出力する場合は、下記のように指定します。

     extension_substitutions:
       "__restrict": "restrict"


27 arbitrary_substitutions 文字列のマップ extension_substitutions と同様に、プリプロセス後にトークン列を置換するための項目ですが、W0061 メ ッセージを出力しない点が異なります。


Next: , Previous: Compiler Traits, Up: Traits

4.2.4 リンカ特性

リンカ特性は、linker_traits 配下の項目で設定します。

No. 項目名 形式 内容
1 identifier_max 整数値 リンカにより識別可能な外部シンボルの最大長を指定します。
2 identifier_ignore_case 真偽値 リンカにより外部シンボルを識別する際、大文字小文字を区別するかを指定します。


Previous: Linker Traits, Up: Traits

4.2.5 メッセージ特性

メッセージ特性は、message_traits 配下の項目で設定します。

No. 項目名 形式 内容
1 language 文字列 メッセージ本文の言語を指定します。(現時点では) "en_US""ja_JP" が指定可能です。
2 individual_suppression 真偽値 解析対象ファイル内の ソースコード注釈 による警告メッセージの抑止機能を有効化します。

true の場合、注釈によるメッセージ抑止が可能になります。

3 exclusion:categories 文字列の配列 exam_packages で指定したソースコード検査パッ ケージ中のコードチェック機能で、実行を除外するものをメッセージのカテゴリにより 指定します。
4 exclusion:severities 正規表現を表す文字列 exam_packages で指定したソースコード検査パッ ケージ中のコードチェック機能で、実行を除外するものをメッセージの深刻度により指 定します。
5 exclusion:messages メッセージ ID と文字列のマップ exam_packages で指定したソースコード検査パッ ケージ中のコードチェック機能で、実行を除外するものをメッセージ ID により指定し ます。

メッセージ ID は、ソースコード検査パッケージをまたいでユニークではない場合があ るため、文字列として該当するメッセージ ID が含まれるソースコード検査パッケージ 名も指定してください。

6 inclusion:messages メッセージ ID と文字列のマップ exclusion セクションの設定内容により除外しましたが、メッセージ ID 指定で 特定のコードチェック機能を含める場合に指定します。

例えば、exclusion:categories でカテ ゴリ指定により除外したコードチェック機能群のうち、特定のもののみを実行したい場 合を想定した項目です。

7 change_list メッセージ ID と変更内容のマップ 特定メッセージの定義情報を変更する場合に指定します。

例えば、"c_builtin" パッケージの W9999 メッセージを変更する場合、 下記のように設定します。

     change_list:
       W9999:
         package: "c_builtin"
         classes:
           - "新しいカテゴリ名1:深刻度1"
           - "新しいカテゴリ名2:深刻度2"
         format: "新しいメッセージフォーマット。"



Next: , Previous: Traits, Up: Input

4.3 メッセージ定義ファイル

AdLint が出力する全てのエラー、警告メッセージを YAML 形 式の設定ファイルに記述します。 通常、このファイルは直接編集することはありません。 メッセージ内容を変更する場合は、特性ファイルの change_list 項目で変更内容を指定してください。


Previous: Message Definition, Up: Input

4.4 ソースコード注釈

解析対象のソースコード中にコメントとして、AdLint の解析動作を制御するための注釈 を記述することができます。

4.4.1 警告メッセージ抑止注釈

通常のコメントに ADLINT:SF で始まる注釈を含めることで、該当ファイルの解 析時に指定した警告メッセージを抑止することができます。 また、ADLINT:SL で始まる注釈を含めると、該当行の解析時に指定した警告メッ セージを抑止することができます。

注釈の書式、および、使用例を下記に示します。

• 共通定義

     message_specifier_list : qualified_message_specifier
                            | unqualified_message_specifier
                            | message_specifier_list qualified_message_specifier
                            | message_specifier_list unqualified_message_specifier
     
     qualified_message_specifier : ':' package_name unqualified_message_specifier
     
     unqualified_message_specifier : ':' '[' message_name_list ']'
     
     message_name_list : message_name
                       | message_name_list ',' message_name
     
     message_name : 'W' [0-9]{4}
     
     package_name : 特性ファイルの exam_packages に指定した文字列

• ファイル毎の警告メッセージ抑止注釈

     file_wise_suppressor_annotation : "/*" file_wise_suppressor_head message_specifier_list "*/"
                                     | "//" file_wise_suppressor_head message_specifier_list
     
     file_wise_suppressor_head : "ADLINT:SF"

• 行毎の警告メッセージ抑止注釈

     line_wise_suppressor_annotation : "/*" line_wise_suppressor_head message_specifier_list "*/"
                                     | "//" line_wise_suppressor_head message_specifier_list
     
     line_wise_suppressor_head : "ADLINT:SL"

• サンプルコード

/* ADLINT:SF:[W0001,W0002] (to suppress W0001 and W0002 of all exam-packages in this file.) */
#include <stdio.h>

extern int i; /* ADLINT:SL:[W0003] (to suppress W0003 of all exam-packages only at this line.) */
extern int j; /* ADLINT:SL:c_staging:[W2001] (to suppress W2001 of `c_staging' exam-package only at this line.) */

void foo(void)
{
    printf("%d\n", i + j);
}


Next: , Previous: Input, Up: Top

5 出力仕様


Next: , Up: Output

5.1 出力ファイル

シングルモジュール解析の結果を、下記 4 種類のファイルに出力します。

No. 名称 ファイル名 内容
1 プリプロセス済みソース <拡張子を除いたソースファイル名>.i # で始まる行はラインマーカーです。
2 メトリクスファイル <ソースファイル名>.met.csv メトリクス、コード情報を CSV 形式で出力します。
3 メッセージファイル <ソースファイル名>.msg.csv エラー、警告メッセージを CSV 形式で出力します。
4 ログファイル <ソースファイル名>.log シングルモジュール解析処理のログを出力します。

クロスモジュール解析の結果を、下記 3 種類のファイルに出力します。

No. 名称 ファイル名 内容
1 メトリクスファイル <プロジェクト名>.met.csv メトリクス情報を CSV 形式で出力します。
2 メッセージファイル <プロジェクト名>.msg.csv 警告メッセージを CSV 形式で出力します。
3 ログファイル <プロジェクト名>.log クロスモジュール解析処理のログを出力します。


Next: , Previous: Output Files, Up: Output

5.2 共通定義

     version_number
       : major_version '.' minor_version '.' patch_level
     
     major_version : 整数値
     
     minor_version : 整数値
     
     patch_level : 整数値
     
     exec_timestamp : 年 '-' 月 '-' 日 ' ' 時 ':' 分 ':' 秒 ':' タイムゾーン
     
     exec_working_directory : 解析を実行したディレクトリのフルパス名
     
     new_line : 実行環境依存の改行文字列
     
     file_path : 実行環境依存のファイルパス名
     
     line_no : 整数値
     
     lines : 整数値
     
     column_no : 整数値
     
     location : file_path ',' line_no ',' column_no
     
     function_identifier
       : function_name ',' function_signature
     
     function_name : c_identifier
     
     function_signature : c_declaration_specifiers c_declarator
     
     function_linkage_type
       : 'I'  <- Internal
       | 'X'  <- eXternal
     
     function_scope_type
       : 'F'  <- File
       | 'B'  <- Block
     
     function_declaration_type
       : 'E'  <- Explicit
       | 'I'  <- Implicit
     
     type_name : c_identifier
     
     type_rep : c_declaration
     
     variable_name : c_identifier
     
     initializer_rep : c_initializer
     
     assignment_rep : c_assignment_operator c_assignment_expression
     
     macro_name : c_identifier
     
     macro_value
       :
       | pp_tokens
     
     pp_tokens : c_pp_tokens
     
     exam_package_name : 任意の文字列
     
     message_id
       : 'W' [0-9]{4}
       | 'E' [0-9]{4}
       | 'C' [0-9]{4}
     
     message_category : [A-Z]{3}
     
     message_severity : [A-Z][0-9]{2}
     
     message_text : 任意の文字列


Next: , Previous: Common, Up: Output

5.3 メトリクスファイル

5.3.1 バージョンレコード

     metrics_version_record
       : metrics_version_head ',' version_number ',' exec_timestamp ',' exec_working_directory
     
     metrics_version_head : "VER"

• 出力例

     VER,0.6.4,2012-02-16 14:10:59 +0900,/home/yanoh/intro_demo

5.3.2 宣言レコード

     declaration_record
       : declaration_head ',' location ',' typedcl_record_body
       | declaration_head ',' location ',' gvardcl_record_body
       | declaration_head ',' location ',' funcdcl_record_body
     
     declaration_head : "DCL"

• 型宣言レコード

     typedcl_record_body
       : 'T' ',' typedcl_type ',' type_name ',' type_rep
     
     typedcl_type
       : 'T'  <- typedef
       | 'S'  <- struct
       | 'U'  <- union
       | 'E'  <- enum

• 外部変数宣言レコード

     gvardcl_record_body
       : 'V' ',' variable_name ',' type_rep

• 関数宣言レコード

     funcdcl_record_body
       : 'F' ',' function_linkage_type ',' function_scope_type ',' function_declaration_type ',' function_identifier

• 出力例

 1: typedef int *int_ptr;
 2:
 3: struct Foo {
 4:     int i;
 5:     long l;
 6: };
 7:
 8: union Bar {
 9:     int i;
10:     char c;
11: };
12:
13: enum Color {
14:     RED = 1,
15:     GREEN,
16:     BLUE
17: };
18:
19: extern int global_1;
20:
21: extern int foo(long);
     DCL,test.c,1,14,T,T,int_ptr,int *
     DCL,test.c,3,8,T,S,Foo,struct Foo { int i; long l; }
     DCL,test.c,8,7,T,U,Bar,union Bar { int i; char c; }
     DCL,test.c,13,6,T,E,Color,"enum Color { RED = 1, GREEN, BLUE }"
     DCL,test.c,19,12,V,global_1,int
     DCL,test.c,21,12,F,X,F,E,foo,int foo(long)

5.3.3 定義レコード

     definition_record
       : definition_head ',' location ',' vardef_record_body
       | definition_head ',' location ',' fundef_record_body
       | definition_head ',' location ',' macrodef_record_body
       | definition_head ',' location ',' labeldef_record_body
     
     definition_head : "DEF"

• 変数定義レコード

     vardef_record_body
       : 'V' ',' variable_linkage_type ',' variable_scope_type ',' storage_class_type ',' variable_name ',' type_rep
     
     variable_linkage_type
       : 'I'  <- Internal
       | 'X'  <- eXternal
       | 'N'  <- None
     
     variable_scope_type
       : 'F'  <- File
       | 'B'  <- Block
       | 'P'  <- Parameter
     
     storage_class_type
       : 'A'  <- Auto
       | 'R'  <- Register
       | 'S'  <- Static
       | 'N'  <- None

• 関数定義レコード

     fundef_record_body
       : 'F' ',' function_linkage_type ',' function_scope_type ',' function_identifier ',' lines

• マクロ定義レコード

     macrodef_record_body
       : 'M' ',' macro_name ',' macro_form_type
     
     macro_form_type
       : 'O'  <- Object
       | 'F'  <- Function

• ラベル定義レコード

     labeldef_record_body
       : 'L' ',' label_name
     
     label_name : c_identifier

• 出力例

 1: int global_1;
 2: struct { int i; long l; } global_2;
 3:
 4: static long static_1;
 5: static enum { FOO, BAR, BAZ } static_2;
 6:
 7: int foo(int i, register short s)
 8: {
 9:     static char static_3 = 0;
10:     register int local_1 = i + s + static_3;
11:     auto int local_2 = 0;
12:     int local_3 = 0;
13:     goto end;
14: end:
15:     return local_1 + local_2 + local_3;
16: }
17:
18: static void bar(void) {}
19:
20: #define OBJ_FORM_MACRO (1 + 2)
21: #define MAX(a, b) ((a) < (b) ? (b) : (a))
     DEF,test.c,1,5,V,X,F,N,global_1,int
     DEF,test.c,2,27,V,X,F,N,global_2,struct __adlint__unnamed_1
     DEF,test.c,4,13,V,I,F,S,static_1,long
     DEF,test.c,5,31,V,I,F,S,static_2,enum __adlint__unnamed_2
     DEF,test.c,7,13,V,I,P,N,i,int
     DEF,test.c,7,31,V,I,P,R,s,short
     DEF,test.c,9,17,V,I,B,S,static_3,char
     DEF,test.c,10,18,V,I,B,R,local_1,int
     DEF,test.c,11,14,V,I,B,A,local_2,int
     DEF,test.c,12,9,V,I,B,N,local_3,int
     DEF,test.c,7,5,F,X,F,foo,"int foo(int,short)",10
     DEF,test.c,18,13,F,I,F,bar,void bar(void),1
     DEF,test.c,20,1,M,OBJ_FORM_MACRO,O
     DEF,test.c,21,1,M,MAX,F
     DEF,test.c,14,1,L,end

5.3.4 初期化レコード

     initialization_record
       : initialization_head ',' location ',' variable_name ',' initializer_rep
     
     initialization_head : "INI"

• 出力例

1: int global_1 = 1;
2:
3: int main(void)
4: {
5:     int local_1 = global_1;
6:     int local_2 = local_1 + 1;
7:
8:     return local_1 + local_2;
9: }
     INI,test.c,1,5,global_1,1
     INI,test.c,5,9,local_1,global_1
     INI,test.c,6,9,local_2,local_1 + 1

5.3.5 代入式レコード

     assignment_record
       : assignment_head ',' location ',' variable_name ',' assignment_rep
     
     assignment_head : "ASN"

• 出力例

 1: int main(void)
 2: {
 3:     int i;
 4:
 5:     for (i = 0; i < 10; i++) {
 6:         if (i % 2) {
 7:             i += 1;
 8:         }
 9:     }
10:
11:     return 0;
12: }
     ASN,test.c,5,12,i,= 0
     ASN,test.c,7,15,i,+= 1

5.3.6 依存レコード

     dependency_record
       : dependency_head ',' location ',' include_record_body
       | dependency_head ',' location ',' call_record_body
       | dependency_head ',' location ',' xref_record_body
     
     dependency_head : "DEP"

• インクルードレコード

     include_record_body
       : 'I' ',' included_fpath
     
     included_fpath : '<' file_path '>' | '"' file_path '"'

• 呼び出しレコード

     call_record_body
       : 'C' ',' caller_function ',' callee_function
     
     caller_function : function_identifier
     
     callee_function : function_identifier

• 外部参照レコード

     xref_record_body
       : 'X' ',' xref_variable_record_body
       | 'X' ',' xref_function_record_body
     
     xref_variable_record_body
       : 'V' ',' accessor_function ',' access_type ',' accessee_variable
     
     xref_function_record_body
       : 'F' ',' accessor_function ',' access_type ',' accessee_function
     
     accessor_function : function_identifier
     
     access_type : 'R' | 'W'
     
     accessee_variable : variable_name
     
     accessee_function : function_identifier

• 出力例

 1: #include <stdio.h>
 2: #include "test.h"
 3:
 4: extern int global;
 5:
 6: int foo(long l)
 7: {
 8:     int i = global;
 9:
10:     return l - i;
11: }
12:
13: int main(void)
14: {
15:     int (*p)(long) = &foo;
16:
17:     global = 5;
18:
19:     return (*p)(10);
20: }
     DEP,test.c,1,1,I,</usr/include/stdio.h>
     DEP,test.c,2,1,I,"""test.h"""
     DEP,test.c,8,13,X,V,foo,int foo(long),R,global
     DEP,test.c,19,16,C,main,int main(void),foo,int foo(long)
     DEP,test.c,15,23,X,F,main,int main(void),R,foo,int foo(long)
     DEP,test.c,17,12,X,V,main,int main(void),W,global

5.3.7 リテラルレコード

     literal_record
       : literal_head ',' location ',' literal_type ',' literal_prefix ',' literal_suffix ',' literal_value
     
     literal_head : "LIT"
     
     literal_type
       : 'DN'  <- Decimal Number
       | 'HN'  <- Hexadecimal Number
       | 'ON'  <- Octal Number
       | 'BN'  <- Binary Number
       | 'FN'  <- Floating point Number
       | 'CN'  <- Character Narrow
       | 'SN'  <- String Narrow
       | 'CW'  <- Character Wide
       | 'SW'  <- String Wide
     
     literal_prefix
       :
       | 'l'  | 'L'
       | '0'
       | '0x' | '0X'
       | '0b' | '0B'
     
     literal_suffix
       :
       | 'u'   | 'U'
       | 'l'   | 'L'
       | 'ul'  | 'Ul'  | 'uL'  | 'UL'
       | 'ull' | 'Ull' | 'uLL' | 'ULL'
       | 'll'  | 'LL'
       | 'f'   | 'F'
     
     literal_value
       : c_constant
       | c_string_literal

• 出力例

1: unsigned int i = 0xFFU;
2:
3: int foo(long l)
4: {
5:     const wchar_t *s = L"foobar";
6:
7:     return 0;
8: }
     LIT,test.c,1,18,HN,0x,U,0xFFU
     LIT,test.c,5,24,SW,L,,"L""foobar"""

5.3.8 プリプロセスレコード

     preprocess_record
       : preprocess_head ',' location ',' pp_directive ',' pp_tokens
     
     preprocess_head : "PRE"
     
     pp_directive
       : "#if"
       | "#ifdef"
       | "#ifndef"
       | "#elif"
       | "#else"
       | "#endif"
       | "#include"
       | "#define"
       | "#undef"
       | "#line"
       | "#error"
       | "#pragma"
       | "#"

• 出力例

 1: #pragma once
 2:
 3: #if defined(NDEBUG)
 4: void debug(const char *msg) {}
 5: #else
 6: #include <stdio.h>
 7: void debug(const char *msg)
 8: {
 9:     puts(msg);
10: }
11: #endif
     PRE,test.c,1,1,#pragma,once
     PRE,test.c,3,1,#if,defined(NDEBUG)
     PRE,test.c,5,1,#else,
     PRE,test.c,6,1,#include,<stdio.h>
     PRE,test.c,11,1,#endif,

5.3.9 メトリック値レコード

     metric_record
       : metric_head ',' file_metric_record_body
       | metric_head ',' func_metric_record_body
     
     metric_head : "MET"
     
     file_metric_record_body
       : file_metric_name ',' file_path ',' metric_value
     
     func_metric_record_body
       : func_metric_name ',' function_identifier ',' location ',' metric_value
     
     file_metric_name
       : "FL_STMT"  <- ステートメント数
       | "FL_FUNC"  <- 関数の数
     
     func_metric_name
       : "FN_STMT"  <- ステートメント数
       | "FN_UNRC"  <- 到達しないステートメント数
       | "FN_LINE"  <- 物理行数
       | "FN_PARA"  <- パラメータ数
       | "FN_UNUV"  <- 使用/再使用されない変数の数
       | "FN_CSUB"  <- 関数を呼び出す箇所数
       | "FN_CALL"  <- 関数から呼び出される箇所数
       | "FN_GOTO"  <- goto 文の数
       | "FN_RETN"  <- 関数内の戻り点の数
       | "FN_UELS"  <- else なしの if 文数
       | "FN_NEST"  <- 制御フローグラフの最大ネスト数
       | "FN_PATH"  <- 推定静的パス数
       | "FN_CYCM"  <- サイクロマティック複雑度
     
     metric_value : 整数値


Previous: Metrics File, Up: Output

5.4 メッセージファイル

     message_file
       : message_version_record
       | message_version_record new_line message_list
     
     message_version_record
       : 'V' ',' version_number ',' exec_timestamp ',' exec_working_directory
     
     message_list
       : error_record
       | warning_record
       | message_list new_line error_record
       | message_list new_line warning_record
     
     error_record
       : error_line new_line context_line_list
     
     error_line
       : 'E' ',' file_path ',' line_no ',' column_no ',' exam_package_name ',' message_id ',' message_category ',' message_severity ',' message_text
     
     warning_record
       : warning_line new_line context_line_list
     
     warning_line
       : 'W' ',' file_path ',' line_no ',' column_no ',' exam_package_name ',' message_id ',' message_category ',' message_severity ',' message_text
     
     context_line_list
       :
       | context_line new_line context_line_list
     
     context_line
       : 'C' ',' file_path ',' line_no ',' column_no ',' exam_package_name ',' message_id ',' message_category ',' message_severity ',' message_text


Next: , Previous: Output, Up: Top

6 メッセージ一覧


Next: , Up: Messages

6.1 X0001

6.1.1 メッセージ本文

不明な例外条件 `%s' を検出しました。

6.1.2 内容

AdLint 内部でエラーが発生したことを示します。

このメッセージが出力された場合、該当ソースファイル、特性ファイルメッセージファイル、ログファイルとともに AdLint 開発チー ムへご報告いただければ、AdLint の品質向上につなげることができます。

6.1.3 サンプルコード

なし。

6.1.4 関連メッセージ

なし。

6.1.5 対応バージョン

1.0.0


Next: , Previous: X0001, Up: Messages

6.2 X0002

6.2.1 メッセージ本文

不正なメッセージ ID `%s' を検出しました。

6.2.2 内容

AdLint が内部で使用するメッセージカタログファイルが壊れている可能性があります。

AdLint を再インストールしても問題が解決されない場合は、AdLint 開発チームへご報 告ください。

6.2.3 サンプルコード

なし。

6.2.4 関連メッセージ

なし。

6.2.5 対応バージョン

1.0.0


Next: , Previous: X0002, Up: Messages

6.3 X0003

6.3.1 メッセージ本文

回復不能なエラーにより解析処理を中断しました。詳細は `%s' 及び `%s' を確認して下さい。

6.3.2 内容

ヘッダファイルが見つからない、ソースファイルの構文解析ができないなど、AdLint が 解析を続行できないエラーを検知した場合に出力されます。

この問題の多くは、特性ファイルの内容を見直すことで解決できます。

6.3.3 サンプルコード

なし。

6.3.4 関連メッセージ

なし。

6.3.5 対応バージョン

1.0.0


Next: , Previous: X0003, Up: Messages

6.4 X0004

6.4.1 メッセージ本文

不正なメッセージフォーマット `%s' を検出しました。

6.4.2 内容

AdLint が内部で使用するメッセージカタログファイルが壊れている可能性があります。

AdLint を再インストールしても問題が解決されない場合は、AdLint 開発チームへご報 告ください。

6.4.3 サンプルコード

なし。

6.4.4 関連メッセージ

なし。

6.4.5 対応バージョン

1.0.0


Next: , Previous: X0004, Up: Messages

6.5 E0004

6.5.1 メッセージ本文

対応する #endif 行がありません。

6.5.2 内容

#if#ifdef#ifndef ディレクティブに対応する #endif ディレクティブが見つからない場合に出力されます。

6.5.3 サンプルコード

#if DEBUG
  int i = 0;
#else
  int i = 1;

6.5.4 関連メッセージ

なし。

6.5.5 対応バージョン

1.0.0


Next: , Previous: E0004, Up: Messages

6.6 E0007

6.6.1 メッセージ本文

条件式中のトークン `%s' で構文エラーを検出しました。条件式を偽として評価します。

6.6.2 内容

#if#elif ディレクティブの条件式を評価中に構文エラーを検知した場 合に出力します。

このメッセージが出力された場合、該当する条件式は偽として評価されます。

6.6.3 サンプルコード

なし。

6.6.4 関連メッセージ

なし。

6.6.5 対応バージョン

1.0.0


Next: , Previous: E0007, Up: Messages

6.7 E0008

6.7.1 メッセージ本文

トークン `%s' で構文エラーを検知しました。

6.7.2 内容

このメッセージはプリプロセス後のソースファイルを構文解析できない場合に出力され ます。

ビルドに使用するコンパイラ独自の拡張機能を使用している場合は、 特性ファイルで該当するトークン列を削除するように指定すれば解決で きます。

6.7.3 サンプルコード

なし。

6.7.4 関連メッセージ

なし。

6.7.5 対応バージョン

1.0.0


Next: , Previous: E0008, Up: Messages

6.8 E0009

6.8.1 メッセージ本文

ヘッダファイル <%s> が見つかりません。

6.8.2 内容

#include <...> ディレクティブでヘッダファイルをインクルードしていますが 、特性ファイルで指定したインクルードパス中に該当するヘッダファイ ルが存在しない場合に出力されます。

特性ファイルのインクルードパス設定を見直すことで解決できます。

6.8.3 サンプルコード

なし。

6.8.4 関連メッセージ

なし。

6.8.5 対応バージョン

1.0.0


Next: , Previous: E0009, Up: Messages

6.9 E0010

6.9.1 メッセージ本文

ヘッダファイル "%s" が見つかりません。

6.9.2 内容

#include "..." ディレクティブでヘッダファイルをインクルードしていますが 、特性ファイルで指定したインクルードパス中に該当するヘッダファイ ルが存在しない場合に出力されます。

特性ファイルのインクルードパス設定を見直すことで解決できます。

6.9.3 サンプルコード

なし。

6.9.4 関連メッセージ

なし。

6.9.5 対応バージョン

1.0.0


Next: , Previous: E0010, Up: Messages

6.10 E0013

6.10.1 メッセージ本文

式に文を含めることはできません。

6.10.2 内容

式の中に文を記述する GCC 拡張機能 (Statement Exprs) を使用した場合に出力されます 。

6.10.3 サンプルコード

#define maxint(a, b) ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
int i = maxint(1, 2); /* E0013 */

6.10.4 関連メッセージ

なし。

6.10.5 対応バージョン

1.0.0


Next: , Previous: E0013, Up: Messages

6.11 E0014

6.11.1 メッセージ本文

ラベルのアドレスを取得するための && 単項演算子は GCC 独自の拡張機能です。

6.11.2 内容

ラベルを値として使用する GCC 拡張機能 (Labels as Values) を使用した場合に出力され ます。

6.11.3 サンプルコード

void *label_ptr = &&foo; /* E0014 */
goto *label_ptr; /* E0015 */
foo:;

6.11.4 関連メッセージ

  • E0015 ラベルのアドレスを指定した goto 文は GCC 独自の拡張機能です。

6.11.5 対応バージョン

1.0.0


Next: , Previous: E0014, Up: Messages

6.12 E0015

6.12.1 メッセージ本文

ラベルのアドレスを指定した goto 文は GCC 独自の拡張機能です。

6.12.2 内容

ラベルを値として使用する GCC 拡張機能 (Labels as Values) を使用した場合に出力され ます。

6.12.3 サンプルコード

void *label_ptr = &&foo; /* E0014 */
goto *label_ptr; /* E0015 */
foo:;

6.12.4 関連メッセージ

  • E0014 ラベルのアドレスを取得するための && 単項演算子は GCC 独自の拡張機能です。

6.12.5 対応バージョン

1.0.0


Next: , Previous: E0015, Up: Messages

6.13 E0016

6.13.1 メッセージ本文

終了しないコメントブロックが見つかりました。

6.13.2 内容

/* で開始するブロックコメントが */ で終了されない状態で、翻訳単位 の末尾に到達した場合に出力されます。

6.13.3 サンプルコード

なし。

6.13.4 関連メッセージ

なし。

6.13.5 対応バージョン

1.0.0


Next: , Previous: E0016, Up: Messages

6.14 W0001

6.14.1 メッセージ本文

括弧 `()' のネストの深さが 32 を超えています。このプログラムは、ISO C90 標準規格に厳密に合致していません。

6.14.2 内容

括弧の入れ子レベルは最大 32 までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。

6.14.3 サンプルコード

int a = 10;
int b = 20;
int c = (((((((((((((((((((((((((((((((((a + b))))))))))))))))))))))))))))))))); /* W0001 */

6.14.4 関連メッセージ

なし。

6.14.5 対応バージョン

1.0.0


Next: , Previous: W0001, Up: Messages

6.15 W0002

6.15.1 メッセージ本文

関数 `%s()' の定義において、識別子と仮引数宣言を分けて記述するのは、古いスタイルです。

6.15.2 内容

非 ANSI の関数定義は、いまや多くのエンジニアにとって馴染みがないものといえます。そのようなエンジニアにとって、解析性が低くなります。

6.15.3 サンプルコード

/* function definition in K&R style */
int func(arg) /* W0002 */
char arg;
{
    return 0;
}

6.15.4 関連メッセージ

なし。

6.15.5 対応バージョン

1.0.0


Next: , Previous: W0002, Up: Messages

6.16 W0003

6.16.1 メッセージ本文

この switch 文には default ラベルが含まれていません。

6.16.2 内容

default 条件を持たない switch 文では、case ラベルの条件に該当しない場合に何も処理が行われないことになり、多くの場合、プログラマの意図しない動作になります。

6.16.3 サンプルコード

int foo(int i)
{
    int j;

    switch(i) { /* W0003 */
    case 1:
        j = 1;
        break;
    case 2:
        j = 2;
        break;
    case 3:
        j = 3;
        break;
    }

    return j;
}

6.16.4 関連メッセージ

なし。

6.16.5 対応バージョン

1.0.0


Next: , Previous: W0003, Up: Messages

6.17 W0007

6.17.1 メッセージ本文

直前の case 節あるいは default 節の末尾に、break 文または return 文がありません。

6.17.2 内容

case ラベルでは break 文や return 文を書かない限り、次の case ラベルへフォールスルーすることになりますが、 このようなフォールスルーは気づきにくいという点でコードの保守性を低下させます。

6.17.3 サンプルコード

int value;
int number;
switch (number) {
case 1:
    value = 1;
    break;
case 2:
    value = 2;
case 3: /* W0007 */
    value = 3;
    break;
default:
    value = 0;
    break;
}

6.17.4 関連メッセージ

なし。

6.17.5 対応バージョン

1.0.0


Next: , Previous: W0007, Up: Messages

6.18 W0010

6.18.1 メッセージ本文

この三項演算子(条件演算子)のオペランドに副作用があります。

6.18.2 内容

副作用を生じる条件演算子を使用すると、条件によって副作用の内容が変わり、コードが複雑になります。

6.18.3 サンプルコード

x = (a > 0) ? b++ : b--; /* W0010 */

6.18.4 関連メッセージ

なし。

6.18.5 対応バージョン

1.0.0


Next: , Previous: W0010, Up: Messages

6.19 W0013

6.19.1 メッセージ本文

繰り返し文の中で、continue 文が使用されています。

6.19.2 内容

continue 文はしばしば、構造化定理(「順次」「反復」「分岐」)に基づいたコードの構造を壊してしまいます。影響はループ文の中に限定されるため、 goto 文ほど大きなネガティブインパクトはありませんが、利用の際は注意が必要です。

6.19.3 サンプルコード

static void foo(void)
{
    int i;
    int j;

    i++;
    for (i = 1, j = 0; i < 20; i++) {
        j += 2;
        if ((j % i) == 3) {
            continue;  /* W0013 */
        }
    }
}

6.19.4 関連メッセージ

なし。

6.19.5 対応バージョン

1.0.0


Next: , Previous: W0013, Up: Messages

6.20 W0016

6.20.1 メッセージ本文

変換指定子のフィールド幅が 509 文字を超えています。

6.20.2 内容

printf() 関数における変換指定子のフィールド幅は最大 509 文字までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。

6.20.3 サンプルコード

printf("%510d\n", a); /* W0016 */

6.20.4 関連メッセージ

  • W0017 変換指定子のフィールド幅が 509 文字を超えています。

6.20.5 対応バージョン

1.0.0


Next: , Previous: W0016, Up: Messages

6.21 W0017

6.21.1 メッセージ本文

変換指定子のフィールド幅が 509 文字を超えています。

6.21.2 内容

scanf() 関数における変換指定子のフィールド幅は最大 509 文字までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。

6.21.3 サンプルコード

scanf("%510d", &a); /* W0017 */

6.21.4 関連メッセージ

  • W0016 変換指定子のフィールド幅が 509 文字を超えています。

6.21.5 対応バージョン

1.0.0


Next: , Previous: W0017, Up: Messages

6.22 W0018

6.22.1 メッセージ本文

変換指定子の精度幅が 509 文字を超えています。

6.22.2 内容

変換指定子の精度幅は最大 509 文字までと ISO C 標準規格で定められています。この水準を超えると移植性を損ないます。

6.22.3 サンプルコード

printf("%.510f\n", a); /* W0018 */

6.22.4 関連メッセージ

なし。

6.22.5 対応バージョン

1.0.0


Next: , Previous: W0018, Up: Messages

6.23 W0019

6.23.1 メッセージ本文

このポインタキャストは、const 修飾を削除しているので危険です。

6.23.2 内容

const 修飾された変数は値が変更されないことを前提として使用されます。 そのような変数に const が失われるキャストが実行されると前提が崩れてしまい、意図しない結果を引き起こす可能性があります。

6.23.3 サンプルコード

int *pa;
const int *pb;
pa = (int *) pb; /* W0019 */

6.23.4 関連メッセージ

なし。

6.23.5 対応バージョン

1.0.0


Next: , Previous: W0019, Up: Messages

6.24 W0021

6.24.1 メッセージ本文

このポインタキャストは、volatile 修飾を削除しているので危険です。

6.24.2 内容

volatile 修飾された変数は最適化の対象外にしたいという意図が含まれています。 そのような変数に volatile が失われるキャストが実行されると意図に反して最適化が行われてしまい、 意図しない結果を引き起こす可能性があります。

6.24.3 サンプルコード

int *pa;
volatile int *pb;
pa = (int *) pb; /* W0021 */

6.24.4 関連メッセージ

なし。

6.24.5 対応バージョン

1.0.0


Next: , Previous: W0021, Up: Messages

6.25 W0023

6.25.1 メッセージ本文

ポインタ型の変数に対して算術演算が行われています。

6.25.2 内容

ポインタ演算により意図しないアドレスを使用する可能性が高くなります。

6.25.3 サンプルコード

int *p;
int *q;
long r = p + r; /* W0023 */

6.25.4 関連メッセージ

  • W0024 ポインタ型の変数に対してインクリメントまたはデクリメントが行われています。

6.25.5 対応バージョン

1.0.0


Next: , Previous: W0023, Up: Messages

6.26 W0024

6.26.1 メッセージ本文

ポインタ型の変数に対してインクリメントまたはデクリメントが行われています。

6.26.2 内容

ポインタ演算により意図しないアドレスを使用する可能性が高くなります。

6.26.3 サンプルコード

int *p;
p++; /* W0024 */

6.26.4 関連メッセージ

  • W0023 ポインタ型の変数に対して算術演算が行われています。

6.26.5 対応バージョン

1.0.0


Next: , Previous: W0024, Up: Messages

6.27 W0025

6.27.1 メッセージ本文

`%s' は、既にこのファイルから直接インクルードされています。

6.27.2 内容

重複したインクルードは意味のない記述です。意味のない不要な記述がコード中にあることで解析性が低下します。

6.27.3 サンプルコード

#include "test.h"
#include "test2.h"
#include "test.h" /* W0025 */

6.27.4 関連メッセージ

  • W0026 `%s' は、既にこのファイルから間接的にインクルードされています。

6.27.5 対応バージョン

1.0.0


Next: , Previous: W0025, Up: Messages

6.28 W0026

6.28.1 メッセージ本文

`%s' は、既にこのファイルから間接的にインクルードされています。

6.28.2 内容

重複したインクルードは意味のない記述です。意味のない不要な記述がコード中にあることで解析性が低下します。

6.28.3 サンプルコード

test.h

#include "test2.h"

test.c

#include "test.h"
#include "test2.h" /* W0026 */

6.28.4 関連メッセージ

  • W0025 `%s' は、既にこのファイルから直接インクルードされています。

6.28.5 対応バージョン

1.0.0


Next: , Previous: W0026, Up: Messages

6.29 W0027

6.29.1 メッセージ本文

ポインタ型の変数に対して比較演算が行われています。

6.29.2 内容

比較演算子を用いて異なる配列のポインタや異なる構造体のポインタと比較する動作は ISO C90 で未定義のため、予期しない動作を引き起こす可能性があります。

6.29.3 サンプルコード

int *p;
int *q;
if (p < q) { /* W0027 */

6.29.4 関連メッセージ

なし。

6.29.5 対応バージョン

1.0.0


Next: , Previous: W0027, Up: Messages

6.30 W0028

6.30.1 メッセージ本文

NULL ポインタに対して間接参照が行われています。

6.30.2 内容

NULL ポインタが指す値を間接参照する動作は ISO C90 で未定義のため、予期しない動作を引き起こす可能性があります。

6.30.3 サンプルコード

int i = *(int *) NULL; /* W0028 */

6.30.4 関連メッセージ

なし。

6.30.5 対応バージョン

1.0.0


Next: , Previous: W0028, Up: Messages

6.31 W0030

6.31.1 メッセージ本文

NULL ポインタに対して算術演算が行われています。

6.31.2 内容

NULL ポインタに対する算術演算は ISO C90 で未定義のため、予期しない動作を引き起こす可能性があります。

6.31.3 サンプルコード

int *p;
p = (int *) NULL + 1; /* W0030 */

6.31.4 関連メッセージ

なし。

6.31.5 対応バージョン

1.0.0


Next: , Previous: W0030, Up: Messages

6.32 W0031

6.32.1 メッセージ本文

仮引数 `%s' は、この関数の中で使われていません。

6.32.2 内容

未使用の実引数は資源を無駄に使用するという点で効率性を低下させます。またコード中に無駄な要素があることで解析性が低下します。

6.32.3 サンプルコード

int func(int num) /* W0031 */
{
    return 0;
}

6.32.4 関連メッセージ

なし。

6.32.5 対応バージョン

1.0.0


Next: , Previous: W0031, Up: Messages

6.33 W0033

6.33.1 メッセージ本文

ラベル `%s:' は、この関数の中で使われていないため、削除することができます。

6.33.2 内容

使用されないラベルは無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。

6.33.3 サンプルコード

void func(void)
{
    int num = 0;
    for (int i =0; i < 10; i++) {
        num++;
    }
ERROR: /* W0033 */
    num = 0;
}

6.33.4 関連メッセージ

なし。

6.33.5 対応バージョン

1.0.0


Next: , Previous: W0033, Up: Messages

6.34 W0035

6.34.1 メッセージ本文

`&&' または `||' の右のオペランドは、算術型またはポインタ型でなければなりません。

6.34.2 内容

ISO C90 では &&|| の右辺はスカラ型でなければならないとされています。 従って構造体型にした場合の動作は未定義なので、予期しない動作を引き起こす可能性があります。

6.34.3 サンプルコード

struct STR {
    int x;
    int y;
};

extern struct STR str;

void func(void)
{
    int x;
    int y;
    x = y && str; /* W0035 */
}

6.34.4 関連メッセージ

なし。

6.34.5 対応バージョン

1.0.0


Next: , Previous: W0035, Up: Messages

6.35 W0036

6.35.1 メッセージ本文

宣言子の中の修飾子の数が 12 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.35.2 内容

ISO C90 では宣言子の修飾子数の制限を 12 と定めています。この制限を超えると移植性が低下します。

6.35.3 サンプルコード

int num[1][2][3][4][5][6][7][8][9][10][11][12][13]; /* W0036 */

6.35.4 関連メッセージ

なし。

6.35.5 対応バージョン

1.0.0


Next: , Previous: W0036, Up: Messages

6.36 W0037

6.36.1 メッセージ本文

構造体または共用体のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.36.2 内容

ISO C90 では構造体や共用体のネスト数の制限を 15 と定めています。この制限を超えると移植性が低下します。

6.36.3 サンプルコード

struct st1 {
  struct st2 {
    struct st3 {
      struct st4 {
        struct st5 {
          struct st6 {
            struct st7 {
              struct st8 {
                struct st9 {
                  struct st10 {
                    struct st11 {
                      struct st12 {
                        struct st13 {
                          struct st14 {
                            struct st15 {
                              struct st16 { /* W0037 */
                                int i;
                              } st16;
                            } st15;
                          } st14;
                        } st13;
                      } st12;
                    } st11;
                  } st10;
                } st9;
              } st8;
            } st7;
          } st6;
        } st5;
      } st5;
    } st3;
  } st2;
};

6.36.4 関連メッセージ

なし。

6.36.5 対応バージョン

1.0.0


Next: , Previous: W0037, Up: Messages

6.37 W0038

6.37.1 メッセージ本文

オブジェクト `%s' のサイズが 32767 バイトを超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.37.2 内容

ISO C90 ではオブジェクトのサイズ制限を 32767 バイトと定めています。この制限を超えると移植性が低下します。

6.37.3 サンプルコード

int num[100][330]; /* W0038 */

6.37.4 関連メッセージ

なし。

6.37.5 対応バージョン

1.0.0


Next: , Previous: W0038, Up: Messages

6.38 W0039

6.38.1 メッセージ本文

ブロックの中のローカルな識別子の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.38.2 内容

ISO C90 ではブロックスコープ識別子を持つブロック数の制限を 127 個と定めています。この制限を超えると移植性が低下します。

6.38.3 サンプルコード

void func(void)
{
    int num1,  num2,  num3,  num4,  num5,  num6,  num7,  num8,  num9,  num10;
    int num11, num12, num13, num14, num15, num16, num17, num18, num19, num20;

    ...snip...

    int num111, num112, num113, num114, num115, num116, num117, num118, num119, num120;
    int num121, num122, num123, num124, num125, num126, num127, num128; /* W0039 */
}

6.38.4 関連メッセージ

なし。

6.38.5 対応バージョン

1.0.0


Next: , Previous: W0039, Up: Messages

6.39 W0040

6.39.1 メッセージ本文

ビットフィールドが signed または unsigned 付きで宣言されていません。

6.39.2 内容

単なる int 型でビットフィールドを定義した場合、signed int になるか unsigned int になるかは処理系依存になります。 従って、プログラマが意図しない型になる可能性があります。

6.39.3 サンプルコード

struct STR { /* W0040 */
    int a:5;
};

6.39.4 関連メッセージ

なし。

6.39.5 対応バージョン

1.0.0


Next: , Previous: W0040, Up: Messages

6.40 W0041

6.40.1 メッセージ本文

構造体または共用体のメンバの数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.40.2 内容

ISO C90 では構造体や共用体のメンバ数の制限を 127 と定めています。この制限を超えると移植性が低下します。

6.40.3 サンプルコード

struct STR {
    int num1;
    int num2;
    int num3;
    int num4;
    int num5;

    ...snip...

    int num125;
    int num126;
    int num127;
    int num128; /* W0041 */
};

6.40.4 関連メッセージ

なし。

6.40.5 対応バージョン

1.0.0


Next: , Previous: W0041, Up: Messages

6.41 W0042

6.41.1 メッセージ本文

列挙定数の数が 127 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.41.2 内容

ISO C90 では列挙定数の制限を 127 と定めています。この制限を超えると移植性が低下します。

6.41.3 サンプルコード

enum ENM {
    e1,  e2,  e3,  e4,  e5,  e6,  e7,  e8,  e9,  e10,
    e11, e12, e13, e14, e15, e16, e17, e18, e19, e20,

    ...snip...

    e111, e112, e113, e114, e115, e116, e117, e118, e119, e120,
    e121, e122, e123, e124, e125, e126, e127, e128 /* W0042 */
};

6.41.4 関連メッセージ

なし。

6.41.5 対応バージョン

1.0.0


Next: , Previous: W0042, Up: Messages

6.42 W0043

6.42.1 メッセージ本文

配列の初期値が、宣言された配列のサイズに足りません。残りの配列要素はゼロで初期化されます。

6.42.2 内容

初期化子が不足する場合は 0 で初期化されますが、意図したものか、そうでないかが分かりづらくなります。 初期化子を指定する場合には、要素数と初期値の数を一致させることが望ましいです。

6.42.3 サンプルコード

int array[5] = { 1, 2, 3 }; /* W0043 */

6.42.4 関連メッセージ

なし。

6.42.5 対応バージョン

1.0.0


Next: , Previous: W0043, Up: Messages

6.43 W0049

6.43.1 メッセージ本文

制御構造のネストが 15 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.43.2 内容

ISO C90 では制御構造のネスト数の制限を 15 と定めています。この制限を超えると移植性が低下します。

6.43.3 サンプルコード

if(x > 0) {
  if(x > 0) {
    if(x > 0) {
      if(x > 0) {
        if(x > 0) {
          if(x > 0) {
            if(x > 0) {
              if(x > 0) {
                if(x > 0) {
                  if(x > 0) {
                    if(x > 0) {
                      if(x > 0) {
                        if(x > 0) {
                          if(x > 0) {
                            if (x > 0) {
                              if(x > 0) { /* W0049 */
                                ;
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

6.43.4 関連メッセージ

なし。

6.43.5 対応バージョン

1.0.0


Next: , Previous: W0049, Up: Messages

6.44 W0050

6.44.1 メッセージ本文

case ラベルの数が 257 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.44.2 内容

ISO C90 では case ラベルの制限を 257 と定めています。この制限を超えると移植性が低下します。

6.44.3 サンプルコード

switch (num) {
case 1:
    break;
case 2:
    break;
case 3:
    break;

  ...snip...

case 257:
    break;
case 258: /* W0050 */
    break;
}

6.44.4 関連メッセージ

なし。

6.44.5 対応バージョン

1.0.0


Next: , Previous: W0050, Up: Messages

6.45 W0051

6.45.1 メッセージ本文

外部識別子 `%s' が他の識別子名と、リンカ特性で指定された文字数の範囲内で区別できません。

6.45.2 内容

処理系で決められている文字数の制限を超えた場合の動作は未定義なので、予期しない動作を引き起こす可能性があります。

6.45.3 サンプルコード

extern int very_long_long_long_ ...snip... _long_external_symbol; /* W0051 */

6.45.4 関連メッセージ

  • C0001 この識別名 `%s' で警告を検知しました。

6.45.5 対応バージョン

1.0.0


Next: , Previous: W0051, Up: Messages

6.46 W0052

6.46.1 メッセージ本文

識別子名 `%s' が他の識別子名と、コンパイラ特性で指定された文字数の範囲内で区別できません。

6.46.2 内容

処理系で決められている文字数の制限(原則 31 文字)を超えた場合の動作は未定義なので、予期しない動作を引き起こす可能性があります。

6.46.3 サンプルコード

void func(void)
{
    int very_long_long_long_long_long_ ...snip... _long_symbol; /* W0052 */
}

6.46.4 関連メッセージ

  • C0001 この識別名 `%s' で警告を検知しました。

6.46.5 対応バージョン

1.0.0


Next: , Previous: W0052, Up: Messages

6.47 W0053

6.47.1 メッセージ本文

`#include "%s"' のネストが 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.47.2 内容

ISO C90 では include の入れ子レベルの制限を 8 と定めています。この制限を超えると移植性が低下します。

6.47.3 サンプルコード

test.c

#include "test1.h"

test1.h

#include "test2.h"

test2.h

#include "test3.h"

test3.h

#include "test4.h"

test4.h

#include "test5.h"

test5.h

#include "test6.h"

test6.h

#include "test7.h"

test7.h

#include "test8.h"

test8.h

#include "test9.h"

test9.h

#include "test10.h" /* W0053 */

6.47.4 関連メッセージ

なし。

6.47.5 対応バージョン

1.0.0


Next: , Previous: W0053, Up: Messages

6.48 W0054

6.48.1 メッセージ本文

`#if...' のネストの最大値が 8 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.48.2 内容

ISO C90 では #if の入れ子レベルの制限を 8 と定めています。この制限を超えると移植性が低下します。

6.48.3 サンプルコード

#if N > 1
#if N > 2
#if N > 3
#if N > 4
#if N > 5
#if N > 6
#if N > 7
#if N > 8 /* W0054 */
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif

6.48.4 関連メッセージ

なし。

6.48.5 対応バージョン

1.0.0


Next: , Previous: W0054, Up: Messages

6.49 W0055

6.49.1 メッセージ本文

マクロ定義の数が 1024 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.49.2 内容

ISO C90 では一つの翻訳単位中で定義できるマクロの制限を 1024 と定めています。この制限を超えると移植性が低下します。

6.49.3 サンプルコード

#define MACRO_1
#define MACRO_2
#define MACRO_3

...snip...

#define MACRO_1023
#define MACRO_1024
#define MACRO_1025 /* W0055 */

6.49.4 関連メッセージ

なし。

6.49.5 対応バージョン

1.0.0


Next: , Previous: W0055, Up: Messages

6.50 W0056

6.50.1 メッセージ本文

関数形式マクロの仮引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.50.2 内容

ISO C90 ではマクロ引数数の制限を 31 と定めています。この制限を超えると移植性が低下します。

6.50.3 サンプルコード

#define MACRO(a1, a2, a3, ...snip... a30, a31, a32) /* W0056 */

6.50.4 関連メッセージ

なし。

6.50.5 対応バージョン

1.0.0


Next: , Previous: W0056, Up: Messages

6.51 W0057

6.51.1 メッセージ本文

関数形式マクロの呼び出しの実引数の数が 31 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.51.2 内容

ISO C90 ではマクロ呼び出しの引数数の制限を 31 と定めています。この制限を超えると移植性が低下します。

6.51.3 サンプルコード

int i = MACRO(1, 2, 3 ...snip... 30, 31, 32); /* W0057 */

6.51.4 関連メッセージ

なし。

6.51.5 対応バージョン

1.0.0


Next: , Previous: W0057, Up: Messages

6.52 W0058

6.52.1 メッセージ本文

文字列リテラルの文字数が 509 を超えました。このプログラムは ISO C90 標準規格に厳密に準拠していません。

6.52.2 内容

ISO C90 では文字列リテラルの文字数の制限を 509 と定めています。この制限を超えると移植性が低下します。

6.52.3 サンプルコード

char buf[] = "very long long long ...snip... long string literal"; /* W0058 */

6.52.4 関連メッセージ

なし。

6.52.5 対応バージョン

1.0.0


Next: , Previous: W0058, Up: Messages

6.53 W0059

6.53.1 メッセージ本文

このファイルの行末に Ctrl-M(^M) 制御文字が見つかりました。

6.53.2 内容

PC で作成したソースには機種依存の制御コードが使用されることがあります。 このような制御コードを無視せず、意図しない処理をする処理系が存在する可能性があります。 従ってこのような機種依存の記述は移植性を低下させます。

6.53.3 サンプルコード

なし。

6.53.4 関連メッセージ

  • W0060 このファイル内に Ctrl-Z(^Z) 制御文字が見つかりました。

6.53.5 対応バージョン

1.0.0


Next: , Previous: W0059, Up: Messages

6.54 W0060

6.54.1 メッセージ本文

このファイル内に Ctrl-Z(^Z) 制御文字が見つかりました。

6.54.2 内容

PC で作成したソースには機種依存の制御コードが使用されることがあります。 このような制御コードを無視せず、意図しない処理をしてしまう処理系が存在する可能性があります。 従ってこのような機種依存の記述は移植性を低下させます。

6.54.3 サンプルコード

なし。

6.54.4 関連メッセージ

  • W0059 このファイルの行末に Ctrl-M(^M) 制御文字が見つかりました。

6.54.5 対応バージョン

1.0.0


Next: , Previous: W0060, Up: Messages

6.55 W0061

6.55.1 メッセージ本文

`%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。

6.55.2 内容

ある特定のコンパイラで定義されている言語拡張を使用すると移植性が低下します。

6.55.3 サンプルコード

extern int func(void) __attribute__ ((__const__)); /* W0061 */

6.55.4 関連メッセージ

  • W0062 `__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。
  • W0063 `__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。

6.55.5 対応バージョン

1.0.0


Next: , Previous: W0061, Up: Messages

6.56 W0062

6.56.1 メッセージ本文

`__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。

6.56.2 内容

ある特定のコンパイラで定義されている言語拡張を使用すると移植性が低下します。

6.56.3 サンプルコード

#define DEF_FUNPTR(func) __typeof__(func) *ptr_##func = 0
DEF_FUNPTR(main); /* W0062 */

6.56.4 関連メッセージ

  • W0061 `%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。
  • W0063 `__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。

6.56.5 対応バージョン

1.0.0


Next: , Previous: W0062, Up: Messages

6.57 W0063

6.57.1 メッセージ本文

`__alignof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。

6.57.2 内容

ある特定のコンパイラで定義されている言語拡張を使用すると移植性が低下します。

6.57.3 サンプルコード

int a = __alignof__(struct sockaddr *) /* W0063 */

6.57.4 関連メッセージ

  • W0061 `%s' は ISO C 標準規格の正式な予約語ではありません。言語拡張と見なし無視します。
  • W0062 `__typeof__' は ISO C 標準規格ではサポートされていません。言語拡張と見なします。

6.57.5 対応バージョン

1.0.0


Next: , Previous: W0063, Up: Messages

6.58 W0064

6.58.1 メッセージ本文

2 進数整数リテラルが使われています。これは言語拡張です。

6.58.2 内容

2 進数定数が認められている場合、それは言語拡張と考えられます。言語拡張を使用すると移植性が低下します。

6.58.3 サンプルコード

unsigned char c = 0b00000001; /* W0064 */

6.58.4 関連メッセージ

なし。

6.58.5 対応バージョン

1.0.0


Next: , Previous: W0064, Up: Messages

6.59 W0065

6.59.1 メッセージ本文

代入演算子の左オペランドをキャストしてはなりません。

6.59.2 内容

左オペランドに対するキャストが認められている場合、それは言語拡張と考えられます。 言語拡張を使用すると移植性が低下します。

6.59.3 サンプルコード

void func(int num)
{
    (unsigned short) num = 100U; /* W0065 */
}

6.59.4 関連メッセージ

なし。

6.59.5 対応バージョン

1.0.0


Next: , Previous: W0065, Up: Messages

6.60 W0066

6.60.1 メッセージ本文

`main()' 関数は、`int (void)' または `int (int, char *[])' のどちらかでなければなりません。

6.60.2 内容

int main(void) または int main(int, char*[]) 以外の形式の main 関数の定義が認められている場合、それは言語拡張と考えられます。

6.60.3 サンプルコード

void main(void) {} /* W0066 */

6.60.4 関連メッセージ

なし。

6.60.5 対応バージョン

1.0.0


Next: , Previous: W0066, Up: Messages

6.61 W0067

6.61.1 メッセージ本文

ネストされた構造体のメンバに直接アクセスしています。これは言語拡張です。

6.61.2 内容

入れ子の構造体への直接アクセスや特定ビットへの直接アクセスが認められている場合、 それは言語拡張と考えられます。言語拡張を使用すると移植性が低下します。

6.61.3 サンプルコード

struct BBB {
    int mb;
    struct AAA {
        int ma;
    };
} bbb;

bbb.ma = 1; /* W0067 */

6.61.4 関連メッセージ

  • W0068 ビットにアクセスするために `.' を使っています。これは言語拡張です。

6.61.5 対応バージョン

1.0.0


Next: , Previous: W0067, Up: Messages

6.62 W0068

6.62.1 メッセージ本文

ビットにアクセスするために `.' を使っています。これは言語拡張です。

6.62.2 内容

入れ子の構造体への直接アクセスや特定ビットへの直接アクセスが認められている場合、 それは言語拡張と考えられます。言語拡張を使用すると移植性が低下します。

6.62.3 サンプルコード

unsigned short a;

a.2 = 0; /* W0068 */

6.62.4 関連メッセージ

  • W0067 ネストされた構造体のメンバに直接アクセスしています。これは言語拡張です。

6.62.5 対応バージョン

1.0.0


Next: , Previous: W0068, Up: Messages

6.63 W0069

6.63.1 メッセージ本文

`/*' で始まるコメントの中に `/*' が見つかりました。ネストされたコメントは、ISO C 標準規格では認められていません。

6.63.2 内容

/* コメントの入れ子は ISO C90 では認められていません。 入れ子によって即問題に直結するわけではありませんが、 内側のコメントの終端 */ によって外側のコメントが終了してしまうことで 予期しない動作を引き起こす可能性があります。

6.63.3 サンプルコード

/* /* W0069 */ */

6.63.4 関連メッセージ

なし。

6.63.5 対応バージョン

1.0.0


Next: , Previous: W0069, Up: Messages

6.64 W0070

6.64.1 メッセージ本文

インクルードされている <%s> の内容は翻訳単位の中で全く参照されていません。削除することができます。

6.64.2 内容

参照しないヘッダファイルをインクルードすることは無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。

6.64.3 サンプルコード

なし。

6.64.4 関連メッセージ

  • W0071 インクルードされている "%s" の内容は翻訳単位の中で全く参照されていません。削除することができます。

6.64.5 対応バージョン

1.0.0


Next: , Previous: W0070, Up: Messages

6.65 W0071

6.65.1 メッセージ本文

インクルードされている "%s" の内容は翻訳単位の中で全く参照されていません。削除することができます。

6.65.2 内容

参照しないヘッダファイルをインクルードすることは無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。

6.65.3 サンプルコード

なし。

6.65.4 関連メッセージ

  • W0070 インクルードされている <%s> の内容は翻訳単位の中で全く参照されていません。削除することができます。

6.65.5 対応バージョン

1.0.0


Next: , Previous: W0071, Up: Messages

6.66 W0072

6.66.1 メッセージ本文

基本ソース文字集合に含まれない文字が、ヘッダファイル名で使われています。

6.66.2 内容

ISO C90 では処理できる最小限の文字集合を定めています。この集合に当てはまらない文字を処理する場合は処理系定義の動作となります。 処理系定義の動作を使用すると移植性が低下します。

6.66.3 サンプルコード

#include <test$.h> /* W0072 */

6.66.4 関連メッセージ

なし。

6.66.5 対応バージョン

1.0.0


Next: , Previous: W0072, Up: Messages

6.67 W0073

6.67.1 メッセージ本文

このインクルードファイルには、インクルードガードが記述されていません。

6.67.2 内容

重複インクルードは型の再定義に関するエラーを引き起こす原因になります。

6.67.3 サンプルコード

なし。

6.67.4 関連メッセージ

なし。

6.67.5 対応バージョン

1.0.0


Next: , Previous: W0073, Up: Messages

6.68 W0076

6.68.1 メッセージ本文

この 16 進整数リテラルには、接尾語 `U' または `u' が付けられていません。

6.68.2 内容

整数定数の値は、規格で指定された型のうち、その値を表現できる最初の型になります。 つまり、接尾語 "U" を使用していない 16 進定数は、 unsigned を意図していても、signed 型で表現できる場合は signed となります。 例えば、0x8000 は、int の実装サイズが 16bit の場合 unsigned int になりますが、 int の実装サイズが 32bit の場合 signed int 型になります。 このように、16 進定数に接尾語 "U" を使用していない時、 signedunsigned のどちらになるのかが判断しづらくなります。

6.68.3 サンプルコード

unsigned int num = 0x1234; /* W0076 */

6.68.4 関連メッセージ

なし。

6.68.5 対応バージョン

1.0.0


Next: , Previous: W0076, Up: Messages

6.69 W0077

6.69.1 メッセージ本文

接尾語として小文字の `l' が整数または浮動小数点数に付けられています。

6.69.2 内容

long 型を表す接尾語 "l" の使用は、数字の "1" と間違えられやすいため解析性が低下します。

6.69.3 サンプルコード

long a = 0x1000l; /* W0077 */
long b = 0x1000L; /* OK */

6.69.4 関連メッセージ

なし。

6.69.5 対応バージョン

1.0.0


Next: , Previous: W0077, Up: Messages

6.70 W0078

6.70.1 メッセージ本文

仮引数並びがない関数が宣言されています。

6.70.2 内容

仮引数の並びが空の関数宣言は旧式 (K&R) の文法であり、 これが現在でも利用できるのはコンパイラが旧式の文法の一部をサポートしているためです。 このようなコンパイラの配慮に依存したコードは将来的に変更を余儀なくされる未成熟なコードといえます。

6.70.3 サンプルコード

int sample() /* W0078 */
{
    return 0;
}

6.70.4 関連メッセージ

なし。

6.70.5 対応バージョン

1.0.0


Next: , Previous: W0078, Up: Messages

6.71 W0079

6.71.1 メッセージ本文

この配列は、初期値の文字列リテラルの終端文字 `\0' を保持できません。

6.71.2 内容

文字列配列はターミネータとして終端にヌル文字が入っていることを想定して使用される場合が多くあります。 例えば、文字数を数えるために終端のヌル文字が見つかるまで反復処理するような使用法が挙げられます。 このような処理を、ヌル文字を保持していない文字列配列に行った場合、無限ループに陥ってしまいます。

6.71.3 サンプルコード

char text[3] = "ABC"; /* W0079 */

6.71.4 関連メッセージ

なし。

6.71.5 対応バージョン

1.0.0


Next: , Previous: W0079, Up: Messages

6.72 W0080

6.72.1 メッセージ本文

const 修飾されたグローバルオブジェクトが、明示的に初期化されずに定義されています。

6.72.2 内容

const 指定されている変数は、値を代入することができませんので、宣言時に初期化する必要があります。 従って、const 指定されており、宣言時に初期化されていない変数は使いようのない無駄なデータということになります。 無駄なものは、メモリ資源を消費する、ソースコードの可読性を低下させる、などのデメリットがあります。

6.72.3 サンプルコード

const int num; /* W0080 */

6.72.4 関連メッセージ

なし。

6.72.5 対応バージョン

1.0.0


Next: , Previous: W0080, Up: Messages

6.73 W0081

6.73.1 メッセージ本文

単項演算子 `-' を unsigned int 型、unsigned long 型、unsigned long long 型のオペランドに対して使うと、符号無し型になってしまいます。

6.73.2 内容

符号なし型の変数に、単項演算子 "-" を使用すると結果は処理系定義、または未定義の動作になります。 従って、予期しない動作を引き起こす可能性があります。

6.73.3 サンプルコード

unsigned long num = 0;
long val = -num; /* W0081 */

6.73.4 関連メッセージ

なし。

6.73.5 対応バージョン

1.0.0


Next: , Previous: W0081, Up: Messages

6.74 W0082

6.74.1 メッセージ本文

単項演算子 `-' を符号無しの潜在型 `%s' のオペランドに対して使っています。

6.74.2 内容

符号なし型の変数に、単項演算子 "-" を使用すると結果は処理系定義、または未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.74.3 サンプルコード

unsigned short num = 20;
int val = -num; /* W0082 */

6.74.4 関連メッセージ

なし。

6.74.5 対応バージョン

1.0.0


Next: , Previous: W0082, Up: Messages

6.75 W0084

6.75.1 メッセージ本文

このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。

6.75.2 内容

副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。

6.75.3 サンプルコード

int a = 0;
int b = 1;

a, b++; /* W0084 */

6.75.4 関連メッセージ

  • W0085 この文には副作用がありません。誤りのある可能性が高いです。
  • W0086 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。
  • W0087 カンマ演算子の右側の式は、副作用がない冗長な式です。
  • W0088 論理演算子の右側の式は、副作用がない冗長な式です。

6.75.5 対応バージョン

1.0.0


Next: , Previous: W0084, Up: Messages

6.76 W0085

6.76.1 メッセージ本文

この文には副作用がありません。誤りのある可能性が高いです。

6.76.2 内容

副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。

6.76.3 サンプルコード

a; /* W0085 */

6.76.4 関連メッセージ

  • W0084 このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。
  • W0086 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。
  • W0087 カンマ演算子の右側の式は、副作用がない冗長な式です。
  • W0088 論理演算子の右側の式は、副作用がない冗長な式です。

6.76.5 対応バージョン

1.0.0


Next: , Previous: W0085, Up: Messages

6.77 W0086

6.77.1 メッセージ本文

三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。

6.77.2 内容

副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。

6.77.3 サンプルコード

int a;
int b;

(a < 0) ? b : b++; /* W0086 */

6.77.4 関連メッセージ

  • W0084 このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。
  • W0085 この文には副作用がありません。誤りのある可能性が高いです。
  • W0087 カンマ演算子の右側の式は、副作用がない冗長な式です。
  • W0088 論理演算子の右側の式は、副作用がない冗長な式です。

6.77.5 対応バージョン

1.0.0


Next: , Previous: W0086, Up: Messages

6.78 W0087

6.78.1 メッセージ本文

カンマ演算子の右側の式は、副作用がない冗長な式です。

6.78.2 内容

副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。

6.78.3 サンプルコード

int a = 0;
int b = 1;

a++, b; /* W0087 */

6.78.4 関連メッセージ

  • W0084 このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。
  • W0085 この文には副作用がありません。誤りのある可能性が高いです。
  • W0086 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。
  • W0088 論理演算子の右側の式は、副作用がない冗長な式です。

6.78.5 対応バージョン

1.0.0


Next: , Previous: W0087, Up: Messages

6.79 W0088

6.79.1 メッセージ本文

論理演算子の右側の式は、副作用がない冗長な式です。

6.79.2 内容

副作用がない文は無駄な文だと言えます。コード中に無駄な文があることで解析性が低下します。

6.79.3 サンプルコード

(a < 0) && func(a) && func(b) && c; /* W0088 */

6.79.4 関連メッセージ

  • W0084 このカンマ演算子 `,' の左オペランドには副作用をもつ式が記述されていません。
  • W0085 この文には副作用がありません。誤りのある可能性が高いです。
  • W0086 三項演算子(条件演算子)の中で、2 番目あるいは 3 番目のオペランドは、副作用がない冗長な式です。
  • W0087 カンマ演算子の右側の式は、副作用がない冗長な式です。

6.79.5 対応バージョン

1.0.0


Next: , Previous: W0088, Up: Messages

6.80 W0093

6.80.1 メッセージ本文

ゼロで除算される恐れがあります。

6.80.2 内容

ゼロでの除算は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.80.3 サンプルコード

int func(int a, int b)
{
    if (b > 0) {
        return a / b; /* OK */
    }
    return a / b; /* W0093 */
}

6.80.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.80.5 対応バージョン

1.0.0


Next: , Previous: W0093, Up: Messages

6.81 W0096

6.81.1 メッセージ本文

ゼロになる定数式で除算しています。

6.81.2 内容

ゼロでの除算は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.81.3 サンプルコード

#define A (0)

int b = 10 / A; /* W0096 */

6.81.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.81.5 対応バージョン

1.0.0


Next: , Previous: W0096, Up: Messages

6.82 W0097

6.82.1 メッセージ本文

ゼロの値で除算しています。

6.82.2 内容

ゼロでの除算は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.82.3 サンプルコード

int func(int a, int b)
{
    if (a < 0) {
        ...snip...
    }
    else {
        ...snip...
        if (a < 1) {
            return b / a; /* W0097 */
        }
    }
}

6.82.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.82.5 対応バージョン

1.0.0


Next: , Previous: W0097, Up: Messages

6.83 W0100

6.83.1 メッセージ本文

変数 `%s' は初期値を設定後に再代入されません。変数を const 付きで初期値を指定して定義できる可能性があります。

6.83.2 内容

このような変数は、値を変更しても良いか否かがわかりづらいといった問題があります。

6.83.3 サンプルコード

int func(int a)
{
    int b = a; /* W0100 */
    return b;
}

6.83.4 関連メッセージ

なし。

6.83.5 対応バージョン

1.0.0


Next: , Previous: W0100, Up: Messages

6.84 W0101

6.84.1 メッセージ本文

自動変数のアドレスが、より長い寿命を持つポインタに代入されています。このプログラムは危険です。

6.84.2 内容

ある関数で宣言された自動変数のスコープはその関数内に限定されますが、 その自動変数のアドレスをより大きなスコープを持つポインタに代入して使用した場合、 あたかもそのポインタが有効なスコープで自動変数のアドレスを扱うようなソースコードになります。 しかし実際は、関数内で宣言された自動変数は、その関数を抜けた時点でスコープを外れるため、 その自動変数のポインタも無効になります。 従って、自動変数のポインタをより大きいスコープを持つポインタへ代入することは、 無効なポインタを意図しないタイミングで使う可能性を生じさせるため危険です。

6.84.3 サンプルコード

extern long *ptr;

void func()
{
    long value = 0;
    ptr = &value; /* W0101 */
}

6.84.4 関連メッセージ

なし。

6.84.5 対応バージョン

1.0.0


Next: , Previous: W0101, Up: Messages

6.85 W0102

6.85.1 メッセージ本文

自動変数のアドレスが、関数の仮引数を介して戻されています。このプログラムは危険です。

6.85.2 内容

関数内で宣言された自動変数は、関数の実行が終了した時点で無効になります。 そのような変数のアドレスは、いつ別の変数のメモリ領域として使用されるかわかりません。

6.85.3 サンプルコード

void func(int **ptr)
{
    int num;
    *ptr = &num; /* W0102 */
}

6.85.4 関連メッセージ

  • W0103 自動変数のアドレスが、戻り値として関数から返されています。このプログラムは危険です。

6.85.5 対応バージョン

1.0.0


Next: , Previous: W0102, Up: Messages

6.86 W0103

6.86.1 メッセージ本文

自動変数のアドレスが、戻り値として関数から返されています。このプログラムは危険です。

6.86.2 内容

関数内で宣言された自動変数は、関数の実行が終了した時点で無効になります。 そのような変数のアドレスは、いつ別の変数のメモリ領域として使用されるかわかりません。

6.86.3 サンプルコード

char *foo1(void)
{
    char a[3];
    return a; /* W0103 */
}

6.86.4 関連メッセージ

  • W0102 自動変数のアドレスが、関数の仮引数を介して戻されています。このプログラムは危険です。

6.86.5 対応バージョン

1.0.0


Next: , Previous: W0103, Up: Messages

6.87 W0104

6.87.1 メッセージ本文

仮引数 `%s' は値が変わりません。const 付きで宣言できる可能性があります。

6.87.2 内容

このような引数は、値を変更しても良いか否かがわかりづらいといった問題があります。

6.87.3 サンプルコード

void func(int val) /* W0104 */
{
    const int num = val + 1;
}

6.87.4 関連メッセージ

  • W0105 ポインタ仮引数 `%s' が指しているオブジェクトは関数内で変わらないので、const オブジェクトを指すポインタ型として宣言できる可能性があります。

6.87.5 対応バージョン

1.0.0


Next: , Previous: W0104, Up: Messages

6.88 W0105

6.88.1 メッセージ本文

ポインタ仮引数 `%s' が指しているオブジェクトは関数内で変わらないので、const オブジェクトを指すポインタ型として宣言できる可能性があります。

6.88.2 内容

このような引数は、値を変更しても良いか否かがわかりづらいといった問題があります。

6.88.3 サンプルコード

void func(int *val) /* W0105 */
{
    const int num = *val;
}

6.88.4 関連メッセージ

  • W0104 仮引数 `%s' は値が変わりません。const 付きで宣言できる可能性があります。

6.88.5 対応バージョン

1.0.0


Next: , Previous: W0105, Up: Messages

6.89 W0107

6.89.1 メッセージ本文

自動変数のアドレスが、static 付きローカルポインタに代入されています。このプログラムは危険です。

6.89.2 内容

関数のスコープを抜けると自動記憶域期間を持つオブジェクトが無効になる一方で、 静的記憶域期間を持つオブジェクトは無効になりません。 従って、静的記憶域期間を持つポインタに自動記憶域期間を持つオブジェクトのアドレスを代入することは危険です。

6.89.3 サンプルコード

void foo()
{
    static int *p;
    int b = 100;

    p = &b; /* W0107 */
}

6.89.4 関連メッセージ

なし。

6.89.5 対応バージョン

1.0.0


Next: , Previous: W0107, Up: Messages

6.90 W0108

6.90.1 メッセージ本文

代入演算子が論理演算式の中で使われています。

6.90.2 内容

実質的にブール型として使用されている変数に対する代入演算子や複合代入演算子の使用は、 どのように解釈してよいかがわかりづらく、コードを複雑にします。

6.90.3 サンプルコード

int a;
int b;

if (a = b) { /* W0108 */
}

6.90.4 関連メッセージ

なし。

6.90.5 対応バージョン

1.0.0


Next: , Previous: W0108, Up: Messages

6.91 W0109

6.91.1 メッセージ本文

この関数の宣言が見つかりません。省略されたものとみなし、`extern int %s()' を挿入します。

6.91.2 内容

ISO C90 では、関数は使用される前に定義もしくはプロトタイプ宣言すべきとされています。 定義もしくはプロトタイプ宣言なしで使用する場合は、暗黙の宣言があるものと見なされます。 しかし、このような規格の配慮に依存したコードは将来的に変更を余儀なくされる未成熟なコードといえます。

6.91.3 サンプルコード

void func()
{
    foo(); /* W0109 */
}

6.91.4 関連メッセージ

なし。

6.91.5 対応バージョン

1.0.0


Next: , Previous: W0109, Up: Messages

6.92 W0110

6.92.1 メッセージ本文

浮動小数点型の変数が for 文のループカウンタとして使われています。

6.92.2 内容

ループカウンタ(ループの制御変数)の型を浮動小数点型にした場合、 ループを抜ける条件に等式や不等式を採用した場合に、 ループカウンタの丸め誤差が原因で無限ループになる可能性が高くなります。

6.92.3 サンプルコード

double d;

for (d = 0.0; d != 1.0; d += 0.1) { /* W0110 */
}

6.92.4 関連メッセージ

なし。

6.92.5 対応バージョン

1.0.0


Next: , Previous: W0110, Up: Messages

6.93 W0112

6.93.1 メッセージ本文

浮動小数点の式を等価演算子で比較しています。

6.93.2 内容

浮動小数点型の変数は様々な誤差の影響により、ある数と等式や不等式で比較しても目的の結果を得られるとは限りません。

6.93.3 サンプルコード

double a = 0.1;
a = (a + 0.1) * 5.0;
if (a == 1.0) { /* W0112 */
}

6.93.4 関連メッセージ

なし。

6.93.5 対応バージョン

1.0.0


Next: , Previous: W0112, Up: Messages

6.94 W0114

6.94.1 メッセージ本文

この制御式は明示的な論理演算ではありません。

6.94.2 内容

制御式で比較演算子を使用しないと暗黙的に 0 と比較された結果を判定することになります。 このような比較演算子を用いない書き方はコーディング量が減るメリットよりも解析性が低下するデメリットの方が大きいと考えられます。

6.94.3 サンプルコード

int a;

if (a != 0) { /* OK */
}

if (a) { /* W0114 */
}

6.94.4 関連メッセージ

なし。

6.94.5 対応バージョン

1.0.0


Next: , Previous: W0114, Up: Messages

6.95 W0115

6.95.1 メッセージ本文

符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。

6.95.2 内容

符号なし型の変数に対する左シフト演算は上位ビットを切り詰めて、情報を損失する可能性があります。

6.95.3 サンプルコード

unsigned int func(unsigned int a)
{
    if (a > 0x40000000U) {
        return a << 2; /* W0115 */
    }
}

6.95.4 関連メッセージ

  • W0116 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.95.5 対応バージョン

1.0.0


Next: , Previous: W0115, Up: Messages

6.96 W0116

6.96.1 メッセージ本文

符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。

6.96.2 内容

符号なし型の変数に対する左シフト演算は上位ビットを切り詰めて、情報を損失する可能性があります。

6.96.3 サンプルコード

unsigned int func(unsigned int a)
{
    if (a > 0x40000000U) {
        return a << 1; /* W0116 */
    }
}

6.96.4 関連メッセージ

  • W0115 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.96.5 対応バージョン

1.0.0


Next: , Previous: W0116, Up: Messages

6.97 W0117

6.97.1 メッセージ本文

`%s' の定義は外部結合を持ちますが、定義より前にその宣言がありません。

6.97.2 内容

外部変数や外部関数は複数のファイルで使用されることを想定して宣言されます。 従って、これらはヘッダファイルで宣言され、インクルードして使用されるべきです。 ソースファイルで宣言して使用する場合、ヘッダファイルで宣言して使用するよりも安全性、保守性が低下します。

6.97.3 サンプルコード

void func(void) /* W0117 */
{
    ...snip...
}

6.97.4 関連メッセージ

  • W0118 外部結合を持つ `%s' の宣言が、ヘッダファイルの中にありません。

6.97.5 対応バージョン

1.0.0


Next: , Previous: W0117, Up: Messages

6.98 W0118

6.98.1 メッセージ本文

外部結合を持つ `%s' の宣言が、ヘッダファイルの中にありません。

6.98.2 内容

外部変数や外部関数は複数のファイルで使用されることを想定して宣言されます。 従って、これらはヘッダファイルで宣言され、インクルードして使用されるべきです。 ソースファイルで宣言して使用する場合、ヘッダファイルで宣言して使用するよりも安全性、保守性が低下します。

6.98.3 サンプルコード

test.c

extern int val; /* W0118 */

6.98.4 関連メッセージ

  • W0117 `%s' の定義は外部結合を持ちますが、定義より前にその宣言がありません。

6.98.5 対応バージョン

1.0.0


Next: , Previous: W0118, Up: Messages

6.99 W0119

6.99.1 メッセージ本文

暗黙的に char 型から signed char 型に型変換されています。

6.99.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.99.3 サンプルコード

extern void foo(signed char a);

void bar(char a)
{
    signed char b = a; /* W0119 */
    foo(a); /* W0119 */
}

6.99.4 関連メッセージ

  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.99.5 対応バージョン

1.0.0


Next: , Previous: W0119, Up: Messages

6.100 W0120

6.100.1 メッセージ本文

暗黙的に char 型から unsigned char 型に型変換されています。

6.100.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.100.3 サンプルコード

extern void foo(unsigned char a);

void bar(char a)
{
    unsigned char b = a; /* W0120 */
    foo(a); /* W0120 */
}

6.100.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.100.5 対応バージョン

1.0.0


Next: , Previous: W0120, Up: Messages

6.101 W0121

6.101.1 メッセージ本文

暗黙的に char 型から signed short 型に型変換されています。

6.101.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.101.3 サンプルコード

extern void foo(short a);

void bar(char a)
{
    short b = a; /* W0121 */
    foo(a); /* W0121 */
}

6.101.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.101.5 対応バージョン

1.0.0


Next: , Previous: W0121, Up: Messages

6.102 W0122

6.102.1 メッセージ本文

暗黙的に char 型から unsigned short 型に型変換されています。

6.102.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.102.3 サンプルコード

extern void foo(unsigned short a);

void bar(char a)
{
    unsigned short b = a; /* W0122 */
    foo(a); /* W0122 */
}

6.102.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.102.5 対応バージョン

1.0.0


Next: , Previous: W0122, Up: Messages

6.103 W0123

6.103.1 メッセージ本文

暗黙的に char 型から signed int 型に型変換されています。

6.103.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.103.3 サンプルコード

extern void foo(int a);

void bar(char a)
{
    int b = a; /* W0123 */
    foo(a); /* W0123 */
}

6.103.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.103.5 対応バージョン

1.0.0


Next: , Previous: W0123, Up: Messages

6.104 W0124

6.104.1 メッセージ本文

暗黙的に char 型から unsigned int 型に型変換されています。

6.104.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.104.3 サンプルコード

extern void foo(unsigned int a);

void bar(char a)
{
    unsigned int b = a; /* W0124 */
    foo(a); /* W0124 */
}

6.104.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.104.5 対応バージョン

1.0.0


Next: , Previous: W0124, Up: Messages

6.105 W0125

6.105.1 メッセージ本文

暗黙的に char 型から signed long 型に型変換されています。

6.105.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.105.3 サンプルコード

extern void foo(long a);

void bar(char a)
{
    long b = a; /* W0125 */
    foo(a); /* W0125 */
}

6.105.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.105.5 対応バージョン

1.0.0


Next: , Previous: W0125, Up: Messages

6.106 W0126

6.106.1 メッセージ本文

暗黙的に char 型から unsigned long 型に型変換されています。

6.106.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.106.3 サンプルコード

extern void foo(unsigned long a);

void bar(char a)
{
    unsigned long b = a; /* W0126 */
    foo(a); /* W0126 */
}

6.106.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.106.5 対応バージョン

1.0.0


Next: , Previous: W0126, Up: Messages

6.107 W0127

6.107.1 メッセージ本文

暗黙的に char 型から float 型に型変換されています。

6.107.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.107.3 サンプルコード

extern void foo(float a);

void bar(char a)
{
    float b = a; /* W0127 */
    foo(a); /* W0127 */
}

6.107.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.107.5 対応バージョン

1.0.0


Next: , Previous: W0127, Up: Messages

6.108 W0128

6.108.1 メッセージ本文

暗黙的に char 型から double 型に型変換されています。

6.108.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.108.3 サンプルコード

extern void foo(double a);

void bar(char a)
{
    double b = a; /* W0128 */
    foo(a); /* W0128 */
}

6.108.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.108.5 対応バージョン

1.0.0


Next: , Previous: W0128, Up: Messages

6.109 W0129

6.109.1 メッセージ本文

暗黙的に char 型から long double 型に型変換されています。

6.109.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.109.3 サンプルコード

extern void foo(long double a);

void bar(char a)
{
    long double b = a; /* W0129 */
    foo(a); /* W0129 */
}

6.109.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.109.5 対応バージョン

1.0.0


Next: , Previous: W0129, Up: Messages

6.110 W0130

6.110.1 メッセージ本文

暗黙的に char 型から signed long long 型に型変換されています。

6.110.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.110.3 サンプルコード

extern void foo(long long a);

void bar(char a)
{
    long long b = a; /* W0130 */
    foo(a); /* W0130 */
}

6.110.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0131 暗黙的に char 型から unsigned long long 型に型変換されています。

6.110.5 対応バージョン

1.0.0


Next: , Previous: W0130, Up: Messages

6.111 W0131

6.111.1 メッセージ本文

暗黙的に char 型から unsigned long long 型に型変換されています。

6.111.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。

6.111.3 サンプルコード

extern void foo(unsigned long long a);

void bar(char a)
{
    unsigned long long b = a; /* W0131 */
    foo(a); /* W0131 */
}

6.111.4 関連メッセージ

  • W0119 暗黙的に char 型から signed char 型に型変換されています。
  • W0120 暗黙的に char 型から unsigned char 型に型変換されています。
  • W0121 暗黙的に char 型から signed short 型に型変換されています。
  • W0122 暗黙的に char 型から unsigned short 型に型変換されています。
  • W0123 暗黙的に char 型から signed int 型に型変換されています。
  • W0124 暗黙的に char 型から unsigned int 型に型変換されています。
  • W0125 暗黙的に char 型から signed long 型に型変換されています。
  • W0126 暗黙的に char 型から unsigned long 型に型変換されています。
  • W0127 暗黙的に char 型から float 型に型変換されています。
  • W0128 暗黙的に char 型から double 型に型変換されています。
  • W0129 暗黙的に char 型から long double 型に型変換されています。
  • W0130 暗黙的に char 型から signed long long 型に型変換されています。

6.111.5 対応バージョン

1.0.0


Next: , Previous: W0131, Up: Messages

6.112 W0132

6.112.1 メッセージ本文

暗黙的に unsigned char 型から char 型に型変換されています。

6.112.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.112.3 サンプルコード

extern void foo(char a);

void bar(unsigned char a)
{
    char b = a; /* W0132 */
    foo(a); /* W0132 */
}

6.112.4 関連メッセージ

  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.112.5 対応バージョン

1.0.0


Next: , Previous: W0132, Up: Messages

6.113 W0133

6.113.1 メッセージ本文

暗黙的に signed char 型から char 型に型変換されています。

6.113.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.113.3 サンプルコード

extern void foo(char a);

void bar(signed char a)
{
    char b = a; /* W0133 */
    foo(a); /* W0133 */
}

6.113.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.113.5 対応バージョン

1.0.0


Next: , Previous: W0133, Up: Messages

6.114 W0134

6.114.1 メッセージ本文

暗黙的に signed short 型から char 型に型変換されています。

6.114.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.114.3 サンプルコード

extern void foo(char a);

void bar(short a)
{
    char b = a; /* W0134 */
    foo(a); /* W0134 */
}

6.114.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.114.5 対応バージョン

1.0.0


Next: , Previous: W0134, Up: Messages

6.115 W0135

6.115.1 メッセージ本文

暗黙的に unsigned short 型から char 型に型変換されています。

6.115.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.115.3 サンプルコード

extern void foo(char a);

void bar(unsigned short a)
{
    char b = a; /* W0135 */
    foo(a); /* W0135 */
}

6.115.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.115.5 対応バージョン

1.0.0


Next: , Previous: W0135, Up: Messages

6.116 W0136

6.116.1 メッセージ本文

暗黙的に signed int 型から char 型に型変換されています。

6.116.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.116.3 サンプルコード

extern void foo(char a);

void bar(int a)
{
    char b = a; /* W0136 */
    foo(a); /* W0136 */
}

6.116.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.116.5 対応バージョン

1.0.0


Next: , Previous: W0136, Up: Messages

6.117 W0137

6.117.1 メッセージ本文

暗黙的に unsigned int 型から char 型に型変換されています。

6.117.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.117.3 サンプルコード

extern void foo(char a);

void bar(unsigned int a)
{
    char b = a; /* W0137 */
    foo(a); /* W0137 */
}

6.117.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.117.5 対応バージョン

1.0.0


Next: , Previous: W0137, Up: Messages

6.118 W0138

6.118.1 メッセージ本文

暗黙的に signed long 型から char 型に型変換されています。

6.118.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.118.3 サンプルコード

extern void foo(char a);

void bar(long a)
{
    char b = a; /* W0138 */
    foo(a); /* W0138 */
}

6.118.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.118.5 対応バージョン

1.0.0


Next: , Previous: W0138, Up: Messages

6.119 W0139

6.119.1 メッセージ本文

暗黙的に unsigned long 型から char 型に型変換されています。

6.119.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.119.3 サンプルコード

extern void foo(char a);

void bar(unsigned long a)
{
    char b = a; /* W0139 */
    foo(a); /* W0139 */
}

6.119.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.119.5 対応バージョン

1.0.0


Next: , Previous: W0139, Up: Messages

6.120 W0140

6.120.1 メッセージ本文

暗黙的に signed long long 型から char 型に型変換されています。

6.120.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.120.3 サンプルコード

extern void foo(char a);

void bar(long long a)
{
    char b = a; /* W0140 */
    foo(a); /* W0140 */
}

6.120.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0141 暗黙的に unsigned long long 型から char 型に型変換されています。

6.120.5 対応バージョン

1.0.0


Next: , Previous: W0140, Up: Messages

6.121 W0141

6.121.1 メッセージ本文

暗黙的に unsigned long long 型から char 型に型変換されています。

6.121.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.121.3 サンプルコード

extern void foo(char a);

void bar(unsigned long long a)
{
    char b = a; /* W0141 */
    foo(a); /* W0141 */
}

6.121.4 関連メッセージ

  • W0132 暗黙的に unsigned char 型から char 型に型変換されています。
  • W0133 暗黙的に signed char 型から char 型に型変換されています。
  • W0134 暗黙的に signed short 型から char 型に型変換されています。
  • W0135 暗黙的に unsigned short 型から char 型に型変換されています。
  • W0136 暗黙的に signed int 型から char 型に型変換されています。
  • W0137 暗黙的に unsigned int 型から char 型に型変換されています。
  • W0138 暗黙的に signed long 型から char 型に型変換されています。
  • W0139 暗黙的に unsigned long 型から char 型に型変換されています。
  • W0140 暗黙的に signed long long 型から char 型に型変換されています。

6.121.5 対応バージョン

1.0.0


Next: , Previous: W0141, Up: Messages

6.122 W0142

6.122.1 メッセージ本文

暗黙的に unsigned char 型から signed char 型に型変換されています。

6.122.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。

6.122.3 サンプルコード

extern void foo(signed char a);

void bar(unsigned char a)
{
    signed char b = a; /* W0142 */
    foo(a); /* W0142 */
}

6.122.4 関連メッセージ

  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.122.5 対応バージョン

1.0.0


Next: , Previous: W0142, Up: Messages

6.123 W0143

6.123.1 メッセージ本文

暗黙的に unsigned short 型から signed char 型に型変換されています。

6.123.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.123.3 サンプルコード

extern void foo(signed char a);

void bar(unsigned short a)
{
    signed char b = a; /* W0143 */
    foo(a); /* W0143 */
}

6.123.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.123.5 対応バージョン

1.0.0


Next: , Previous: W0143, Up: Messages

6.124 W0144

6.124.1 メッセージ本文

暗黙的に unsigned short 型から signed short 型に型変換されています。

6.124.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。

6.124.3 サンプルコード

extern void foo(short a);

void bar(unsigned short a)
{
    short b = a; /* W0144 */
    foo(a); /* W0144 */
}

6.124.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.124.5 対応バージョン

1.0.0


Next: , Previous: W0144, Up: Messages

6.125 W0145

6.125.1 メッセージ本文

暗黙的に unsigned int 型から signed char 型に型変換されています。

6.125.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.125.3 サンプルコード

extern void foo(signed char a);

void bar(unsigned int a)
{
    signed char b = a; /* W0145 */
    foo(a); /* W0145 */
}

6.125.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.125.5 対応バージョン

1.0.0


Next: , Previous: W0145, Up: Messages

6.126 W0146

6.126.1 メッセージ本文

暗黙的に unsigned int 型から signed short 型に型変換されています。

6.126.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.126.3 サンプルコード

extern void foo(short a);

void bar(unsigned int a)
{
    short b = a; /* W0146 */
    foo(a); /* W0146 */
}

6.126.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.126.5 対応バージョン

1.0.0


Next: , Previous: W0146, Up: Messages

6.127 W0147

6.127.1 メッセージ本文

暗黙的に unsigned int 型から signed int 型に型変換されています。

6.127.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。

6.127.3 サンプルコード

extern void foo(int a);

void bar(unsigned int a)
{
    int b = a; /* W0147 */
    foo(a); /* W0147 */
}

6.127.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.127.5 対応バージョン

1.0.0


Next: , Previous: W0147, Up: Messages

6.128 W0148

6.128.1 メッセージ本文

暗黙的に unsigned long 型から signed char 型に型変換されています。

6.128.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.128.3 サンプルコード

extern void foo(signed char a);

void bar(unsigned long a)
{
    signed char b = a; /* W0148 */
    foo(a); /* W0148 */
}

6.128.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.128.5 対応バージョン

1.0.0


Next: , Previous: W0148, Up: Messages

6.129 W0149

6.129.1 メッセージ本文

暗黙的に unsigned long 型から signed short 型に型変換されています。

6.129.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.129.3 サンプルコード

extern void foo(short a);

void bar(unsigned long a)
{
    short b = a; /* W0149 */
    foo(a); /* W0149 */
}

6.129.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.129.5 対応バージョン

1.0.0


Next: , Previous: W0149, Up: Messages

6.130 W0150

6.130.1 メッセージ本文

暗黙的に unsigned long 型から signed int 型に型変換されています。

6.130.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.130.3 サンプルコード

extern void foo(int a);

void bar(unsigned long a)
{
    int b = a; /* W0150 */
    foo(a); /* W0150 */
}

6.130.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.130.5 対応バージョン

1.0.0


Next: , Previous: W0150, Up: Messages

6.131 W0151

6.131.1 メッセージ本文

暗黙的に unsigned long 型から signed long 型に型変換されています。

6.131.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。

6.131.3 サンプルコード

extern void foo(long a);

void bar(unsigned long a)
{
    long b = a; /* W0151 */
    foo(a); /* W0151 */
}

6.131.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.131.5 対応バージョン

1.0.0


Next: , Previous: W0151, Up: Messages

6.132 W0152

6.132.1 メッセージ本文

暗黙的に unsigned long long 型から signed char 型に型変換されています。

6.132.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.132.3 サンプルコード

extern void foo(signed char a);

void bar(unsigned long long a)
{
    signed char b = a; /* W0152 */
    foo(a); /* W0152 */
}

6.132.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.132.5 対応バージョン

1.0.0


Next: , Previous: W0152, Up: Messages

6.133 W0153

6.133.1 メッセージ本文

暗黙的に unsigned long long 型から signed short 型に型変換されています。

6.133.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.133.3 サンプルコード

extern void foo(short a);

void bar(unsigned long long a)
{
    short b = a; /* W0153 */
    foo(a); /* W0153 */
}

6.133.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.133.5 対応バージョン

1.0.0


Next: , Previous: W0153, Up: Messages

6.134 W0154

6.134.1 メッセージ本文

暗黙的に unsigned long long 型から signed int 型に型変換されています。

6.134.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.134.3 サンプルコード

extern void foo(int a);

void bar(unsigned long long a)
{
    int b = a; /* W0154 */
    foo(a); /* W0154 */
}

6.134.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.134.5 対応バージョン

1.0.0


Next: , Previous: W0154, Up: Messages

6.135 W0155

6.135.1 メッセージ本文

暗黙的に unsigned long long 型から signed long 型に型変換されています。

6.135.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。 また、より小さいデータへの暗黙のキャストにより、情報を損失する可能性があります。

6.135.3 サンプルコード

extern void foo(long a);

void bar(unsigned long long a)
{
    long b = a; /* W0155 */
    foo(a); /* W0155 */
}

6.135.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0156 暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.135.5 対応バージョン

1.0.0


Next: , Previous: W0155, Up: Messages

6.136 W0156

6.136.1 メッセージ本文

暗黙的に unsigned long long 型から signed long long 型に型変換されています。

6.136.2 内容

符号なし型から符号つき型への暗黙のキャストにより、 結果が意図せず負の数になる可能性があります。

6.136.3 サンプルコード

extern void foo(long long a);

void bar(unsigned long long a)
{
    long long b = a; /* W0156 */
    foo(a); /* W0156 */
}

6.136.4 関連メッセージ

  • W0142 暗黙的に unsigned char 型から signed char 型に型変換されています。
  • W0143 暗黙的に unsigned short 型から signed char 型に型変換されています。
  • W0144 暗黙的に unsigned short 型から signed short 型に型変換されています。
  • W0145 暗黙的に unsigned int 型から signed char 型に型変換されています。
  • W0146 暗黙的に unsigned int 型から signed short 型に型変換されています。
  • W0147 暗黙的に unsigned int 型から signed int 型に型変換されています。
  • W0148 暗黙的に unsigned long 型から signed char 型に型変換されています。
  • W0149 暗黙的に unsigned long 型から signed short 型に型変換されています。
  • W0150 暗黙的に unsigned long 型から signed int 型に型変換されています。
  • W0151 暗黙的に unsigned long 型から signed long 型に型変換されています。
  • W0152 暗黙的に unsigned long long 型から signed char 型に型変換されています。
  • W0153 暗黙的に unsigned long long 型から signed short 型に型変換されています。
  • W0154 暗黙的に unsigned long long 型から signed int 型に型変換されています。
  • W0155 暗黙的に unsigned long long 型から signed long 型に型変換されています。

6.136.5 対応バージョン

1.0.0


Next: , Previous: W0156, Up: Messages

6.137 W0157

6.137.1 メッセージ本文

暗黙的に signed char 型から unsigned char 型に型変換されています。

6.137.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.137.3 サンプルコード

extern void foo(unsigned char a);

void bar(signed char a)
{
    unsigned char b = a; /* W0157 */
    foo(a); /* W0157 */
}

6.137.4 関連メッセージ

  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.137.5 対応バージョン

1.0.0


Next: , Previous: W0157, Up: Messages

6.138 W0158

6.138.1 メッセージ本文

暗黙的に signed char 型から unsigned short 型に型変換されています。

6.138.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.138.3 サンプルコード

extern void foo(unsigned short a);

void bar(signed char a)
{
    unsigned short b = a; /* W0158 */
    foo(a); /* W0158 */
}

6.138.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.138.5 対応バージョン

1.0.0


Next: , Previous: W0158, Up: Messages

6.139 W0159

6.139.1 メッセージ本文

暗黙的に signed char 型から unsigned int 型に型変換されています。

6.139.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.139.3 サンプルコード

extern void foo(unsigned int a);

void bar(signed char a)
{
    unsigned int b = a; /* W0159 */
    foo(a); /* W0159 */
}

6.139.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.139.5 対応バージョン

1.0.0


Next: , Previous: W0159, Up: Messages

6.140 W0160

6.140.1 メッセージ本文

暗黙的に signed char 型から unsigned long 型に型変換されています。

6.140.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.140.3 サンプルコード

extern void foo(unsigned long a);

void bar(signed char a)
{
    unsigned long b = a; /* W0160 */
    foo(a); /* W0160 */
}

6.140.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.140.5 対応バージョン

1.0.0


Next: , Previous: W0160, Up: Messages

6.141 W0161

6.141.1 メッセージ本文

暗黙的に signed short 型から unsigned char 型に型変換されています。

6.141.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.141.3 サンプルコード

extern void foo(unsigned char a);

void bar(short a)
{
    unsigned char b = a; /* W0161 */
    foo(a); /* W0161 */
}

6.141.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.141.5 対応バージョン

1.0.0


Next: , Previous: W0161, Up: Messages

6.142 W0162

6.142.1 メッセージ本文

暗黙的に signed short 型から unsigned short 型に型変換されています。

6.142.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.142.3 サンプルコード

extern void foo(unsigned short a);

void bar(short a)
{
    unsigned short b = a; /* W0162 */
    foo(a); /* W0162 */
}

6.142.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.142.5 対応バージョン

1.0.0


Next: , Previous: W0162, Up: Messages

6.143 W0163

6.143.1 メッセージ本文

暗黙的に signed short 型から unsigned int 型に型変換されています。

6.143.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.143.3 サンプルコード

extern void foo(unsigned int a);

void bar(short a)
{
    unsigned int b = a; /* W0163 */
    foo(a); /* W0163 */
}

6.143.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.143.5 対応バージョン

1.0.0


Next: , Previous: W0163, Up: Messages

6.144 W0164

6.144.1 メッセージ本文

暗黙的に signed short 型から unsigned long 型に型変換されています。

6.144.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.144.3 サンプルコード

extern void foo(unsigned long a);

void bar(short a)
{
    unsigned long b = a; /* W0164 */
    foo(a); /* W0164 */
}

6.144.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.144.5 対応バージョン

1.0.0


Next: , Previous: W0164, Up: Messages

6.145 W0165

6.145.1 メッセージ本文

暗黙的に signed int 型から unsigned char 型に型変換されています。

6.145.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.145.3 サンプルコード

extern void foo(unsigned char a);

void bar(int a)
{
    unsigned char b = a; /* W0165 */
    foo(a); /* W0165 */
}

6.145.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.145.5 対応バージョン

1.0.0


Next: , Previous: W0165, Up: Messages

6.146 W0166

6.146.1 メッセージ本文

暗黙的に signed int 型から unsigned short 型に型変換されています。

6.146.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.146.3 サンプルコード

extern void foo(unsigned short a);

void bar(int a)
{
    unsigned short b = a; /* W0166 */
    foo(a); /* W0166 */
}

6.146.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.146.5 対応バージョン

1.0.0


Next: , Previous: W0166, Up: Messages

6.147 W0167

6.147.1 メッセージ本文

暗黙的に signed int 型から unsigned int 型に型変換されています。

6.147.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.147.3 サンプルコード

extern void foo(unsigned int a);

void bar(int a)
{
    unsigned int b = a; /* W0167 */
    foo(a); /* W0167 */
}

6.147.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.147.5 対応バージョン

1.0.0


Next: , Previous: W0167, Up: Messages

6.148 W0168

6.148.1 メッセージ本文

暗黙的に signed int 型から unsigned long 型に型変換されています。

6.148.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.148.3 サンプルコード

extern void foo(unsigned long a);

void bar(int a)
{
    unsigned long b = a; /* W0168 */
    foo(a); /* W0168 */
}

6.148.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.148.5 対応バージョン

1.0.0


Next: , Previous: W0168, Up: Messages

6.149 W0169

6.149.1 メッセージ本文

暗黙的に signed long 型から unsigned char 型に型変換されています。

6.149.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.149.3 サンプルコード

extern void foo(unsigned char a);

void bar(long a)
{
    unsigned char b = a; /* W0169 */
    foo(a); /* W0169 */
}

6.149.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.149.5 対応バージョン

1.0.0


Next: , Previous: W0169, Up: Messages

6.150 W0170

6.150.1 メッセージ本文

暗黙的に signed long 型から unsigned short 型に型変換されています。

6.150.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.150.3 サンプルコード

extern void foo(unsigned short a);

void bar(long a)
{
    unsigned short b = a; /* W0170 */
    foo(a); /* W0170 */
}

6.150.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.150.5 対応バージョン

1.0.0


Next: , Previous: W0170, Up: Messages

6.151 W0171

6.151.1 メッセージ本文

暗黙的に signed long 型から unsigned int 型に型変換されています。

6.151.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.151.3 サンプルコード

extern void foo(unsigned int a);

void bar(long a)
{
    unsigned int b = a; /* W0171 */
    foo(a); /* W0171 */
}

6.151.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.151.5 対応バージョン

1.0.0


Next: , Previous: W0171, Up: Messages

6.152 W0172

6.152.1 メッセージ本文

暗黙的に signed long 型から unsigned long 型に型変換されています。

6.152.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.152.3 サンプルコード

extern void foo(unsigned long a);

void bar(long a)
{
    unsigned long b = a; /* W0172 */
    foo(a); /* W0172 */
}

6.152.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.152.5 対応バージョン

1.0.0


Next: , Previous: W0172, Up: Messages

6.153 W0173

6.153.1 メッセージ本文

暗黙的に signed char 型から unsigned long long 型に型変換されています。

6.153.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.153.3 サンプルコード

extern void foo(unsigned long long a);

void bar(signed char a)
{
    unsigned long long b = a; /* W0173 */
    foo(a); /* W0173 */
}

6.153.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.153.5 対応バージョン

1.0.0


Next: , Previous: W0173, Up: Messages

6.154 W0174

6.154.1 メッセージ本文

暗黙的に signed short 型から unsigned long long 型に型変換されています。

6.154.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.154.3 サンプルコード

extern void foo(unsigned long long a);

void bar(short a)
{
    unsigned long long b = a; /* W0174 */
    foo(a); /* W0174 */
}

6.154.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.154.5 対応バージョン

1.0.0


Next: , Previous: W0174, Up: Messages

6.155 W0175

6.155.1 メッセージ本文

暗黙的に signed int 型から unsigned long long 型に型変換されています。

6.155.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.155.3 サンプルコード

extern void foo(unsigned long long a);

void bar(int a)
{
    unsigned long long b = a; /* W0175 */
    foo(a); /* W0175 */
}

6.155.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.155.5 対応バージョン

1.0.0


Next: , Previous: W0175, Up: Messages

6.156 W0176

6.156.1 メッセージ本文

暗黙的に signed long 型から unsigned long long 型に型変換されています。

6.156.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.156.3 サンプルコード

extern void foo(unsigned long long a);

void bar(long a)
{
    unsigned long long b = a; /* W0176 */
    foo(a); /* W0176 */
}

6.156.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.156.5 対応バージョン

1.0.0


Next: , Previous: W0176, Up: Messages

6.157 W0177

6.157.1 メッセージ本文

暗黙的に signed long long 型から unsigned char 型に型変換されています。

6.157.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.157.3 サンプルコード

extern void foo(unsigned char a);

void bar(long long a)
{
    unsigned char b = a; /* W0177 */
    foo(a); /* W0177 */
}

6.157.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.157.5 対応バージョン

1.0.0


Next: , Previous: W0177, Up: Messages

6.158 W0178

6.158.1 メッセージ本文

暗黙的に signed long long 型から unsigned short 型に型変換されています。

6.158.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.158.3 サンプルコード

extern void foo(unsigned short a);

void bar(long long a)
{
    unsigned short b = a; /* W0178 */
    foo(a); /* W0178 */
}

6.158.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.158.5 対応バージョン

1.0.0


Next: , Previous: W0178, Up: Messages

6.159 W0179

6.159.1 メッセージ本文

暗黙的に signed long long 型から unsigned int 型に型変換されています。

6.159.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.159.3 サンプルコード

extern void foo(unsigned int a);

void bar(long long a)
{
    unsigned int b = a; /* W0179 */
    foo(a); /* W0179 */
}

6.159.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.159.5 対応バージョン

1.0.0


Next: , Previous: W0179, Up: Messages

6.160 W0180

6.160.1 メッセージ本文

暗黙的に signed long long 型から unsigned long 型に型変換されています。

6.160.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.160.3 サンプルコード

extern void foo(unsigned long a);

void bar(long long a)
{
    unsigned long b = a; /* W0180 */
    foo(a); /* W0180 */
}

6.160.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0181 暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.160.5 対応バージョン

1.0.0


Next: , Previous: W0180, Up: Messages

6.161 W0181

6.161.1 メッセージ本文

暗黙的に signed long long 型から unsigned long long 型に型変換されています。

6.161.2 内容

符号つき型から符号なし型への暗黙のキャストにより、 結果が意図せず負の数から大きな正の数になる可能性があります。

6.161.3 サンプルコード

extern void foo(unsigned long long a);

void bar(long long a)
{
    unsigned long long b = a; /* W0181 */
    foo(a); /* W0181 */
}

6.161.4 関連メッセージ

  • W0157 暗黙的に signed char 型から unsigned char 型に型変換されています。
  • W0158 暗黙的に signed char 型から unsigned short 型に型変換されています。
  • W0159 暗黙的に signed char 型から unsigned int 型に型変換されています。
  • W0160 暗黙的に signed char 型から unsigned long 型に型変換されています。
  • W0161 暗黙的に signed short 型から unsigned char 型に型変換されています。
  • W0162 暗黙的に signed short 型から unsigned short 型に型変換されています。
  • W0163 暗黙的に signed short 型から unsigned int 型に型変換されています。
  • W0164 暗黙的に signed short 型から unsigned long 型に型変換されています。
  • W0165 暗黙的に signed int 型から unsigned char 型に型変換されています。
  • W0166 暗黙的に signed int 型から unsigned short 型に型変換されています。
  • W0167 暗黙的に signed int 型から unsigned int 型に型変換されています。
  • W0168 暗黙的に signed int 型から unsigned long 型に型変換されています。
  • W0169 暗黙的に signed long 型から unsigned char 型に型変換されています。
  • W0170 暗黙的に signed long 型から unsigned short 型に型変換されています。
  • W0171 暗黙的に signed long 型から unsigned int 型に型変換されています。
  • W0172 暗黙的に signed long 型から unsigned long 型に型変換されています。
  • W0173 暗黙的に signed char 型から unsigned long long 型に型変換されています。
  • W0174 暗黙的に signed short 型から unsigned long long 型に型変換されています。
  • W0175 暗黙的に signed int 型から unsigned long long 型に型変換されています。
  • W0176 暗黙的に signed long 型から unsigned long long 型に型変換されています。
  • W0177 暗黙的に signed long long 型から unsigned char 型に型変換されています。
  • W0178 暗黙的に signed long long 型から unsigned short 型に型変換されています。
  • W0179 暗黙的に signed long long 型から unsigned int 型に型変換されています。
  • W0180 暗黙的に signed long long 型から unsigned long 型に型変換されています。

6.161.5 対応バージョン

1.0.0


Next: , Previous: W0181, Up: Messages

6.162 W0182

6.162.1 メッセージ本文

暗黙的に unsigned char 型から float 型に型変換されています。

6.162.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.162.3 サンプルコード

extern void foo(float a);

void bar(unsigned char a)
{
    float b = a; /* W0182 */
    foo(a); /* W0182 */
}

6.162.4 関連メッセージ

  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.162.5 対応バージョン

1.0.0


Next: , Previous: W0182, Up: Messages

6.163 W0183

6.163.1 メッセージ本文

暗黙的に unsigned char 型から double 型に型変換されています。

6.163.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.163.3 サンプルコード

extern void foo(double a);

void bar(unsigned char a)
{
    double b = a; /* W0183 */
    foo(a); /* W0183 */
}

6.163.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.163.5 対応バージョン

1.0.0


Next: , Previous: W0183, Up: Messages

6.164 W0184

6.164.1 メッセージ本文

暗黙的に unsigned char 型から long double 型に型変換されています。

6.164.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.164.3 サンプルコード

extern void foo(long double a);

void bar(unsigned char a)
{
    long double b = a; /* W0184 */
    foo(a); /* W0184 */
}

6.164.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.164.5 対応バージョン

1.0.0


Next: , Previous: W0184, Up: Messages

6.165 W0185

6.165.1 メッセージ本文

暗黙的に signed char 型から float 型に型変換されています。

6.165.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.165.3 サンプルコード

extern void foo(float a);

void bar(signed char a)
{
    float b = a; /* W0185 */
    foo(a); /* W0185 */
}

6.165.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.165.5 対応バージョン

1.0.0


Next: , Previous: W0185, Up: Messages

6.166 W0186

6.166.1 メッセージ本文

暗黙的に signed char 型から double 型に型変換されています。

6.166.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.166.3 サンプルコード

extern void foo(double a);

void bar(signed char a)
{
    double b = a; /* W0186 */
    foo(a); /* W0186 */
}

6.166.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.166.5 対応バージョン

1.0.0


Next: , Previous: W0186, Up: Messages

6.167 W0187

6.167.1 メッセージ本文

暗黙的に signed char 型から long double 型に型変換されています。

6.167.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.167.3 サンプルコード

extern void foo(long double a);

void bar(signed char a)
{
    long double b = a; /* W0187 */
    foo(a); /* W0187 */
}

6.167.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.167.5 対応バージョン

1.0.0


Next: , Previous: W0187, Up: Messages

6.168 W0188

6.168.1 メッセージ本文

暗黙的に signed short 型から float 型に型変換されています。

6.168.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.168.3 サンプルコード

extern void foo(float a);

void bar(short a)
{
    float b = a; /* W0188 */
    foo(a); /* W0188 */
}

6.168.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.168.5 対応バージョン

1.0.0


Next: , Previous: W0188, Up: Messages

6.169 W0189

6.169.1 メッセージ本文

暗黙的に signed short 型から double 型に型変換されています。

6.169.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.169.3 サンプルコード

extern void foo(double a);

void bar(short a)
{
    double b = a; /* W0189 */
    foo(a); /* W0189 */
}

6.169.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.169.5 対応バージョン

1.0.0


Next: , Previous: W0189, Up: Messages

6.170 W0190

6.170.1 メッセージ本文

暗黙的に signed short 型から long double 型に型変換されています。

6.170.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.170.3 サンプルコード

extern void foo(long double a);

void bar(short a)
{
    long double b = a; /* W0190 */
    foo(a); /* W0190 */
}

6.170.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.170.5 対応バージョン

1.0.0


Next: , Previous: W0190, Up: Messages

6.171 W0191

6.171.1 メッセージ本文

暗黙的に unsigned short 型から float 型に型変換されています。

6.171.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.171.3 サンプルコード

extern void foo(float a);

void bar(unsigned short a)
{
    float b = a; /* W0191 */
    foo(a); /* W0191 */
}

6.171.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.171.5 対応バージョン

1.0.0


Next: , Previous: W0191, Up: Messages

6.172 W0192

6.172.1 メッセージ本文

暗黙的に unsigned short 型から double 型に型変換されています。

6.172.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.172.3 サンプルコード

extern void foo(double a);

void bar(unsigned short a)
{
    double b = a; /* W0192 */
    foo(a); /* W0192 */
}

6.172.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.172.5 対応バージョン

1.0.0


Next: , Previous: W0192, Up: Messages

6.173 W0193

6.173.1 メッセージ本文

暗黙的に unsigned short 型から long double 型に型変換されています。

6.173.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.173.3 サンプルコード

extern void foo(long double a);

void bar(unsigned short a)
{
    long double b = a; /* W0193 */
    foo(a); /* W0193 */
}

6.173.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.173.5 対応バージョン

1.0.0


Next: , Previous: W0193, Up: Messages

6.174 W0194

6.174.1 メッセージ本文

暗黙的に signed int 型から float 型に型変換されています。

6.174.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.174.3 サンプルコード

extern void foo(float a);

void bar(int a)
{
    float b = a; /* W0194 */
    foo(a); /* W0194 */
}

6.174.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.174.5 対応バージョン

1.0.0


Next: , Previous: W0194, Up: Messages

6.175 W0195

6.175.1 メッセージ本文

暗黙的に signed int 型から double 型に型変換されています。

6.175.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.175.3 サンプルコード

extern void foo(double a);

void bar(int a)
{
    double b = a; /* W0195 */
    foo(a); /* W0195 */
}

6.175.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.175.5 対応バージョン

1.0.0


Next: , Previous: W0195, Up: Messages

6.176 W0196

6.176.1 メッセージ本文

暗黙的に signed int 型から long double 型に型変換されています。

6.176.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.176.3 サンプルコード

extern void foo(long double a);

void bar(int a)
{
    long double b = a; /* W0196 */
    foo(a); /* W0196 */
}

6.176.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.176.5 対応バージョン

1.0.0


Next: , Previous: W0196, Up: Messages

6.177 W0197

6.177.1 メッセージ本文

暗黙的に unsigned int 型から float 型に型変換されています。

6.177.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.177.3 サンプルコード

extern void foo(float a);

void bar(unsigned int a)
{
    float b = a; /* W0197 */
    foo(a); /* W0197 */
}

6.177.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.177.5 対応バージョン

1.0.0


Next: , Previous: W0197, Up: Messages

6.178 W0198

6.178.1 メッセージ本文

暗黙的に unsigned int 型から double 型に型変換されています。

6.178.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.178.3 サンプルコード

extern void foo(double a);

void bar(unsigned int a)
{
    double b = a; /* W0198 */
    foo(a); /* W0198 */
}

6.178.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.178.5 対応バージョン

1.0.0


Next: , Previous: W0198, Up: Messages

6.179 W0199

6.179.1 メッセージ本文

暗黙的に unsigned int 型から long double 型に型変換されています。

6.179.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.179.3 サンプルコード

extern void foo(long double a);

void bar(unsigned int a)
{
    long double b = a; /* W0199 */
    foo(a); /* W0199 */
}

6.179.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.179.5 対応バージョン

1.0.0


Next: , Previous: W0199, Up: Messages

6.180 W0200

6.180.1 メッセージ本文

暗黙的に signed long 型から float 型に型変換されています。

6.180.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.180.3 サンプルコード

extern void foo(float a);

void bar(long a)
{
    float b = a; /* W0200 */
    foo(a); /* W0200 */
}

6.180.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.180.5 対応バージョン

1.0.0


Next: , Previous: W0200, Up: Messages

6.181 W0201

6.181.1 メッセージ本文

暗黙的に signed long 型から double 型に型変換されています。

6.181.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.181.3 サンプルコード

extern void foo(double a);

void bar(long a)
{
    double b = a; /* W0201 */
    foo(a); /* W0201 */
}

6.181.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.181.5 対応バージョン

1.0.0


Next: , Previous: W0201, Up: Messages

6.182 W0202

6.182.1 メッセージ本文

暗黙的に signed long 型から long double 型に型変換されています。

6.182.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.182.3 サンプルコード

extern void foo(long double a);

void bar(long a)
{
    long double b = a; /* W0202 */
    foo(a); /* W0202 */
}

6.182.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.182.5 対応バージョン

1.0.0


Next: , Previous: W0202, Up: Messages

6.183 W0203

6.183.1 メッセージ本文

暗黙的に unsigned long 型から float 型に型変換されています。

6.183.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.183.3 サンプルコード

extern void foo(float a);

void bar(unsigned long a)
{
    float b = a; /* W0203 */
    foo(a); /* W0203 */
}

6.183.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.183.5 対応バージョン

1.0.0


Next: , Previous: W0203, Up: Messages

6.184 W0204

6.184.1 メッセージ本文

暗黙的に unsigned long 型から double 型に型変換されています。

6.184.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.184.3 サンプルコード

extern void foo(double a);

void bar(unsigned long a)
{
    double b = a; /* W0204 */
    foo(a); /* W0204 */
}

6.184.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.184.5 対応バージョン

1.0.0


Next: , Previous: W0204, Up: Messages

6.185 W0205

6.185.1 メッセージ本文

暗黙的に unsigned long 型から long double 型に型変換されています。

6.185.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.185.3 サンプルコード

extern void foo(long double a);

void bar(unsigned long a)
{
    long double b = a; /* W0205 */
    foo(a); /* W0205 */
}

6.185.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.185.5 対応バージョン

1.0.0


Next: , Previous: W0205, Up: Messages

6.186 W0206

6.186.1 メッセージ本文

暗黙的に signed long long 型から float 型に型変換されています。

6.186.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.186.3 サンプルコード

extern void foo(float a);

void bar(long long a)
{
    float b = a; /* W0206 */
    foo(a); /* W0206 */
}

6.186.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.186.5 対応バージョン

1.0.0


Next: , Previous: W0206, Up: Messages

6.187 W0207

6.187.1 メッセージ本文

暗黙的に signed long long 型から double 型に型変換されています。

6.187.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.187.3 サンプルコード

extern void foo(double a);

void bar(long long a)
{
    double b = a; /* W0207 */
    foo(a); /* W0207 */
}

6.187.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.187.5 対応バージョン

1.0.0


Next: , Previous: W0207, Up: Messages

6.188 W0208

6.188.1 メッセージ本文

暗黙的に signed long long 型から long double 型に型変換されています。

6.188.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.188.3 サンプルコード

extern void foo(long double a);

void bar(long long a)
{
    long double b = a; /* W0208 */
    foo(a); /* W0208 */
}

6.188.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.188.5 対応バージョン

1.0.0


Next: , Previous: W0208, Up: Messages

6.189 W0209

6.189.1 メッセージ本文

暗黙的に unsigned long long 型から float 型に型変換されています。

6.189.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.189.3 サンプルコード

extern void foo(float a);

void bar(unsigned long long a)
{
    float b = a; /* W0209 */
    foo(a); /* W0209 */
}

6.189.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.189.5 対応バージョン

1.0.0


Next: , Previous: W0209, Up: Messages

6.190 W0210

6.190.1 メッセージ本文

暗黙的に unsigned long long 型から double 型に型変換されています。

6.190.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.190.3 サンプルコード

extern void foo(double a);

void bar(unsigned long long a)
{
    double b = a; /* W0210 */
    foo(a); /* W0210 */
}

6.190.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0211 暗黙的に unsigned long long 型から long double 型に型変換されています。

6.190.5 対応バージョン

1.0.0


Next: , Previous: W0210, Up: Messages

6.191 W0211

6.191.1 メッセージ本文

暗黙的に unsigned long long 型から long double 型に型変換されています。

6.191.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.191.3 サンプルコード

extern void foo(long double a);

void bar(unsigned long long a)
{
    long double b = a; /* W0211 */
    foo(a); /* W0211 */
}

6.191.4 関連メッセージ

  • W0182 暗黙的に unsigned char 型から float 型に型変換されています。
  • W0183 暗黙的に unsigned char 型から double 型に型変換されています。
  • W0184 暗黙的に unsigned char 型から long double 型に型変換されています。
  • W0185 暗黙的に signed char 型から float 型に型変換されています。
  • W0186 暗黙的に signed char 型から double 型に型変換されています。
  • W0187 暗黙的に signed char 型から long double 型に型変換されています。
  • W0188 暗黙的に signed short 型から float 型に型変換されています。
  • W0189 暗黙的に signed short 型から double 型に型変換されています。
  • W0190 暗黙的に signed short 型から long double 型に型変換されています。
  • W0191 暗黙的に unsigned short 型から float 型に型変換されています。
  • W0192 暗黙的に unsigned short 型から double 型に型変換されています。
  • W0193 暗黙的に unsigned short 型から long double 型に型変換されています。
  • W0194 暗黙的に signed int 型から float 型に型変換されています。
  • W0195 暗黙的に signed int 型から double 型に型変換されています。
  • W0196 暗黙的に signed int 型から long double 型に型変換されています。
  • W0197 暗黙的に unsigned int 型から float 型に型変換されています。
  • W0198 暗黙的に unsigned int 型から double 型に型変換されています。
  • W0199 暗黙的に unsigned int 型から long double 型に型変換されています。
  • W0200 暗黙的に signed long 型から float 型に型変換されています。
  • W0201 暗黙的に signed long 型から double 型に型変換されています。
  • W0202 暗黙的に signed long 型から long double 型に型変換されています。
  • W0203 暗黙的に unsigned long 型から float 型に型変換されています。
  • W0204 暗黙的に unsigned long 型から double 型に型変換されています。
  • W0205 暗黙的に unsigned long 型から long double 型に型変換されています。
  • W0206 暗黙的に signed long long 型から float 型に型変換されています。
  • W0207 暗黙的に signed long long 型から double 型に型変換されています。
  • W0208 暗黙的に signed long long 型から long double 型に型変換されています。
  • W0209 暗黙的に unsigned long long 型から float 型に型変換されています。
  • W0210 暗黙的に unsigned long long 型から double 型に型変換されています。

6.191.5 対応バージョン

1.0.0


Next: , Previous: W0211, Up: Messages

6.192 W0212

6.192.1 メッセージ本文

暗黙的に float 型から char 型に型変換されています。

6.192.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.192.3 サンプルコード

extern void foo(char a);

void bar(float a)
{
    char b = a; /* W0212 */
    foo(a); /* W0212 */
}

6.192.4 関連メッセージ

  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.192.5 対応バージョン

1.0.0


Next: , Previous: W0212, Up: Messages

6.193 W0213

6.193.1 メッセージ本文

暗黙的に float 型から signed char 型に型変換されています。

6.193.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.193.3 サンプルコード

extern void foo(signed char a);

void bar(float a)
{
    signed char b = a; /* W0213 */
    foo(a); /* W0213 */
}

6.193.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.193.5 対応バージョン

1.0.0


Next: , Previous: W0213, Up: Messages

6.194 W0214

6.194.1 メッセージ本文

暗黙的に float 型から unsigned char 型に型変換されています。

6.194.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.194.3 サンプルコード

extern void foo(unsigned char a);

void bar(float a)
{
    unsigned char b = a; /* W0214 */
    foo(a); /* W0214 */
}

6.194.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.194.5 対応バージョン

1.0.0


Next: , Previous: W0214, Up: Messages

6.195 W0215

6.195.1 メッセージ本文

暗黙的に float 型から signed short 型に型変換されています。

6.195.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.195.3 サンプルコード

extern void foo(short a);

void bar(float a)
{
    short b = a; /* W0215 */
    foo(a); /* W0215 */
}

6.195.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.195.5 対応バージョン

1.0.0


Next: , Previous: W0215, Up: Messages

6.196 W0216

6.196.1 メッセージ本文

暗黙的に float 型から unsigned short 型に型変換されています。

6.196.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.196.3 サンプルコード

extern void foo(unsigned short a);

void bar(float a)
{
    unsigned short b = a; /* W0216 */
    foo(a); /* W0216 */
}

6.196.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.196.5 対応バージョン

1.0.0


Next: , Previous: W0216, Up: Messages

6.197 W0217

6.197.1 メッセージ本文

暗黙的に float 型から signed int 型に型変換されています。

6.197.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.197.3 サンプルコード

extern void foo(int a);

void bar(float a)
{
    int b = a; /* W0217 */
    foo(a); /* W0217 */
}

6.197.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.197.5 対応バージョン

1.0.0


Next: , Previous: W0217, Up: Messages

6.198 W0218

6.198.1 メッセージ本文

暗黙的に float 型から unsigned int 型に型変換されています。

6.198.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.198.3 サンプルコード

extern void foo(unsigned int a);

void bar(float a)
{
    unsigned int b = a; /* W0218 */
    foo(a); /* W0218 */
}

6.198.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.198.5 対応バージョン

1.0.0


Next: , Previous: W0218, Up: Messages

6.199 W0219

6.199.1 メッセージ本文

暗黙的に float 型から signed long 型に型変換されています。

6.199.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.199.3 サンプルコード

extern void foo(long a);

void bar(float a)
{
    long b = a; /* W0219 */
    foo(a); /* W0219 */
}

6.199.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.199.5 対応バージョン

1.0.0


Next: , Previous: W0219, Up: Messages

6.200 W0220

6.200.1 メッセージ本文

暗黙的に float 型から unsigned long 型に型変換されています。

6.200.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.200.3 サンプルコード

extern void foo(unsigned long a);

void bar(float a)
{
    unsigned long b = a; /* W0220 */
    foo(a); /* W0220 */
}

6.200.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.200.5 対応バージョン

1.0.0


Next: , Previous: W0220, Up: Messages

6.201 W0221

6.201.1 メッセージ本文

暗黙的に double 型から char 型に型変換されています。

6.201.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.201.3 サンプルコード

extern void foo(char a);

void bar(double a)
{
    char b = a; /* W0221 */
    foo(a); /* W0221 */
}

6.201.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.201.5 対応バージョン

1.0.0


Next: , Previous: W0221, Up: Messages

6.202 W0222

6.202.1 メッセージ本文

暗黙的に double 型から signed char 型に型変換されています。

6.202.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.202.3 サンプルコード

extern void foo(signed char a);

void bar(double a)
{
    signed char b = a; /* W0222 */
    foo(a); /* W0222 */
}

6.202.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.202.5 対応バージョン

1.0.0


Next: , Previous: W0222, Up: Messages

6.203 W0223

6.203.1 メッセージ本文

暗黙的に double 型から unsigned char 型に型変換されています。

6.203.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.203.3 サンプルコード

extern void foo(unsigned char a);

void bar(double a)
{
    unsigned char b = a; /* W0223 */
    foo(a); /* W0223 */
}

6.203.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.203.5 対応バージョン

1.0.0


Next: , Previous: W0223, Up: Messages

6.204 W0224

6.204.1 メッセージ本文

暗黙的に double 型から signed short 型に型変換されています。

6.204.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.204.3 サンプルコード

extern void foo(short a);

void bar(double a)
{
    short b = a; /* W0224 */
    foo(a); /* W0224 */
}

6.204.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.204.5 対応バージョン

1.0.0


Next: , Previous: W0224, Up: Messages

6.205 W0225

6.205.1 メッセージ本文

暗黙的に double 型から unsigned short 型に型変換されています。

6.205.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.205.3 サンプルコード

extern void foo(unsigned short a);

void bar(double a)
{
    unsigned short b = a; /* W0225 */
    foo(a); /* W0225 */
}

6.205.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.205.5 対応バージョン

1.0.0


Next: , Previous: W0225, Up: Messages

6.206 W0226

6.206.1 メッセージ本文

暗黙的に double 型から signed int 型に型変換されています。

6.206.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.206.3 サンプルコード

extern void foo(int a);

void bar(double a)
{
    int b = a; /* W0226 */
    foo(a); /* W0226 */
}

6.206.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.206.5 対応バージョン

1.0.0


Next: , Previous: W0226, Up: Messages

6.207 W0227

6.207.1 メッセージ本文

暗黙的に double 型から unsigned int 型に型変換されています。

6.207.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.207.3 サンプルコード

extern void foo(unsigned int a);

void bar(double a)
{
    unsigned int b = a; /* W0227 */
    foo(a); /* W0227 */
}

6.207.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.207.5 対応バージョン

1.0.0


Next: , Previous: W0227, Up: Messages

6.208 W0228

6.208.1 メッセージ本文

暗黙的に double 型から signed long 型に型変換されています。

6.208.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.208.3 サンプルコード

extern void foo(long a);

void bar(double a)
{
    long b = a; /* W0228 */
    foo(a); /* W0228 */
}

6.208.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.208.5 対応バージョン

1.0.0


Next: , Previous: W0228, Up: Messages

6.209 W0229

6.209.1 メッセージ本文

暗黙的に double 型から unsigned long 型に型変換されています。

6.209.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.209.3 サンプルコード

extern void foo(unsigned long a);

void bar(double a)
{
    unsigned long b = a; /* W0229 */
    foo(a); /* W0229 */
}

6.209.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.209.5 対応バージョン

1.0.0


Next: , Previous: W0229, Up: Messages

6.210 W0230

6.210.1 メッセージ本文

暗黙的に long double 型から char 型に型変換されています。

6.210.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.210.3 サンプルコード

extern void foo(char a);

void bar(long double a)
{
    char b = a; /* W0230 */
    foo(a); /* W0230 */
}

6.210.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.210.5 対応バージョン

1.0.0


Next: , Previous: W0230, Up: Messages

6.211 W0231

6.211.1 メッセージ本文

暗黙的に long double 型から signed char 型に型変換されています。

6.211.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.211.3 サンプルコード

extern void foo(signed char a);

void bar(long double a)
{
    signed char b = a; /* W0231 */
    foo(a); /* W0231 */
}

6.211.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.211.5 対応バージョン

1.0.0


Next: , Previous: W0231, Up: Messages

6.212 W0232

6.212.1 メッセージ本文

暗黙的に long double 型から unsigned char 型に型変換されています。

6.212.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.212.3 サンプルコード

extern void foo(unsigned char a);

void bar(long double a)
{
    unsigned char b = a; /* W0232 */
    foo(a); /* W0232 */
}

6.212.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.212.5 対応バージョン

1.0.0


Next: , Previous: W0232, Up: Messages

6.213 W0233

6.213.1 メッセージ本文

暗黙的に long double 型から signed short 型に型変換されています。

6.213.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.213.3 サンプルコード

extern void foo(short a);

void bar(long double a)
{
    short b = a; /* W0233 */
    foo(a); /* W0233 */
}

6.213.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.213.5 対応バージョン

1.0.0


Next: , Previous: W0233, Up: Messages

6.214 W0234

6.214.1 メッセージ本文

暗黙的に long double 型から unsigned short 型に型変換されています。

6.214.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.214.3 サンプルコード

extern void foo(unsigned short a);

void bar(long double a)
{
    unsigned short b = a; /* W0234 */
    foo(a); /* W0234 */
}

6.214.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.214.5 対応バージョン

1.0.0


Next: , Previous: W0234, Up: Messages

6.215 W0235

6.215.1 メッセージ本文

暗黙的に long double 型から signed int 型に型変換されています。

6.215.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.215.3 サンプルコード

extern void foo(int a);

void bar(long double a)
{
    int b = a; /* W0235 */
    foo(a); /* W0235 */
}

6.215.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.215.5 対応バージョン

1.0.0


Next: , Previous: W0235, Up: Messages

6.216 W0236

6.216.1 メッセージ本文

暗黙的に long double 型から unsigned int 型に型変換されています。

6.216.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.216.3 サンプルコード

extern void foo(unsigned int a);

void bar(long double a)
{
    unsigned int b = a; /* W0236 */
    foo(a); /* W0236 */
}

6.216.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.216.5 対応バージョン

1.0.0


Next: , Previous: W0236, Up: Messages

6.217 W0237

6.217.1 メッセージ本文

暗黙的に long double 型から signed long 型に型変換されています。

6.217.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.217.3 サンプルコード

extern void foo(long a);

void bar(long double a)
{
    long b = a; /* W0237 */
    foo(a); /* W0237 */
}

6.217.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.217.5 対応バージョン

1.0.0


Next: , Previous: W0237, Up: Messages

6.218 W0238

6.218.1 メッセージ本文

暗黙的に long double 型から unsigned long 型に型変換されています。

6.218.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.218.3 サンプルコード

extern void foo(unsigned long a);

void bar(long double a)
{
    unsigned long b = a; /* W0238 */
    foo(a); /* W0238 */
}

6.218.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.218.5 対応バージョン

1.0.0


Next: , Previous: W0238, Up: Messages

6.219 W0239

6.219.1 メッセージ本文

暗黙的に float 型から signed long long 型に型変換されています。

6.219.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.219.3 サンプルコード

extern void foo(long long a);

void bar(float a)
{
    long long b = a; /* W0239 */
    foo(a); /* W0239 */
}

6.219.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.219.5 対応バージョン

1.0.0


Next: , Previous: W0239, Up: Messages

6.220 W0240

6.220.1 メッセージ本文

暗黙的に float 型から unsigned long long 型に型変換されています。

6.220.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.220.3 サンプルコード

extern void foo(unsigned long long a);

void bar(float a)
{
    unsigned long long b = a; /* W0240 */
    foo(a); /* W0240 */
}

6.220.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.220.5 対応バージョン

1.0.0


Next: , Previous: W0240, Up: Messages

6.221 W0241

6.221.1 メッセージ本文

暗黙的に double 型から signed long long 型に型変換されています。

6.221.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.221.3 サンプルコード

extern void foo(long long a);

void bar(double a)
{
    long long b = a; /* W0241 */
    foo(a); /* W0241 */
}

6.221.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.221.5 対応バージョン

1.0.0


Next: , Previous: W0241, Up: Messages

6.222 W0242

6.222.1 メッセージ本文

暗黙的に double 型から unsigned long long 型に型変換されています。

6.222.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.222.3 サンプルコード

extern void foo(unsigned long long a);

void bar(double a)
{
    unsigned long long b = a; /* W0242 */
    foo(a); /* W0242 */
}

6.222.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.222.5 対応バージョン

1.0.0


Next: , Previous: W0242, Up: Messages

6.223 W0243

6.223.1 メッセージ本文

暗黙的に long double 型から signed long long 型に型変換されています。

6.223.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.223.3 サンプルコード

extern void foo(long long a);

void bar(long double a)
{
    long long b = a; /* W0243 */
    foo(a); /* W0243 */
}

6.223.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0244 暗黙的に long double 型から unsigned long long 型に型変換されています。

6.223.5 対応バージョン

1.0.0


Next: , Previous: W0243, Up: Messages

6.224 W0244

6.224.1 メッセージ本文

暗黙的に long double 型から unsigned long long 型に型変換されています。

6.224.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.224.3 サンプルコード

extern void foo(unsigned long long a);

void bar(long double a)
{
    unsigned long long b = a; /* W0244 */
    foo(a); /* W0244 */
}

6.224.4 関連メッセージ

  • W0212 暗黙的に float 型から char 型に型変換されています。
  • W0213 暗黙的に float 型から signed char 型に型変換されています。
  • W0214 暗黙的に float 型から unsigned char 型に型変換されています。
  • W0215 暗黙的に float 型から signed short 型に型変換されています。
  • W0216 暗黙的に float 型から unsigned short 型に型変換されています。
  • W0217 暗黙的に float 型から signed int 型に型変換されています。
  • W0218 暗黙的に float 型から unsigned int 型に型変換されています。
  • W0219 暗黙的に float 型から signed long 型に型変換されています。
  • W0220 暗黙的に float 型から unsigned long 型に型変換されています。
  • W0221 暗黙的に double 型から char 型に型変換されています。
  • W0222 暗黙的に double 型から signed char 型に型変換されています。
  • W0223 暗黙的に double 型から unsigned char 型に型変換されています。
  • W0224 暗黙的に double 型から signed short 型に型変換されています。
  • W0225 暗黙的に double 型から unsigned short 型に型変換されています。
  • W0226 暗黙的に double 型から signed int 型に型変換されています。
  • W0227 暗黙的に double 型から unsigned int 型に型変換されています。
  • W0228 暗黙的に double 型から signed long 型に型変換されています。
  • W0229 暗黙的に double 型から unsigned long 型に型変換されています。
  • W0230 暗黙的に long double 型から char 型に型変換されています。
  • W0231 暗黙的に long double 型から signed char 型に型変換されています。
  • W0232 暗黙的に long double 型から unsigned char 型に型変換されています。
  • W0233 暗黙的に long double 型から signed short 型に型変換されています。
  • W0234 暗黙的に long double 型から unsigned short 型に型変換されています。
  • W0235 暗黙的に long double 型から signed int 型に型変換されています。
  • W0236 暗黙的に long double 型から unsigned int 型に型変換されています。
  • W0237 暗黙的に long double 型から signed long 型に型変換されています。
  • W0238 暗黙的に long double 型から unsigned long 型に型変換されています。
  • W0239 暗黙的に float 型から signed long long 型に型変換されています。
  • W0240 暗黙的に float 型から unsigned long long 型に型変換されています。
  • W0241 暗黙的に double 型から signed long long 型に型変換されています。
  • W0242 暗黙的に double 型から unsigned long long 型に型変換されています。
  • W0243 暗黙的に long double 型から signed long long 型に型変換されています。

6.224.5 対応バージョン

1.0.0


Next: , Previous: W0244, Up: Messages

6.225 W0245

6.225.1 メッセージ本文

暗黙的に unsigned char 型から signed short 型に型変換されています。

6.225.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.225.3 サンプルコード

extern void foo(short a);

void bar(unsigned char a)
{
    short b = a; /* W0245 */
    foo(a); /* W0245 */
}

6.225.4 関連メッセージ

  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.225.5 対応バージョン

1.0.0


Next: , Previous: W0245, Up: Messages

6.226 W0246

6.226.1 メッセージ本文

暗黙的に unsigned char 型から signed int 型に型変換されています。

6.226.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.226.3 サンプルコード

extern void foo(int a);

void bar(unsigned char a)
{
    int b = a; /* W0246 */
    foo(a); /* W0246 */
}

6.226.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.226.5 対応バージョン

1.0.0


Next: , Previous: W0246, Up: Messages

6.227 W0247

6.227.1 メッセージ本文

暗黙的に unsigned char 型から signed long 型に型変換されています。

6.227.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.227.3 サンプルコード

extern void foo(long a);

void bar(unsigned char a)
{
    long b = a; /* W0247 */
    foo(a); /* W0247 */
}

6.227.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.227.5 対応バージョン

1.0.0


Next: , Previous: W0247, Up: Messages

6.228 W0248

6.228.1 メッセージ本文

暗黙的に unsigned short 型から signed int 型に型変換されています。

6.228.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.228.3 サンプルコード

extern void foo(int a);

void bar(unsigned short a)
{
    int b = a; /* W0248 */
    foo(a); /* W0248 */
}

6.228.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.228.5 対応バージョン

1.0.0


Next: , Previous: W0248, Up: Messages

6.229 W0249

6.229.1 メッセージ本文

暗黙的に unsigned short 型から signed long 型に型変換されています。

6.229.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.229.3 サンプルコード

extern void foo(long a);

void bar(unsigned short a)
{
    long b = a; /* W0249 */
    foo(a); /* W0249 */
}

6.229.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.229.5 対応バージョン

1.0.0


Next: , Previous: W0249, Up: Messages

6.230 W0250

6.230.1 メッセージ本文

暗黙的に unsigned int 型から signed long 型に型変換されています。

6.230.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.230.3 サンプルコード

extern void foo(long a);

void bar(unsigned int a)
{
    long b = a; /* W0250 */
    foo(a); /* W0250 */
}

6.230.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.230.5 対応バージョン

1.0.0


Next: , Previous: W0250, Up: Messages

6.231 W0251

6.231.1 メッセージ本文

暗黙的に unsigned char 型から signed long long 型に型変換されています。

6.231.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.231.3 サンプルコード

extern void foo(long long a);

void bar(unsigned char a)
{
    long long b = a; /* W0251 */
    foo(a); /* W0251 */
}

6.231.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.231.5 対応バージョン

1.0.0


Next: , Previous: W0251, Up: Messages

6.232 W0252

6.232.1 メッセージ本文

暗黙的に unsigned short 型から signed long long 型に型変換されています。

6.232.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.232.3 サンプルコード

extern void foo(long long a);

void bar(unsigned short a)
{
    long long b = a; /* W0252 */
    foo(a); /* W0252 */
}

6.232.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.232.5 対応バージョン

1.0.0


Next: , Previous: W0252, Up: Messages

6.233 W0253

6.233.1 メッセージ本文

暗黙的に unsigned int 型から signed long long 型に型変換されています。

6.233.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.233.3 サンプルコード

extern void foo(long long a);

void bar(unsigned int a)
{
    long long b = a; /* W0253 */
    foo(a); /* W0253 */
}

6.233.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0254 暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.233.5 対応バージョン

1.0.0


Next: , Previous: W0253, Up: Messages

6.234 W0254

6.234.1 メッセージ本文

暗黙的に unsigned long 型から signed long long 型に型変換されています。

6.234.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.234.3 サンプルコード

extern void foo(long long a);

void bar(unsigned long a)
{
    long long b = a; /* W0254 */
    foo(a); /* W0254 */
}

6.234.4 関連メッセージ

  • W0245 暗黙的に unsigned char 型から signed short 型に型変換されています。
  • W0246 暗黙的に unsigned char 型から signed int 型に型変換されています。
  • W0247 暗黙的に unsigned char 型から signed long 型に型変換されています。
  • W0248 暗黙的に unsigned short 型から signed int 型に型変換されています。
  • W0249 暗黙的に unsigned short 型から signed long 型に型変換されています。
  • W0250 暗黙的に unsigned int 型から signed long 型に型変換されています。
  • W0251 暗黙的に unsigned char 型から signed long long 型に型変換されています。
  • W0252 暗黙的に unsigned short 型から signed long long 型に型変換されています。
  • W0253 暗黙的に unsigned int 型から signed long long 型に型変換されています。

6.234.5 対応バージョン

1.0.0


Next: , Previous: W0254, Up: Messages

6.235 W0255

6.235.1 メッセージ本文

char 型の値が関数 `signed char %s()' から返されています。

6.235.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.235.3 サンプルコード

signed char func(void)
{
    char a = 0;
    return a; /* W0255 */
}

6.235.4 関連メッセージ

  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.235.5 対応バージョン

1.0.0


Next: , Previous: W0255, Up: Messages

6.236 W0256

6.236.1 メッセージ本文

char 型の値が関数 `unsigned char %s()' から返されています。

6.236.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.236.3 サンプルコード

unsigned char func(void)
{
    char a = 0;
    return a; /* W0256 */
}

6.236.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.236.5 対応バージョン

1.0.0


Next: , Previous: W0256, Up: Messages

6.237 W0257

6.237.1 メッセージ本文

char 型の値が関数 `signed short %s()' から返されています。

6.237.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.237.3 サンプルコード

short func(void)
{
    char a = 0;
    return a; /* W0257 */
}

6.237.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.237.5 対応バージョン

1.0.0


Next: , Previous: W0257, Up: Messages

6.238 W0258

6.238.1 メッセージ本文

char 型の値が関数 `unsigned short %s()' から返されています。

6.238.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.238.3 サンプルコード

unsigned short func(void)
{
    char a = 0;
    return a; /* W0258 */
}

6.238.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.238.5 対応バージョン

1.0.0


Next: , Previous: W0258, Up: Messages

6.239 W0259

6.239.1 メッセージ本文

char 型の値が関数 `signed int %s()' から返されています。

6.239.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.239.3 サンプルコード

int func(void)
{
    char a = 0;
    return a; /* W0259 */
}

6.239.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.239.5 対応バージョン

1.0.0


Next: , Previous: W0259, Up: Messages

6.240 W0260

6.240.1 メッセージ本文

char 型の値が関数 `unsigned int %s()' から返されています。

6.240.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.240.3 サンプルコード

unsigned int func(void)
{
    char a = 0;
    return a; /* W0260 */
}

6.240.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.240.5 対応バージョン

1.0.0


Next: , Previous: W0260, Up: Messages

6.241 W0261

6.241.1 メッセージ本文

char 型の値が関数 `signed long %s()' から返されています。

6.241.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.241.3 サンプルコード

long func(void)
{
    char a = 0;
    return a; /* W0261 */
}

6.241.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.241.5 対応バージョン

1.0.0


Next: , Previous: W0261, Up: Messages

6.242 W0262

6.242.1 メッセージ本文

char 型の値が関数 `unsigned long %s()' から返されています。

6.242.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.242.3 サンプルコード

unsigned long func(void)
{
    char a = 0;
    return a; /* W0262 */
}

6.242.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.242.5 対応バージョン

1.0.0


Next: , Previous: W0262, Up: Messages

6.243 W0263

6.243.1 メッセージ本文

char 型の値が関数 `float %s()' から返されています。

6.243.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.243.3 サンプルコード

float func(void)
{
    char a = 0;
    return a; /* W0263 */
}

6.243.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.243.5 対応バージョン

1.0.0


Next: , Previous: W0263, Up: Messages

6.244 W0264

6.244.1 メッセージ本文

char 型の値が関数 `double %s()' から返されています。

6.244.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.244.3 サンプルコード

double func(void)
{
    char a = 0;
    return a; /* W0264 */
}

6.244.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.244.5 対応バージョン

1.0.0


Next: , Previous: W0264, Up: Messages

6.245 W0265

6.245.1 メッセージ本文

char 型の値が関数 `long double %s()' から返されています。

6.245.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.245.3 サンプルコード

long double func(void)
{
    char a = 0;
    return a; /* W0265 */
}

6.245.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.245.5 対応バージョン

1.0.0


Next: , Previous: W0265, Up: Messages

6.246 W0266

6.246.1 メッセージ本文

char 型の値が関数 `signed long long %s()' から返されています。

6.246.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.246.3 サンプルコード

long long func(void)
{
    char a = 0;
    return a; /* W0266 */
}

6.246.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0267 char 型の値が関数 `unsigned long long %s()' から返されています。

6.246.5 対応バージョン

1.0.0


Next: , Previous: W0266, Up: Messages

6.247 W0267

6.247.1 メッセージ本文

char 型の値が関数 `unsigned long long %s()' から返されています。

6.247.2 内容

単なる char 型からの暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.247.3 サンプルコード

unsigned long long func(void)
{
    char a = 0;
    return a; /* W0267 */
}

6.247.4 関連メッセージ

  • W0255 char 型の値が関数 `signed char %s()' から返されています。
  • W0256 char 型の値が関数 `unsigned char %s()' から返されています。
  • W0257 char 型の値が関数 `signed short %s()' から返されています。
  • W0258 char 型の値が関数 `unsigned short %s()' から返されています。
  • W0259 char 型の値が関数 `signed int %s()' から返されています。
  • W0260 char 型の値が関数 `unsigned int %s()' から返されています。
  • W0261 char 型の値が関数 `signed long %s()' から返されています。
  • W0262 char 型の値が関数 `unsigned long %s()' から返されています。
  • W0263 char 型の値が関数 `float %s()' から返されています。
  • W0264 char 型の値が関数 `double %s()' から返されています。
  • W0265 char 型の値が関数 `long double %s()' から返されています。
  • W0266 char 型の値が関数 `signed long long %s()' から返されています。

6.247.5 対応バージョン

1.0.0


Next: , Previous: W0267, Up: Messages

6.248 W0268

6.248.1 メッセージ本文

unsigned char 型の値が関数 `char %s()' から返されています。

6.248.2 内容

単なる char 型への暗黙のキャストは処理系定義です。

6.248.3 サンプルコード

char func(void)
{
    unsigned char a = 0;
    return a; /* W0268 */
}

6.248.4 関連メッセージ

  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.248.5 対応バージョン

1.0.0


Next: , Previous: W0268, Up: Messages

6.249 W0269

6.249.1 メッセージ本文

signed char 型の値が関数 `char %s()' から返されています。

6.249.2 内容

単なる char 型への暗黙のキャストは処理系定義です。

6.249.3 サンプルコード

char func(void)
{
    signed char a = 0;
    return a; /* W0269 */
}

6.249.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.249.5 対応バージョン

1.0.0


Next: , Previous: W0269, Up: Messages

6.250 W0270

6.250.1 メッセージ本文

signed short 型の値が関数 `char %s()' から返されています。

6.250.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.250.3 サンプルコード

char func(void)
{
    short a = 0;
    return a; /* W0270 */
}

6.250.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.250.5 対応バージョン

1.0.0


Next: , Previous: W0270, Up: Messages

6.251 W0271

6.251.1 メッセージ本文

unsigned short 型の値が関数 `char %s()' から返されています。

6.251.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.251.3 サンプルコード

char func(void)
{
    unsigned short a = 0;
    return a; /* W0271 */
}

6.251.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.251.5 対応バージョン

1.0.0


Next: , Previous: W0271, Up: Messages

6.252 W0272

6.252.1 メッセージ本文

signed int 型の値が関数 `char %s()' から返されています。

6.252.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.252.3 サンプルコード

char func(void)
{
    int a = 0;
    return a; /* W0272 */
}

6.252.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.252.5 対応バージョン

1.0.0


Next: , Previous: W0272, Up: Messages

6.253 W0273

6.253.1 メッセージ本文

unsigned int 型の値が関数 `char %s()' から返されています。

6.253.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.253.3 サンプルコード

char func(void)
{
    unsigned int a = 0;
    return a; /* W0273 */
}

6.253.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.253.5 対応バージョン

1.0.0


Next: , Previous: W0273, Up: Messages

6.254 W0274

6.254.1 メッセージ本文

signed long 型の値が関数 `char %s()' から返されています。

6.254.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.254.3 サンプルコード

char func(void)
{
    long a = 0;
    return a; /* W0274 */
}

6.254.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.254.5 対応バージョン

1.0.0


Next: , Previous: W0274, Up: Messages

6.255 W0275

6.255.1 メッセージ本文

unsigned long 型の値が関数 `char %s()' から返されています。

6.255.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.255.3 サンプルコード

char func(void)
{
    unsigned long a = 0;
    return a; /* W0275 */
}

6.255.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.255.5 対応バージョン

1.0.0


Next: , Previous: W0275, Up: Messages

6.256 W0276

6.256.1 メッセージ本文

signed long long 型の値が関数 `char %s()' から返されています。

6.256.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.256.3 サンプルコード

char func(void)
{
    long long a = 0;
    return a; /* W0276 */
}

6.256.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0277 unsigned long long 型の値が関数 `char %s()' から返されています。

6.256.5 対応バージョン

1.0.0


Next: , Previous: W0276, Up: Messages

6.257 W0277

6.257.1 メッセージ本文

unsigned long long 型の値が関数 `char %s()' から返されています。

6.257.2 内容

単なる char 型への暗黙のキャストは処理系定義です。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.257.3 サンプルコード

char func(void)
{
    unsigned long long a = 0;
    return a; /* W0277 */
}

6.257.4 関連メッセージ

  • W0268 unsigned char 型の値が関数 `char %s()' から返されています。
  • W0269 signed char 型の値が関数 `char %s()' から返されています。
  • W0270 signed short 型の値が関数 `char %s()' から返されています。
  • W0271 unsigned short 型の値が関数 `char %s()' から返されています。
  • W0272 signed int 型の値が関数 `char %s()' から返されています。
  • W0273 unsigned int 型の値が関数 `char %s()' から返されています。
  • W0274 signed long 型の値が関数 `char %s()' から返されています。
  • W0275 unsigned long 型の値が関数 `char %s()' から返されています。
  • W0276 signed long long 型の値が関数 `char %s()' から返されています。

6.257.5 対応バージョン

1.0.0


Next: , Previous: W0277, Up: Messages

6.258 W0278

6.258.1 メッセージ本文

unsigned char 型の値が関数 `signed char %s()' から返されています。

6.258.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.258.3 サンプルコード

signed char func(void)
{
    unsigned char a = 0;
    return a; /* W0278 */
}

6.258.4 関連メッセージ

  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.258.5 対応バージョン

1.0.0


Next: , Previous: W0278, Up: Messages

6.259 W0279

6.259.1 メッセージ本文

unsigned short 型の値が関数 `signed char %s()' から返されています。

6.259.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.259.3 サンプルコード

signed char func(void)
{
    unsigned short a = 0;
    return a; /* W0279 */
}

6.259.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.259.5 対応バージョン

1.0.0


Next: , Previous: W0279, Up: Messages

6.260 W0280

6.260.1 メッセージ本文

unsigned short 型の値が関数 `signed short %s()' から返されています。

6.260.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.260.3 サンプルコード

short func(void)
{
    unsigned short a = 0;
    return a; /* W0280 */
}

6.260.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.260.5 対応バージョン

1.0.0


Next: , Previous: W0280, Up: Messages

6.261 W0281

6.261.1 メッセージ本文

unsigned int 型の値が関数 `signed char %s()' から返されています。

6.261.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.261.3 サンプルコード

signed char func(void)
{
    unsigned int a = 0;
    return a; /* W0281 */
}

6.261.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.261.5 対応バージョン

1.0.0


Next: , Previous: W0281, Up: Messages

6.262 W0282

6.262.1 メッセージ本文

unsigned int 型の値が関数 `signed short %s()' から返されています。

6.262.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.262.3 サンプルコード

short func(void)
{
    unsigned int a = 0;
    return a; /* W0282 */
}

6.262.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.262.5 対応バージョン

1.0.0


Next: , Previous: W0282, Up: Messages

6.263 W0283

6.263.1 メッセージ本文

unsigned int 型の値が関数 `signed int %s()' から返されています。

6.263.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.263.3 サンプルコード

int func(void)
{
    unsigned int a = 0;
    return a; /* W0283 */
}

6.263.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.263.5 対応バージョン

1.0.0


Next: , Previous: W0283, Up: Messages

6.264 W0284

6.264.1 メッセージ本文

unsigned long 型の値が関数 `signed char %s()' から返されています。

6.264.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.264.3 サンプルコード

signed char func(void)
{
    unsigned long a = 0;
    return a; /* W0284 */
}

6.264.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.264.5 対応バージョン

1.0.0


Next: , Previous: W0284, Up: Messages

6.265 W0285

6.265.1 メッセージ本文

unsigned long 型の値が関数 `signed short %s()' から返されています。

6.265.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.265.3 サンプルコード

short func(void)
{
    unsigned long a = 0;
    return a; /* W0285 */
}

6.265.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.265.5 対応バージョン

1.0.0


Next: , Previous: W0285, Up: Messages

6.266 W0286

6.266.1 メッセージ本文

unsigned long 型の値が関数 `signed int %s()' から返されています。

6.266.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.266.3 サンプルコード

int func(void)
{
    unsigned long a = 0;
    return a; /* W0286 */
}

6.266.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.266.5 対応バージョン

1.0.0


Next: , Previous: W0286, Up: Messages

6.267 W0287

6.267.1 メッセージ本文

unsigned long 型の値が関数 `signed long %s()' から返されています。

6.267.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.267.3 サンプルコード

long func(void)
{
    unsigned long a = 0;
    return a; /* W0287 */
}

6.267.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.267.5 対応バージョン

1.0.0


Next: , Previous: W0287, Up: Messages

6.268 W0288

6.268.1 メッセージ本文

unsigned long long 型の値が関数 `signed char %s()' から返されています。

6.268.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.268.3 サンプルコード

signed char func(void)
{
    unsigned long long a = 0;
    return a; /* W0288 */
}

6.268.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.268.5 対応バージョン

1.0.0


Next: , Previous: W0288, Up: Messages

6.269 W0289

6.269.1 メッセージ本文

unsigned long long 型の値が関数 `signed short %s()' から返されています。

6.269.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.269.3 サンプルコード

short func(void)
{
    unsigned long long a = 0;
    return a; /* W0289 */
}

6.269.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.269.5 対応バージョン

1.0.0


Next: , Previous: W0289, Up: Messages

6.270 W0290

6.270.1 メッセージ本文

unsigned long long 型の値が関数 `signed int %s()' から返されています。

6.270.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.270.3 サンプルコード

int func(void)
{
    unsigned long long a = 0;
    return a; /* W0290 */
}

6.270.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.270.5 対応バージョン

1.0.0


Next: , Previous: W0290, Up: Messages

6.271 W0291

6.271.1 メッセージ本文

unsigned long long 型の値が関数 `signed long %s()' から返されています。

6.271.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.271.3 サンプルコード

long func(void)
{
    unsigned long long a = 0;
    return a; /* W0291 */
}

6.271.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0292 unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.271.5 対応バージョン

1.0.0


Next: , Previous: W0291, Up: Messages

6.272 W0292

6.272.1 メッセージ本文

unsigned long long 型の値が関数 `signed long long %s()' から返されています。

6.272.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.272.3 サンプルコード

long long func(void)
{
    unsigned long long a = 0;
    return a; /* W0292 */
}

6.272.4 関連メッセージ

  • W0278 unsigned char 型の値が関数 `signed char %s()' から返されています。
  • W0279 unsigned short 型の値が関数 `signed char %s()' から返されています。
  • W0280 unsigned short 型の値が関数 `signed short %s()' から返されています。
  • W0281 unsigned int 型の値が関数 `signed char %s()' から返されています。
  • W0282 unsigned int 型の値が関数 `signed short %s()' から返されています。
  • W0283 unsigned int 型の値が関数 `signed int %s()' から返されています。
  • W0284 unsigned long 型の値が関数 `signed char %s()' から返されています。
  • W0285 unsigned long 型の値が関数 `signed short %s()' から返されています。
  • W0286 unsigned long 型の値が関数 `signed int %s()' から返されています。
  • W0287 unsigned long 型の値が関数 `signed long %s()' から返されています。
  • W0288 unsigned long long 型の値が関数 `signed char %s()' から返されています。
  • W0289 unsigned long long 型の値が関数 `signed short %s()' から返されています。
  • W0290 unsigned long long 型の値が関数 `signed int %s()' から返されています。
  • W0291 unsigned long long 型の値が関数 `signed long %s()' から返されています。

6.272.5 対応バージョン

1.0.0


Next: , Previous: W0292, Up: Messages

6.273 W0293

6.273.1 メッセージ本文

signed char 型の値が関数 `unsigned char %s()' から返されています。

6.273.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.273.3 サンプルコード

unsigned char func(void)
{
    signed char a = 0;
    return a; /* W0293 */
}

6.273.4 関連メッセージ

  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.273.5 対応バージョン

1.0.0


Next: , Previous: W0293, Up: Messages

6.274 W0294

6.274.1 メッセージ本文

signed char 型の値が関数 `unsigned short %s()' から返されています。

6.274.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.274.3 サンプルコード

unsigned short func(void)
{
    signed char a = 0;
    return a; /* W0294 */
}

6.274.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.274.5 対応バージョン

1.0.0


Next: , Previous: W0294, Up: Messages

6.275 W0295

6.275.1 メッセージ本文

signed char 型の値が関数 `unsigned int %s()' から返されています。

6.275.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.275.3 サンプルコード

unsigned int func(void)
{
    signed char a = 0;
    return a; /* W0295 */
}

6.275.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.275.5 対応バージョン

1.0.0


Next: , Previous: W0295, Up: Messages

6.276 W0296

6.276.1 メッセージ本文

signed char 型の値が関数 `unsigned long %s()' から返されています。

6.276.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.276.3 サンプルコード

unsigned long func(void)
{
    signed char a = 0;
    return a; /* W0296 */
}

6.276.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.276.5 対応バージョン

1.0.0


Next: , Previous: W0296, Up: Messages

6.277 W0297

6.277.1 メッセージ本文

signed short 型の値が関数 `unsigned char %s()' から返されています。

6.277.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.277.3 サンプルコード

unsigned char func(void)
{
    short a = 0;
    return a; /* W0297 */
}

6.277.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.277.5 対応バージョン

1.0.0


Next: , Previous: W0297, Up: Messages

6.278 W0298

6.278.1 メッセージ本文

signed short 型の値が関数 `unsigned short %s()' から返されています。

6.278.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.278.3 サンプルコード

unsigned short func(void)
{
    short a = 0;
    return a; /* W0298 */
}

6.278.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.278.5 対応バージョン

1.0.0


Next: , Previous: W0298, Up: Messages

6.279 W0299

6.279.1 メッセージ本文

signed short 型の値が関数 `unsigned int %s()' から返されています。

6.279.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.279.3 サンプルコード

unsigned int func(void)
{
    short a = 0;
    return a; /* W0299 */
}

6.279.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.279.5 対応バージョン

1.0.0


Next: , Previous: W0299, Up: Messages

6.280 W0300

6.280.1 メッセージ本文

signed short 型の値が関数 `unsigned long %s()' から返されています。

6.280.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.280.3 サンプルコード

unsigned long func(void)
{
    short a = 0;
    return a; /* W0300 */
}

6.280.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.280.5 対応バージョン

1.0.0


Next: , Previous: W0300, Up: Messages

6.281 W0301

6.281.1 メッセージ本文

signed int 型の値が関数 `unsigned char %s()' から返されています。

6.281.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.281.3 サンプルコード

unsigned char func(void)
{
    int a = 0;
    return a; /* W0301 */
}

6.281.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.281.5 対応バージョン

1.0.0


Next: , Previous: W0301, Up: Messages

6.282 W0302

6.282.1 メッセージ本文

signed int 型の値が関数 `unsigned short %s()' から返されています。

6.282.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.282.3 サンプルコード

unsigned short func(void)
{
    int a = 0;
    return a; /* W0302 */
}

6.282.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.282.5 対応バージョン

1.0.0


Next: , Previous: W0302, Up: Messages

6.283 W0303

6.283.1 メッセージ本文

signed int 型の値が関数 `unsigned int %s()' から返されています。

6.283.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.283.3 サンプルコード

unsigned int func(void)
{
    int a = 0;
    return a; /* W0303 */
}

6.283.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.283.5 対応バージョン

1.0.0


Next: , Previous: W0303, Up: Messages

6.284 W0304

6.284.1 メッセージ本文

signed int 型の値が関数 `unsigned long %s()' から返されています。

6.284.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.284.3 サンプルコード

unsigned long func(void)
{
    int a = 0;
    return a; /* W0304 */
}

6.284.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.284.5 対応バージョン

1.0.0


Next: , Previous: W0304, Up: Messages

6.285 W0305

6.285.1 メッセージ本文

signed long 型の値が関数 `unsigned char %s()' から返されています。

6.285.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.285.3 サンプルコード

unsigned char func(void)
{
    long a = 0;
    return a; /* W0305 */
}

6.285.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.285.5 対応バージョン

1.0.0


Next: , Previous: W0305, Up: Messages

6.286 W0306

6.286.1 メッセージ本文

signed long 型の値が関数 `unsigned short %s()' から返されています。

6.286.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.286.3 サンプルコード

unsigned short func(void)
{
    long a = 0;
    return a; /* W0306 */
}

6.286.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.286.5 対応バージョン

1.0.0


Next: , Previous: W0306, Up: Messages

6.287 W0307

6.287.1 メッセージ本文

signed long 型の値が関数 `unsigned int %s()' から返されています。

6.287.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.287.3 サンプルコード

unsigned int func(void)
{
    long a = 0;
    return a; /* W0307 */
}

6.287.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.287.5 対応バージョン

1.0.0


Next: , Previous: W0307, Up: Messages

6.288 W0308

6.288.1 メッセージ本文

signed long 型の値が関数 `unsigned long %s()' から返されています。

6.288.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.288.3 サンプルコード

unsigned long func(void)
{
    long a = 0;
    return a; /* W0308 */
}

6.288.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.288.5 対応バージョン

1.0.0


Next: , Previous: W0308, Up: Messages

6.289 W0309

6.289.1 メッセージ本文

signed char 型の値が関数 `unsigned long long %s()' から返されています。

6.289.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.289.3 サンプルコード

unsigned long long func(void)
{
    signed char a = 0;
    return a; /* W0309 */
}

6.289.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.289.5 対応バージョン

1.0.0


Next: , Previous: W0309, Up: Messages

6.290 W0310

6.290.1 メッセージ本文

signed short 型の値が関数 `unsigned long long %s()' から返されています。

6.290.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.290.3 サンプルコード

unsigned long long func(void)
{
    short a = 0;
    return a; /* W0310 */
}

6.290.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.290.5 対応バージョン

1.0.0


Next: , Previous: W0310, Up: Messages

6.291 W0311

6.291.1 メッセージ本文

signed int 型の値が関数 `unsigned long long %s()' から返されています。

6.291.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.291.3 サンプルコード

unsigned long long func(void)
{
    int a = 0;
    return a; /* W0311 */
}

6.291.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.291.5 対応バージョン

1.0.0


Next: , Previous: W0311, Up: Messages

6.292 W0312

6.292.1 メッセージ本文

signed long 型の値が関数 `unsigned long long %s()' から返されています。

6.292.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.292.3 サンプルコード

unsigned long long func(void)
{
    long a = 0;
    return a; /* W0312 */
}

6.292.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.292.5 対応バージョン

1.0.0


Next: , Previous: W0312, Up: Messages

6.293 W0313

6.293.1 メッセージ本文

signed long long 型の値が関数 `unsigned char %s()' から返されています。

6.293.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.293.3 サンプルコード

unsigned char func(void)
{
    long long a = 0;
    return a; /* W0313 */
}

6.293.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.293.5 対応バージョン

1.0.0


Next: , Previous: W0313, Up: Messages

6.294 W0314

6.294.1 メッセージ本文

signed long long 型の値が関数 `unsigned short %s()' から返されています。

6.294.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.294.3 サンプルコード

unsigned short func(void)
{
    long long a = 0;
    return a; /* W0314 */
}

6.294.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.294.5 対応バージョン

1.0.0


Next: , Previous: W0314, Up: Messages

6.295 W0315

6.295.1 メッセージ本文

signed long long 型の値が関数 `unsigned int %s()' から返されています。

6.295.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.295.3 サンプルコード

unsigned int func(void)
{
    long long a = 0;
    return a; /* W0315 */
}

6.295.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.295.5 対応バージョン

1.0.0


Next: , Previous: W0315, Up: Messages

6.296 W0316

6.296.1 メッセージ本文

signed long long 型の値が関数 `unsigned long %s()' から返されています。

6.296.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。 また、より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.296.3 サンプルコード

unsigned long func(void)
{
    long long a = 0;
    return a; /* W0316 */
}

6.296.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0317 signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.296.5 対応バージョン

1.0.0


Next: , Previous: W0316, Up: Messages

6.297 W0317

6.297.1 メッセージ本文

signed long long 型の値が関数 `unsigned long long %s()' から返されています。

6.297.2 内容

符号つき型から符号なし型への暗黙のキャストにより、結果が意図せず負の数から大きな正の数になる可能性があります。

6.297.3 サンプルコード

unsigned long long func(void)
{
    long long a = 0;
    return a; /* W0317 */
}

6.297.4 関連メッセージ

  • W0293 signed char 型の値が関数 `unsigned char %s()' から返されています。
  • W0294 signed char 型の値が関数 `unsigned short %s()' から返されています。
  • W0295 signed char 型の値が関数 `unsigned int %s()' から返されています。
  • W0296 signed char 型の値が関数 `unsigned long %s()' から返されています。
  • W0297 signed short 型の値が関数 `unsigned char %s()' から返されています。
  • W0298 signed short 型の値が関数 `unsigned short %s()' から返されています。
  • W0299 signed short 型の値が関数 `unsigned int %s()' から返されています。
  • W0300 signed short 型の値が関数 `unsigned long %s()' から返されています。
  • W0301 signed int 型の値が関数 `unsigned char %s()' から返されています。
  • W0302 signed int 型の値が関数 `unsigned short %s()' から返されています。
  • W0303 signed int 型の値が関数 `unsigned int %s()' から返されています。
  • W0304 signed int 型の値が関数 `unsigned long %s()' から返されています。
  • W0305 signed long 型の値が関数 `unsigned char %s()' から返されています。
  • W0306 signed long 型の値が関数 `unsigned short %s()' から返されています。
  • W0307 signed long 型の値が関数 `unsigned int %s()' から返されています。
  • W0308 signed long 型の値が関数 `unsigned long %s()' から返されています。
  • W0309 signed char 型の値が関数 `unsigned long long %s()' から返されています。
  • W0310 signed short 型の値が関数 `unsigned long long %s()' から返されています。
  • W0311 signed int 型の値が関数 `unsigned long long %s()' から返されています。
  • W0312 signed long 型の値が関数 `unsigned long long %s()' から返されています。
  • W0313 signed long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0314 signed long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0315 signed long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0316 signed long long 型の値が関数 `unsigned long %s()' から返されています。

6.297.5 対応バージョン

1.0.0


Next: , Previous: W0317, Up: Messages

6.298 W0318

6.298.1 メッセージ本文

unsigned char 型の値が関数 `float %s()' から返されています。

6.298.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.298.3 サンプルコード

float func(void)
{
    unsigned char a = 0;
    return a; /* W0318 */
}

6.298.4 関連メッセージ

  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.298.5 対応バージョン

1.0.0


Next: , Previous: W0318, Up: Messages

6.299 W0319

6.299.1 メッセージ本文

unsigned char 型の値が関数 `double %s()' から返されています。

6.299.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.299.3 サンプルコード

double func(void)
{
    unsigned char a = 0;
    return a; /* W0319 */
}

6.299.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.299.5 対応バージョン

1.0.0


Next: , Previous: W0319, Up: Messages

6.300 W0320

6.300.1 メッセージ本文

unsigned char 型の値が関数 `long double %s()' から返されています。

6.300.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.300.3 サンプルコード

long double func(void)
{
    unsigned char a = 0;
    return a; /* W0320 */
}

6.300.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.300.5 対応バージョン

1.0.0


Next: , Previous: W0320, Up: Messages

6.301 W0321

6.301.1 メッセージ本文

signed char 型の値が関数 `float %s()' から返されています。

6.301.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.301.3 サンプルコード

float func(void)
{
    unsigned char a = 0;
    return a; /* W0321 */
}

6.301.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.301.5 対応バージョン

1.0.0


Next: , Previous: W0321, Up: Messages

6.302 W0322

6.302.1 メッセージ本文

signed char 型の値が関数 `double %s()' から返されています。

6.302.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.302.3 サンプルコード

double func(void)
{
    unsigned char a = 0;
    return a; /* W0322 */
}

6.302.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.302.5 対応バージョン

1.0.0


Next: , Previous: W0322, Up: Messages

6.303 W0323

6.303.1 メッセージ本文

signed char 型の値が関数 `long double %s()' から返されています。

6.303.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.303.3 サンプルコード

long double func(void)
{
    unsigned char a = 0;
    return a; /* W0323 */
}

6.303.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.303.5 対応バージョン

1.0.0


Next: , Previous: W0323, Up: Messages

6.304 W0324

6.304.1 メッセージ本文

signed short 型の値が関数 `float %s()' から返されています。

6.304.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.304.3 サンプルコード

float func(void)
{
    short a = 0;
    return a; /* W0324 */
}

6.304.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.304.5 対応バージョン

1.0.0


Next: , Previous: W0324, Up: Messages

6.305 W0325

6.305.1 メッセージ本文

signed short 型の値が関数 `double %s()' から返されています。

6.305.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.305.3 サンプルコード

double func(void)
{
    short a = 0;
    return a; /* W0325 */
}

6.305.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.305.5 対応バージョン

1.0.0


Next: , Previous: W0325, Up: Messages

6.306 W0326

6.306.1 メッセージ本文

signed short 型の値が関数 `long double %s()' から返されています。

6.306.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.306.3 サンプルコード

long double func(void)
{
    short a = 0;
    return a; /* W0326 */
}

6.306.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.306.5 対応バージョン

1.0.0


Next: , Previous: W0326, Up: Messages

6.307 W0327

6.307.1 メッセージ本文

unsigned short 型の値が関数 `float %s()' から返されています。

6.307.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.307.3 サンプルコード

float func(void)
{
    unsigned short a = 0;
    return a; /* W0327 */
}

6.307.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.307.5 対応バージョン

1.0.0


Next: , Previous: W0327, Up: Messages

6.308 W0328

6.308.1 メッセージ本文

unsigned short 型の値が関数 `double %s()' から返されています。

6.308.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.308.3 サンプルコード

double func(void)
{
    unsigned short a = 0;
    return a; /* W0328 */
}

6.308.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.308.5 対応バージョン

1.0.0


Next: , Previous: W0328, Up: Messages

6.309 W0329

6.309.1 メッセージ本文

unsigned short 型の値が関数 `long double %s()' から返されています。

6.309.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.309.3 サンプルコード

long double func(void)
{
    unsigned short a = 0;
    return a; /* W0329 */
}

6.309.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.309.5 対応バージョン

1.0.0


Next: , Previous: W0329, Up: Messages

6.310 W0330

6.310.1 メッセージ本文

signed int 型の値が関数 `float %s()' から返されています。

6.310.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.310.3 サンプルコード

float func(void)
{
    int a = 0;
    return a; /* W0330 */
}

6.310.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.310.5 対応バージョン

1.0.0


Next: , Previous: W0330, Up: Messages

6.311 W0331

6.311.1 メッセージ本文

signed int 型の値が関数 `double %s()' から返されています。

6.311.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.311.3 サンプルコード

double func(void)
{
    int a = 0;
    return a; /* W0331 */
}

6.311.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.311.5 対応バージョン

1.0.0


Next: , Previous: W0331, Up: Messages

6.312 W0332

6.312.1 メッセージ本文

signed int 型の値が関数 `long double %s()' から返されています。

6.312.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.312.3 サンプルコード

long double func(void)
{
    int a = 0;
    return a; /* W0332 */
}

6.312.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.312.5 対応バージョン

1.0.0


Next: , Previous: W0332, Up: Messages

6.313 W0333

6.313.1 メッセージ本文

unsigned int 型の値が関数 `float %s()' から返されています。

6.313.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.313.3 サンプルコード

float func(void)
{
    unsigned int a = 0;
    return a; /* W0333 */
}

6.313.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.313.5 対応バージョン

1.0.0


Next: , Previous: W0333, Up: Messages

6.314 W0334

6.314.1 メッセージ本文

unsigned int 型の値が関数 `double %s()' から返されています。

6.314.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.314.3 サンプルコード

double func(void)
{
    unsigned int a = 0;
    return a; /* W0334 */
}

6.314.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.314.5 対応バージョン

1.0.0


Next: , Previous: W0334, Up: Messages

6.315 W0335

6.315.1 メッセージ本文

unsigned int 型の値が関数 `long double %s()' から返されています。

6.315.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.315.3 サンプルコード

long double func(void)
{
    unsigned int a = 0;
    return a; /* W0335 */
}

6.315.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.315.5 対応バージョン

1.0.0


Next: , Previous: W0335, Up: Messages

6.316 W0336

6.316.1 メッセージ本文

signed long 型の値が関数 `float %s()' から返されています。

6.316.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.316.3 サンプルコード

float func(void)
{
    long a = 0;
    return a; /* W0336 */
}

6.316.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.316.5 対応バージョン

1.0.0


Next: , Previous: W0336, Up: Messages

6.317 W0337

6.317.1 メッセージ本文

signed long 型の値が関数 `double %s()' から返されています。

6.317.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.317.3 サンプルコード

double func(void)
{
    long a = 0;
    return a; /* W0337 */
}

6.317.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.317.5 対応バージョン

1.0.0


Next: , Previous: W0337, Up: Messages

6.318 W0338

6.318.1 メッセージ本文

signed long 型の値が関数 `long double %s()' から返されています。

6.318.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.318.3 サンプルコード

long double func(void)
{
    long a = 0;
    return a; /* W0338 */
}

6.318.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.318.5 対応バージョン

1.0.0


Next: , Previous: W0338, Up: Messages

6.319 W0339

6.319.1 メッセージ本文

unsigned long 型の値が関数 `float %s()' から返されています。

6.319.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.319.3 サンプルコード

float func(void)
{
    unsigned long a = 0;
    return a; /* W0339 */
}

6.319.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.319.5 対応バージョン

1.0.0


Next: , Previous: W0339, Up: Messages

6.320 W0340

6.320.1 メッセージ本文

unsigned long 型の値が関数 `double %s()' から返されています。

6.320.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.320.3 サンプルコード

double func(void)
{
    unsigned long a = 0;
    return a; /* W0340 */
}

6.320.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.320.5 対応バージョン

1.0.0


Next: , Previous: W0340, Up: Messages

6.321 W0341

6.321.1 メッセージ本文

unsigned long 型の値が関数 `long double %s()' から返されています。

6.321.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.321.3 サンプルコード

long double func(void)
{
    unsigned long a = 0;
    return a; /* W0341 */
}

6.321.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.321.5 対応バージョン

1.0.0


Next: , Previous: W0341, Up: Messages

6.322 W0342

6.322.1 メッセージ本文

signed long long 型の値が関数 `float %s()' から返されています。

6.322.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.322.3 サンプルコード

float func(void)
{
    long long a = 0;
    return a; /* W0342 */
}

6.322.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.322.5 対応バージョン

1.0.0


Next: , Previous: W0342, Up: Messages

6.323 W0343

6.323.1 メッセージ本文

signed long long 型の値が関数 `double %s()' から返されています。

6.323.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.323.3 サンプルコード

double func(void)
{
    long long a = 0;
    return a; /* W0343 */
}

6.323.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.323.5 対応バージョン

1.0.0


Next: , Previous: W0343, Up: Messages

6.324 W0344

6.324.1 メッセージ本文

signed long long 型の値が関数 `long double %s()' から返されています。

6.324.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.324.3 サンプルコード

long double func(void)
{
    long long a = 0;
    return a; /* W0344 */
}

6.324.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.324.5 対応バージョン

1.0.0


Next: , Previous: W0344, Up: Messages

6.325 W0345

6.325.1 メッセージ本文

unsigned long long 型の値が関数 `float %s()' から返されています。

6.325.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.325.3 サンプルコード

float func(void)
{
    unsigned long long a = 0;
    return a; /* W0345 */
}

6.325.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.325.5 対応バージョン

1.0.0


Next: , Previous: W0345, Up: Messages

6.326 W0346

6.326.1 メッセージ本文

unsigned long long 型の値が関数 `double %s()' から返されています。

6.326.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.326.3 サンプルコード

double func(void)
{
    unsigned long long a = 0;
    return a; /* W0346 */
}

6.326.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0347 unsigned long long 型の値が関数 `long double %s()' から返されています。

6.326.5 対応バージョン

1.0.0


Next: , Previous: W0346, Up: Messages

6.327 W0347

6.327.1 メッセージ本文

unsigned long long 型の値が関数 `long double %s()' から返されています。

6.327.2 内容

整数型から浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.327.3 サンプルコード

long double func(void)
{
    unsigned long long a = 0;
    return a; /* W0347 */
}

6.327.4 関連メッセージ

  • W0318 unsigned char 型の値が関数 `float %s()' から返されています。
  • W0319 unsigned char 型の値が関数 `double %s()' から返されています。
  • W0320 unsigned char 型の値が関数 `long double %s()' から返されています。
  • W0321 signed char 型の値が関数 `float %s()' から返されています。
  • W0322 signed char 型の値が関数 `double %s()' から返されています。
  • W0323 signed char 型の値が関数 `long double %s()' から返されています。
  • W0324 signed short 型の値が関数 `float %s()' から返されています。
  • W0325 signed short 型の値が関数 `double %s()' から返されています。
  • W0326 signed short 型の値が関数 `long double %s()' から返されています。
  • W0327 unsigned short 型の値が関数 `float %s()' から返されています。
  • W0328 unsigned short 型の値が関数 `double %s()' から返されています。
  • W0329 unsigned short 型の値が関数 `long double %s()' から返されています。
  • W0330 signed int 型の値が関数 `float %s()' から返されています。
  • W0331 signed int 型の値が関数 `double %s()' から返されています。
  • W0332 signed int 型の値が関数 `long double %s()' から返されています。
  • W0333 unsigned int 型の値が関数 `float %s()' から返されています。
  • W0334 unsigned int 型の値が関数 `double %s()' から返されています。
  • W0335 unsigned int 型の値が関数 `long double %s()' から返されています。
  • W0336 signed long 型の値が関数 `float %s()' から返されています。
  • W0337 signed long 型の値が関数 `double %s()' から返されています。
  • W0338 signed long 型の値が関数 `long double %s()' から返されています。
  • W0339 unsigned long 型の値が関数 `float %s()' から返されています。
  • W0340 unsigned long 型の値が関数 `double %s()' から返されています。
  • W0341 unsigned long 型の値が関数 `long double %s()' から返されています。
  • W0342 signed long long 型の値が関数 `float %s()' から返されています。
  • W0343 signed long long 型の値が関数 `double %s()' から返されています。
  • W0344 signed long long 型の値が関数 `long double %s()' から返されています。
  • W0345 unsigned long long 型の値が関数 `float %s()' から返されています。
  • W0346 unsigned long long 型の値が関数 `double %s()' から返されています。

6.327.5 対応バージョン

1.0.0


Next: , Previous: W0347, Up: Messages

6.328 W0348

6.328.1 メッセージ本文

float 型の値が関数 `char %s()' から返されています。

6.328.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.328.3 サンプルコード

char func(void)
{
    float a = 0;
    return a; /* W0348 */
}

6.328.4 関連メッセージ

  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.328.5 対応バージョン

1.0.0


Next: , Previous: W0348, Up: Messages

6.329 W0349

6.329.1 メッセージ本文

float 型の値が関数 `signed char %s()' から返されています。

6.329.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.329.3 サンプルコード

signed char func(void)
{
    float a = 0;
    return a; /* W0349 */
}

6.329.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.329.5 対応バージョン

1.0.0


Next: , Previous: W0349, Up: Messages

6.330 W0350

6.330.1 メッセージ本文

float 型の値が関数 `unsigned char %s()' から返されています。

6.330.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.330.3 サンプルコード

unsigned char func(void)
{
    float a = 0;
    return a; /* W0350 */
}

6.330.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.330.5 対応バージョン

1.0.0


Next: , Previous: W0350, Up: Messages

6.331 W0351

6.331.1 メッセージ本文

float 型の値が関数 `signed short %s()' から返されています。

6.331.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.331.3 サンプルコード

short func(void)
{
    float a = 0;
    return a; /* W0351 */
}

6.331.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.331.5 対応バージョン

1.0.0


Next: , Previous: W0351, Up: Messages

6.332 W0352

6.332.1 メッセージ本文

float 型の値が関数 `unsigned short %s()' から返されています。

6.332.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.332.3 サンプルコード

unsigned short func(void)
{
    float a = 0;
    return a; /* W0352 */
}

6.332.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.332.5 対応バージョン

1.0.0


Next: , Previous: W0352, Up: Messages

6.333 W0353

6.333.1 メッセージ本文

float 型の値が関数 `signed int %s()' から返されています。

6.333.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.333.3 サンプルコード

int func(void)
{
    float a = 0;
    return a; /* W0353 */
}

6.333.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.333.5 対応バージョン

1.0.0


Next: , Previous: W0353, Up: Messages

6.334 W0354

6.334.1 メッセージ本文

float 型の値が関数 `unsigned int %s()' から返されています。

6.334.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.334.3 サンプルコード

unsigned int func(void)
{
    float a = 0;
    return a; /* W0354 */
}

6.334.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.334.5 対応バージョン

1.0.0


Next: , Previous: W0354, Up: Messages

6.335 W0355

6.335.1 メッセージ本文

float 型の値が関数 `signed long %s()' から返されています。

6.335.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.335.3 サンプルコード

long func(void)
{
    float a = 0;
    return a; /* W0355 */
}

6.335.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.335.5 対応バージョン

1.0.0


Next: , Previous: W0355, Up: Messages

6.336 W0356

6.336.1 メッセージ本文

float 型の値が関数 `unsigned long %s()' から返されています。

6.336.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.336.3 サンプルコード

unsigned long func(void)
{
    float a = 0;
    return a; /* W0356 */
}

6.336.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.336.5 対応バージョン

1.0.0


Next: , Previous: W0356, Up: Messages

6.337 W0357

6.337.1 メッセージ本文

double 型の値が関数 `char %s()' から返されています。

6.337.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.337.3 サンプルコード

char func(void)
{
    double a = 0;
    return a; /* W0357 */
}

6.337.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.337.5 対応バージョン

1.0.0


Next: , Previous: W0357, Up: Messages

6.338 W0358

6.338.1 メッセージ本文

double 型の値が関数 `signed char %s()' から返されています。

6.338.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.338.3 サンプルコード

signed char func(void)
{
    double a = 0;
    return a; /* W0358 */
}

6.338.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.338.5 対応バージョン

1.0.0


Next: , Previous: W0358, Up: Messages

6.339 W0359

6.339.1 メッセージ本文

double 型の値が関数 `unsigned char %s()' から返されています。

6.339.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.339.3 サンプルコード

unsigned char func(void)
{
    double a = 0;
    return a; /* W0359 */
}

6.339.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.339.5 対応バージョン

1.0.0


Next: , Previous: W0359, Up: Messages

6.340 W0360

6.340.1 メッセージ本文

double 型の値が関数 `signed short %s()' から返されています。

6.340.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.340.3 サンプルコード

short func(void)
{
    double a = 0;
    return a; /* W0360 */
}

6.340.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.340.5 対応バージョン

1.0.0


Next: , Previous: W0360, Up: Messages

6.341 W0361

6.341.1 メッセージ本文

double 型の値が関数 `unsigned short %s()' から返されています。

6.341.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.341.3 サンプルコード

unsigned short func(void)
{
    double a = 0;
    return a; /* W0361 */
}

6.341.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.341.5 対応バージョン

1.0.0


Next: , Previous: W0361, Up: Messages

6.342 W0362

6.342.1 メッセージ本文

double 型の値が関数 `signed int %s()' から返されています。

6.342.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.342.3 サンプルコード

int func(void)
{
    double a = 0;
    return a; /* W0362 */
}

6.342.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.342.5 対応バージョン

1.0.0


Next: , Previous: W0362, Up: Messages

6.343 W0363

6.343.1 メッセージ本文

double 型の値が関数 `unsigned int %s()' から返されています。

6.343.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.343.3 サンプルコード

unsigned int func(void)
{
    double a = 0;
    return a; /* W0363 */
}

6.343.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.343.5 対応バージョン

1.0.0


Next: , Previous: W0363, Up: Messages

6.344 W0364

6.344.1 メッセージ本文

double 型の値が関数 `signed long %s()' から返されています。

6.344.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.344.3 サンプルコード

long func(void)
{
    double a = 0;
    return a; /* W0364 */
}

6.344.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.344.5 対応バージョン

1.0.0


Next: , Previous: W0364, Up: Messages

6.345 W0365

6.345.1 メッセージ本文

double 型の値が関数 `unsigned long %s()' から返されています。

6.345.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.345.3 サンプルコード

unsigned long func(void)
{
    double a = 0;
    return a; /* W0365 */
}

6.345.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.345.5 対応バージョン

1.0.0


Next: , Previous: W0365, Up: Messages

6.346 W0366

6.346.1 メッセージ本文

long double 型の値が関数 `char %s()' から返されています。

6.346.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.346.3 サンプルコード

char func(void)
{
    long double a = 0;
    return a; /* W0366 */
}

6.346.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.346.5 対応バージョン

1.0.0


Next: , Previous: W0366, Up: Messages

6.347 W0367

6.347.1 メッセージ本文

long double 型の値が関数 `signed char %s()' から返されています。

6.347.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.347.3 サンプルコード

signed char func(void)
{
    long double a = 0;
    return a; /* W0367 */
}

6.347.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.347.5 対応バージョン

1.0.0


Next: , Previous: W0367, Up: Messages

6.348 W0368

6.348.1 メッセージ本文

long double 型の値が関数 `unsigned char %s()' から返されています。

6.348.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.348.3 サンプルコード

unsigned char func(void)
{
    long double a = 0;
    return a; /* W0368 */
}

6.348.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.348.5 対応バージョン

1.0.0


Next: , Previous: W0368, Up: Messages

6.349 W0369

6.349.1 メッセージ本文

long double 型の値が関数 `signed short %s()' から返されています。

6.349.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.349.3 サンプルコード

short func(void)
{
    long double a = 0;
    return a; /* W0369 */
}

6.349.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.349.5 対応バージョン

1.0.0


Next: , Previous: W0369, Up: Messages

6.350 W0370

6.350.1 メッセージ本文

long double 型の値が関数 `unsigned short %s()' から返されています。

6.350.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.350.3 サンプルコード

unsigned short func(void)
{
    long double a = 0;
    return a; /* W0370 */
}

6.350.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.350.5 対応バージョン

1.0.0


Next: , Previous: W0370, Up: Messages

6.351 W0371

6.351.1 メッセージ本文

long double 型の値が関数 `signed int %s()' から返されています。

6.351.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.351.3 サンプルコード

int func(void)
{
    long double a = 0;
    return a; /* W0371 */
}

6.351.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.351.5 対応バージョン

1.0.0


Next: , Previous: W0371, Up: Messages

6.352 W0372

6.352.1 メッセージ本文

long double 型の値が関数 `unsigned int %s()' から返されています。

6.352.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.352.3 サンプルコード

unsigned int func(void)
{
    long double a = 0;
    return a; /* W0372 */
}

6.352.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.352.5 対応バージョン

1.0.0


Next: , Previous: W0372, Up: Messages

6.353 W0373

6.353.1 メッセージ本文

long double 型の値が関数 `signed long %s()' から返されています。

6.353.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.353.3 サンプルコード

long func(void)
{
    long double a = 0;
    return a; /* W0373 */
}

6.353.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.353.5 対応バージョン

1.0.0


Next: , Previous: W0373, Up: Messages

6.354 W0374

6.354.1 メッセージ本文

long double 型の値が関数 `unsigned long %s()' から返されています。

6.354.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.354.3 サンプルコード

unsigned long func(void)
{
    long double a = 0;
    return a; /* W0374 */
}

6.354.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.354.5 対応バージョン

1.0.0


Next: , Previous: W0374, Up: Messages

6.355 W0375

6.355.1 メッセージ本文

float 型の値が関数 `signed long long %s()' から返されています。

6.355.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.355.3 サンプルコード

long long func(void)
{
    float a = 0;
    return a; /* W0375 */
}

6.355.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.355.5 対応バージョン

1.0.0


Next: , Previous: W0375, Up: Messages

6.356 W0376

6.356.1 メッセージ本文

float 型の値が関数 `unsigned long long %s()' から返されています。

6.356.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.356.3 サンプルコード

unsigned long long func(void)
{
    float a = 0;
    return a; /* W0376 */
}

6.356.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.356.5 対応バージョン

1.0.0


Next: , Previous: W0376, Up: Messages

6.357 W0377

6.357.1 メッセージ本文

double 型の値が関数 `signed long long %s()' から返されています。

6.357.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.357.3 サンプルコード

long long func(void)
{
    double a = 0;
    return a; /* W0377 */
}

6.357.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.357.5 対応バージョン

1.0.0


Next: , Previous: W0377, Up: Messages

6.358 W0378

6.358.1 メッセージ本文

double 型の値が関数 `unsigned long long %s()' から返されています。

6.358.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.358.3 サンプルコード

unsigned long long func(void)
{
    double a = 0;
    return a; /* W0378 */
}

6.358.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.358.5 対応バージョン

1.0.0


Next: , Previous: W0378, Up: Messages

6.359 W0379

6.359.1 メッセージ本文

long double 型の値が関数 `signed long long %s()' から返されています。

6.359.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.359.3 サンプルコード

long long func(void)
{
    long double a = 0;
    return a; /* W0379 */
}

6.359.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0380 long double 型の値が関数 `unsigned long long %s()' から返されています。

6.359.5 対応バージョン

1.0.0


Next: , Previous: W0379, Up: Messages

6.360 W0380

6.360.1 メッセージ本文

long double 型の値が関数 `unsigned long long %s()' から返されています。

6.360.2 内容

浮動小数点型から整数型への暗黙のキャストにより、精度落ちになる可能性があります。

6.360.3 サンプルコード

unsigned long long func(void)
{
    long double a = 0;
    return a; /* W0380 */
}

6.360.4 関連メッセージ

  • W0348 float 型の値が関数 `char %s()' から返されています。
  • W0349 float 型の値が関数 `signed char %s()' から返されています。
  • W0350 float 型の値が関数 `unsigned char %s()' から返されています。
  • W0351 float 型の値が関数 `signed short %s()' から返されています。
  • W0352 float 型の値が関数 `unsigned short %s()' から返されています。
  • W0353 float 型の値が関数 `signed int %s()' から返されています。
  • W0354 float 型の値が関数 `unsigned int %s()' から返されています。
  • W0355 float 型の値が関数 `signed long %s()' から返されています。
  • W0356 float 型の値が関数 `unsigned long %s()' から返されています。
  • W0357 double 型の値が関数 `char %s()' から返されています。
  • W0358 double 型の値が関数 `signed char %s()' から返されています。
  • W0359 double 型の値が関数 `unsigned char %s()' から返されています。
  • W0360 double 型の値が関数 `signed short %s()' から返されています。
  • W0361 double 型の値が関数 `unsigned short %s()' から返されています。
  • W0362 double 型の値が関数 `signed int %s()' から返されています。
  • W0363 double 型の値が関数 `unsigned int %s()' から返されています。
  • W0364 double 型の値が関数 `signed long %s()' から返されています。
  • W0365 double 型の値が関数 `unsigned long %s()' から返されています。
  • W0366 long double 型の値が関数 `char %s()' から返されています。
  • W0367 long double 型の値が関数 `signed char %s()' から返されています。
  • W0368 long double 型の値が関数 `unsigned char %s()' から返されています。
  • W0369 long double 型の値が関数 `signed short %s()' から返されています。
  • W0370 long double 型の値が関数 `unsigned short %s()' から返されています。
  • W0371 long double 型の値が関数 `signed int %s()' から返されています。
  • W0372 long double 型の値が関数 `unsigned int %s()' から返されています。
  • W0373 long double 型の値が関数 `signed long %s()' から返されています。
  • W0374 long double 型の値が関数 `unsigned long %s()' から返されています。
  • W0375 float 型の値が関数 `signed long long %s()' から返されています。
  • W0376 float 型の値が関数 `unsigned long long %s()' から返されています。
  • W0377 double 型の値が関数 `signed long long %s()' から返されています。
  • W0378 double 型の値が関数 `unsigned long long %s()' から返されています。
  • W0379 long double 型の値が関数 `signed long long %s()' から返されています。

6.360.5 対応バージョン

1.0.0


Next: , Previous: W0380, Up: Messages

6.361 W0381

6.361.1 メッセージ本文

signed short 型の値が関数 `signed char %s()' から返されています。

6.361.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.361.3 サンプルコード

signed char func(void)
{
    short a = 0;
    return a; /* W0381 */
}

6.361.4 関連メッセージ

  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.361.5 対応バージョン

1.0.0


Next: , Previous: W0381, Up: Messages

6.362 W0382

6.362.1 メッセージ本文

unsigned short 型の値が関数 `unsigned char %s()' から返されています。

6.362.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.362.3 サンプルコード

unsigned char func(void)
{
    unsigned short a = 0;
    return a; /* W0382 */
}

6.362.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.362.5 対応バージョン

1.0.0


Next: , Previous: W0382, Up: Messages

6.363 W0383

6.363.1 メッセージ本文

signed int 型の値が関数 `signed char %s()' から返されています。

6.363.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.363.3 サンプルコード

signed char func(void)
{
    int a = 0;
    return a; /* W0383 */
}

6.363.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.363.5 対応バージョン

1.0.0


Next: , Previous: W0383, Up: Messages

6.364 W0384

6.364.1 メッセージ本文

signed int 型の値が関数 `signed short %s()' から返されています。

6.364.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.364.3 サンプルコード

short func(void)
{
    int a = 0;
    return a; /* W0384 */
}

6.364.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.364.5 対応バージョン

1.0.0


Next: , Previous: W0384, Up: Messages

6.365 W0385

6.365.1 メッセージ本文

unsigned int 型の値が関数 `unsigned char %s()' から返されています。

6.365.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.365.3 サンプルコード

unsigned char func(void)
{
    unsigned int a = 0;
    return a; /* W0385 */
}

6.365.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.365.5 対応バージョン

1.0.0


Next: , Previous: W0385, Up: Messages

6.366 W0386

6.366.1 メッセージ本文

unsigned int 型の値が関数 `unsigned short %s()' から返されています。

6.366.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.366.3 サンプルコード

unsigned short func(void)
{
    unsigned int a = 0;
    return a; /* W0386 */
}

6.366.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.366.5 対応バージョン

1.0.0


Next: , Previous: W0386, Up: Messages

6.367 W0387

6.367.1 メッセージ本文

signed long 型の値が関数 `signed char %s()' から返されています。

6.367.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.367.3 サンプルコード

signed char func(void)
{
    long a = 0;
    return a; /* W0387 */
}

6.367.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.367.5 対応バージョン

1.0.0


Next: , Previous: W0387, Up: Messages

6.368 W0388

6.368.1 メッセージ本文

signed long 型の値が関数 `signed short %s()' から返されています。

6.368.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.368.3 サンプルコード

short func(void)
{
    long a = 0;
    return a; /* W0388 */
}

6.368.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.368.5 対応バージョン

1.0.0


Next: , Previous: W0388, Up: Messages

6.369 W0389

6.369.1 メッセージ本文

signed long 型の値が関数 `signed int %s()' から返されています。

6.369.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.369.3 サンプルコード

int func(void)
{
    long a = 0;
    return a; /* W0389 */
}

6.369.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.369.5 対応バージョン

1.0.0


Next: , Previous: W0389, Up: Messages

6.370 W0390

6.370.1 メッセージ本文

unsigned long 型の値が関数 `unsigned char %s()' から返されています。

6.370.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.370.3 サンプルコード

unsigned char func(void)
{
    unsigned long a = 0;
    return a; /* W0390 */
}

6.370.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.370.5 対応バージョン

1.0.0


Next: , Previous: W0390, Up: Messages

6.371 W0391

6.371.1 メッセージ本文

unsigned long 型の値が関数 `unsigned short %s()' から返されています。

6.371.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.371.3 サンプルコード

unsigned short func(void)
{
    unsigned long a = 0;
    return a; /* W0391 */
}

6.371.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.371.5 対応バージョン

1.0.0


Next: , Previous: W0391, Up: Messages

6.372 W0392

6.372.1 メッセージ本文

unsigned long 型の値が関数 `unsigned int %s()' から返されています。

6.372.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.372.3 サンプルコード

unsigned int func(void)
{
    unsigned long a = 0;
    return a; /* W0392 */
}

6.372.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.372.5 対応バージョン

1.0.0


Next: , Previous: W0392, Up: Messages

6.373 W0393

6.373.1 メッセージ本文

signed long long 型の値が関数 `signed char %s()' から返されています。

6.373.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.373.3 サンプルコード

signed char func(void)
{
    long long a = 0;
    return a; /* W0393 */
}

6.373.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.373.5 対応バージョン

1.0.0


Next: , Previous: W0393, Up: Messages

6.374 W0394

6.374.1 メッセージ本文

signed long long 型の値が関数 `signed short %s()' から返されています。

6.374.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.374.3 サンプルコード

short func(void)
{
    long long a = 0;
    return a; /* W0394 */
}

6.374.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.374.5 対応バージョン

1.0.0


Next: , Previous: W0394, Up: Messages

6.375 W0395

6.375.1 メッセージ本文

signed long long 型の値が関数 `signed int %s()' から返されています。

6.375.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.375.3 サンプルコード

int func(void)
{
    long long a = 0;
    return a; /* W0395 */
}

6.375.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.375.5 対応バージョン

1.0.0


Next: , Previous: W0395, Up: Messages

6.376 W0396

6.376.1 メッセージ本文

signed long long 型の値が関数 `signed long %s()' から返されています。

6.376.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.376.3 サンプルコード

long func(void)
{
    long long a = 0;
    return a; /* W0396 */
}

6.376.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.376.5 対応バージョン

1.0.0


Next: , Previous: W0396, Up: Messages

6.377 W0397

6.377.1 メッセージ本文

unsigned long long 型の値が関数 `unsigned char %s()' から返されています。

6.377.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.377.3 サンプルコード

unsigned char func(void)
{
    unsigned long long a = 0;
    return a; /* W0397 */
}

6.377.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.377.5 対応バージョン

1.0.0


Next: , Previous: W0397, Up: Messages

6.378 W0398

6.378.1 メッセージ本文

unsigned long long 型の値が関数 `unsigned short %s()' から返されています。

6.378.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.378.3 サンプルコード

unsigned short func(void)
{
    unsigned long long a = 0;
    return a; /* W0398 */
}

6.378.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.378.5 対応バージョン

1.0.0


Next: , Previous: W0398, Up: Messages

6.379 W0399

6.379.1 メッセージ本文

unsigned long long 型の値が関数 `unsigned int %s()' から返されています。

6.379.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.379.3 サンプルコード

unsigned int func(void)
{
    unsigned long long a = 0;
    return a; /* W0399 */
}

6.379.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0400 unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.379.5 対応バージョン

1.0.0


Next: , Previous: W0399, Up: Messages

6.380 W0400

6.380.1 メッセージ本文

unsigned long long 型の値が関数 `unsigned long %s()' から返されています。

6.380.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。 また、小さいデータ型にキャストされた結果を表現することができない場合の処理は処理系依存です。

6.380.3 サンプルコード

unsigned long func(void)
{
    unsigned long long a = 0;
    return a; /* W0400 */
}

6.380.4 関連メッセージ

  • W0381 signed short 型の値が関数 `signed char %s()' から返されています。
  • W0382 unsigned short 型の値が関数 `unsigned char %s()' から返されています。
  • W0383 signed int 型の値が関数 `signed char %s()' から返されています。
  • W0384 signed int 型の値が関数 `signed short %s()' から返されています。
  • W0385 unsigned int 型の値が関数 `unsigned char %s()' から返されています。
  • W0386 unsigned int 型の値が関数 `unsigned short %s()' から返されています。
  • W0387 signed long 型の値が関数 `signed char %s()' から返されています。
  • W0388 signed long 型の値が関数 `signed short %s()' から返されています。
  • W0389 signed long 型の値が関数 `signed int %s()' から返されています。
  • W0390 unsigned long 型の値が関数 `unsigned char %s()' から返されています。
  • W0391 unsigned long 型の値が関数 `unsigned short %s()' から返されています。
  • W0392 unsigned long 型の値が関数 `unsigned int %s()' から返されています。
  • W0393 signed long long 型の値が関数 `signed char %s()' から返されています。
  • W0394 signed long long 型の値が関数 `signed short %s()' から返されています。
  • W0395 signed long long 型の値が関数 `signed int %s()' から返されています。
  • W0396 signed long long 型の値が関数 `signed long %s()' から返されています。
  • W0397 unsigned long long 型の値が関数 `unsigned char %s()' から返されています。
  • W0398 unsigned long long 型の値が関数 `unsigned short %s()' から返されています。
  • W0399 unsigned long long 型の値が関数 `unsigned int %s()' から返されています。

6.380.5 対応バージョン

1.0.0


Next: , Previous: W0400, Up: Messages

6.381 W0401

6.381.1 メッセージ本文

unsigned char 型の値が関数 `signed short %s()' から返されています。

6.381.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.381.3 サンプルコード

short func(void)
{
    unsigned char a = 0;
    return a; /* W0401 */
}

6.381.4 関連メッセージ

  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.381.5 対応バージョン

1.0.0


Next: , Previous: W0401, Up: Messages

6.382 W0402

6.382.1 メッセージ本文

unsigned char 型の値が関数 `signed int %s()' から返されています。

6.382.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.382.3 サンプルコード

int func(void)
{
    unsigned char a = 0;
    return a; /* W0402 */
}

6.382.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.382.5 対応バージョン

1.0.0


Next: , Previous: W0402, Up: Messages

6.383 W0403

6.383.1 メッセージ本文

unsigned char 型の値が関数 `signed long %s()' から返されています。

6.383.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.383.3 サンプルコード

long func(void)
{
    unsigned char a = 0;
    return a; /* W0403 */
}

6.383.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.383.5 対応バージョン

1.0.0


Next: , Previous: W0403, Up: Messages

6.384 W0404

6.384.1 メッセージ本文

unsigned short 型の値が関数 `signed int %s()' から返されています。

6.384.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.384.3 サンプルコード

int func(void)
{
    unsigned short a = 0;
    return a; /* W0404 */
}

6.384.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.384.5 対応バージョン

1.0.0


Next: , Previous: W0404, Up: Messages

6.385 W0405

6.385.1 メッセージ本文

unsigned short 型の値が関数 `signed long %s()' から返されています。

6.385.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.385.3 サンプルコード

long func(void)
{
    unsigned short a = 0;
    return a; /* W0405 */
}

6.385.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.385.5 対応バージョン

1.0.0


Next: , Previous: W0405, Up: Messages

6.386 W0406

6.386.1 メッセージ本文

unsigned int 型の値が関数 `signed long %s()' から返されています。

6.386.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.386.3 サンプルコード

long func(void)
{
    unsigned int a = 0;
    return a; /* W0406 */
}

6.386.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.386.5 対応バージョン

1.0.0


Next: , Previous: W0406, Up: Messages

6.387 W0407

6.387.1 メッセージ本文

unsigned char 型の値が関数 `signed long long %s()' から返されています。

6.387.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.387.3 サンプルコード

long long func(void)
{
    unsigned char a = 0;
    return a; /* W0407 */
}

6.387.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.387.5 対応バージョン

1.0.0


Next: , Previous: W0407, Up: Messages

6.388 W0408

6.388.1 メッセージ本文

unsigned short 型の値が関数 `signed long long %s()' から返されています。

6.388.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.388.3 サンプルコード

long long func(void)
{
    unsigned short a = 0;
    return a; /* W0408 */
}

6.388.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.388.5 対応バージョン

1.0.0


Next: , Previous: W0408, Up: Messages

6.389 W0409

6.389.1 メッセージ本文

unsigned int 型の値が関数 `signed long long %s()' から返されています。

6.389.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.389.3 サンプルコード

long long func(void)
{
    unsigned int a = 0;
    return a; /* W0409 */
}

6.389.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0410 unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.389.5 対応バージョン

1.0.0


Next: , Previous: W0409, Up: Messages

6.390 W0410

6.390.1 メッセージ本文

unsigned long 型の値が関数 `signed long long %s()' から返されています。

6.390.2 内容

符号なし型から符号つき型への暗黙のキャストにより、結果が意図せず負の数になる可能性があります。

6.390.3 サンプルコード

long long func(void)
{
    unsigned long a = 0;
    return a; /* W0410 */
}

6.390.4 関連メッセージ

  • W0401 unsigned char 型の値が関数 `signed short %s()' から返されています。
  • W0402 unsigned char 型の値が関数 `signed int %s()' から返されています。
  • W0403 unsigned char 型の値が関数 `signed long %s()' から返されています。
  • W0404 unsigned short 型の値が関数 `signed int %s()' から返されています。
  • W0405 unsigned short 型の値が関数 `signed long %s()' から返されています。
  • W0406 unsigned int 型の値が関数 `signed long %s()' から返されています。
  • W0407 unsigned char 型の値が関数 `signed long long %s()' から返されています。
  • W0408 unsigned short 型の値が関数 `signed long long %s()' から返されています。
  • W0409 unsigned int 型の値が関数 `signed long long %s()' から返されています。

6.390.5 対応バージョン

1.0.0


Next: , Previous: W0410, Up: Messages

6.391 W0411

6.391.1 メッセージ本文

列挙体は、最初だけ初期化するか、全てを初期化するか、全く初期化しないかのいずれかにしてください。

6.391.2 内容

“列挙型の初期化が不十分”と判断されるのは、サンプルコードのような初期化の場合です。 このような初期化を行うと、springwinter がどのような値で初期化されているのかがわかりづらくなります。 また、意図的に行っているのか、一部の初期化を忘れているのかの判断も難しくなります。 以上より、混乱を招く可能性の高い記述だと言えます。

6.391.3 サンプルコード

enum SEASON1 { /* W0411 */
    SPRING,
    SUMMER = 4,
    AUTUMN = 8,
    WINTER
};

enum SEASON2 { /* OK */
    SPRING,
    SUMMER,
    AUTUMN,
    WINTER
};

enum SEASON3 { /* OK */
    SPRING = 0,
    SUMMER = 1,
    AUTUMN = 2,
    WINTER = 3
};

enum SEASON4 { /* OK */
    SPRING = 1,
    SUMMER,
    AUTUMN,
    WINTER
};

6.391.4 関連メッセージ

なし。

6.391.5 対応バージョン

1.0.0


Next: , Previous: W0411, Up: Messages

6.392 W0413

6.392.1 メッセージ本文

制御文の本体が `{}' で囲まれたブロックになっていません。

6.392.2 内容

波括弧がなければ、本体がどこまでなのかが直感的にわかりづらくなるデメリットがあります。 また、制御文における本体が単一文で済まなくなったときに、波括弧をつけ忘れるリスクもあります。

6.392.3 サンプルコード

if (x > 0)
    x++; /* W0413 */

6.392.4 関連メッセージ

  • W0414 制御文の本体が同じ行にあり、`{}' で囲まれたブロックになっていません。

6.392.5 対応バージョン

1.0.0


Next: , Previous: W0413, Up: Messages

6.393 W0414

6.393.1 メッセージ本文

制御文の本体が同じ行にあり、`{}' で囲まれたブロックになっていません。

6.393.2 内容

波括弧がなければ、本体がどこまでなのかが直感的にわかりづらくなるデメリットがあります。 また、制御文における本体が単一文で済まなくなったときに、波括弧をつけ忘れるリスクもあります。

6.393.3 サンプルコード

if (x > 0) x++; /* W0414 */

6.393.4 関連メッセージ

  • W0413 制御文の本体が `{}' で囲まれたブロックになっていません。

6.393.5 対応バージョン

1.0.0


Next: , Previous: W0414, Up: Messages

6.394 W0421

6.394.1 メッセージ本文

値が NULL になるポインタに対して間接参照が行われています。

6.394.2 内容

NULL ポインタを間接参照するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.394.3 サンプルコード

void func(int a, int *p)
{
    int b;

    if (p) {
        b = *p; /* OK */
    }
    else {
        b = *p; /* W0421 */
    }
}

6.394.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1004 ここで該当変数に NULL の値を割り当てました。
  • C1005 ここで該当変数に NULL の可能性がある値を割り当てました。

6.394.5 対応バージョン

1.0.0


Next: , Previous: W0421, Up: Messages

6.395 W0422

6.395.1 メッセージ本文

値が NULL になることがあるポインタに対して間接参照が行われています。

6.395.2 内容

NULL ポインタを間接参照するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.395.3 サンプルコード

void func(int a, int *p)
{
    int b;

    if (p) {
        b = *p; /* OK */
    }

    b = *p; /* W0422 */
}

6.395.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1004 ここで該当変数に NULL の値を割り当てました。
  • C1005 ここで該当変数に NULL の可能性がある値を割り当てました。

6.395.5 対応バージョン

1.0.0


Next: , Previous: W0422, Up: Messages

6.396 W0423

6.396.1 メッセージ本文

値が NULL になるポインタに対して算術演算を行っています。

6.396.2 内容

NULL ポインタに対して算術演算するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.396.3 サンプルコード

int *func(int *p)
{
    if (p) {
        return p + 1; /* OK */
    }
    else {
        return p + 1; /* W0423 */
    }
}

6.396.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1004 ここで該当変数に NULL の値を割り当てました。
  • C1005 ここで該当変数に NULL の可能性がある値を割り当てました。

6.396.5 対応バージョン

1.0.0


Next: , Previous: W0423, Up: Messages

6.397 W0424

6.397.1 メッセージ本文

値が NULL になることがあるポインタに対して算術演算を行っています。

6.397.2 内容

NULL ポインタに対して算術演算するときの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.397.3 サンプルコード

int *func(int *p)
{
    int a;

    if (p) {
        a = *(p + 1); /* OK */
    }

    return p + 1; /* W0424 */
}

6.397.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1004 ここで該当変数に NULL の値を割り当てました。
  • C1005 ここで該当変数に NULL の可能性がある値を割り当てました。

6.397.5 対応バージョン

1.0.0


Next: , Previous: W0424, Up: Messages

6.398 W0425

6.398.1 メッセージ本文

一つの行に複数の宣言または文が存在します。

6.398.2 内容

1 行中に複数の宣言や文を書くことは文法上の誤りではありませんが、コードがやや複雑になります。

6.398.3 サンプルコード

int a, b; /* W0425 */
int a; int b; /* W0425 */
struct C { int i; } c = { 0 }; c.i = a; /* W0425 */

6.398.4 関連メッセージ

なし。

6.398.5 対応バージョン

1.0.0


Next: , Previous: W0425, Up: Messages

6.399 W0431

6.399.1 メッセージ本文

この行は以前の同じ深さのインデントより左にずれています。

6.399.2 内容

インデントの付け方に一貫性が保たれていないと、解析性が低下します。

6.399.3 サンプルコード

void func()
{
    int a;
int b; /* W0431 */
    a = var();
}

6.399.4 関連メッセージ

  • W0432 この行はプロジェクトのインデントスタイルと合っていません。

6.399.5 対応バージョン

1.0.0


Next: , Previous: W0431, Up: Messages

6.400 W0432

6.400.1 メッセージ本文

この行はプロジェクトのインデントスタイルと合っていません。

6.400.2 内容

インデントの付け方に一貫性が保たれていないと、解析性が低下します。

6.400.3 サンプルコード

void func()
{
    int a;
      int b; /* W0432 */
    a = var();
}

6.400.4 関連メッセージ

  • W0431 この行は以前の同じ深さのインデントより左にずれています。

6.400.5 対応バージョン

1.0.0


Next: , Previous: W0432, Up: Messages

6.401 W0440

6.401.1 メッセージ本文

この閉じカッコ `}' は、対応する開きカッコ `{' に合うようなインデントに置かれていません。

6.401.2 内容

制御文の開き波括弧と閉じ波括弧の配置を合っていないコードはスタイルの統一感がないという意味で解析性が低下します。

6.401.3 サンプルコード

void func()
{
    if (x == 0)
    {
        if (y == 0)
        {
            ...snip...
    } /* W0440 */
        } /* W0440 */
}

6.401.4 関連メッセージ

なし。

6.401.5 対応バージョン

1.0.0


Next: , Previous: W0440, Up: Messages

6.402 W0441

6.402.1 メッセージ本文

接尾辞がない整数リテラルの型が、int 型ではありません。

6.402.2 内容

整数定数の型が int 型でない場合、どのような型になるかは、接尾語の有無、サイズ、int の処理系依存のサイズなどによって決まります。 従って、接尾語がない場合、整数定数の型が不明確となり解析性が低下します。

6.402.3 サンプルコード

int i = 0x1234; /* W0441 */

6.402.4 関連メッセージ

なし。

6.402.5 対応バージョン

1.0.0


Next: , Previous: W0441, Up: Messages

6.403 W0442

6.403.1 メッセージ本文

関数形式マクロが定義されています。

6.403.2 内容

関数形式マクロは関数呼び出しのオーバーヘッドがない分だけ効率性にメリットがある反面、 実引数に対する型チェックが行われない、ブレークポイント等を用いたデバッグが行いにくい、などのデメリットがあります。

6.403.3 サンプルコード

#define MAX(a, b) (a < b ? b : a) /* W0442 */

6.403.4 関連メッセージ

  • W0443 この関数形式マクロは関数で置き換えることができる可能性があります。

6.403.5 対応バージョン

1.0.0


Next: , Previous: W0442, Up: Messages

6.404 W0443

6.404.1 メッセージ本文

この関数形式マクロは関数で置き換えることができる可能性があります。

6.404.2 内容

関数形式マクロは関数呼び出しのオーバーヘッドがない分だけ効率性にメリットがある反面、 実引数に対する型チェックが行われない、ブレークポイント等を用いたデバッグが行いにくい、などのデメリットがあります。

6.404.3 サンプルコード

#define MACRO(a, b) (a * b) /* W0443 */

6.404.4 関連メッセージ

  • W0442 関数形式マクロが定義されています。

6.404.5 対応バージョン

1.0.0


Next: , Previous: W0443, Up: Messages

6.405 W0444

6.405.1 メッセージ本文

`#' 演算子と `##' 演算子が一つのマクロ定義内で使われています。

6.405.2 内容

プリプロセッサが # 演算子や ## 演算子を評価する順番は、 ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.405.3 サンプルコード

#define MACRO(a) L ## #a /* W0444 */

6.405.4 関連メッセージ

  • W0445 複数の `##' 演算子が一つのマクロ定義内で使われています。

6.405.5 対応バージョン

1.0.0


Next: , Previous: W0444, Up: Messages

6.406 W0445

6.406.1 メッセージ本文

複数の `##' 演算子が一つのマクロ定義内で使われています。

6.406.2 内容

プリプロセッサが # 演算子や ## 演算子を評価する順番は、 ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.406.3 サンプルコード

#define MACRO(prefix, name, suffix) int i = prefix##name##suffix /* W0445 */

6.406.4 関連メッセージ

  • W0444 `#' 演算子と `##' 演算子が一つのマクロ定義内で使われています。

6.406.5 対応バージョン

1.0.0


Next: , Previous: W0445, Up: Messages

6.407 W0446

6.407.1 メッセージ本文

代入演算の結果値が使われています。

6.407.2 内容

1 つの式の中に、複数の代入演算子や複合代入演算子を使用すると、文が複雑になります。

6.407.3 サンプルコード

void func(void)
{
    int a;
    int b;

    a = b += 3; /* W0446 */
}

6.407.4 関連メッセージ

なし。

6.407.5 対応バージョン

1.0.0


Next: , Previous: W0446, Up: Messages

6.408 W0447

6.408.1 メッセージ本文

カンマ演算子が for 文の制御式以外で使われています。

6.408.2 内容

カンマ演算子は複数の式を一つの文で書きたいときに使用します。主な用途は for 文です。for 文以外で使用するとコードが複雑になります。

6.408.3 サンプルコード

int a = 1;
int b = 0;

int c = (b = a, a); /* W0447 */

6.408.4 関連メッセージ

なし。

6.408.5 対応バージョン

1.0.0


Next: , Previous: W0447, Up: Messages

6.409 W0456

6.409.1 メッセージ本文

外部結合を持つオブジェクトあるいは関数 `%s' が、ヘッダファイル内で定義されています。

6.409.2 内容

ヘッダファイルは通常は複数のファイルからインクルードされることを想定します。このようなヘッダファイルに外部結合を持つオブジェクトや関数が定義されていると、インクルードされている数分定義されることになり、通常はリンクエラーとなります。

6.409.3 サンプルコード

test.h

int num = 1; /* W0456 */

int func(void) /* W0456 */
{
    return num;
}

test.c

#include "test.h"

6.409.4 関連メッセージ

なし。

6.409.5 対応バージョン

1.0.0


Next: , Previous: W0456, Up: Messages

6.410 W0457

6.410.1 メッセージ本文

関数の宣言あるいは定義で、戻り値型が明示的に定義されていないので、暗黙的に int 型と定義されます。

6.410.2 内容

関数宣言の際に型を明示しなければ、暗黙的に int 型の関数として宣言されます。これはコードを省略したい動機で使われることもあるかもしれませんが、コードの明確さが失われ、解析性を低下させます。

6.410.3 サンプルコード

func1(void); /* W0457 */

func2(void) /* W0457 */
{
    return 0;
}

6.410.4 関連メッセージ

なし。

6.410.5 対応バージョン

1.0.0


Next: , Previous: W0457, Up: Messages

6.411 W0458

6.411.1 メッセージ本文

オブジェクトの宣言あるいは定義で、型が明示的に定義されていないので、暗黙的に int 型と定義されます。

6.411.2 内容

オブジェクト宣言の際に型を明示しなければ、暗黙的に int 型の関数として宣言されます。これはコードを省略したい動機で使われることもあるかもしれませんが、コードの明確さが失われ、解析性を低下させます。

6.411.3 サンプルコード

a; /* W0458 */
b = 0; /* W0458 */
extern c; /* W0458 */
static d; /* W0458 */

int func(e) /* W0458 */
{
    const f = e; /* W0458 */
    return f;
}

6.411.4 関連メッセージ

なし。

6.411.5 対応バージョン

1.0.0


Next: , Previous: W0458, Up: Messages

6.412 W0459

6.412.1 メッセージ本文

変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。

6.412.2 内容

変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。

6.412.3 サンプルコード

int a;

if(a > 0) { /* W0459 */
}

6.412.4 関連メッセージ

  • W0460 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。
  • W0461 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。
  • W0462 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1003 ここで該当変数が初期値を指定せずに定義されています。

6.412.5 対応バージョン

1.0.0


Next: , Previous: W0459, Up: Messages

6.413 W0460

6.413.1 メッセージ本文

変数 `%s' の値は、この式の評価時点では設定されていないことがあります。

6.413.2 内容

変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。

6.413.3 サンプルコード

void func(int a)
{
    int b;

    if (a == 0) {
        b = 1;
    }

    if (b > 0) { /* W0460 */
    }
}

6.413.4 関連メッセージ

  • W0459 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。
  • W0461 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。
  • W0462 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1003 ここで該当変数が初期値を指定せずに定義されています。

6.413.5 対応バージョン

1.0.0


Next: , Previous: W0460, Up: Messages

6.414 W0461

6.414.1 メッセージ本文

値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。

6.414.2 内容

変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。

6.414.3 サンプルコード

extern int func1(const int *);

void func2(int a)
{
  int b;

  func1(&a); /* OK */
  func1(&b); /* W0461 */
}

6.414.4 関連メッセージ

  • W0459 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。
  • W0460 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。
  • W0462 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1003 ここで該当変数が初期値を指定せずに定義されています。

6.414.5 対応バージョン

1.0.0


Next: , Previous: W0461, Up: Messages

6.415 W0462

6.415.1 メッセージ本文

値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。

6.415.2 内容

変数を明示的に初期化しない場合、静的変数とグローバル変数は暗黙的に 0 で初期化されますが、自動変数は不定になります。 従って、そのような自動変数を使用すると予期しない動作を引き起こす可能性があります。

6.415.3 サンプルコード

extern int func1(const int *);

int func2(int a)
{
    int b;

    if (a > 10) {
        b = a + 10;
    }

    func1(&b); /* W0462 */
}

6.415.4 関連メッセージ

  • W0459 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。
  • W0460 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。
  • W0461 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1003 ここで該当変数が初期値を指定せずに定義されています。

6.415.5 対応バージョン

1.0.0


Next: , Previous: W0462, Up: Messages

6.416 W0477

6.416.1 メッセージ本文

マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。

6.416.2 内容

このようなマクロ定義は、プロジェクトやプログラマに特有のものになりがちなため、 外部の人が見たときの解析性が大幅に低下します。

6.416.3 サンプルコード

#define BEGIN { /* W0477 */
#define END } /* W0477 */

void func()
BEGIN
    ...snip...
END

6.416.4 関連メッセージ

  • W0478 このマクロは、認識不可能なコードの断片を定義しています。
  • W0479 このマクロ定義は typedef 宣言に置換することができます。
  • W0480 このマクロは、制御文のキーワード、あるいは句読文字を定義しています。
  • W0481 このマクロは、`{}' で囲まれたブロックを定義しています。
  • W0482 このマクロは、いずれかの型指定子を定義しています。
  • W0483 このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。

6.416.5 対応バージョン

1.0.0


Next: , Previous: W0477, Up: Messages

6.417 W0478

6.417.1 メッセージ本文

このマクロは、認識不可能なコードの断片を定義しています。

6.417.2 内容

このようなマクロ定義は、プロジェクトやプログラマに特有のものになりがちなため、 外部の人が見たときの解析性が大幅に低下します。

6.417.3 サンプルコード

#define MALLOC_OR_DIE(ptr, size) ptr = malloc(size); if (!ptr) exit(1); /* W0478 */

6.417.4 関連メッセージ

  • W0477 マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。
  • W0479 このマクロ定義は typedef 宣言に置換することができます。
  • W0480 このマクロは、制御文のキーワード、あるいは句読文字を定義しています。
  • W0481 このマクロは、`{}' で囲まれたブロックを定義しています。
  • W0482 このマクロは、いずれかの型指定子を定義しています。
  • W0483 このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。

6.417.5 対応バージョン

1.0.0


Next: , Previous: W0478, Up: Messages

6.418 W0479

6.418.1 メッセージ本文

このマクロ定義は typedef 宣言に置換することができます。

6.418.2 内容

外部の人が見たときの解析性が大幅に低下します。

6.418.3 サンプルコード

#define foo unsigned int /* W0479 */

6.418.4 関連メッセージ

  • W0477 マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。
  • W0478 このマクロは、認識不可能なコードの断片を定義しています。
  • W0480 このマクロは、制御文のキーワード、あるいは句読文字を定義しています。
  • W0481 このマクロは、`{}' で囲まれたブロックを定義しています。
  • W0482 このマクロは、いずれかの型指定子を定義しています。
  • W0483 このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。

6.418.5 対応バージョン

1.0.0


Next: , Previous: W0479, Up: Messages

6.419 W0480

6.419.1 メッセージ本文

このマクロは、制御文のキーワード、演算子、あるいは区切り文字を定義しています。

6.419.2 内容

外部の人が見たときの解析性が大幅に低下します。

6.419.3 サンプルコード

#define PLUS + /* W0480 */
#define LOOP while /* W0480 */

6.419.4 関連メッセージ

  • W0477 マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。
  • W0478 このマクロは、認識不可能なコードの断片を定義しています。
  • W0479 このマクロ定義は typedef 宣言に置換することができます。
  • W0481 このマクロは、`{}' で囲まれたブロックを定義しています。
  • W0482 このマクロは、いずれかの型指定子を定義しています。
  • W0483 このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。

6.419.5 対応バージョン

1.0.0


Next: , Previous: W0480, Up: Messages

6.420 W0481

6.420.1 メッセージ本文

このマクロは、`{}' で囲まれたブロックを定義しています。

6.420.2 内容

外部の人が見たときの解析性が大幅に低下します。

6.420.3 サンプルコード

#define SETUP(a, b) /* W0481 */ \
    { \
        if (a) \
            b = 0; \
        else \
            b = 1; \
    }

6.420.4 関連メッセージ

  • W0477 マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。
  • W0478 このマクロは、認識不可能なコードの断片を定義しています。
  • W0479 このマクロ定義は typedef 宣言に置換することができます。
  • W0480 このマクロは、制御文のキーワード、あるいは句読文字を定義しています。
  • W0482 このマクロは、いずれかの型指定子を定義しています。
  • W0483 このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。

6.420.5 対応バージョン

1.0.0


Next: , Previous: W0481, Up: Messages

6.421 W0482

6.421.1 メッセージ本文

このマクロは、いずれかの型指定子を定義しています。

6.421.2 内容

外部の人が見たときの解析性が大幅に低下します。

6.421.3 サンプルコード

#define COMPOSITE struct /* W0482 */

6.421.4 関連メッセージ

  • W0477 マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。
  • W0478 このマクロは、認識不可能なコードの断片を定義しています。
  • W0479 このマクロ定義は typedef 宣言に置換することができます。
  • W0480 このマクロは、制御文のキーワード、あるいは句読文字を定義しています。
  • W0481 このマクロは、`{}' で囲まれたブロックを定義しています。
  • W0483 このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。

6.421.5 対応バージョン

1.0.0


Next: , Previous: W0482, Up: Messages

6.422 W0483

6.422.1 メッセージ本文

このマクロは、記憶域クラス指定子と型修飾子の組みを定義しています。

6.422.2 内容

外部の人が見たときの解析性が大幅に低下します。

6.422.3 サンプルコード

#define PRIVATE_FINAL static const /* W0483 */

6.422.4 関連メッセージ

  • W0477 マクロ定義の中に、対になっていない `[]'、`()'、`{}' が存在します。
  • W0478 このマクロは、認識不可能なコードの断片を定義しています。
  • W0479 このマクロ定義は typedef 宣言に置換することができます。
  • W0480 このマクロは、制御文のキーワード、あるいは句読文字を定義しています。
  • W0481 このマクロは、`{}' で囲まれたブロックを定義しています。
  • W0482 このマクロは、いずれかの型指定子を定義しています。

6.422.5 対応バージョン

1.0.0


Next: , Previous: W0483, Up: Messages

6.423 W0488

6.423.1 メッセージ本文

関数呼び出し `()'、配列添字演算 `[]'、あるいは構造体/共用体メンバ演算 `->' または `.' が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。

6.423.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、 チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.423.3 サンプルコード

while (func(&a, &b) < 0 && i > 0) { /* W0488 */
    ...snip...
}

6.423.4 関連メッセージ

  • W0489 単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0490 二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。

6.423.5 対応バージョン

1.0.0


Next: , Previous: W0488, Up: Messages

6.424 W0489

6.424.1 メッセージ本文

単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。

6.424.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、 チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.424.3 サンプルコード

void func(unsigned int a, unsigned int b)
{
    unsigned int c = !a && b; /* W0489 */
}

6.424.4 関連メッセージ

  • W0488 関数呼び出し `()' 、配列添字演算 `[]' 、あるいは構造体/共用体メンバ演算 `->' または `.' が、&& あるいは || と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0490 二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。

6.424.5 対応バージョン

1.0.0


Next: , Previous: W0489, Up: Messages

6.425 W0490

6.425.1 メッセージ本文

二項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。

6.425.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、 チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.425.3 サンプルコード

void func(unsigned int a, unsigned int b, unsigned int c)
{
    unsigned int d = a && b || c; /* W0490 */
}

6.425.4 関連メッセージ

  • W0488 関数呼び出し `()' 、配列添字演算 `[]' 、あるいは構造体/共用体メンバ演算 `->' または `.' が、&& あるいは || と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0489 単項演算子が、`&&' あるいは `||' と共に使われています。`()' で結合を明確にすることを勧めます。

6.425.5 対応バージョン

1.0.0


Next: , Previous: W0490, Up: Messages

6.426 W0491

6.426.1 メッセージ本文

同じ識別子名 `%s' は他の名前空間内の宣言でも使われています。

6.426.2 内容

名前空間が異なるからといって、同じ名前の識別子を使用すると、コードが紛らわしくなります。

6.426.3 サンプルコード

extern int foo;

struct foo { /* W0491 */
    int a;
    int b;
};

6.426.4 関連メッセージ

  • W0492 同じ識別子名 `%s' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。

6.426.5 対応バージョン

1.0.0


Next: , Previous: W0491, Up: Messages

6.427 W0492

6.427.1 メッセージ本文

同じ識別子名 `%s' が構造体/共用体のメンバの他に、ラベル、タグ、または通常の識別子としても使われています。

6.427.2 内容

名前空間が異なるからといって、同じ名前の識別子を使用すると、コードが紛らわしくなります。

6.427.3 サンプルコード

extern int foo;

struct a {
    int foo; /* W0492 */
    int b;
};

void func(void)
{
    struct a a;
    int b; /* W0492 */
}

6.427.4 関連メッセージ

  • W0491 同じ識別子名 `%s' は他の名前空間内の宣言でも使われています。

6.427.5 対応バージョン

1.0.0


Next: , Previous: W0492, Up: Messages

6.428 W0493

6.428.1 メッセージ本文

構造体あるいは共用体の値を関数の実引数として渡しています。

6.428.2 内容

引数にオブジェクトの値を渡すと、それらの要素のサイズ分スタックメモリを消費することになり、パフォーマンスの面でデメリットがあります。

6.428.3 サンプルコード

struct STR {
    long a;
    long b;
};

extern int foo(struct STR s);

void func(void)
{
    struct STR s = { 0 };

    foo(s); /* W0493 */
}

6.428.4 関連メッセージ

なし。

6.428.5 対応バージョン

1.0.0


Next: , Previous: W0493, Up: Messages

6.429 W0495

6.429.1 メッセージ本文

演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.429.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.429.3 サンプルコード

void func(int a, int b, int c)
{
    int x = a % b  * c; /* W0495 */
}

6.429.4 関連メッセージ

  • W0496 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0497 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0498 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0499 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0500 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0501 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0502 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.429.5 対応バージョン

1.0.0


Next: , Previous: W0495, Up: Messages

6.430 W0496

6.430.1 メッセージ本文

三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。

6.430.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.430.3 サンプルコード

void func(int a, int b, int c, int d, int e)
{
    int f = a ? b : c ? d : e; /* W0496 */
}

6.430.4 関連メッセージ

  • W0495 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0497 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0498 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0499 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0500 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0501 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0502 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.430.5 対応バージョン

1.0.0


Next: , Previous: W0496, Up: Messages

6.431 W0497

6.431.1 メッセージ本文

シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。

6.431.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.431.3 サンプルコード

void func(int a, int b, int c)
{
    int d = a << b << c; /* W0497 */
}

6.431.4 関連メッセージ

  • W0495 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0496 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0498 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0499 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0500 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0501 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0502 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.431.5 対応バージョン

1.0.0


Next: , Previous: W0497, Up: Messages

6.432 W0498

6.432.1 メッセージ本文

二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。

6.432.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.432.3 サンプルコード

void func(int a, int b, int c)
{
    int d = a - b + c; /* W0498 */
}

6.432.4 関連メッセージ

  • W0495 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0496 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0497 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0499 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0500 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0501 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0502 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.432.5 対応バージョン

1.0.0


Next: , Previous: W0498, Up: Messages

6.433 W0499

6.433.1 メッセージ本文

+ - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。

6.433.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.433.3 サンプルコード

void func(int a, int b, int c)
{
    int d = a << b >> c; /* W0499 */
}

6.433.4 関連メッセージ

  • W0495 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0496 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0497 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0498 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0500 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0501 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0502 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.433.5 対応バージョン

1.0.0


Next: , Previous: W0499, Up: Messages

6.434 W0500

6.434.1 メッセージ本文

二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。

6.434.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.434.3 サンプルコード

void func(int a, int b, int c)
{
    int d = a * b + c;  /* W0500 */
}

6.434.4 関連メッセージ

  • W0495 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0496 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0497 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0498 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0499 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0501 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0502 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.434.5 対応バージョン

1.0.0


Next: , Previous: W0500, Up: Messages

6.435 W0501

6.435.1 メッセージ本文

三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.435.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.435.3 サンプルコード

void func(int a, int b, int c)
{
    int d = a ? a : a + c; /* W0501 */
}

6.435.4 関連メッセージ

  • W0495 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0496 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0497 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0498 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0499 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0500 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0502 + - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.435.5 対応バージョン

1.0.0


Next: , Previous: W0501, Up: Messages

6.436 W0502

6.436.1 メッセージ本文

+ - * / % 以外の二項演算子が、異なる優先順位の二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.436.2 内容

演算子の評価順序は ISO C90 で定められているため、曖昧さはありませんが、チーム内のメンバ全員がその順序を把握することは容易ではありません。 従って、ほとんどのメンバにとって評価順序が不明確になるため、解析性が低下します。

6.436.3 サンプルコード

void func(int a, int b, int c)
{
    int d = a != b << c; /* W0502 */
}

6.436.4 関連メッセージ

  • W0495 演算子 % が、他の算術演算子と共に使われています。`()' で結合を明確にすることを勧めます。
  • W0496 三項演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0497 シフト演算子、関係演算子、あるいは等価演算子が複数回使われています。`()' で結合を明確にすることを勧めます。
  • W0498 二項演算子 + - * / のうち、同じ優先順位の異なる演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0499 + - * / % 以外の二項演算子のうち、同じ優先順位の異なる二項演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0500 二項演算子 + - * / のうち、異なる優先順位の演算子が共に使われています。`()' で結合を明確にすることを勧めます。
  • W0501 三項演算子が、二項演算子と共に使われています。`()' で結合を明確にすることを勧めます。

6.436.5 対応バージョン

1.0.0


Next: , Previous: W0502, Up: Messages

6.437 W0508

6.437.1 メッセージ本文

`&&' あるいは `||' 演算子の右オペランドに副作用があります。

6.437.2 内容

&& 演算子および || 演算子は短絡評価の方式で処理されます。 したがって、これらの右オペランドに副作用を含む式がある場合、 その副作用の有無が左オペランドに依存することになります。 これは非常に紛らわしく、バグが入り込む可能性を高めます。

6.437.3 サンプルコード

if ((a == b) && ((c = func()) == d)) /* W0508 */

c には、 a==b の評価が真の場合にのみ func() の戻り値が代入されます。

6.437.4 関連メッセージ

なし。

6.437.5 対応バージョン

1.0.0


Next: , Previous: W0508, Up: Messages

6.438 W0511

6.438.1 メッセージ本文

C++ コメント `//' が使われています。

6.438.2 内容

// コメントは ISO C90 で規定されておらず、言語拡張に該当します。言語拡張を使用すると移植性が低下します。

6.438.3 サンプルコード

// W0511

6.438.4 関連メッセージ

なし。

6.438.5 対応バージョン

1.0.0


Next: , Previous: W0511, Up: Messages

6.439 W0512

6.439.1 メッセージ本文

`++' あるいは `–' 演算子の結果が式の中で使われています。

6.439.2 内容

このような式では ++ 演算子や -- 演算子の評価順の認識誤りがあれば、意図しない結果になる可能性が高いです。 見た目にも複雑な式になり、理解が困難かつ誤った理解をしやすいなどのデメリットもあります。

6.439.3 サンプルコード

a = b++ + --c + d++; /* W0512 */

6.439.4 関連メッセージ

なし。

6.439.5 対応バージョン

1.0.0


Next: , Previous: W0512, Up: Messages

6.440 W0525

6.440.1 メッセージ本文

1 ビットの名前が付いたフィールドが符号付き型として宣言されています。

6.440.2 内容

1 ビットの符号付ビットフィールドで表すことができるのは "-1" と "0" のみで、"1" を表すことはできません。 このようなビットフィールドは用途が考えづらく、理解が困難です。

6.440.3 サンプルコード

struct ST {
    int bit:1; /* W0525 */
};

6.440.4 関連メッセージ

なし。

6.440.5 対応バージョン

1.0.0


Next: , Previous: W0525, Up: Messages

6.441 W0528

6.441.1 メッセージ本文

このマクロは、8 進数定数を定義しています。

6.441.2 内容

0 で始まる定数は 8 進数として解釈されます。 10 進数と比べて紛らわしいです。

6.441.3 サンプルコード

#define MACRO 0123 /* W0528 */

6.441.4 関連メッセージ

  • W0529 8 進数リテラルが使われています。
  • W0530 文字定数または文字列リテラルの中で、8 進拡張表記が使われています。

6.441.5 対応バージョン

1.0.0


Next: , Previous: W0528, Up: Messages

6.442 W0529

6.442.1 メッセージ本文

8 進数リテラルが使われています。

6.442.2 内容

0 で始まる定数は 8 進数として解釈されます。 10 進数と比べて紛らわしいです。

6.442.3 サンプルコード

#define MACRO 0123

int a = 0123; /* W0529 */
int b = MACRO; /* W0529 */

6.442.4 関連メッセージ

  • W0528 このマクロは、8 進数定数を定義しています。
  • W0530 文字定数または文字列リテラルの中で、8 進拡張表記が使われています。

6.442.5 対応バージョン

1.0.0


Next: , Previous: W0529, Up: Messages

6.443 W0530

6.443.1 メッセージ本文

文字定数または文字列リテラルの中で、8 進拡張表記が使われています。

6.443.2 内容

0 で始まる定数は 8 進数として解釈されます。 10 進数と比べて紛らわしいです。

6.443.3 サンプルコード

char *s = "\012"; /* W0530 */

6.443.4 関連メッセージ

  • W0528 このマクロは、8 進数定数を定義しています。
  • W0529 8 進数リテラルが使われています。

6.443.5 対応バージョン

1.0.0


Next: , Previous: W0530, Up: Messages

6.444 W0532

6.444.1 メッセージ本文

switch 文の case 節、default 節から出るために break 文が使われていますが、case 節の末尾に記述されていません。

6.444.2 内容

break 文は、case 文内の末尾でのみ使用されるべきです。

6.444.3 サンプルコード

switch (x) {
case 1:
    if (y == 0) {
        break; /* W0532 */
    }
    ...snip...
    break;
case 2:
    ...snip...
    break;
}

6.444.4 関連メッセージ

なし。

6.444.5 対応バージョン

1.0.0


Next: , Previous: W0532, Up: Messages

6.445 W0534

6.445.1 メッセージ本文

制御変数 `%s' は、この for 文制御式で初期化されていません。

6.445.2 内容

ループ制御変数は必ずしも for 文の初期化式の中で初期化しないといけないわけではありません。 しかし、for 文以前のどこかから初期化文を探すよりも、for 文の初期化式に初期化文が書いている方がわかりやすいといえます。

6.445.3 サンプルコード

int i = 0;
int j;

for (; i < 10; i++) { /* W0534 */
}

for (j = 0; i < 20; i++) { /* W0534 */
}

6.445.4 関連メッセージ

なし。

6.445.5 対応バージョン

1.0.0


Next: , Previous: W0534, Up: Messages

6.446 W0535

6.446.1 メッセージ本文

for 文の制御式の中にカンマ演算子が使われています。

6.446.2 内容

for 文におけるカンマ演算子の使用は、for 文以外での使用よりはデメリットが少ないと言えます。 しかし、程度は小さいながらも解析性を低下させることに変わりはありません。

6.446.3 サンプルコード

int i, j, k = 0;

for (i = 0, j = 0; i < 10; i++, j++, k--) { /* W0535 */
}

6.446.4 関連メッセージ

なし。

6.446.5 対応バージョン

1.0.0


Next: , Previous: W0535, Up: Messages

6.447 W0538

6.447.1 メッセージ本文

この default ラベルは、switch 文内の最後のラベルではありません。

6.447.2 内容

switch 文において default 節が末尾でない場合、その節以降の case 節が判定されません。 これは、ほどんどの場合プログラマの意図ではないと想定されます。

6.447.3 サンプルコード

switch (x) {
default: /* W0538 */
    ...snip...
case 1:
    ...snip...
}

6.447.4 関連メッセージ

なし。

6.447.5 対応バージョン

1.0.0


Next: , Previous: W0538, Up: Messages

6.448 W0540

6.448.1 メッセージ本文

空の仮引数並びの関数が定義されています。`void' が省略されています。

6.448.2 内容

引数を持たない関数定義で void を使用しない書き方は、古い形式の関数定義と見なされ、意図しない動作を引き起こす可能性があります。

6.448.3 サンプルコード

void func() /* W0540 */
{
    ...snip...
}

6.448.4 関連メッセージ

なし。

6.448.5 対応バージョン

1.0.0


Next: , Previous: W0540, Up: Messages

6.449 W0541

6.449.1 メッセージ本文

マクロで隠蔽されないインラインアセンブリコードです。

6.449.2 内容

アセンブラコードは環境によって変わるため、複数の関数に点在させると、別の環境に移植するときの変更コストが大きくなります。

6.449.3 サンプルコード

#define ASM_CODE asm("movl %ecx, %eax")

void foo(int arg1, int *arg2, int arg3)
{
    asm("movl %ecx, %eax"); /* W0541 */
    __asm__("movl %ecx, (%eax)"); /* W0541 */

    asm { /* W0541 */
        xorl eax, eax
    }

    ASM_CODE; /* OK */

    __asm__ volatile ( /* W0541 */
            "int $0x80"
            : "=a" (r)
              "+b" (arg1),
              "+c" (arg2),
              "+d" (arg3)
            : "a" (128)
            : "memory", "cc");
}

6.449.4 関連メッセージ

なし。

6.449.5 対応バージョン

1.6.0


Next: , Previous: W0541, Up: Messages

6.450 W0542

6.450.1 メッセージ本文

関数宣言の仮引数の一部にのみ識別子が存在します。

6.450.2 内容

関数定義の仮引数名が対応する宣言の仮引数名と異なる場合、その関数の仕様変更が未完了となる可能性があります。

6.450.3 サンプルコード

void func(int i, char, int, char c); /* W0542 */

6.450.4 関連メッセージ

なし。

6.450.5 対応バージョン

1.0.0


Next: , Previous: W0542, Up: Messages

6.451 W0543

6.451.1 メッセージ本文

この関数宣言における仮引数の識別子は、以前の宣言の仮引数の識別子と異なります。

6.451.2 内容

関数定義の仮引数名が対応する宣言の仮引数名と異なる場合、その関数の仕様変更が未完了となる可能性があります。

6.451.3 サンプルコード

void func(int i1, int i2);

void func(int i2, int i1) /* W0543 */
{
    ...snip...
}

6.451.4 関連メッセージ

  • W0544 関数宣言の仮引数の識別子と関数ポインタの宣言の仮引数の識別子が異なります。

6.451.5 対応バージョン

1.0.0


Next: , Previous: W0543, Up: Messages

6.452 W0544

6.452.1 メッセージ本文

関数宣言の仮引数の識別子と関数ポインタの宣言の仮引数の識別子が異なります。

6.452.2 内容

関数定義の仮引数名が対応する宣言の仮引数名と異なる場合、その関数の仕様変更が未完了となる可能性があります。

6.452.3 サンプルコード

void func(int i1, int i2);
void (*p)(int i2, int i1) = &func; /* W0544 */

6.452.4 関連メッセージ

  • W0543 この関数宣言における仮引数の識別子は、以前の宣言の仮引数の識別子と異なります。

6.452.5 対応バージョン

1.0.0


Next: , Previous: W0544, Up: Messages

6.453 W0546

6.453.1 メッセージ本文

switch 文の case ラベルあるいは default ラベルが、ネストされたブロックの中に存在します。

6.453.2 内容

switch 文中の入れ子ブロックの中に case 節や default 節を記述することは可能ですが、文が複雑になります。 また、入れ子ブロックが条件文になっている場合には構造化定理の側面から見ても怪しいものになってしまいます。

6.453.3 サンプルコード

switch (x) {
case 1:
    if (y > 0) {
    case 2: /* W0546 */
        break;
    }
    ...snip...
    break;
default:
    ...snip...
}

6.453.4 関連メッセージ

なし。

6.453.5 対応バージョン

1.0.0


Next: , Previous: W0546, Up: Messages

6.454 W0549

6.454.1 メッセージ本文

マクロの仮引数が `()' で囲まれていません。

6.454.2 内容

マクロ仮引数が式である場合に、演算子の優先順位に関して問題が生じる可能性があります。

6.454.3 サンプルコード

#define ADD(a, b) a + b /* W0549 */

int x = 3 * ADD(1, 2);

上記コードでは、 3 * (1 + 2) = 9 ではなく、(3 * 1) + 2 = 5x に代入されます。

6.454.4 関連メッセージ

なし。

6.454.5 対応バージョン

1.0.0


Next: , Previous: W0549, Up: Messages

6.455 W0551

6.455.1 メッセージ本文

共用体型指定子が定義されています。

6.455.2 内容

共用体では、メンバがどのような順番でメモリに配置されるかが環境依存になります。従って、移植性が低下します。

6.455.3 サンプルコード

union UNI { /* W0551 */
    int a;
    short b;
    long c;
};

6.455.4 関連メッセージ

  • W0552 共用体型のオブジェクトが定義されています。

6.455.5 対応バージョン

1.0.0


Next: , Previous: W0551, Up: Messages

6.456 W0552

6.456.1 メッセージ本文

共用体型のオブジェクトが定義されています。

6.456.2 内容

共用体では、メンバがどのような順番でメモリに配置されるかが環境依存になります。従って、移植性が低下します。

6.456.3 サンプルコード

union UNI {
    int a;
    short b;
    long c;
};

union UNI u; /* W0552 */

6.456.4 関連メッセージ

  • W0551 共用体型指定子が定義されています。

6.456.5 対応バージョン

1.0.0


Next: , Previous: W0552, Up: Messages

6.457 W0553

6.457.1 メッセージ本文

関数を指すポインタが、異なる関数ポインタ型へキャストされています。

6.457.2 内容

異なる関数ポインタ型へのキャストを使用しても問題ない処理系が多いですが、中には関数ポインタのキャストを実施した時点でアボートするような処理系も存在します。

6.457.3 サンプルコード

extern int func(void);

void (*p)(int) = (void (*)(int)) &func; /* W0553 */

6.457.4 関連メッセージ

なし。

6.457.5 対応バージョン

1.0.0


Next: , Previous: W0553, Up: Messages

6.458 W0554

6.458.1 メッセージ本文

`#pragma' の実引数 `%s' は認識できません。この `#pragma' 指令は無視されました。

6.458.2 内容

#pragma ディレクティブで実行できる命令の内容や種類は処理系依存になります。従って、#pragma ディレクティブを使用するだけで移植性が低下します。

6.458.3 サンプルコード

#pragma SystemSpecificPragmaName 5 /* W0544 */

6.458.4 関連メッセージ

なし。

6.458.5 対応バージョン

1.0.0


Next: , Previous: W0554, Up: Messages

6.459 W0555

6.459.1 メッセージ本文

この関数はプロジェクト中で間接的に再帰呼び出しされています。

6.459.2 内容

再帰関数は、効率性の面で「処理が遅くなる」、「スタックを想定以上に使用してしまう可能性がある」などのデメリットがあります。 また、無限ループに陥る可能性があるため危険だという側面もあります。

6.459.3 サンプルコード

test1.c

int func1(int i) /* W0555 */
{
    if (i < 10) {
        return i + 1;
    }
    else {
        return func3(i);
    }
}

test2.c

int func2(int i) /* W0555 */
{
    return func1(i) + 2;
}

test3.c

int func3(int i) /* W0555 */
{
    return func2(i) + 3;
}

6.459.4 関連メッセージ

  • W0556 この呼び出しを含む関数は、再帰呼び出しされています。

6.459.5 対応バージョン

1.0.0


Next: , Previous: W0555, Up: Messages

6.460 W0556

6.460.1 メッセージ本文

この呼び出しを含む関数は、再帰呼び出しされています。

6.460.2 内容

再帰関数は、効率性の面で、「処理が遅くなる」、「スタックを想定以上に使用してしまう可能性がある」、などのデメリットがあります。 また、無限ループに陥る可能性があるため危険だという側面もあります。

6.460.3 サンプルコード

int func(int i)
{
    if (i == 0) {
        return 0;
    }
    else {
        return func(i - 1); /* W0556 */
    }
}

6.460.4 関連メッセージ

  • W0555 この関数はプロジェクト中で間接的に再帰呼び出しされています。

6.460.5 対応バージョン

1.0.0


Next: , Previous: W0556, Up: Messages

6.461 W0559

6.461.1 メッセージ本文

`!' 演算子のオペランドが算術演算あるいはビット演算の式になっています。

6.461.2 内容

正しい単項演算子の使い方をしていません。ビット単位の論理積 `&' または論理和 `|' を使用すべきです。

6.461.3 サンプルコード

int func(int a, int b)
{
    if (!(a || b)) {
        return 0;
    }
    else {
        return !(a & b); /* W0559 */
    }
}

6.461.4 関連メッセージ

  • W0560 `~' 演算子のオペランドがブール型式になっています。

6.461.5 対応バージョン

1.0.0


Next: , Previous: W0559, Up: Messages

6.462 W0560

6.462.1 メッセージ本文

`~' 演算子のオペランドがブール型式になっています。

6.462.2 内容

正しい単項演算子の使い方をしていません。論理否定演算子 `!' を使用すべきです。

6.462.3 サンプルコード

int func(int a, int b)
{
    return ~((a < b) && (b > 0)); /* W0560 */
}

6.462.4 関連メッセージ

  • W0559 `!' 演算子のオペランドが算術演算あるいはビット演算の式になっています。

6.462.5 対応バージョン

1.0.0


Next: , Previous: W0560, Up: Messages

6.463 W0561

6.463.1 メッセージ本文

`*p++' の意味は、`(*p)++' ではなく、`*(p++)' です。`*' 演算子は冗長です。

6.463.2 内容

プログラムの動作に寄与しない文の具体例としてサンプルコードの例が挙げられます。 この文は *(p++) と同義になるため、p++ とした場合と処理結果は変わりません。 従って * 演算子が冗長といえます。冗長な記述が削除されずにコード中に残ることで解析性が低下します。

6.463.3 サンプルコード

*p++; /* W0561 */

6.463.4 関連メッセージ

なし。

6.463.5 対応バージョン

1.0.0


Next: , Previous: W0561, Up: Messages

6.464 W0562

6.464.1 メッセージ本文

初期化子の中に余分な `{}' があります。

6.464.2 内容

ここでの余分な波括弧とは、配列の初期化子でいうとサンプルコードの配列 ng における外側から一つ内側にある波括弧です。 このような波括弧は冗長であり、配列要素の数を変えるときなどに修正ミスを生じやすくさせます。

6.464.3 サンプルコード

int ng[3][2] = { { {1, 2}, { 3, 4}, { 5, 6 } } }; /* W0562 */

int ok[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* OK */

6.464.4 関連メッセージ

なし。

6.464.5 対応バージョン

1.0.0


Next: , Previous: W0562, Up: Messages

6.465 W0563

6.465.1 メッセージ本文

このブロックの外側からラベル `%s' へジャンプした場合、ローカル変数は初期化されません。

6.465.2 内容

不定値を使うことで予期しない動作を引き起こす可能性があります。

6.465.3 サンプルコード

void func(int a, int b)
{
    if (a == 0) {
        if (b != 0) {
            goto ERR;
        }
    }
    else {
        int c = 0;
    ERR:  /* W0563 */
        b = c;
    }
}

6.465.4 関連メッセージ

  • W0564 この goto 文がラベル `%s' へジャンプした場合、ローカル変数は初期化されません。

6.465.5 対応バージョン

1.0.0


Next: , Previous: W0563, Up: Messages

6.466 W0564

6.466.1 メッセージ本文

この goto 文がラベル `%s' へジャンプした場合、ローカル変数は初期化されません。

6.466.2 内容

不定値を使うことで予期しない動作を引き起こす可能性があります。

6.466.3 サンプルコード

void func(int a, int b)
{
    if (a == 0) {
        int c = 0;
    RETRY:
        b = c;
    }

    if (b != 0) {
        goto RETRY; /* W0564 */
    }
}

6.466.4 関連メッセージ

  • W0563 このブロックの外側からラベル `%s' へジャンプした場合、ローカル変数は初期化されません。

6.466.5 対応バージョン

1.0.0


Next: , Previous: W0564, Up: Messages

6.467 W0565

6.467.1 メッセージ本文

汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。

6.467.2 内容

このようなキャストの動作は処理系定義のため移植性が低下します。

6.467.3 サンプルコード

unsigned int a = 0xFFFFU;
volatile unsigned int *b = (volatile unsigned int *) a; /* W0565 */
unsigned int c = (unsigned int) b; /* W0565 */

6.467.4 関連メッセージ

  • W0566 汎整数型を関数ポインタ型(またはその逆)へキャストしています。
  • W0567 汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。

6.467.5 対応バージョン

1.0.0


Next: , Previous: W0565, Up: Messages

6.468 W0566

6.468.1 メッセージ本文

汎整数型を関数ポインタ型(またはその逆)へキャストしています。

6.468.2 内容

このようなキャストの動作は処理系定義のため移植性が低下します。

6.468.3 サンプルコード

unsigned int addr = 0xFFFFFFFFU;
void (*p)(int, long) = (void (*)(int, long)) addr; /* W0566 */
int i = (int) p; /* W0566 */

6.468.4 関連メッセージ

  • W0565 汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。
  • W0567 汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。

6.468.5 対応バージョン

1.0.0


Next: , Previous: W0566, Up: Messages

6.469 W0567

6.469.1 メッセージ本文

汎整数型をオブジェクトを指すポインタ(あるいはその逆)へキャストしています。

6.469.2 内容

このようなキャストの動作は処理系定義のため移植性が低下します。

6.469.3 サンプルコード

unsigned int addr = 0xFFFFFFFFU;
void (*p)(int, long) = (void (*)(int, long)) addr; /* W0567 */
int i = (int) p; /* W0567 */

6.469.4 関連メッセージ

  • W0565 汎整数型を volatile ポインタ型(あるいはその逆)へキャストしています。
  • W0566 汎整数型を関数ポインタ型(またはその逆)へキャストしています。

6.469.5 対応バージョン

1.0.0


Next: , Previous: W0567, Up: Messages

6.470 W0568

6.470.1 メッセージ本文

符号付き定数式の値を左シフト演算した結果は、未定義になります。

6.470.2 内容

このようなシフト演算は処理系定義のため移植性が低下します。

6.470.3 サンプルコード

int a = 0x7FFFFFFF << 1; /* W0568 */
int b = -5 << 1; /* W0568 */

6.470.4 関連メッセージ

  • W0569 符号付きの式の値を左シフト演算した結果は、未定義になります。
  • W0570 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.470.5 対応バージョン

1.0.0


Next: , Previous: W0568, Up: Messages

6.471 W0569

6.471.1 メッセージ本文

符号付きの式の値を左シフト演算した結果は、未定義になります。

6.471.2 内容

このようなシフト演算は処理系定義のため移植性が低下します。

6.471.3 サンプルコード

int func(int a)
{
    if (a >= 0x40000000) {
        return a << 1; /* W0569 */
    }

    if (a < 0) {
        return a << 1; /* W0569 */
    }

    return a << 1;
}

6.471.4 関連メッセージ

  • W0568 符号付き定数式の値を左シフト演算した結果は、未定義になります。
  • W0570 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.471.5 対応バージョン

1.0.0


Next: , Previous: W0569, Up: Messages

6.472 W0570

6.472.1 メッセージ本文

符号付きの式の値を左シフト演算した結果は、未定義になることがあります。

6.472.2 内容

このようなシフト演算は処理系定義のため移植性が低下します。

6.472.3 サンプルコード

int func(int a)
{
    if (a >= 0x10000000) {
        return a << 1; /* W0570 */
    }

    if (a < 10) {
        return a << 1; /* W0570 */
    }

    return a << 1;
}

6.472.4 関連メッセージ

  • W0568 符号付き定数式の値を左シフト演算した結果は、未定義になります。
  • W0569 符号付きの式の値を左シフト演算した結果は、未定義になります。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.472.5 対応バージョン

1.0.0


Next: , Previous: W0570, Up: Messages

6.473 W0571

6.473.1 メッセージ本文

符号付きデータの右シフト演算には、処理系によって論理シフトと算術シフトの両方の可能性があります。

6.473.2 内容

このような符号付き型の演算は、符号ビットがゼロになる(論理シフト)場合と符号ビットを複製したものに置き換わる(算術シフト)場合があり、 どちらになるかは処理系定義のため移植性が低下します。

6.473.3 サンプルコード

int func(int a)
{
    return a >> 3; /* W0571 */
}

6.473.4 関連メッセージ

  • W0572 符号付きのデータに対するビット演算は処理系定義の結果になります。

6.473.5 対応バージョン

1.0.0


Next: , Previous: W0571, Up: Messages

6.474 W0572

6.474.1 メッセージ本文

符号付きのデータに対するビット演算は処理系定義の結果になります。

6.474.2 内容

このような符号付き型の演算は、符号ビットがゼロになる(論理シフト)場合と符号ビットを複製したものに置き換わる(算術シフト)場合があり、 どちらになるかは処理系定義のため移植性が低下します。

6.474.3 サンプルコード

void func(short a)
{
    short b;

    b = a >> 8; /* W0572 */
    b <<= 1; /* W0572 */
    b = a & 15; /* W0572 */
    b = a | 15; /* W0572 */
    b = a ^ 15; /* W0572 */
    b = ~a; /* W0572 */
}

6.474.4 関連メッセージ

  • W0571 符号付きデータの右シフト演算には、処理系によって論理シフトと算術シフトの両方の可能性があります。

6.474.5 対応バージョン

1.0.0


Next: , Previous: W0572, Up: Messages

6.475 W0573

6.475.1 メッセージ本文

`[]' 内の走査セットの `-' 文字は、処理系定義になります。

6.475.2 内容

このような変換指定子の動作は処理系定義のため移植性が低下します。

6.475.3 サンプルコード

char c;
scanf("%[a-z]", &c); /* W0573 */

6.475.4 関連メッセージ

なし。

6.475.5 対応バージョン

1.6.0


Next: , Previous: W0573, Up: Messages

6.476 W0574

6.476.1 メッセージ本文

基本ソース文字集合に含まれない文字が、文字定数の中で使われています。

6.476.2 内容

基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。

6.476.3 サンプルコード

const char c = '$'; /* W0574 */

6.476.4 関連メッセージ

  • W0575 基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。
  • W0576 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。
  • W0577 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。

6.476.5 対応バージョン

1.0.0


Next: , Previous: W0574, Up: Messages

6.477 W0575

6.477.1 メッセージ本文

基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。

6.477.2 内容

基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。

6.477.3 サンプルコード

const char *str = "@$"; /* W0575 */

6.477.4 関連メッセージ

  • W0574 基本ソース文字集合に含まれない文字が、文字定数の中で使われています。
  • W0576 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。
  • W0577 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。

6.477.5 対応バージョン

1.0.0


Next: , Previous: W0575, Up: Messages

6.478 W0576

6.478.1 メッセージ本文

基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。

6.478.2 内容

基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。

6.478.3 サンプルコード

/* $ W0576 */

6.478.4 関連メッセージ

  • W0574 基本ソース文字集合に含まれない文字が、文字定数の中で使われています。
  • W0575 基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。
  • W0577 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。

6.478.5 対応バージョン

1.0.0


Next: , Previous: W0576, Up: Messages

6.479 W0577

6.479.1 メッセージ本文

基本ソース文字集合に含まれない文字が、ソースファイル `%s' のこの前処理指令の中で使われています。

6.479.2 内容

基本ソース文字集合以外の文字の処理は処理系定義のため移植性が低下します。

6.479.3 サンプルコード

#define MACRO $ /* W0577 */

6.479.4 関連メッセージ

  • W0574 基本ソース文字集合に含まれない文字が、文字定数の中で使われています。
  • W0575 基本ソース文字集合に含まれない文字が、文字列リテラルの中で使われています。
  • W0576 基本ソース文字集合に含まれない文字が、ソースファイル `%s' のコメントの中で使われています。

6.479.5 対応バージョン

1.0.0


Next: , Previous: W0577, Up: Messages

6.480 W0578

6.480.1 メッセージ本文

暗黙的に汎整数型 `%s' の複合式からより大きな型 `%s' に型変換されています。

6.480.2 内容

サンプルコードの関数では int 型変数 a の 2 乗した値が int 型の範囲に収まらないことを想定して long 型変数 b へ代入しています。 しかし、環境によっては a * a の演算はいったん int 型として結果を出したあとに b へ代入される場合があります。その場合、a の値によっては情報の損失が起こります。

6.480.3 サンプルコード

void func(int a)
{
    long b = a * a; /* W0578 */
}

6.480.4 関連メッセージ

なし。

6.480.5 対応バージョン

1.0.0


Next: , Previous: W0578, Up: Messages

6.481 W0579

6.481.1 メッセージ本文

汎整数型 `%s' の複合式を、より大きな型 `%s' にキャストしています。

6.481.2 内容

サンプルコードの関数では int 型変数 a の 2 乗した値が int 型の範囲に収まらないことを想定して long 型変数 b へ代入しています。 しかし、環境によっては a * a の演算はいったん int 型として結果を出したあとに b へ代入される場合があります。その場合、a の値によっては情報の損失が起こります。

6.481.3 サンプルコード

void func(int a)
{
    long b = (long) (a * a); /* W0579 */
}

6.481.4 関連メッセージ

なし。

6.481.5 対応バージョン

1.6.0


Next: , Previous: W0579, Up: Messages

6.482 W0580

6.482.1 メッセージ本文

ローカルな静的変数のアドレスが、より長い寿命を持つポインタに代入されています。

6.482.2 内容

ローカルで static な変数のアドレスが、結合またはより広いスコープを持つポインタに代入されています。 静的記憶域期間を持つため、危険ではありませんが、データ隠蔽の原則に反します。

6.482.3 サンプルコード

int *p;

void func(void)
{
    static int i = 0;

    p = &i; /* W0580 */
}

6.482.4 関連メッセージ

なし。

6.482.5 対応バージョン

1.0.0


Next: , Previous: W0580, Up: Messages

6.483 W0581

6.483.1 メッセージ本文

実引数の個数か型が、この関数の以前の使用時と異なります。

6.483.2 内容

足りない引数がある場合は補われますが、値は不定になります。 従って、その不定値を使用する部分の処理に不具合が生じる危険性が高いといえます。

6.483.3 サンプルコード

int func(int a, short b, long c)
{
    switch (a) {
    case 0:
        return foo(a, b, c);
    case 1:
        return foo(a, c, b); /* W0581 */
    default:
        return foo(b, c); /* W0581 */
    }
}

6.483.4 関連メッセージ

  • W0582 実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。
  • W0583 実引数の個数か型が、この後で見つかる関数定義と異なります。
  • W0584 %s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。

6.483.5 対応バージョン

1.0.0


Next: , Previous: W0581, Up: Messages

6.484 W0582

6.484.1 メッセージ本文

実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。

6.484.2 内容

足りない引数がある場合は補われますが、値は不定になります。 従って、その不定値を使用する部分の処理に不具合が生じる危険性が高いといえます。

6.484.3 サンプルコード

int func(int a, short b, long c)
{
    switch (a) {
    case 0:
        return foo(a, b, c);
    case 1:
        return foo(a, c, b); /* W0582 */
    default:
        return foo(b, c); /* W0582 */
    }
}

extern int foo(int, short, long);

6.484.4 関連メッセージ

  • W0581 実引数の個数か型が、この関数の以前の使用時と異なります。
  • W0583 実引数の個数か型が、この後で見つかる関数定義と異なります。
  • W0584 %s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。

6.484.5 対応バージョン

1.0.0


Next: , Previous: W0582, Up: Messages

6.485 W0583

6.485.1 メッセージ本文

実引数の個数か型が、この後で見つかる関数定義と異なります。

6.485.2 内容

足りない引数がある場合は補われますが、値は不定になります。 従って、その不定値を使用する部分の処理に不具合が生じる危険性が高いといえます。

6.485.3 サンプルコード

int func(int a, short b, long c)
{
    switch (a) {
    case 0:
        return foo(a, b, c);
    case 1:
        return foo(a, c, b); /* W0583 */
    default:
        return foo(b, c); /* W0583 */
    }
}

int foo(int a, short b, long c)
{
    return a + b + c;
}

6.485.4 関連メッセージ

  • W0581 実引数の個数か型が、この関数の以前の使用時と異なります。
  • W0582 実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。
  • W0584 %s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。

6.485.5 対応バージョン

1.0.0


Next: , Previous: W0583, Up: Messages

6.486 W0584

6.486.1 メッセージ本文

%s 番目の実引数の型が、関数定義の中の仮引数の型と異なります。

6.486.2 内容

実引数の型と仮引数の型が異なる場合、値が暗黙的に変換されます。

6.486.3 サンプルコード

extern void func1(a, b)
long a;
double b;
{
    ...snip...
}

void func2(void)
{
    int a = 0;
    long b = 0;

    func1(a, b); /* W0584 */
}

6.486.4 関連メッセージ

  • W0581 実引数の個数か型が、この関数の以前の使用時と異なります。
  • W0582 実引数の個数か型が、この後で見つかる関数プロトタイプ宣言と異なります。
  • W0583 実引数の個数か型が、この後で見つかる関数定義と異なります。

6.486.5 対応バージョン

1.0.0


Next: , Previous: W0584, Up: Messages

6.487 W0585

6.487.1 メッセージ本文

制御変数 `%s' はインクリメント式に現れません。

6.487.2 内容

ループ変数の増分を増分式で行わずにループ本体中で行うとループの仕様がわかりにくくなります。

6.487.3 サンプルコード

int i, j;

for (i = j = 0; i < 10; j++) { /* W0585 */
    i++;
}

6.487.4 関連メッセージ

なし。

6.487.5 対応バージョン

1.0.0


Next: , Previous: W0585, Up: Messages

6.488 W0586

6.488.1 メッセージ本文

typedef`%s' が二つ以上の場所で宣言されています。

6.488.2 内容

typedef 名はリンケージを持ちません。同一の typedef を複数宣言しても、それらの typedef 名は別物として扱われます。 これは非常に紛らわしく、コードの可読性を低下させます。

6.488.3 サンプルコード

test1.c

typedef int *INT_PTR; /* W0586 */

void func1(INT_PTR)
{
    ...snip...
}

test2.c

typedef int *INT_PTR; /* W0586 */

void func2(INT_PTR)
{
    ...snip...
}

6.488.4 関連メッセージ

なし。

6.488.5 対応バージョン

1.0.0


Next: , Previous: W0586, Up: Messages

6.489 W0589

6.489.1 メッセージ本文

オブジェクト `%s' は、定義されている翻訳単位の内の、関数 `%s' のみから参照されています。

6.489.2 内容

グローバルな可視性を持ちながら、局所的な参照をされています。グローバルなオブジェクトの数が多いと、プログラム全体を理解する場合の可読性が減少します。

6.489.3 サンプルコード

test1.c

void func1(void) /* W0589 & W0591 */
{
    ...snip...
}

void func2(void)
{
    func1();
}

test2.c

extern void func2(void);

void func3(void)
{
    func2();
}

6.489.4 関連メッセージ

なし。

6.489.5 対応バージョン

1.0.0


Next: , Previous: W0589, Up: Messages

6.490 W0591

6.490.1 メッセージ本文

関数 `%s' は、定義されている翻訳単位の内でのみ参照されています。

6.490.2 内容

グローバルな関数の数が多いと、プログラム全体を理解する場合の可読性が減少します。

6.490.3 サンプルコード

test1.c

void func1(void) /* W0589 & W0591 */
{
    ...snip...
}

void func2(void)
{
    func1();
}

test2.c

extern void func2(void);

void func3(void)
{
    func2();
}

6.490.4 関連メッセージ

なし。

6.490.5 対応バージョン

1.0.0


Next: , Previous: W0591, Up: Messages

6.491 W0593

6.491.1 メッセージ本文

オブジェクト `%s' は、定義されている翻訳単位の中でのみ参照されています。

6.491.2 内容

グローバルなオブジェクトの数が多いと、プログラム全体を理解する場合の可読性が減少します。

6.491.3 サンプルコード

test1.c

int a = 100; /* W0593 */

void func1(void)
{
    a += 1;
}

void func2(void)
{
    func1();
    a += 2;
}

test2.c

extern void func2(void);

void func3(void)
{
    func2();
}

6.491.4 関連メッセージ

なし。

6.491.5 対応バージョン

1.0.0


Next: , Previous: W0593, Up: Messages

6.492 W0597

6.492.1 メッセージ本文

副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。

6.492.2 内容

同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。

6.492.3 サンプルコード

extern int bar(int *);
extern int baz(const int *);

void foo(int a, int b)
{
    a = b * a++; /* W0597 */
    a = bar(&a) * a++; /* W0597 */
    b = bar(&a) * (a++ + --a); /* W0597, W0599 */
}

6.492.4 関連メッセージ

  • W0598 副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。
  • W0599 副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。
  • W0600 副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。

6.492.5 対応バージョン

1.2.0


Next: , Previous: W0597, Up: Messages

6.493 W0598

6.493.1 メッセージ本文

副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。

6.493.2 内容

同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。

6.493.3 サンプルコード

extern int bar(int *);
extern int baz(const int *);

void foo(int a, int b)
{
    b = bar(&a) * a++; /* W0598 */
    b = bar(&a) + bar(&a); /* W0598 */
    b = bar(&a) + baz(&a); /* W0600 */
    b = baz(&a) + baz(&a);
}

6.493.4 関連メッセージ

  • W0597 副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。
  • W0599 副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。
  • W0600 副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。

6.493.5 対応バージョン

1.2.0


Next: , Previous: W0598, Up: Messages

6.494 W0599

6.494.1 メッセージ本文

副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。

6.494.2 内容

同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。

6.494.3 サンプルコード

extern void bar(int, int, int);

void foo(int a, int b, int *c)
{
    b = (a + 1) + a++; /* W0599 */
    b = c[a] + c[++a]; /* W0599 */
    bar(a, a++, c[a]); /* W0599 */
    bar(a, a, c[a++]); /* W0599 */
    a = a + b;
    c[a] = a++ + b; /* W0599 */
}

6.494.4 関連メッセージ

  • W0597 副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。
  • W0598 副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。
  • W0600 副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。

6.494.5 対応バージョン

1.2.0


Next: , Previous: W0599, Up: Messages

6.495 W0600

6.495.1 メッセージ本文

副作用完了点の間で `%s' が変えられ、参照される可能性があります。評価順序は未定義です。

6.495.2 内容

同一の変数が副作用完了点の間に 2 度以上アクセスされた場合、その評価順序は ISO 規格では未定義のため、予期しない動作が生じる可能性があります。

6.495.3 サンプルコード

extern int bar(int *);
extern int baz(const int *);

void foo(int a, int b)
{
    b = bar(&a) * a; /* W0600 */
    b = baz(&a) * a;
}

6.495.4 関連メッセージ

  • W0597 副作用完了点の間で `%s' が二回以上変更されています。評価順序は未定義です。
  • W0598 副作用完了点の間で `%s' が二回以上変更される可能性があります。評価順序は未定義です。
  • W0599 副作用完了点の間で `%s' が変えられ、参照されています。評価順序は未定義です。

6.495.5 対応バージョン

1.2.0


Next: , Previous: W0600, Up: Messages

6.496 W0605

6.496.1 メッセージ本文

繰り返し文を終了させる目的で、break 文が二つ以上使用されています。

6.496.2 内容

繰り返し文で複数の break 文が使用されている場合、コードの構造が複雑になり、 構造化定理(「順次」「反復」「分岐」)に基づいたコードで実現できる保守性に関するメリットを損ないます。

6.496.3 サンプルコード

while (n > 0) {
    if (n == 1) {
        break;
    }

    if (n == 2) {
        break; /* W0605 */
    }
}

6.496.4 関連メッセージ

なし。

6.496.5 対応バージョン

1.0.0


Next: , Previous: W0605, Up: Messages

6.497 W0606

6.497.1 メッセージ本文

共用体に浮動小数点型のメンバがあります。

6.497.2 内容

浮動小数点型のメンバ変数に対して共用体を使ってビット単位でアクセスする場合の動作はコンパイラ依存なので、移植性を低下させます。

6.497.3 サンプルコード

union UNI { /* W0606 */
    float a;
    int b;
};

6.497.4 関連メッセージ

なし。

6.497.5 対応バージョン

1.4.0


Next: , Previous: W0606, Up: Messages

6.498 W0607

6.498.1 メッセージ本文

値が負になる整数式が符号無し型に変換されています。

6.498.2 内容

明らかに負になることが明らかな整数は、負の数として扱われることが想定されます。 そのような値が符号無し型に変換されることで意図しない動作を引き起こす可能性があります。

6.498.3 サンプルコード

void func(int a)
{
    if (a < 0) {
        unsigned int b = (unsigned int) a; /* W0607 */
    }
}

6.498.4 関連メッセージ

  • W0608 値が負になることがありうる整数式が符号無し型に変換されています。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.498.5 対応バージョン

1.8.0


Next: , Previous: W0607, Up: Messages

6.499 W0608

6.499.1 メッセージ本文

値が負になることがありうる整数式が符号無し型に変換されています。

6.499.2 内容

明らかに負になることが明らかな整数は、負の数として扱われることが想定されます。 そのような値が符号無し型に変換されることで意図しない動作を引き起こす可能性があります。

6.499.3 サンプルコード

void fuu(int a)
{
    unsigned char b;

    if (a < 256) {
        b = (unsigned char) a; /* W0608 */
    }
}

6.499.4 関連メッセージ

  • W0607 値が負になる整数式が符号無し型に変換されています。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.499.5 対応バージョン

1.8.0


Next: , Previous: W0608, Up: Messages

6.500 W0609

6.500.1 メッセージ本文

この論理演算の結果は常に真になります。

6.500.2 内容

処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。

6.500.3 サンプルコード

void func(int a)
{
    if (a < 0) {
        if (a != 0) { /* W0609 */
            ...snip...
        }
    }
}

6.500.4 関連メッセージ

  • W0610 この論理演算の結果は常に偽になります。
  • W0611 この繰り返し文の制御式の値は常に真です。
  • W0612 この if 条件式の値は常に真です。
  • W0613 この制御式の値は常に偽になります。
  • W0614 この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。

6.500.5 対応バージョン

1.0.0


Next: , Previous: W0609, Up: Messages

6.501 W0610

6.501.1 メッセージ本文

この論理演算の結果は常に偽になります。

6.501.2 内容

処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。

6.501.3 サンプルコード

void func(int a)
{
    if (a < 0) {
        if (a == 0) { /* W0610 */
        }
    }
}

6.501.4 関連メッセージ

  • W0609 この論理演算の結果は常に真になります。
  • W0611 この繰り返し文の制御式の値は常に真です。
  • W0612 この if 条件式の値は常に真です。
  • W0613 この制御式の値は常に偽になります。
  • W0614 この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。

6.501.5 対応バージョン

1.0.0


Next: , Previous: W0610, Up: Messages

6.502 W0611

6.502.1 メッセージ本文

この繰り返し文の制御式の値は常に真です。

6.502.2 内容

処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。

6.502.3 サンプルコード

void func(int a)
{
    if ( a > 0 ) {
        while (a != 0) { /* W0611 */
            ...snip...
        }
    }
}

6.502.4 関連メッセージ

  • W0609 この論理演算の結果は常に真になります。
  • W0610 この論理演算の結果は常に偽になります。
  • W0612 この if 条件式の値は常に真です。
  • W0613 この制御式の値は常に偽になります。
  • W0614 この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。

6.502.5 対応バージョン

1.0.0


Next: , Previous: W0611, Up: Messages

6.503 W0612

6.503.1 メッセージ本文

この if 条件式の値は常に真です。

6.503.2 内容

処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。

6.503.3 サンプルコード

int i;

for (i = 0; i < 10; i++) {
    if (i < 20) { /* W0612 */
        ...snip...
    }
}

6.503.4 関連メッセージ

  • W0609 この論理演算の結果は常に真になります。
  • W0610 この論理演算の結果は常に偽になります。
  • W0611 この繰り返し文の制御式の値は常に真です。
  • W0613 この制御式の値は常に偽になります。
  • W0614 この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。

6.503.5 対応バージョン

1.0.0


Next: , Previous: W0612, Up: Messages

6.504 W0613

6.504.1 メッセージ本文

この制御式の値は常に偽になります。

6.504.2 内容

処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。また、不必要な処理がある場合は、コードが冗長になります。

6.504.3 サンプルコード

int i;

for (i = 0; i < 10; i++) {
    if (i > 10) { /* W0613 */
        ...snip...
    }
}

6.504.4 関連メッセージ

  • W0609 この論理演算の結果は常に真になります。
  • W0610 この論理演算の結果は常に偽になります。
  • W0611 この繰り返し文の制御式の値は常に真です。
  • W0612 この if 条件式の値は常に真です。
  • W0614 この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。

6.504.5 対応バージョン

1.0.0


Next: , Previous: W0613, Up: Messages

6.505 W0614

6.505.1 メッセージ本文

この `do-while' 制御式の値は常に偽になります。繰り返し文の本体は一回のみ実行されます。

6.505.2 内容

処理フローが意図通りであるか不明確で、混乱を招く可能性があります。 意図通りでない場合、コードの信頼性が疑われます。 また、不必要な処理がある場合は、コードが冗長になります。

6.505.3 サンプルコード

void func(int a)
{
    if (a == 0) {
        do {
        } while (a > 0); /* W0614 */
    }
}

6.505.4 関連メッセージ

  • W0609 この論理演算の結果は常に真になります。
  • W0610 この論理演算の結果は常に偽になります。
  • W0611 この繰り返し文の制御式の値は常に真です。
  • W0612 この if 条件式の値は常に真です。
  • W0613 この制御式の値は常に偽になります。

6.505.5 対応バージョン

1.0.0


Next: , Previous: W0614, Up: Messages

6.506 W0622

6.506.1 メッセージ本文

関数がブロックスコープ内で宣言されています。

6.506.2 内容

この関数は、ファイルスコープ内で宣言されるべきです。このような記述は解析性を低下させます。

6.506.3 サンプルコード

int func1(void)
{
    extern int func2(void); /* W0622 */
}

6.506.4 関連メッセージ

なし。

6.506.5 対応バージョン

1.0.0


Next: , Previous: W0622, Up: Messages

6.507 W0623

6.507.1 メッセージ本文

外部結合のオブジェクトが、ブロックスコープ内で宣言されています。

6.507.2 内容

このオブジェクトは、ファイルスコープ内で宣言されるべきです。このような記述は解析性を低下させます。

6.507.3 サンプルコード

int func(void)
{
    extern int i; /* W0623 */
}

6.507.4 関連メッセージ

なし。

6.507.5 対応バージョン

1.0.0


Next: , Previous: W0623, Up: Messages

6.508 W0624

6.508.1 メッセージ本文

#define あるいは #undef がブロックの中に存在します。

6.508.2 内容

#define#undef は、ファイルスコープ内で宣言されるべきです。このような記述は解析性を低下させます。

6.508.3 サンプルコード

#define MACRO 0

int foo(void)
{
#if defined(MACRO)
#undef MACRO    /* W0624 */
#define MACRO 1 /* W0624 */
#endif

    return MACRO;
}

6.508.4 関連メッセージ

なし。

6.508.5 対応バージョン

1.0.0


Next: , Previous: W0624, Up: Messages

6.509 W0625

6.509.1 メッセージ本文

外部結合の定義または宣言の中で `%s' が使われていますが、その typedef がヘッダファイルの中で宣言されていません。

6.509.2 内容

typedef 宣言はヘッダファイル内でのみ行うべきです。このような記述は保守性を低下させます。

6.509.3 サンプルコード

typedef int *INT_PTR; /* W0625 */

extern INT_PTR func(void);

INT_PTR func(void)
{
    return 0;
}

6.509.4 関連メッセージ

なし。

6.509.5 対応バージョン

1.8.0


Next: , Previous: W0625, Up: Messages

6.510 W0626

6.510.1 メッセージ本文

ワイド文字またはワイド文字列リテラルが使われています。

6.510.2 内容

ワイド文字またはワイド文字列リテラルを使用するコードは実行環境のロケールに依存 することになります。

6.510.3 サンプルコード

const wchar_t a = L'あ'; /* W0626 */

6.510.4 関連メッセージ

なし。

6.510.5 対応バージョン

1.0.0


Next: , Previous: W0626, Up: Messages

6.511 W0627

6.511.1 メッセージ本文

一行に、空文(`;' だけの文)が、他のコードの後にあります。

6.511.2 内容

他の文と空文が 1 行で書かれている場合、空文の意図が不明確になります。

6.511.3 サンプルコード

if (0); /* W0627 */
{
    ...snip...
}

6.511.4 関連メッセージ

なし。

6.511.5 対応バージョン

1.0.0


Next: , Previous: W0627, Up: Messages

6.512 W0628

6.512.1 メッセージ本文

関数 `%s' が定義されていますが、このプロジェクトでは使われていません。

6.512.2 内容

使用されていない関数は無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。

6.512.3 サンプルコード

test1.c

int func1(void)
{
    return 0;
}

void func2(void) /* W0628 */
{
    ...snip...
}

test2.c

extern int func1(void);

int main(void)
{
    return func1();
}

6.512.4 関連メッセージ

  • W0629 static 関数 `%s()' は、この翻訳単位の中で使われていません。

6.512.5 対応バージョン

1.0.0


Next: , Previous: W0628, Up: Messages

6.513 W0629

6.513.1 メッセージ本文

static 関数 `%s()' は、この翻訳単位の中で使われていません。

6.513.2 内容

使用されていない関数は無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。

6.513.3 サンプルコード

static int func1(void) /* W0629 */
{
    return 1;
}

int func2(void)
{
    return 1;
}

6.513.4 関連メッセージ

  • W0628 関数 `%s' が定義されていますが、このプロジェクトでは使われていません。

6.513.5 対応バージョン

1.0.0


Next: , Previous: W0629, Up: Messages

6.514 W0632

6.514.1 メッセージ本文

`#include <%s>' の中で ' や " 文字を使うと、未定義の動作になります。

6.514.2 内容

`''、`"' または `/*' を #include 文で使用すると、未定義の動作になります。

6.514.3 サンプルコード

#include <NG'_header.h> /* W0632 */

6.514.4 関連メッセージ

  • W0633 `#include "%s"' の中で ' 文字を使うと、未定義の動作になります。
  • W0634 `#include' 行の中で `\' を使っています。パス区切り文字としては `/' を勧めます。

6.514.5 対応バージョン

1.8.0


Next: , Previous: W0632, Up: Messages

6.515 W0633

6.515.1 メッセージ本文

`#include "%s"' の中で ' 文字を使うと、未定義の動作になります。

6.515.2 内容

`'' を #include 文で使用すると、未定義の動作になります。

6.515.3 サンプルコード

#include "NG'_header.h" /* W0633 */

6.515.4 関連メッセージ

  • W0632 `#include <%s>' の中で ' や " 文字を使うと、未定義の動作になります。
  • W0634 `#include' 行の中で `\' を使っています。パス区切り文字としては `/' を勧めます。

6.515.5 対応バージョン

1.8.0


Next: , Previous: W0633, Up: Messages

6.516 W0634

6.516.1 メッセージ本文

`#include' 行の中で `\' を使っています。パス区切り文字としては `/' を勧めます。

6.516.2 内容

\ は PC 環境におけるパス区切り文字であり、#include 文で使用することで移植性を損ないます。

6.516.3 サンプルコード

#include "..\ng\header.h" /* W0634 */
#include "..\\ng\\header.h" /* W0634 */

6.516.4 関連メッセージ

  • W0632 `#include <%s>' の中で ' や " 文字を使うと、未定義の動作になります。
  • W0633 `#include "%s"' の中で ' 文字を使うと、未定義の動作になります。

6.516.5 対応バージョン

1.8.0


Next: , Previous: W0634, Up: Messages

6.517 W0635

6.517.1 メッセージ本文

%s 番目の変換指定子と、対応する実引数の型が合いません。

6.517.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.517.3 サンプルコード

void func(int a)
{
    printf("Apple %f\n", a); /* W0635 */
}

6.517.4 関連メッセージ

  • W0636 %s 番目の変換指定子に対応する実引数が存在しません。
  • W0637 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。
  • W0638 この関数呼び出しには、少なくとも一つの実引数が必要です。
  • W0639 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0640 scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。

6.517.5 対応バージョン

1.0.0


Next: , Previous: W0635, Up: Messages

6.518 W0636

6.518.1 メッセージ本文

%s 番目の変換指定子に対応する実引数が存在しません。

6.518.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.518.3 サンプルコード

void func(int a, int b, int c)
{
    printf("Banana %d, %d, %d\n", a, b); /* W0636 */
}

6.518.4 関連メッセージ

  • W0635 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0637 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。
  • W0638 この関数呼び出しには、少なくとも一つの実引数が必要です。
  • W0639 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0640 scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。

6.518.5 対応バージョン

1.0.0


Next: , Previous: W0636, Up: Messages

6.519 W0637

6.519.1 メッセージ本文

関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。

6.519.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.519.3 サンプルコード

void func(int a, int b)
{
    printf("Orange %d\n", a, b); /* W0637 */
}

6.519.4 関連メッセージ

  • W0635 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0636 %s 番目の変換指定子に対応する実引数が存在しません。
  • W0638 この関数呼び出しには、少なくとも一つの実引数が必要です。
  • W0639 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0640 scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。

6.519.5 対応バージョン

1.0.0


Next: , Previous: W0637, Up: Messages

6.520 W0638

6.520.1 メッセージ本文

この関数呼び出しには、少なくとも一つの実引数が必要です。

6.520.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.520.3 サンプルコード

printf(); /* W0638 */

6.520.4 関連メッセージ

  • W0635 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0636 %s 番目の変換指定子に対応する実引数が存在しません。
  • W0637 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。
  • W0639 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0640 scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。

6.520.5 対応バージョン

1.0.0


Next: , Previous: W0638, Up: Messages

6.521 W0639

6.521.1 メッセージ本文

%s 番目の変換指定子と、対応する実引数の型が合いません。

6.521.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.521.3 サンプルコード

int a;

scanf("%f",  &a); /* W0639 */

6.521.4 関連メッセージ

  • W0635 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0636 %s 番目の変換指定子に対応する実引数が存在しません。
  • W0637 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。
  • W0638 この関数呼び出しには、少なくとも一つの実引数が必要です。
  • W0640 scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。

6.521.5 対応バージョン

1.0.0


Next: , Previous: W0639, Up: Messages

6.522 W0640

6.522.1 メッセージ本文

scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。

6.522.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.522.3 サンプルコード

int a;

fscanf(stdin, "%d", a); /* W0640 */

6.522.4 関連メッセージ

  • W0635 %s 番目の変換指定子と、対応する実引数の型が合いません。
  • W0636 %s 番目の変換指定子に対応する実引数が存在しません。
  • W0637 関数呼び出しに、変換指定子の数よりも多くの実引数が存在します。
  • W0638 この関数呼び出しには、少なくとも一つの実引数が必要です。
  • W0639 %s 番目の変換指定子と、対応する実引数の型が合いません。

6.522.5 対応バージョン

1.0.0


Next: , Previous: W0640, Up: Messages

6.523 W0641

6.523.1 メッセージ本文

浮動小数点数型をオブジェクトへのポインタ(あるいはその逆)へキャストしています。

6.523.2 内容

このようなキャストは未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.523.3 サンプルコード

int *foo(const float f)
{
    return (int *) f; /* W0641 */
}

6.523.4 関連メッセージ

なし。

6.523.5 対応バージョン

1.18.0


Next: , Previous: W0641, Up: Messages

6.524 W0642

6.524.1 メッセージ本文

register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。

6.524.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.524.3 サンプルコード

void func(void)
{
    register int a[3];

    int *p1 = a; /* W0642 */
    int *p2 = &a[1]; /* W0642 */
}

6.524.4 関連メッセージ

  • W0643 このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
  • W0644 void 式の値を使用しようとしています。void 式は値をもちません。
  • W0645 仮引数の型には、void 型を使うことができません。
  • W0646 通常の文字列リテラルとワイド文字列リテラルが隣接しています。

6.524.5 対応バージョン

1.8.0


Next: , Previous: W0642, Up: Messages

6.525 W0643

6.525.1 メッセージ本文

このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。

6.525.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.525.3 サンプルコード

#define MACRO(x) #x
const char *str = MACRO(foo\); /* W0643 */

6.525.4 関連メッセージ

  • W0642 register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
  • W0644 void 式の値を使用しようとしています。void 式は値をもちません。
  • W0645 仮引数の型には、void 型を使うことができません。
  • W0646 通常の文字列リテラルとワイド文字列リテラルが隣接しています。

6.525.5 対応バージョン

1.16.0


Next: , Previous: W0643, Up: Messages

6.526 W0644

6.526.1 メッセージ本文

void 式の値を使用しようとしています。void 式は値をもちません。

6.526.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.526.3 サンプルコード

extern void foo(void);

int bar(void)
{
    return (int) foo(); /* W0644 */
}

6.526.4 関連メッセージ

  • W0642 register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
  • W0643 このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
  • W0645 仮引数の型には、void 型を使うことができません。
  • W0646 通常の文字列リテラルとワイド文字列リテラルが隣接しています。

6.526.5 対応バージョン

1.18.0


Next: , Previous: W0644, Up: Messages

6.527 W0645

6.527.1 メッセージ本文

仮引数の型には、void 型を使うことができません。

6.527.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.527.3 サンプルコード

extern void func(a) /* W0645 */
void a;
{
}

6.527.4 関連メッセージ

  • W0642 register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
  • W0643 このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
  • W0644 void 式の値を使用しようとしています。void 式は値をもちません。
  • W0646 通常の文字列リテラルとワイド文字列リテラルが隣接しています。

6.527.5 対応バージョン

1.14.0


Next: , Previous: W0645, Up: Messages

6.528 W0646

6.528.1 メッセージ本文

通常の文字列リテラルとワイド文字列リテラルが隣接しています。

6.528.2 内容

未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.528.3 サンプルコード

static const char *str = "foo" L"bar"; /* W0646 */

6.528.4 関連メッセージ

  • W0642 register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
  • W0643 このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
  • W0644 void 式の値を使用しようとしています。void 式は値をもちません。
  • W0645 仮引数の型には、void 型を使うことができません。

6.528.5 対応バージョン

1.16.0


Next: , Previous: W0646, Up: Messages

6.529 W0649

6.529.1 メッセージ本文

シフト演算子の右オペランドの値が負の定数です。結果は未定義になります。

6.529.2 内容

このようなシフト演算は未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.529.3 サンプルコード

int foo(int i)
{
    return i << -1; /* W0649 */
}

6.529.4 関連メッセージ

  • W0650 シフト演算子の右オペランドの値が左オペランドの型 `%s' で表されるビット数に対して大きすぎます。結果は未定義になります。

6.529.5 対応バージョン

1.18.0


Next: , Previous: W0649, Up: Messages

6.530 W0650

6.530.1 メッセージ本文

シフト演算子の右オペランドの値が左オペランドの型 `%s' で表されるビット数に対して大きすぎます。結果は未定義になります。

6.530.2 内容

このようなシフト演算は未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.530.3 サンプルコード

unsigned int foo(unsigned int i)
{
    return i << 32; /* W0650 */
}

6.530.4 関連メッセージ

  • W0649 シフト演算子の右オペランドの値が負の定数です。結果は未定義になります。

6.530.5 対応バージョン

1.18.0


Next: , Previous: W0650, Up: Messages

6.531 W0653

6.531.1 メッセージ本文

配列、構造体あるいは共用体の初期値が `{}' で囲まれていません。

6.531.2 内容

適合しない型の変数を用いて、構造体や共用体を初期化することは ISO C90 で未定義なので、 予期しない動作を引き起こす可能性があります。

6.531.3 サンプルコード

struct ST {
    int i;
};

int a[3] = 0; /* W0653 */
struct ST s = 0; /* W0653 */

6.531.4 関連メッセージ

  • W0654 構造体あるいは共用体の初期化子は、同じ構造体型あるいは共用体型の値でなければなりません。

6.531.5 対応バージョン

1.0.0


Next: , Previous: W0653, Up: Messages

6.532 W0654

6.532.1 メッセージ本文

構造体あるいは共用体の初期化子は、同じ構造体型あるいは共用体型の値でなければなりません。

6.532.2 内容

適合しない型の変数を用いて、構造体や共用体を初期化することは ISO C90 で未定義なので、 予期しない動作を引き起こす可能性があります。

6.532.3 サンプルコード

struct A {
    int i;
};

struct B {
    int j;
};

struct A a = { 0 };
struct B b = a; /* W0654 */

6.532.4 関連メッセージ

  • W0653 配列、構造体あるいは共用体の初期値が `{}' で囲まれていません。

6.532.5 対応バージョン

1.0.0


Next: , Previous: W0654, Up: Messages

6.533 W0655

6.533.1 メッセージ本文

サイズが未定義のビットフィールド式です。

6.533.2 内容

ビットフィールド式に対して sizeof 演算子を使用することは無意味です。

6.533.3 サンプルコード

struct ST {
    unsigned int a:2;
    unsigned int b:4;
};

void func(void)
{
    struct ST s = { 0 };
    int i = sizeof(s.a); /* W0655 */
}

6.533.4 関連メッセージ

  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.533.5 対応バージョン

1.0.0


Next: , Previous: W0655, Up: Messages

6.534 W0656

6.534.1 メッセージ本文

%s 番目の変換指定子は、ISO C 標準規格でサポートされません。

6.534.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.534.3 サンプルコード

void func(int count)
{
    printf("There are %Ld apples\n", count); /* W0656 */
}

6.534.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.534.5 対応バージョン

1.0.0


Next: , Previous: W0656, Up: Messages

6.535 W0657

6.535.1 メッセージ本文

%s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。

6.535.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.535.3 サンプルコード

void func(int count)
{
    printf("There are %Ld apples\n", count); /* W0657 */
}

6.535.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.535.5 対応バージョン

1.0.0


Next: , Previous: W0657, Up: Messages

6.536 W0658

6.536.1 メッセージ本文

%s 番目の変換指定子 `o' に無効なフラグが使われています。

6.536.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.536.3 サンプルコード

void func(unsigned int count)
{
    printf("There are %Lo apples\n", count); /* W0658 */
}

6.536.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.536.5 対応バージョン

1.0.0


Next: , Previous: W0658, Up: Messages

6.537 W0659

6.537.1 メッセージ本文

%s 番目の変換指定子 `u' に無効なフラグが使われています。

6.537.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.537.3 サンプルコード

void func(unsigned int count)
{
    printf("There are %Lu apples\n", count); /* W0659 */
}

6.537.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.537.5 対応バージョン

1.0.0


Next: , Previous: W0659, Up: Messages

6.538 W0660

6.538.1 メッセージ本文

%s 番目の変換指定子 `x' に無効なフラグが使われています。

6.538.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.538.3 サンプルコード

void func(unsigned int count)
{
    printf("There are %Lx apples\n", count); /* W0660 */
}

6.538.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.538.5 対応バージョン

1.0.0


Next: , Previous: W0660, Up: Messages

6.539 W0661

6.539.1 メッセージ本文

%s 番目の変換指定子 `X' に無効なフラグが使われています。

6.539.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.539.3 サンプルコード

void func(unsigned int count)
{
    printf("There are %LX apples\n", count); /* W0661 */
}

6.539.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.539.5 対応バージョン

1.0.0


Next: , Previous: W0661, Up: Messages

6.540 W0662

6.540.1 メッセージ本文

%s 番目の変換指定子 `f' に無効なフラグが使われています。

6.540.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.540.3 サンプルコード

void func(double count)
{
    printf("There are %lf apples\n", count); /* W0662 */
}

6.540.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.540.5 対応バージョン

1.0.0


Next: , Previous: W0662, Up: Messages

6.541 W0663

6.541.1 メッセージ本文

%s 番目の変換指定子 `e' に無効なフラグが使われています。

6.541.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.541.3 サンプルコード

void func(double count)
{
    printf("There are %le apples\n", count); /* W0663 */
}

6.541.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.541.5 対応バージョン

1.0.0


Next: , Previous: W0663, Up: Messages

6.542 W0664

6.542.1 メッセージ本文

%s 番目の変換指定子 `E' に無効なフラグが使われています。

6.542.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.542.3 サンプルコード

void func(double count)
{
    printf("There are %lE apples\n", count); /* W0664 */
}

6.542.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.542.5 対応バージョン

1.0.0


Next: , Previous: W0664, Up: Messages

6.543 W0665

6.543.1 メッセージ本文

%s 番目の変換指定子 `g' に無効なフラグが使われています。

6.543.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.543.3 サンプルコード

void func(double count)
{
    printf("There are %lg apples\n", count); /* W0665 */
}

6.543.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.543.5 対応バージョン

1.0.0


Next: , Previous: W0665, Up: Messages

6.544 W0666

6.544.1 メッセージ本文

%s 番目の変換指定子 `G' に無効なフラグが使われています。

6.544.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.544.3 サンプルコード

void func(double count)
{
    printf("There are %lG apples\n", count); /* W0666 */
}

6.544.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.544.5 対応バージョン

1.0.0


Next: , Previous: W0666, Up: Messages

6.545 W0667

6.545.1 メッセージ本文

%s 番目の変換指定子 `c' に無効なフラグが使われています。

6.545.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.545.3 サンプルコード

void func(char count)
{
    printf("There are %hc apples\n", count); /* W0667 */
}

6.545.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.545.5 対応バージョン

1.0.0


Next: , Previous: W0667, Up: Messages

6.546 W0668

6.546.1 メッセージ本文

%s 番目の変換指定子 `%' に無効なフラグが使われています。

6.546.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.546.3 サンプルコード

void func(double percent)
{
    printf("There is %f%l% apple juice\n", percent); /* W0668 */
}

6.546.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.546.5 対応バージョン

1.0.0


Next: , Previous: W0668, Up: Messages

6.547 W0669

6.547.1 メッセージ本文

%s 番目の変換指定子 `s' に無効なフラグが使われています。

6.547.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.547.3 サンプルコード

void func(char *s)
{
    printf("There are %hs apples\n", s); /* W0669 */
}

6.547.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.547.5 対応バージョン

1.0.0


Next: , Previous: W0669, Up: Messages

6.548 W0670

6.548.1 メッセージ本文

%s 番目の変換指定子 `n' に無効なフラグが使われています。

6.548.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.548.3 サンプルコード

void func(void)
{
    int n;

    printf("There are %Ln apples\n", &n); /* W0670 */
}

6.548.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.548.5 対応バージョン

1.0.0


Next: , Previous: W0670, Up: Messages

6.549 W0671

6.549.1 メッセージ本文

%s 番目の変換指定子 `p' に無効なフラグが使われています。

6.549.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.549.3 サンプルコード

void func(char *p)
{
    printf("p points to %lp\n", p); /* W0671 */
}

6.549.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.549.5 対応バージョン

1.0.0


Next: , Previous: W0671, Up: Messages

6.550 W0672

6.550.1 メッセージ本文

%s 番目に無効な変換指定子が使われています。

6.550.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.550.3 サンプルコード

void func(void)
{
    int a;

    printf("%0", &a); /* W0672 */
}

6.550.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.550.5 対応バージョン

1.0.0


Next: , Previous: W0672, Up: Messages

6.551 W0673

6.551.1 メッセージ本文

%s 番目の変換指定子は、ISO C 標準規格でサポートされません。

6.551.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.551.3 サンプルコード

void func(void)
{
    int a;

    scanf("%y", &a); /* W0673 */
}

6.551.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.551.5 対応バージョン

1.0.0


Next: , Previous: W0673, Up: Messages

6.552 W0674

6.552.1 メッセージ本文

%s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。

6.552.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.552.3 サンプルコード

void func(void)
{
    int a;

    scanf("%Ld", &a); /* W0674 */
}

6.552.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.552.5 対応バージョン

1.0.0


Next: , Previous: W0674, Up: Messages

6.553 W0675

6.553.1 メッセージ本文

%s 番目の変換指定子 `o' に無効なフラグが使われています。

6.553.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.553.3 サンプルコード

void func(void)
{
    int a;

    scanf("%Lo", &a); /* W0675 */
}

6.553.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.553.5 対応バージョン

1.0.0


Next: , Previous: W0675, Up: Messages

6.554 W0676

6.554.1 メッセージ本文

%s 番目の変換指定子 `u' に無効なフラグが使われています。

6.554.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.554.3 サンプルコード

void func(void)
{
    int a;

    scanf("%Lu", &a); /* W0676 */
}

6.554.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.554.5 対応バージョン

1.0.0


Next: , Previous: W0676, Up: Messages

6.555 W0677

6.555.1 メッセージ本文

%s 番目の変換指定子 `x/X' に無効なフラグが使われています。

6.555.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.555.3 サンプルコード

void func(void)
{
    int a;

    scanf("%Lx", &a); /* W0677 */
}

6.555.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.555.5 対応バージョン

1.0.0


Next: , Previous: W0677, Up: Messages

6.556 W0678

6.556.1 メッセージ本文

%s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。

6.556.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.556.3 サンプルコード

void func(void)
{
    double a;

    scanf("%lle", &a); /* W0678 */
}

6.556.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.556.5 対応バージョン

1.0.0


Next: , Previous: W0678, Up: Messages

6.557 W0679

6.557.1 メッセージ本文

%s 番目の変換指定子 `s' に無効なフラグが使われています。

6.557.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.557.3 サンプルコード

void func(void)
{
    char a[256];

    scanf("%lls", a); /* W0679 */
}

6.557.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.557.5 対応バージョン

1.0.0


Next: , Previous: W0679, Up: Messages

6.558 W0680

6.558.1 メッセージ本文

%s 番目の変換指定子 `p' に無効なフラグが使われています。

6.558.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.558.3 サンプルコード

void func(void)
{
    void *a;

    scanf("%lp", &a); /* W0680 */
}

6.558.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.558.5 対応バージョン

1.0.0


Next: , Previous: W0680, Up: Messages

6.559 W0681

6.559.1 メッセージ本文

%s 番目の変換指定子 `%' に無効なフラグが使われています。

6.559.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.559.3 サンプルコード

void func(void)
{
    int a;

    scanf("%d%l%", &a); /* W0681 */
}

6.559.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.559.5 対応バージョン

1.0.0


Next: , Previous: W0681, Up: Messages

6.560 W0682

6.560.1 メッセージ本文

%s 番目の変換指定子 `[' に無効なフラグが使われています。

6.560.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.560.3 サンプルコード

void func(void)
{
    char buf[256];

    scanf("%L[0-9]", buf); /* W0682 */
}

6.560.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.560.5 対応バージョン

1.0.0


Next: , Previous: W0682, Up: Messages

6.561 W0683

6.561.1 メッセージ本文

%s 番目の変換指定子 `c' に無効なフラグが使われています。

6.561.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.561.3 サンプルコード

void func(void)
{
    char a;

    scanf("%Lc", &a); /* W0683 */
}

6.561.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.561.5 対応バージョン

1.0.0


Next: , Previous: W0683, Up: Messages

6.562 W0684

6.562.1 メッセージ本文

%s 番目に無効な変換指定子が使われています。

6.562.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.562.3 サンプルコード

void func(void)
{
    long a;

    scanf("%l", &a); /* W0684 */
}

6.562.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.562.5 対応バージョン

1.0.0


Next: , Previous: W0684, Up: Messages

6.563 W0685

6.563.1 メッセージ本文

`[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。

6.563.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.563.3 サンプルコード

char c;
scanf("%[z-a]", &c); /* W0685 */

6.563.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0686 走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.563.5 対応バージョン

1.6.0


Next: , Previous: W0685, Up: Messages

6.564 W0686

6.564.1 メッセージ本文

走査セット(`[]' に囲まれた文字の並び)の中に同じ文字が二つ以上記述されています。

6.564.2 内容

未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.564.3 サンプルコード

char c;
scanf("%[abcda]", &c); /* W0686 */

6.564.4 関連メッセージ

  • W0655 サイズが未定義のビットフィールド式です。
  • W0656 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0657 %s 番目の変換指定子 `i' あるいは 'd' に無効なフラグが使われています。
  • W0658 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0659 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0660 %s 番目の変換指定子 `x' に無効なフラグが使われています。
  • W0661 %s 番目の変換指定子 `X' に無効なフラグが使われています。
  • W0662 %s 番目の変換指定子 `f' に無効なフラグが使われています。
  • W0663 %s 番目の変換指定子 `e' に無効なフラグが使われています。
  • W0664 %s 番目の変換指定子 `E' に無効なフラグが使われています。
  • W0665 %s 番目の変換指定子 `g' に無効なフラグが使われています。
  • W0666 %s 番目の変換指定子 `G' に無効なフラグが使われています。
  • W0667 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0668 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0669 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0670 %s 番目の変換指定子 `n' に無効なフラグが使われています。
  • W0671 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0672 %s 番目に無効な変換指定子が使われています。
  • W0673 %s 番目の変換指定子は、ISO C 標準規格でサポートされません。
  • W0674 %s 番目の変換指定子 `d/i/n' に無効なフラグが使われています。
  • W0675 %s 番目の変換指定子 `o' に無効なフラグが使われています。
  • W0676 %s 番目の変換指定子 `u' に無効なフラグが使われています。
  • W0677 %s 番目の変換指定子 `x/X' に無効なフラグが使われています。
  • W0678 %s 番目の変換指定子 `e/E/f/g/G' に無効なフラグが使われています。
  • W0679 %s 番目の変換指定子 `s' に無効なフラグが使われています。
  • W0680 %s 番目の変換指定子 `p' に無効なフラグが使われています。
  • W0681 %s 番目の変換指定子 `%' に無効なフラグが使われています。
  • W0682 %s 番目の変換指定子 `[' に無効なフラグが使われています。
  • W0683 %s 番目の変換指定子 `c' に無効なフラグが使われています。
  • W0684 %s 番目に無効な変換指定子が使われています。
  • W0685 `[]' の走査セット内の `-' の前にある文字が `-' の後にある文字より大きいです。

6.564.5 対応バージョン

1.6.0


Next: , Previous: W0686, Up: Messages

6.565 W0687

6.565.1 メッセージ本文

defined 演算子を削除する目的で #undef を使っています。

6.565.2 内容

このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.565.3 サンプルコード

#undef defined /* W0687 */

6.565.4 関連メッセージ

  • W0688 #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。
  • W0689 #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。
  • W0690 #line 指令の後に行番号が記述されていません。
  • W0691 `##' 演算子の結果が有効な前処理字句ではありません。

6.565.5 対応バージョン

1.4.0


Next: , Previous: W0687, Up: Messages

6.566 W0688

6.566.1 メッセージ本文

#line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。

6.566.2 内容

このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.566.3 サンプルコード

#line 35000 "test.c" /* W0688 */

6.566.4 関連メッセージ

  • W0687 defined 演算子を削除する目的で #undef を使っています。
  • W0689 #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。
  • W0690 #line 指令の後に行番号が記述されていません。
  • W0691 `##' 演算子の結果が有効な前処理字句ではありません。

6.566.5 対応バージョン

1.2.0


Next: , Previous: W0688, Up: Messages

6.567 W0689

6.567.1 メッセージ本文

#line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。

6.567.2 内容

このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.567.3 サンプルコード

#line 35 * 100 /* W0689 */
#line 35 * 100 "test.c" /* W0689 */
#line 35 L"あいう.c" /* W0689 */
#line __FILE__ 35 /* W0689 */

6.567.4 関連メッセージ

  • W0687 defined 演算子を削除する目的で #undef を使っています。
  • W0688 #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。
  • W0690 #line 指令の後に行番号が記述されていません。
  • W0691 `##' 演算子の結果が有効な前処理字句ではありません。

6.567.5 対応バージョン

1.2.0


Next: , Previous: W0689, Up: Messages

6.568 W0690

6.568.1 メッセージ本文

#line 指令の後に行番号が記述されていません。

6.568.2 内容

このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.568.3 サンプルコード

#line LINE1000 /* W0690 */
#line __FILE__ 35 /* W0690 */

6.568.4 関連メッセージ

  • W0687 defined 演算子を削除する目的で #undef を使っています。
  • W0688 #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。
  • W0689 #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。
  • W0691 `##' 演算子の結果が有効な前処理字句ではありません。

6.568.5 対応バージョン

1.2.0


Next: , Previous: W0690, Up: Messages

6.569 W0691

6.569.1 メッセージ本文

`##' 演算子の結果が有効な前処理字句ではありません。

6.569.2 内容

このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.569.3 サンプルコード

#define MACRO(a, b) a ## b

double d = (double) MACRO(-, 123); /* W0691 */

6.569.4 関連メッセージ

  • W0687 defined 演算子を削除する目的で #undef を使っています。
  • W0688 #line 指令の後に、1 から 32767 の範囲の行番号が記述されていません。
  • W0689 #line 指令の構文が `#line 汎整数定数 "文字列"' の形式と合っていません。
  • W0690 #line 指令の後に行番号が記述されていません。

6.569.5 対応バージョン

1.16.0


Next: , Previous: W0691, Up: Messages

6.570 W0692

6.570.1 メッセージ本文

関数形式マクロ `%s' に実引数が与えられていません。

6.570.2 内容

このような記述は ISO C99 のみで使用可能なので、移植性を低下させます。

6.570.3 サンプルコード

#define MACRO(a) #a

const char *s = (char *) MACRO(); /* W0692 */

6.570.4 関連メッセージ

  • W0693 関数形式マクロがその定義よりも少ない実引数で呼び出されています。

6.570.5 対応バージョン

1.16.0


Next: , Previous: W0692, Up: Messages

6.571 W0693

6.571.1 メッセージ本文

関数形式マクロがその定義よりも少ない実引数で呼び出されています。

6.571.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

このような記述は、言語制約違反になりますので、移植性を低下させます。

6.571.3 サンプルコード

/* 追記予定 */

6.571.4 関連メッセージ

  • W0692 関数形式マクロ `%s' に実引数が与えられていません。

6.571.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W0693, Up: Messages

6.572 W0694

6.572.1 メッセージ本文

`assert' という名称の関数を呼び出す目的で、assert マクロが抑制されています。未定義の結果になります。

6.572.2 内容

assert という名前の関数を作成すると、未定義の結果になります。

6.572.3 サンプルコード

#undef assert
extern void assert(int);

void foo(void)
{
    assert("should not be reached" == ""); /* W0694 */
}

6.572.4 関連メッセージ

なし。

6.572.5 対応バージョン

1.16.0


Next: , Previous: W0694, Up: Messages

6.573 W0695

6.573.1 メッセージ本文

assert マクロを #undef してその名前の関数を呼び出しできるようにすると、未定義の結果になります。

6.573.2 内容

assert マクロの定義解消や再定義は、未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。

6.573.3 サンプルコード

#undef assert /* W0695 */
extern void assert(int a);

6.573.4 関連メッセージ

なし。

6.573.5 対応バージョン

1.4.0


Next: , Previous: W0695, Up: Messages

6.574 W0696

6.574.1 メッセージ本文

この `#if...' で使われているマクロ `%s' は定義されていません。

6.574.2 内容

通常、未定義マクロは 0 に置き換えられるため、未定義の動作というわけではありませんが、プリプロセッサに依存した処理といえますので、移植性を低下させます。 また、マクロが未定義であることはプログラマの意図しないことの可能性もあります。その場合は、動作上のバグにつながります。

6.574.3 サンプルコード

#define MACRO (1)

#if MACRO == 1
    ...snip...
#endif

#undef MACRO

#if MACRO == 2 /* W0696 */
    ...snip...
#endif

6.574.4 関連メッセージ

なし。

6.574.5 対応バージョン

1.0.0


Next: , Previous: W0696, Up: Messages

6.575 W0697

6.575.1 メッセージ本文

戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。

6.575.2 内容

式を持たない return 文は不定値を返します。

6.575.3 サンプルコード

int func(int value) /* W0697 */
{
    if (value == 0) {
        return 0;
    }
    /* No return statement at the end of this function. */
}

6.575.4 関連メッセージ

  • W0698 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。
  • W0699 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。
  • W0700 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。

6.575.5 対応バージョン

1.14.0


Next: , Previous: W0697, Up: Messages

6.576 W0698

6.576.1 メッセージ本文

戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。

6.576.2 内容

式を持たない return 文は不定値を返します。

6.576.3 サンプルコード

int func(void)
{
    return; /* W0698 */
}

6.576.4 関連メッセージ

  • W0698 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。
  • W0699 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。
  • W0700 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。

6.576.5 対応バージョン

1.4.0


Next: , Previous: W0698, Up: Messages

6.577 W0699

6.577.1 メッセージ本文

関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。

6.577.2 内容

式を持たない return 文は不定値を返します。

6.577.3 サンプルコード

extern func(void)
{
    return; /* W0699 */
}

6.577.4 関連メッセージ

  • W0697 戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。
  • W0698 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。
  • W0700 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。

6.577.5 対応バージョン

1.4.0


Next: , Previous: W0699, Up: Messages

6.578 W0700

6.578.1 メッセージ本文

関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、値を戻す return 文がありません。

6.578.2 内容

式を持たない return 文は不定値を返します。

6.578.3 サンプルコード

extern func(void) /* W0700 */
{
}

6.578.4 関連メッセージ

  • W0697 戻り値を返すように定義された関数 `%s' の中に、暗黙の `return;' 文で終了するパスが存在します。
  • W0698 戻り値を返すように定義された関数 `%s' の中で、`return;' 文が見つかりました。
  • W0699 関数 `%s()' は、戻り値の型が明示されていないため、戻り値の型は暗黙的な int ですが、return 文に値を戻すための式が記述されていません。

6.578.5 対応バージョン

1.14.0


Next: , Previous: W0700, Up: Messages

6.579 W0703

6.579.1 メッセージ本文

タグ `%s' がより広い有効範囲をもつ同じ識別子の宣言を隠しています。

6.579.2 内容

ローカル変数がグローバル変数を隠蔽することで、ローカル領域でグローバル変数を使用している箇所が影響を受ける可能性があります。

6.579.3 サンプルコード

union FOO {
    ...snip...
};

void func(void)
{
    struct FOO { /* W0703 */
        ...snip...
    };
}

6.579.4 関連メッセージ

  • W0704 この `%s' の宣言は、より広い有効範囲をもつ同じ識別子の宣言を隠しています。

6.579.5 対応バージョン

1.0.0


Next: , Previous: W0703, Up: Messages

6.580 W0704

6.580.1 メッセージ本文

この `%s' の宣言は、より広い有効範囲をもつ同じ識別子の宣言を隠しています。

6.580.2 内容

ローカル変数がグローバル変数を隠蔽することで、ローカル領域でグローバル変数を使用している箇所が影響を受ける可能性があります。

6.580.3 サンプルコード

int a;

void func(void)
{
    double a; /* W0704 */
}

6.580.4 関連メッセージ

  • W0703 タグ `%s' がより広い有効範囲をもつ同じ識別子の宣言を隠しています。

6.580.5 対応バージョン

1.0.0


Next: , Previous: W0704, Up: Messages

6.581 W0705

6.581.1 メッセージ本文

配列の添字が領域外を指すことがあります。

6.581.2 内容

配列の領域外にアクセスする動作は未定義の動作になります。したがって予期しない動作を引き起こす可能性があります。

6.581.3 サンプルコード

void func(unsigned int a)
{
    int buf[10];

    if (a < 10) {
        buf[a] = 0;
    }

    ...snip...

    buf[a] = 5; /* W0705 */
}

6.581.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.581.5 対応バージョン

1.0.0


Next: , Previous: W0705, Up: Messages

6.582 W0707

6.582.1 メッセージ本文

配列の添字が領域外を指す定数です。

6.582.2 内容

配列の領域外にアクセスする動作は未定義の動作になります。したがって予期しない動作を引き起こす可能性があります。

6.582.3 サンプルコード

extern int a[5];

int foo(void)
{
    int i = a[5]; /* W0707 */
    return i;
}

6.582.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.582.5 対応バージョン

1.18.0


Next: , Previous: W0707, Up: Messages

6.583 W0708

6.583.1 メッセージ本文

for 文の制御変数 `%s' は繰り返し文本体の中で値を変えられています。

6.583.2 内容

ループ本体でループ制御変数を変更することが、すぐさま構造化定理に違反することにはなりませんが、 どのように反復するかを判断しにくくなり、修正やテスト時に混乱のもとになります。

6.583.3 サンプルコード

int i, j;

for (i = j = 0; i < 10; j++) {
    i++; /* W0708 */
}

6.583.4 関連メッセージ

なし。

6.583.5 対応バージョン

1.0.0


Next: , Previous: W0708, Up: Messages

6.584 W0711

6.584.1 メッセージ本文

関係演算子の右側のオペランドが実質的なブール型の式です。

6.584.2 内容

このような記述は誤りの可能性があります。

6.584.3 サンプルコード

int func(int a, int b, int c, int d)
{
    return (a + b) > (c > d); /* W0711 */
}

6.584.4 関連メッセージ

  • W0712 関係演算子の左側のオペランドが実質的なブール型の式です。
  • W0713 関係演算子の両側のオペランドが実質的なブール型の式です。

6.584.5 対応バージョン

1.8.0


Next: , Previous: W0711, Up: Messages

6.585 W0712

6.585.1 メッセージ本文

関係演算子の左側のオペランドが実質的なブール型の式です。

6.585.2 内容

このような記述は誤りの可能性があります。

6.585.3 サンプルコード

int func(int a, int b, int c, int d)
{
    return (a > b) > (c + d); /* W0712 */
}

6.585.4 関連メッセージ

  • W0711 関係演算子の右側のオペランドが実質的なブール型の式です。
  • W0713 関係演算子の両側のオペランドが実質的なブール型の式です。

6.585.5 対応バージョン

1.8.0


Next: , Previous: W0712, Up: Messages

6.586 W0713

6.586.1 メッセージ本文

関係演算子の両側のオペランドが実質的なブール型の式です。

6.586.2 内容

このような記述は誤りの可能性があります。

6.586.3 サンプルコード

int func(int a, int b, int c, int d)
{
    return (a > b) > (c > d); /* W0713 */
}

6.586.4 関連メッセージ

  • W0711 関係演算子の右側のオペランドが実質的なブール型の式です。
  • W0712 関係演算子の左側のオペランドが実質的なブール型の式です。

6.586.5 対応バージョン

1.8.0


Next: , Previous: W0713, Up: Messages

6.587 W0714

6.587.1 メッセージ本文

`&' 演算子の両側のオペランドが実質的なブール型の式です。

6.587.2 内容

このような記述は誤りの可能性があります。

6.587.3 サンプルコード

int func(int a, int b, int c, int d)
{
    return (a > b) & (c > d); /* W0714 */
}

6.587.4 関連メッセージ

  • W0715 `|' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0716 ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。
  • W0717 ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。
  • W0718 ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。

6.587.5 対応バージョン

1.8.0


Next: , Previous: W0714, Up: Messages

6.588 W0715

6.588.1 メッセージ本文

`|' 演算子の両側のオペランドが実質的なブール型の式です。

6.588.2 内容

このような記述は誤りの可能性があります。

6.588.3 サンプルコード

int func(int a, int b, int c, int d)
{
    return (a > b) | (c > d); /* W0715 */
}

6.588.4 関連メッセージ

  • W0714 `&' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0716 ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。
  • W0717 ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。
  • W0718 ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。

6.588.5 対応バージョン

1.8.0


Next: , Previous: W0715, Up: Messages

6.589 W0716

6.589.1 メッセージ本文

ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。

6.589.2 内容

このような記述は誤りの可能性があります。

6.589.3 サンプルコード

int func(int a, int b, int c, int d)
{
    return (a > b) + (c > d); /* W0716 */
}

6.589.4 関連メッセージ

  • W0714 `&' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0715 `|' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0717 ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。
  • W0718 ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。

6.589.5 対応バージョン

1.10.0


Next: , Previous: W0716, Up: Messages

6.590 W0717

6.590.1 メッセージ本文

ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。

6.590.2 内容

このような記述は誤りの可能性があります。

6.590.3 サンプルコード

int func(int a, int b, int c)
{
    return (a > b) + c; /* W0717 */
}

6.590.4 関連メッセージ

  • W0714 `&' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0715 `|' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0716 ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。
  • W0717 ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。

6.590.5 対応バージョン

1.10.0


Next: , Previous: W0717, Up: Messages

6.591 W0718

6.591.1 メッセージ本文

ビット演算子あるいは算術演算子の右側のオペランドが実質的なブール型の式です。

6.591.2 内容

このような記述は誤りの可能性があります。

6.591.3 サンプルコード

int func(int a, int b, int c)
{
    return a + (b > c);  /* W0718 */
}

6.591.4 関連メッセージ

  • W0714 `&' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0715 `|' 演算子の両側のオペランドが実質的なブール型の式です。
  • W0716 ビット演算子あるいは算術演算子の両側のオペランドが実質的なブール型の式です。
  • W0717 ビット演算子あるいは算術演算子の左側のオペランドが実質的なブール型の式です。

6.591.5 対応バージョン

1.10.0


Next: , Previous: W0718, Up: Messages

6.592 W0719

6.592.1 メッセージ本文

シフト演算子の右オペランドが、潜在型 `%s' のビット幅以上の定数値です。

6.592.2 内容

このようなシフト演算は汎整数拡張後の型の範囲を超えていないため、 未定義の動作にはなりませんが、 汎整数拡張が生じない型の変数への代入に変更した時点で未定義の動作になりますので、 潜在的な危険を伴います。

6.592.3 サンプルコード

int foo(char c)
{
    return c << 31; /* W0719 */
}

6.592.4 関連メッセージ

なし。

6.592.5 対応バージョン

1.18.0


Next: , Previous: W0719, Up: Messages

6.593 W0720

6.593.1 メッセージ本文

浮動小数点型の値が変換先の型の範囲に入りきりません。

6.593.2 内容

このような式は未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。

6.593.3 サンプルコード

signed char sc1 = (signed char) 127.5; /* OK */
signed char sc2 = (signed char) 128.5; /* W0720 */

signed char sc3 = (signed char) -128.5; /* OK */
signed char sc4 = (signed char) -129.5; /* W0720 */

6.593.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.593.5 対応バージョン

1.4.0


Next: , Previous: W0720, Up: Messages

6.594 W0721

6.594.1 メッセージ本文

この汎整数型は、ポインタの値を保持するのに十分な大きさをもちません。

6.594.2 内容

上記のような変換により、ポインタ型変数の一部の情報が欠落したものが整数型に代入されることになります。 したがって、代入先の値はもはや正しいアドレスを指していないことになります。

6.594.3 サンプルコード

void func(int *p)
{
    /* when short is 16 bit long and pointer is 32 bit long */
    unsigned short us = (unsigned short) p; /* W0721 */
}

6.594.4 関連メッセージ

なし。

6.594.5 対応バージョン

1.4.0


Next: , Previous: W0721, Up: Messages

6.595 W0722

6.595.1 メッセージ本文

符号付きの式の値がオーバーフローしています。

6.595.2 内容

値が型で表現可能な範囲を超えてしまう(オーバーフローする)と、どのような値が代入されるかは未定義です。 したがって、予期しない動作を引き起こす可能性があります。

6.595.3 サンプルコード

int func(int a)
{
    /* when int is 32 bit long */
    if (a < 0) {
        return a + 1; /* OK */
    }
    else if (a < 2147483647) {
        return a + 1; /* OK */
    }

    return a + 1; /* W0722 */
}

6.595.4 関連メッセージ

  • W0723 符号付きの式の値がオーバーフローする可能性があります。

6.595.5 対応バージョン

1.4.0


Next: , Previous: W0722, Up: Messages

6.596 W0723

6.596.1 メッセージ本文

符号付きの式の値がオーバーフローする可能性があります。

6.596.2 内容

値が型で表現可能な範囲を超えてしまう(オーバーフローする)と、どのような値が代入されるかは未定義です。 したがって、予期しない動作を引き起こす可能性があります。

6.596.3 サンプルコード

int func(int a)
{
    /* when int is 32 bit long */
    if (a < 0) {
        return a + 1; /* OK */
    }
    else if (a < 2000000000) {
        return a + 1; /* OK */
    }

    return a + 1; /* W0723 */
}

6.596.4 関連メッセージ

  • W0722 符号付きの式の値がオーバーフローしています。

6.596.5 対応バージョン

1.4.0


Next: , Previous: W0723, Up: Messages

6.597 W0724

6.597.1 メッセージ本文

条件付きインクルード指令によって、認識できない前処理指令が無視されました。

6.597.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

認識できない前処理指令を見つけたときの対処方法は処理系定義です。したがって、移植性が低下します。

6.597.3 サンプルコード

/* 追記予定 */

6.597.4 関連メッセージ

なし。

6.597.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W0724, Up: Messages

6.598 W0726

6.598.1 メッセージ本文

修飾子付き void 型の戻り値が定義された関数 `%s()' の中で、`return 式;' が見つかりました。

6.598.2 内容

値を戻してはならない関数であるにも関わらず、明示的な return 文があります。このような記述は誤りです。

6.598.3 サンプルコード

const void func(int a)
{
    if (a == 0) {
        return 0; /* W0726 */
    }
}

6.598.4 関連メッセージ

なし。

6.598.5 対応バージョン

1.4.0


Next: , Previous: W0726, Up: Messages

6.599 W0727

6.599.1 メッセージ本文

列挙型にない値を使っています。

6.599.2 内容

このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。

6.599.3 サンプルコード

enum Fruits {
    APPLE = 1,
    BANANA,
    ORANGE
};

enum Fruits fruit = 5; /* W0727 */

6.599.4 関連メッセージ

  • W0728 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。
  • W0729 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。
  • W0730 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。
  • W0731 switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。

6.599.5 対応バージョン

1.4.0


Next: , Previous: W0727, Up: Messages

6.600 W0728

6.600.1 メッセージ本文

列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。

6.600.2 内容

このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。

6.600.3 サンプルコード

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE };

extern void func1(enum Color);

void func2(void)
{
    func1(ORANGE); /* W0728 */
}

6.600.4 関連メッセージ

  • W0727 列挙型にない値を使っています。
  • W0729 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。
  • W0730 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。
  • W0731 switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。

6.600.5 対応バージョン

1.4.0


Next: , Previous: W0728, Up: Messages

6.601 W0729

6.601.1 メッセージ本文

列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。

6.601.2 内容

このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。

6.601.3 サンプルコード

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE };

void func(void)
{
    enum Color c;

    c = ORANGE; /* W0729 */
}

6.601.4 関連メッセージ

  • W0727 列挙型にない値を使っています。
  • W0728 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。
  • W0730 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。
  • W0731 switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。

6.601.5 対応バージョン

1.4.0


Next: , Previous: W0729, Up: Messages

6.602 W0730

6.602.1 メッセージ本文

列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。

6.602.2 内容

このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。

6.602.3 サンプルコード

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE };

enum Color func(void)
{
    return ORANGE; /* W0730 */
}

6.602.4 関連メッセージ

  • W0727 列挙型にない値を使っています。
  • W0728 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。
  • W0729 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。
  • W0731 switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。

6.602.5 対応バージョン

1.4.0


Next: , Previous: W0730, Up: Messages

6.603 W0731

6.603.1 メッセージ本文

switch 文の case ラベルの値 `%s' は制御式の列挙型に属していません。

6.603.2 内容

このような列挙型の使い方は文法的には合法ですが、本来の列挙型変数として使用されるべき情報を損失するという意味で問題があります。

6.603.3 サンプルコード

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE, GRAPE };

int func(enum Color c)
{
    switch (c) {
    case RED:
        return 1;
    case GRAPE: /* W0731 */
        return 2;
    }

    return 0;
}

6.603.4 関連メッセージ

  • W0727 列挙型にない値を使っています。
  • W0728 列挙型の関数仮引数に、別の列挙型の列挙定数が実引数として渡されています。
  • W0729 列挙型のオブジェクトに、別の列挙型の列挙定数が代入されています。
  • W0730 列挙型の戻り値が定義された関数で、別の列挙型の列挙定数が戻されています。

6.603.5 対応バージョン

1.4.0


Next: , Previous: W0731, Up: Messages

6.604 W0732

6.604.1 メッセージ本文

`&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。

6.604.2 内容

このような記述は誤りの可能性があります。

6.604.3 サンプルコード

extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d)
{
    int r;
    r = (a + b) && (c - d); /* W0732 */
    r = (a * b) && (c / d); /* W0732 */

    r = (a << b) && (c << d); /* W0732 */
    r = (a >> b) && (c >> d); /* W0732 */
}

6.604.4 関連メッセージ

  • W0733 `||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。
  • W0734 論理演算子の左側のオペランドがビット演算の式あるいは算術式です。
  • W0735 論理演算子の右側のオペランドがビット演算の式あるいは算術式です。

6.604.5 対応バージョン

1.12.0


Next: , Previous: W0732, Up: Messages

6.605 W0733

6.605.1 メッセージ本文

`||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。

6.605.2 内容

このような記述は誤りの可能性があります。

6.605.3 サンプルコード

extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d)
{
    int r;
    r = (a + b) || (c - d); /* W0733 */
    r = (a * b) || (c / d); /* W0733 */

    r = (a << b) || (c << d); /* W0733 */
    r = (a >> b) || (c >> d); /* W0733 */
}

6.605.4 関連メッセージ

  • W0732 `&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。
  • W0734 論理演算子の左側のオペランドがビット演算の式あるいは算術式です。
  • W0735 論理演算子の右側のオペランドがビット演算の式あるいは算術式です。

6.605.5 対応バージョン

1.12.0


Next: , Previous: W0733, Up: Messages

6.606 W0734

6.606.1 メッセージ本文

論理演算子の左側のオペランドがビット演算の式あるいは算術式です。

6.606.2 内容

このような記述は誤りの可能性があります。

6.606.3 サンプルコード

extern void func(unsigned int a, unsigned int b, unsigned int c)
{
    int r;
    r = (a + b) && c; /* W0734 */
    r = (a - b) && c; /* W0734 */

    r = (a << b) || c; /* W0734 */
    r = (a >> b) || c; /* W0734 */
}

6.606.4 関連メッセージ

  • W0732 `&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。
  • W0733 `||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。
  • W0735 論理演算子の右側のオペランドがビット演算の式あるいは算術式です。

6.606.5 対応バージョン

1.12.0


Next: , Previous: W0734, Up: Messages

6.607 W0735

6.607.1 メッセージ本文

論理演算子の右側のオペランドがビット演算の式あるいは算術式です。

6.607.2 内容

このような記述は誤りの可能性があります。

6.607.3 サンプルコード

extern void func(unsigned int a, unsigned int b, unsigned int c)
{
    int r;
    r = a && (b + c); /* W0735 */
    r = a && (b - c); /* W0735 */

    r = a || (b >> c); /* W0735 */
    r = a || (b << c); /* W0735 */
}

6.607.4 関連メッセージ

  • W0732 `&&' 演算子の両側のオペランドがビット演算の式あるいは算術式です。
  • W0733 `||' 演算子の両側のオペランドがビット演算の式あるいは算術式です。
  • W0734 論理演算子の左側のオペランドがビット演算の式あるいは算術式です。

6.607.5 対応バージョン

1.12.0


Next: , Previous: W0735, Up: Messages

6.608 W0736

6.608.1 メッセージ本文

ファイルスコープで宣言された静的変数 `%s' は 1 つの関数内でしか読み書きされていません。

6.608.2 内容

グローバル変数が、1 つの関数内でしか使用されていません。このような変数は、保守性を低下させます。

6.608.3 サンプルコード

static int a = 10; /* W0736 */

int func1(void)
{
    return 0;
}

int func2(void)
{
    return ++a;
}

6.608.4 関連メッセージ

なし。

6.608.5 対応バージョン

1.0.0


Next: , Previous: W0736, Up: Messages

6.609 W0737

6.609.1 メッセージ本文

`enum %s' の内容が不明です。列挙体タグが内容を指定せずに宣言されています。

6.609.2 内容

定義していない列挙体のタグを使用することは言語制約違反になります。したがって、移植性を低下させます。

6.609.3 サンプルコード

extern enum Foo foo; /* W0737 */

6.609.4 関連メッセージ

なし。

6.609.5 対応バージョン

1.4.0


Next: , Previous: W0737, Up: Messages

6.610 W0738

6.610.1 メッセージ本文

正の整数定数の値がより小さな符号無し型への暗黙の型変換を行ったため、切り捨てられます。

6.610.2 内容

値が型で表現可能な範囲を超えてしまう(オーバーフローする)ことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。

6.610.3 サンプルコード

/* when char is 8 bit long */
const unsigned char uc1 = 255; /* OK */
const unsigned char uc2 = 256; /* W0738 */

/* when int is 32 bit long */
const unsigned int ui1 = 4294967295; /* OK */
const unsigned int ui2 = 4294967296; /* W0738 */

6.610.4 関連メッセージ

なし。

6.610.5 対応バージョン

1.4.0


Next: , Previous: W0738, Up: Messages

6.611 W0739

6.611.1 メッセージ本文

定数式における符号無し減算の結果が負になりました。

6.611.2 内容

値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。

6.611.3 サンプルコード

const unsigned int ui1 = 3U - 3U; /* OK */
const unsigned int ui2 = 3U - 5U; /* W0739 */

6.611.4 関連メッセージ

  • W0740 定数式における符号無し加算の結果が最大値を超えました。
  • W0741 定数式における符号無し乗算の結果が最大値を超えました。

6.611.5 対応バージョン

1.4.0


Next: , Previous: W0739, Up: Messages

6.612 W0740

6.612.1 メッセージ本文

定数式における符号無し加算の結果が最大値を超えました。

6.612.2 内容

値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。

6.612.3 サンプルコード

/* when int is 32 bit long */
const unsigned int ui1 = 4294967294U + 1U; /* OK */
const unsigned int ui2 = 4294967295U + 1U; /* W0740 */

6.612.4 関連メッセージ

  • W0739 定数式における符号無し減算の結果が負になりました。
  • W0741 定数式における符号無し乗算の結果が最大値を超えました。

6.612.5 対応バージョン

1.4.0


Next: , Previous: W0740, Up: Messages

6.613 W0741

6.613.1 メッセージ本文

定数式における符号無し乗算の結果が最大値を超えました。

6.613.2 内容

値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。

6.613.3 サンプルコード

/* when int is 32 bit long */
const unsigned int ui1 = 2000000000U * 2U; /* OK */
const unsigned int ui2 = 3000000000U * 2U; /* W0741 */

6.613.4 関連メッセージ

  • W0739 定数式における符号無し減算の結果が負になりました。
  • W0740 定数式における符号無し加算の結果が最大値を超えました。

6.613.5 対応バージョン

1.4.0


Next: , Previous: W0741, Up: Messages

6.614 W0742

6.614.1 メッセージ本文

負の整数定数式が符号無し型に変換されています。

6.614.2 内容

この変換は文法的に問題ありませんが、プログラマの意図どおりでない可能性が高いです。

6.614.3 サンプルコード

#define MACRO (50)

unsigned int ui;

ui = MACRO - 100; /* W0742 */

6.614.4 関連メッセージ

なし。

6.614.5 対応バージョン

1.0.0


Next: , Previous: W0742, Up: Messages

6.615 W0743

6.615.1 メッセージ本文

整数定数式の値は、変換先の符号付きの結果の型で表現できる範囲を超えています。

6.615.2 内容

値が型で表現可能な範囲を超えてしまうことで、代入先には元々の定数の値がそのまま入らなくなります。 つまり、プログラマの意図しない値が代入されることになり、不具合につながります。 また、このような処理は、動作が処理系定義になります。したがって、移植性を低下させます。

6.615.3 サンプルコード

/* when char is 8 bit long */
const signed char sc1 = 127; /* OK */
const signed char sc2 = 128; /* W0743 */

/* when int is 32 bit long */
const int si1 = 2147483647; /* OK */
const int si2 = 2147483648; /* W0743 */

6.615.4 関連メッセージ

なし。

6.615.5 対応バージョン

1.4.0


Next: , Previous: W0743, Up: Messages

6.616 W0744

6.616.1 メッセージ本文

この制御式の値は偽になる定数のため、制御文本体は実行されません。

6.616.2 内容

到達しないコードがあるため、信頼性が低下します。

6.616.3 サンプルコード

#define MACRO1 (0)
#define MACRO2 (1)

if (MACRO1 == MACRO2) { /* W0744 */
    ...snip...
}

6.616.4 関連メッセージ

なし。

6.616.5 対応バージョン

1.0.0


Next: , Previous: W0744, Up: Messages

6.617 W0745

6.617.1 メッセージ本文

配列の添字が、領域外を指しています。

6.617.2 内容

配列の領域外にアクセスする動作は未定義の動作になります。したがって予期しない動作を引き起こす可能性があります。

6.617.3 サンプルコード

void func(unsigned int a)
{
    int buf[10];

    if (a > 5 && a < 10) {
        buf[a + 5] = 0; /* W0745 */
    }
}

6.617.4 関連メッセージ

  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.617.5 対応バージョン

1.0.0


Next: , Previous: W0745, Up: Messages

6.618 W0747

6.618.1 メッセージ本文

暗黙的に signed short 型から signed char 型に型変換されています。

6.618.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.618.3 サンプルコード

extern void foo(signed char a);

void bar(short a)
{
    signed char b = a; /* W0747 */
    foo(a); /* W0747 */
}

6.618.4 関連メッセージ

  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.618.5 対応バージョン

1.0.0


Next: , Previous: W0747, Up: Messages

6.619 W0748

6.619.1 メッセージ本文

暗黙的に unsigned short 型から unsigned char 型に型変換されています。

6.619.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.619.3 サンプルコード

extern void foo(unsigned char a);

void bar(unsigned short a)
{
      unsigned char b = a; /* W0748 */
      foo(a); /* W0748 */
}

6.619.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.619.5 対応バージョン

1.0.0


Next: , Previous: W0748, Up: Messages

6.620 W0749

6.620.1 メッセージ本文

暗黙的に signed int 型から signed char 型に型変換されています。

6.620.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.620.3 サンプルコード

extern void foo(signed char a);

void bar(int a)
{
    signed char b = a; /* W0749 */
    foo(a); /* W0749 */
}

6.620.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.620.5 対応バージョン

1.0.0


Next: , Previous: W0749, Up: Messages

6.621 W0750

6.621.1 メッセージ本文

暗黙的に signed int 型から signed short 型に型変換されています。

6.621.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.621.3 サンプルコード

extern void foo(short a);

void bar(int a)
{
    short b = a; /* W0750 */
    foo(a); /* W0750 */
}

6.621.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.621.5 対応バージョン

1.0.0


Next: , Previous: W0750, Up: Messages

6.622 W0751

6.622.1 メッセージ本文

暗黙的に unsigned int 型から unsigned char 型に型変換されています。

6.622.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.622.3 サンプルコード

extern void foo(unsigned char a);

void bar(unsigned int a)
{
    unsigned char b = a; /* W0751 */
    foo(a); /* W0751 */
}

6.622.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.622.5 対応バージョン

1.0.0


Next: , Previous: W0751, Up: Messages

6.623 W0752

6.623.1 メッセージ本文

暗黙的に unsigned int 型から unsigned short 型に型変換されています。

6.623.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.623.3 サンプルコード

extern void foo(unsigned short a);

void bar(unsigned int a)
{
    unsigned short b = a; /* W0752 */
    foo(a); /* W0752 */
}

6.623.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.623.5 対応バージョン

1.0.0


Next: , Previous: W0752, Up: Messages

6.624 W0753

6.624.1 メッセージ本文

暗黙的に signed long 型から signed char 型に型変換されています。

6.624.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.624.3 サンプルコード

extern void foo(signed char a);

void bar(long a)
{
    signed char b = a; /* W0753 */
    foo(a); /* W0753 */
}

6.624.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.624.5 対応バージョン

1.0.0


Next: , Previous: W0753, Up: Messages

6.625 W0754

6.625.1 メッセージ本文

暗黙的に signed long 型から signed short 型に型変換されています。

6.625.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.625.3 サンプルコード

extern void foo(short a);

void bar(long a)
{
    short b = a; /* W0754 */
    foo(a); /* W0754 */
}

6.625.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.625.5 対応バージョン

1.0.0


Next: , Previous: W0754, Up: Messages

6.626 W0755

6.626.1 メッセージ本文

暗黙的に signed long 型から signed int 型に型変換されています。

6.626.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.626.3 サンプルコード

extern void foo(int a);

void bar(long a)
{
    int b = a; /* W0755 */
    foo(a); /* W0755 */
}

6.626.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.626.5 対応バージョン

1.0.0


Next: , Previous: W0755, Up: Messages

6.627 W0756

6.627.1 メッセージ本文

暗黙的に unsigned long 型から unsigned char 型に型変換されています。

6.627.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.627.3 サンプルコード

extern void foo(unsigned char a);

void bar(unsigned long a)
{
    unsigned char b = a; /* W0756 */
    foo(a); /* W0756 */
}

6.627.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.627.5 対応バージョン

1.0.0


Next: , Previous: W0756, Up: Messages

6.628 W0757

6.628.1 メッセージ本文

暗黙的に unsigned long 型から unsigned short 型に型変換されています。

6.628.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.628.3 サンプルコード

extern void foo(unsigned short a);

void bar(unsigned long a)
{
    unsigned short b = a; /* W0757 */
    foo(a); /* W0757 */
}

6.628.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.628.5 対応バージョン

1.0.0


Next: , Previous: W0757, Up: Messages

6.629 W0758

6.629.1 メッセージ本文

暗黙的に unsigned long 型から unsigned int 型に型変換されています。

6.629.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.629.3 サンプルコード

extern void foo(unsigned int a);

void bar(unsigned long a)
{
    unsigned int b = a; /* W0758 */
    foo(a); /* W0758 */
}

6.629.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.629.5 対応バージョン

1.0.0


Next: , Previous: W0758, Up: Messages

6.630 W0759

6.630.1 メッセージ本文

暗黙的に signed long long 型から signed char 型に型変換されています。

6.630.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.630.3 サンプルコード

extern void foo(signed char a);

void bar(long long a)
{
    signed char b = a; /* W0759 */
    foo(a); /* W0759 */
}

6.630.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.630.5 対応バージョン

1.0.0


Next: , Previous: W0759, Up: Messages

6.631 W0760

6.631.1 メッセージ本文

暗黙的に signed long long 型から signed short 型に型変換されています。

6.631.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.631.3 サンプルコード

extern void foo(short a);

void bar(long long a)
{
    short b = a; /* W0760 */
    foo(a); /* W0760 */
}

6.631.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.631.5 対応バージョン

1.0.0


Next: , Previous: W0760, Up: Messages

6.632 W0761

6.632.1 メッセージ本文

暗黙的に signed long long 型から signed int 型に型変換されています。

6.632.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.632.3 サンプルコード

extern void foo(int a);

void bar(long long a)
{
    int b = a; /* W0761 */
    foo(a); /* W0761 */
}

6.632.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.632.5 対応バージョン

1.0.0


Next: , Previous: W0761, Up: Messages

6.633 W0762

6.633.1 メッセージ本文

暗黙的に signed long long 型から signed long 型に型変換されています。

6.633.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.633.3 サンプルコード

extern void foo(long a);

void bar(long long a)
{
    long b = a; /* W0762 */
    foo(a); /* W0762 */
}

6.633.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.633.5 対応バージョン

1.0.0


Next: , Previous: W0762, Up: Messages

6.634 W0763

6.634.1 メッセージ本文

暗黙的に unsigned long long 型から unsigned char 型に型変換されています。

6.634.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.634.3 サンプルコード

extern void foo(unsigned char a);

void bar(unsigned long long a)
{
    unsigned char b = a; /* W0763 */
    foo(a); /* W0763 */
}

6.634.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.634.5 対応バージョン

1.0.0


Next: , Previous: W0763, Up: Messages

6.635 W0764

6.635.1 メッセージ本文

暗黙的に unsigned long long 型から unsigned short 型に型変換されています。

6.635.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.635.3 サンプルコード

extern void foo(unsigned short a);

void bar(unsigned long long a)
{
    unsigned short b = a; /* W0764 */
    foo(a); /* W0764 */
}

6.635.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.635.5 対応バージョン

1.0.0


Next: , Previous: W0764, Up: Messages

6.636 W0765

6.636.1 メッセージ本文

暗黙的に unsigned long long 型から unsigned int 型に型変換されています。

6.636.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.636.3 サンプルコード

extern void foo(unsigned int a);

void bar(unsigned long long a)
{
    unsigned int b = a; /* W0765 */
    foo(a); /* W0765 */
}

6.636.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0766 暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.636.5 対応バージョン

1.0.0


Next: , Previous: W0765, Up: Messages

6.637 W0766

6.637.1 メッセージ本文

暗黙的に unsigned long long 型から unsigned long 型に型変換されています。

6.637.2 内容

より小さいデータ型への暗黙のキャストにより、情報を損失する可能性があります。

6.637.3 サンプルコード

extern void foo(unsigned long a);

void bar(unsigned long long a)
{
    unsigned long b = a; /* W0766 */
    foo(a); /* W0766 */
}

6.637.4 関連メッセージ

  • W0747 暗黙的に signed short 型から signed char 型に型変換されています。
  • W0748 暗黙的に unsigned short 型から unsigned char 型に型変換されています。
  • W0749 暗黙的に signed int 型から signed char 型に型変換されています。
  • W0750 暗黙的に signed int 型から signed short 型に型変換されています。
  • W0751 暗黙的に unsigned int 型から unsigned char 型に型変換されています。
  • W0752 暗黙的に unsigned int 型から unsigned short 型に型変換されています。
  • W0753 暗黙的に signed long 型から signed char 型に型変換されています。
  • W0754 暗黙的に signed long 型から signed short 型に型変換されています。
  • W0755 暗黙的に signed long 型から signed int 型に型変換されています。
  • W0756 暗黙的に unsigned long 型から unsigned char 型に型変換されています。
  • W0757 暗黙的に unsigned long 型から unsigned short 型に型変換されています。
  • W0758 暗黙的に unsigned long 型から unsigned int 型に型変換されています。
  • W0759 暗黙的に signed long long 型から signed char 型に型変換されています。
  • W0760 暗黙的に signed long long 型から signed short 型に型変換されています。
  • W0761 暗黙的に signed long long 型から signed int 型に型変換されています。
  • W0762 暗黙的に signed long long 型から signed long 型に型変換されています。
  • W0763 暗黙的に unsigned long long 型から unsigned char 型に型変換されています。
  • W0764 暗黙的に unsigned long long 型から unsigned short 型に型変換されています。
  • W0765 暗黙的に unsigned long long 型から unsigned int 型に型変換されています。

6.637.5 対応バージョン

1.0.0


Next: , Previous: W0766, Up: Messages

6.638 W0767

6.638.1 メッセージ本文

暗黙的に double 型から float 型に型変換されています。

6.638.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.638.3 サンプルコード

extern void foo(float a);

void bar(double a)
{
    float b = a; /* W0767 */
    foo(a); /* W0767 */
}

6.638.4 関連メッセージ

  • W0768 暗黙的に long double 型から float 型に型変換されています。
  • W0769 暗黙的に long double 型から double 型に型変換されています。

6.638.5 対応バージョン

1.0.0


Next: , Previous: W0767, Up: Messages

6.639 W0768

6.639.1 メッセージ本文

暗黙的に long double 型から float 型に型変換されています。

6.639.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.639.3 サンプルコード

extern void foo(float a);

void bar(long double a)
{
    float b = a; /* W0768 */
    foo(a); /* W0768 */
}

6.639.4 関連メッセージ

  • W0767 暗黙的に double 型から float 型に型変換されています。
  • W0769 暗黙的に long double 型から double 型に型変換されています。

6.639.5 対応バージョン

1.0.0


Next: , Previous: W0768, Up: Messages

6.640 W0769

6.640.1 メッセージ本文

暗黙的に long double 型から double 型に型変換されています。

6.640.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.640.3 サンプルコード

extern void foo(double a);

void bar(long double a)
{
    double b = a; /* W0769 */
    foo(a); /* W0769 */
}

6.640.4 関連メッセージ

  • W0767 暗黙的に double 型から float 型に型変換されています。
  • W0768 暗黙的に long double 型から float 型に型変換されています。

6.640.5 対応バージョン

1.0.0


Next: , Previous: W0769, Up: Messages

6.641 W0770

6.641.1 メッセージ本文

外部結合をもつ識別子 `%s' の宣言が、二つ以上存在しています。

6.641.2 内容

リンケージをもつオブジェクトおよび関数を複数のファイルで宣言する際は、その宣言に互換性があることを保証する必要があります。 これは、保守性を大きく低下させます。

6.641.3 サンプルコード

test1.h

extern int func(void); /* W0770 */

test2.h

extern int func(void); /* W0770 */

test.c

#include "test1.h"
#include "test2.h"

int func(void)
{
    return 0;
}

6.641.4 関連メッセージ

  • W0771 グローバルな識別子 `%s' が、二つ以上のファイルで宣言されています。

6.641.5 対応バージョン

1.0.0


Next: , Previous: W0770, Up: Messages

6.642 W0771

6.642.1 メッセージ本文

グローバルな識別子 `%s' が、二つ以上のファイルで宣言されています。

6.642.2 内容

リンケージをもつオブジェクトおよび関数を複数のファイルで宣言する際は、その宣言に互換性があることを保証する必要があります。 これは、保守性を大きく低下させます。

6.642.3 サンプルコード

test1.h

extern int func(void); /* W0771 */
extern int a; /* W0771 */

test2.h

extern int func(void); /* W0771 */
extern int a; /* W0771 */

test.c

#include "test1.h"
#include "test2.h"

6.642.4 関連メッセージ

  • W0770 外部結合をもつ識別子 `%s' の宣言が、二つ以上存在しています。

6.642.5 対応バージョン

1.0.0


Next: , Previous: W0771, Up: Messages

6.643 W0774

6.643.1 メッセージ本文

double 型の値が関数 `float %s()' から返されています。

6.643.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.643.3 サンプルコード

extern double foo(void);

float bar(void)
{
    return foo(); /* W0774 */
}

6.643.4 関連メッセージ

  • W0775 long double 型の値が関数 `float %s()' から返されています。
  • W0776 long double 型の値が関数 `double %s()' から返されています。

6.643.5 対応バージョン

1.0.0


Next: , Previous: W0774, Up: Messages

6.644 W0775

6.644.1 メッセージ本文

long double 型の値が関数 `float %s()' から返されています。

6.644.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.644.3 サンプルコード

extern long double foo(void);

float bar(void)
{
    return foo(); /* W0775 */
}

6.644.4 関連メッセージ

  • W0774 double 型の値が関数 `float %s()' から返されています。
  • W0776 long double 型の値が関数 `double %s()' から返されています。

6.644.5 対応バージョン

1.0.0


Next: , Previous: W0775, Up: Messages

6.645 W0776

6.645.1 メッセージ本文

long double 型の値が関数 `double %s()' から返されています。

6.645.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。

6.645.3 サンプルコード

extern long double foo(void);

double bar(void)
{
    return foo(); /* W0776 */
}

6.645.4 関連メッセージ

  • W0774 double 型の値が関数 `float %s()' から返されています。
  • W0775 long double 型の値が関数 `float %s()' から返されています。

6.645.5 対応バージョン

1.0.0


Next: , Previous: W0776, Up: Messages

6.646 W0777

6.646.1 メッセージ本文

暗黙的に float 型の複合式から double 型に型変換されています。

6.646.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 より大きい浮動小数点型への暗黙のキャストでは、大きな問題は起きませんが、暗黙のキャストは解析性にもデメリットがあるため推奨しません。

6.646.3 サンプルコード

void func(float a, float b)
{
    double c = a + b; /* W0777 */
}

6.646.4 関連メッセージ

  • W0778 暗黙的に float 型の複合式から long double 型に型変換されています。
  • W0779 暗黙的に double 型の複合式から long double 型に型変換されています。

6.646.5 対応バージョン

1.0.0


Next: , Previous: W0777, Up: Messages

6.647 W0778

6.647.1 メッセージ本文

暗黙的に float 型の複合式から long double 型に型変換されています。

6.647.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 より大きい浮動小数点型への暗黙のキャストでは、大きな問題は起きませんが、暗黙のキャストは解析性にもデメリットがあるため推奨しません。

6.647.3 サンプルコード

void func(float a, float b)
{
    long double c = a + b; /* W0778 */
}

6.647.4 関連メッセージ

  • W0777 暗黙的に float 型の複合式から double 型に型変換されています。
  • W0779 暗黙的に double 型の複合式から long double 型に型変換されています。

6.647.5 対応バージョン

1.0.0


Next: , Previous: W0778, Up: Messages

6.648 W0779

6.648.1 メッセージ本文

暗黙的に double 型の複合式から long double 型に型変換されています。

6.648.2 内容

より小さい浮動小数点型への暗黙のキャストにより、精度落ちになる可能性があります。 より大きい浮動小数点型への暗黙のキャストでは、大きな問題は起きませんが、暗黙のキャストは解析性にもデメリットがあるため推奨しません。

6.648.3 サンプルコード

void func(double a, double b)
{
    long double c = a + b; /* W0779 */
}

6.648.4 関連メッセージ

  • W0777 暗黙的に float 型の複合式から double 型に型変換されています。
  • W0778 暗黙的に float 型の複合式から long double 型に型変換されています。

6.648.5 対応バージョン

1.0.0


Next: , Previous: W0779, Up: Messages

6.649 W0780

6.649.1 メッセージ本文

定数式における符号無し左シフト演算 `<<' は、非ゼロの上位ビットを切り詰めます。

6.649.2 内容

シフト演算の結果として上位ビットの情報が欠落してしまいます。 これが意図通りであれば問題ありませんが、意図通りでない場合は、不具合の原因になる可能性があります。

6.649.3 サンプルコード

unsigned int foo(void)
{
    return 0x08000000U << 5; /* W0780 */
}

6.649.4 関連メッセージ

なし。

6.649.5 対応バージョン

1.18.0


Next: , Previous: W0780, Up: Messages

6.650 W0781

6.650.1 メッセージ本文

この switch 文にはパスが 1 つしかありません。この switch 文は冗長です。

6.650.2 内容

このような switch 文がプログラマの意図通りだとしたら、 冗長な記述という意味で問題があります。 また、意図通りでないとしたら case 節の書き忘れが考えられますので、 動作上のバグが発生する可能性があります。 また、コードの閲覧者から見てプログラマの意図通りかどうかを判断できないという問題もあります。

6.650.3 サンプルコード

int foo(const int i)
{
    if (i > 5) {
        switch (i) { /* W0781 */
        case 0:
            return 1;
        case 5:
            return 2;
        default:
            return 3;
        }
    }

    switch (i) { /* OK */
    case 0:
        return 4;
    default:
        switch (i) { /* W0781 */
        case 10:
            return 5;
        default:
            return 6;
        }
    }
}

6.650.4 関連メッセージ

なし。

6.650.5 対応バージョン

1.6.0


Next: , Previous: W0781, Up: Messages

6.651 W0783

6.651.1 メッセージ本文

不完全型を指すポインタを含むキャストが行われています。このプログラムは移植性がありません。

6.651.2 内容

完全型から不完全型へのキャストは ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.651.3 サンプルコード

extern struct Foo *gp;

void foo(int *p)
{
    gp = (struct Foo *) p; /* W0783 */
}

6.651.4 関連メッセージ

なし。

6.651.5 対応バージョン

1.18.0


Next: , Previous: W0783, Up: Messages

6.652 W0784

6.652.1 メッセージ本文

非標準の拡張表記が使われています。

6.652.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

未定義の拡張表記を使用した場合の動作は未定義です。したがって、予期しない動作を引き起こす可能性があります。

6.652.3 サンプルコード

/* 追記予定 */

6.652.4 関連メッセージ

なし。

6.652.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W0784, Up: Messages

6.653 W0785

6.653.1 メッセージ本文

このタグ `%s' の宣言は、以前の宣言と異なります。

6.653.2 内容

構造体、共用体、列挙体は衝突しないように異なる識別子でタグ宣言する必要があります。 同じ識別子でタグ宣言されている構造体や共用体の動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.653.3 サンプルコード

struct AAA {
    int a;
};

union AAA { /* W0785 */
    long a;
    int b;
};

6.653.4 関連メッセージ

なし。

6.653.5 対応バージョン

1.0.0


Next: , Previous: W0785, Up: Messages

6.654 W0786

6.654.1 メッセージ本文

int、signed int、あるいは unsigned int 以外の型をもつビットフィールドは、ISO C 標準規格ではサポートされません。

6.654.2 内容

コンパイラの中には int 型以外のビットフィールドの使用を許すものがあります。 しかし、int 型以外のビットフィールドの動作は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.654.3 サンプルコード

struct ST { /* W0786 */
    unsigned int a:3;
    unsigned long b:1;
};

6.654.4 関連メッセージ

なし。

6.654.5 対応バージョン

1.0.0


Next: , Previous: W0786, Up: Messages

6.655 W0787

6.655.1 メッセージ本文

`%s' の型が、以前の異なるスコープで宣言された型と異なります。

6.655.2 内容

宣言が異なるスコープにある場合の動作は処理系定義になります。 また、宣言が同じスコープにある場合は標準制約違反になります。 従って、移植性が低下します。 ただし、一方がもう一方の内側のスコープで宣言される場合は問題ありません。

6.655.3 サンプルコード

void func1(void)
{
    extern int num;
    extern void func3(void);
}

void func2(void)
{
    extern double num; /* W0787 */
    extern void func3(int); /* W0787 */
}

6.655.4 関連メッセージ

  • W0788 `%s' の型が、以前の同じスコープ内で宣言された型と異なります。
  • W0789 `%s' の型が、以前のより広いスコープで宣言された型と異なります。

6.655.5 対応バージョン

1.6.0


Next: , Previous: W0787, Up: Messages

6.656 W0788

6.656.1 メッセージ本文

`%s' の型が、以前の同じスコープ内で宣言された型と異なります。

6.656.2 内容

宣言が異なるスコープにある場合の動作は処理系定義になります。 また、宣言が同じスコープにある場合は標準制約違反になります。 従って、移植性が低下します。 ただし、一方がもう一方の内側のスコープで宣言される場合は問題ありません。

6.656.3 サンプルコード

extern int func(void);

void func(void) /* W0788 */
{
    typedef int num;
    double num; /* W0788 */
}

6.656.4 関連メッセージ

  • W0787 `%s' の型が、以前の異なるスコープで宣言された型と異なります。
  • W0789 `%s' の型が、以前のより広いスコープで宣言された型と異なります。

6.656.5 対応バージョン

1.6.0


Next: , Previous: W0788, Up: Messages

6.657 W0789

6.657.1 メッセージ本文

`%s' の型が、以前のより広いスコープで宣言された型と異なります。

6.657.2 内容

宣言が異なるスコープにある場合の動作は処理系定義になります。 また、宣言が同じスコープにある場合は標準制約違反になります。 従って、移植性が低下します。 ただし、一方がもう一方の内側のスコープで宣言される場合は問題ありません。

6.657.3 サンプルコード

int num = 0;
extern int func1(void);

void func2(void)
{
    extern double num; /* W0789 */
    extern void func1(void); /* W0789 */
}

6.657.4 関連メッセージ

  • W0788 `%s' の型が、以前の同じスコープ内で宣言された型と異なります。
  • W0789 `%s' の型が、以前のより広いスコープで宣言された型と異なります。

6.657.5 対応バージョン

1.6.0


Next: , Previous: W0789, Up: Messages

6.658 W0790

6.658.1 メッセージ本文

グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。

6.658.2 内容

文法上の誤りではありませんので、重複定義そのものが原因で予期しない動作を引き起こすことはありません。 しかし、同じ識別子で複数回定義することは無駄な処理と言えます。 無駄なものは、メモリ資源を消費する、ソースコードの可読性を低下させる、などのデメリットがあります。

6.658.3 サンプルコード

int func(void)
{
    return 0;
}

int a = 0;

int func(void) /* W0790 */
{
    return 1;
}

int a = 1; /* W0790 */

6.658.4 関連メッセージ

  • W0791 グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。

6.658.5 対応バージョン

1.0.0


Next: , Previous: W0790, Up: Messages

6.659 W0791

6.659.1 メッセージ本文

グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。

6.659.2 内容

文法上の誤りではありませんので、重複定義そのものが原因で予期しない動作を引き起こすことはありません。 しかし、同じ識別子で複数回定義することは無駄な処理と言えます。 無駄なものは、メモリ資源を消費する、ソースコードの可読性を低下させる、などのデメリットがあります。

6.659.3 サンプルコード

test1.c

int func(void) /* W0791 */
{
    return 0;
}

int a = 0; /* W0791 */

test2.c

int func(void) /* W0791 */
{
    return 1;
}

int a = 1; /* W0791 */

6.659.4 関連メッセージ

  • W0790 グローバルなオブジェクトまたは関数 `%s' が二回以上定義されています。

6.659.5 対応バージョン

1.0.0


Next: , Previous: W0791, Up: Messages

6.660 W0792

6.660.1 メッセージ本文

浮動小数点数型を関数ポインタ(あるいはその逆)へキャストしています。

6.660.2 内容

関数ポインタから浮動小数点型へのキャスト、またはその逆のキャストは未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。

6.660.3 サンプルコード

int (*foo(const float f))(void)
{
    return (int (*)(void)) f; /* W0792 */
}

6.660.4 関連メッセージ

なし。

6.660.5 対応バージョン

1.18.0


Next: , Previous: W0792, Up: Messages

6.661 W0793

6.661.1 メッセージ本文

関数ポインタをオブジェクトを指すポインタ(あるいはその逆)へキャストしています。

6.661.2 内容

オブジェクトを指すポインタから関数ポインタへのキャスト、またはその逆の黄やストは未定義の動作になります。 従って、予期しない動作を引き起こす可能性があります。

6.661.3 サンプルコード

typedef int (*funptr_t)(void);

funptr_t foo(float *p)
{
    return (funptr_t) p; /* W0793 */
}

6.661.4 関連メッセージ

なし。

6.661.5 対応バージョン

1.18.0


Next: , Previous: W0793, Up: Messages

6.662 W0794

6.662.1 メッセージ本文

符号付きのオペランドを左シフト演算しています。

6.662.2 内容

整数の負の値をどのように表現するかは規格で定義されているわけではありません。 従って、符号付き型の値に対して左シフト演算をした結果は、コンパイラに依存することになり、移植性が低下します。

6.662.3 サンプルコード

int func(int i)
{
    return i << 1; /* W0794 */
}

6.662.4 関連メッセージ

なし。

6.662.5 対応バージョン

1.18.0


Next: , Previous: W0794, Up: Messages

6.663 W0795

6.663.1 メッセージ本文

関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。

6.663.2 内容

このような記述は、言語制約違反になりますので、移植性を低下させます。 また、スタックを破壊する可能性があるため危険です。

6.663.3 サンプルコード

extern void foo(int, int, int);

static void bar(void)
{
    foo(1, 2); /* W0795 */
}

6.663.4 関連メッセージ

  • W0796 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。
  • W0797 関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。

6.663.5 対応バージョン

1.0.0


Next: , Previous: W0795, Up: Messages

6.664 W0796

6.664.1 メッセージ本文

関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。

6.664.2 内容

このような記述は、言語制約違反になりますので、移植性を低下させます。 また、スタックを破壊する可能性があるため危険です。

6.664.3 サンプルコード

extern void foo(int, int);

static void bar(void)
{
    foo(1, 2, 3); /* W0796 */
}

6.664.4 関連メッセージ

  • W0795 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。
  • W0797 関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。

6.664.5 対応バージョン

1.0.0


Next: , Previous: W0796, Up: Messages

6.665 W0797

6.665.1 メッセージ本文

関数呼び出しの実引数の数が、関数定義における仮引数の数とは異なります。

6.665.2 内容

このような記述は、言語制約違反になりますので、移植性を低下させます。 また、スタックを破壊する可能性があるため危険です。

6.665.3 サンプルコード

static int foo(int, int);

static int bar(void)
{
    int a = foo(1); /* W0795 */
    int b = foo(1, 2);
    int c = foo(1, 2, 3); /* W0795 */
}

static int foo(int a, int b)
{
    return a + b;
}

6.665.4 関連メッセージ

  • W0795 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも少ないです。
  • W0796 関数呼び出しの実引数の数が、関数プロトタイプ宣言の仮引数の数よりも多いです。

6.665.5 対応バージョン

1.0.0


Next: , Previous: W0797, Up: Messages

6.666 W0798

6.666.1 メッセージ本文

不完全な共用体オブジェクトの値を使ってはいけません。

6.666.2 内容

オブジェクトの値が必要な文脈で、不完全型をもつ左辺値を用いるような式は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.666.3 サンプルコード

extern union UN *p;

void func(void)
{
    int i = 0;

    if (p) {
        i = p->i; /* W0798 */
    }
}

6.666.4 関連メッセージ

  • W0799 不完全な構造体オブジェクトの値を使ってはいけません。
  • W0800 `%s' は結合をもたない不完全型です。これは未定義です。

6.666.5 対応バージョン

1.0.0


Next: , Previous: W0798, Up: Messages

6.667 W0799

6.667.1 メッセージ本文

不完全な構造体オブジェクトの値を使ってはいけません。

6.667.2 内容

オブジェクトの値が必要な文脈で、不完全型をもつ左辺値を用いるような式は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.667.3 サンプルコード

extern struct ST *p;

void func(void)
{
    int i = 0;

    if (p) {
        i = p->i; /* W0799 */
    }
}

6.667.4 関連メッセージ

  • W0798 不完全な共用体オブジェクトの値を使ってはいけません。
  • W0800 `%s' は結合をもたない不完全型です。これは未定義です。

6.667.5 対応バージョン

1.0.0


Next: , Previous: W0799, Up: Messages

6.668 W0800

6.668.1 メッセージ本文

`%s' は結合をもたない不完全型です。これは未定義です。

6.668.2 内容

オブジェクトの値が必要な文脈で、不完全型をもつ左辺値を用いるような式は ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。

6.668.3 サンプルコード

int a[]; /* W0800 */
struct ST s = { 0 }; /* W0800 */

6.668.4 関連メッセージ

  • W0798 不完全な共用体オブジェクトの値を使ってはいけません。
  • W0799 不完全な構造体オブジェクトの値を使ってはいけません。

6.668.5 対応バージョン

1.0.0


Next: , Previous: W0800, Up: Messages

6.669 W0801

6.669.1 メッセージ本文

この構造体あるいは共用体には名前付きのメンバがありません。

6.669.2 内容

名前付きのメンバを一つも持たない構造体または共用体を使用したときの動作は未定義です。 従って、予期しない動作を引き起こす可能性があります。

6.669.3 サンプルコード

struct foo { /* W0801 */
};

struct bar { /* W0801 */
    int;
    int :1;
    long;
    double;
};

6.669.4 関連メッセージ

なし。

6.669.5 対応バージョン

1.4.0


Next: , Previous: W0801, Up: Messages

6.670 W0802

6.670.1 メッセージ本文

`#include' 前処理指令の後が、<ファイル名> あるいは "ファイル名" 形式のどちらでもありません。

6.670.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

#include <ファイル名> または #include "ファイル名" 以外の形式で記述されている #include 文の動作は未定義になります。 従って、予期しない動作を引き起こす可能性があります。"

6.670.3 サンプルコード

#include fruits.h /* W0802 */

#define MACRO 1
#include MACRO /* W0802 */

6.670.4 関連メッセージ

なし。

6.670.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W0802, Up: Messages

6.671 W0803

6.671.1 メッセージ本文

関数形式マクロの実引数の中に、前処理指令が記述されています。

6.671.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.671.3 サンプルコード

/* 追記予定 */

6.671.4 関連メッセージ

なし。

6.671.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W0803, Up: Messages

6.672 W0804

6.672.1 メッセージ本文

defined 構文が、`defined(識別子)' あるいは `defined 識別子' のどちらでもありません。

6.672.2 内容

このような記述は未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。

6.672.3 サンプルコード

#if defined "MACRO" /* W0804 */
#endif

6.672.4 関連メッセージ

  • W0805 `defined' に、実引数となる識別子がありません。

6.672.5 対応バージョン

1.0.0


Next: , Previous: W0804, Up: Messages

6.673 W0805

6.673.1 メッセージ本文

`defined' に、実引数となる識別子がありません。

6.673.2 内容

このような記述は未定義の動作になります。したがって、予期しない動作を引き起こす可能性があります。

6.673.3 サンプルコード

#if defined "foo" /* W0805 */
int i = 0;
#endif

6.673.4 関連メッセージ

  • W0804 defined 構文が、`defined(識別子)' あるいは `defined 識別子' のどちらでもありません。

6.673.5 対応バージョン

1.16.0


Next: , Previous: W0805, Up: Messages

6.674 W0806

6.674.1 メッセージ本文

`defined' という名称のマクロを定義しようとしています。

6.674.2 内容

ISO C90 で規定されている予約語を定義、再定義、定義解消することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。

6.674.3 サンプルコード

#define defined !defined /* W0806 */

6.674.4 関連メッセージ

  • W0807 事前定義のマクロ名 `%s' を削除しようとしています。
  • W0808 事前定義のマクロ名 `%s' を再定義しようとしています。

6.674.5 対応バージョン

1.4.0


Next: , Previous: W0806, Up: Messages

6.675 W0807

6.675.1 メッセージ本文

事前定義のマクロ名 `%s' を削除しようとしています。

6.675.2 内容

ISO C90 で規定されている予約語を定義、再定義、定義解消することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。

6.675.3 サンプルコード

#undef __STDC_VERSION__ /* W0807 */

6.675.4 関連メッセージ

  • W0806 `defined' という名称のマクロを定義しようとしています。
  • W0808 事前定義のマクロ名 `%s' を再定義しようとしています。

6.675.5 対応バージョン

1.6.0


Next: , Previous: W0807, Up: Messages

6.676 W0808

6.676.1 メッセージ本文

事前定義のマクロ名 `%s' を再定義しようとしています。

6.676.2 内容

ISO C90 で規定されている予約語を定義、再定義、定義解消することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。

6.676.3 サンプルコード

#define __FILE__ "test.c" /* W0808 */

6.676.4 関連メッセージ

  • W0806 `defined' という名称のマクロを定義しようとしています。
  • W0807 事前定義のマクロ名 `%s' を削除しようとしています。

6.676.5 対応バージョン

1.6.0


Next: , Previous: W0808, Up: Messages

6.677 W0809

6.677.1 メッセージ本文

識別子 `%s' はライブラリで予約済みです。

6.677.2 内容

ISO C90 で規定されている予約語を再使用することは未定義の動作になります。 したがって、予期しない動作を引き起こす可能性あります。

6.677.3 サンプルコード

extern int __value; /* W0809 */
int _VAL = 10; /* W0809 */
static void _func(void); /* W0809 */

6.677.4 関連メッセージ

なし。

6.677.5 対応バージョン

1.6.0


Next: , Previous: W0809, Up: Messages

6.678 W0810

6.678.1 メッセージ本文

この `if-if-else' 文の構造をより明確にするためには `{}' が必要です。

6.678.2 内容

サンプルコードのようなコードでは、else がどちらの if に対応するのかが不明確です。 また、本体が単一文で済まなくなったときに、波括弧をつけ忘れるリスクもあります。

6.678.3 サンプルコード

int foo(int i, int j) {
    if (i < 0) /* W0810 */
        if (j > 0) {
            return 0;
        }
    else {
        return 1;
    }

    if (i > 0) /* W0810 */
        if (j < 0) {
            return 2;
        }
        else {
            return 3;
        }

    return 4;
}

6.678.4 関連メッセージ

なし。

6.678.5 対応バージョン

1.0.0


Next: , Previous: W0810, Up: Messages

6.679 W0811

6.679.1 メッセージ本文

このマクロの展開結果の、`defined' トークンは、許容されません。

6.679.2 内容

このような記述は、未定義の動作のため、予期しない動作を引き起こす可能性があります。

6.679.3 サンプルコード

#define COND defined(FOO)

#if COND /* W0811 */
int i = 0;
#endif

6.679.4 関連メッセージ

なし。

6.679.5 対応バージョン

1.16.0


Next: , Previous: W0811, Up: Messages

6.680 W0827

6.680.1 メッセージ本文

ネストされた構造体の初期値の各要素が `{}' で囲まれていません。

6.680.2 内容

構造体を 0 以外で初期化する場合は、構造を示し、初期化子は波括弧 "{}" で囲まなければなりません。

6.680.3 サンプルコード

struct ST {
    int i;
    int j;
};

struct ST a[2] = { 10, 20, 30, 40 }; /* W0827 */

6.680.4 関連メッセージ

  • W0828 ネストされた配列の初期値の各要素が `{}' で囲まれていません。

6.680.5 対応バージョン

1.0.0


Next: , Previous: W0827, Up: Messages

6.681 W0828

6.681.1 メッセージ本文

ネストされた配列の初期値の各要素が `{}' で囲まれていません。

6.681.2 内容

配列を 0 以外で初期化する場合は、構造を示し、初期化子は波括弧 "{}" で囲まなければなりません。

6.681.3 サンプルコード

int a[3][2] = { {1, 2}, {3, 4}, {5, 6} };
int b[3][2] = { 1, 2, 3, 4, 5, 6 }; /* W0828 */

6.681.4 関連メッセージ

  • W0827 ネストされた構造体の初期値の各要素が `{}' で囲まれていません。

6.681.5 対応バージョン

1.0.0


Next: , Previous: W0828, Up: Messages

6.682 W0830

6.682.1 メッセージ本文

列挙子並びの末尾にカンマ `,' があります。

6.682.2 内容

このような記述は、言語拡張に該当するため、移植性を低下させます。

6.682.3 サンプルコード

enum Color { Red, Green, Blue, }; /* W0830 */

6.682.4 関連メッセージ

なし。

6.682.5 対応バージョン

1.18.0


Next: , Previous: W0830, Up: Messages

6.683 W0831

6.683.1 メッセージ本文

これはインラインアセンブリ用の言語拡張です。#asm と #endasm の間は無視します。

6.683.2 内容

インライン・アセンブラ構文は、言語拡張に該当するため、移植性を低下させます。

6.683.3 サンプルコード

/* 追記予定 */

6.683.4 関連メッセージ

  • W0832 インラインアセンブリ構文を使っています。これは言語拡張です。このコードは無視します。

6.683.5 対応バージョン

1.0.0


Next: , Previous: W0831, Up: Messages

6.684 W0832

6.684.1 メッセージ本文

インラインアセンブリ構文を使っています。これは言語拡張です。このコードは無視します。

6.684.2 内容

インライン・アセンブラ構文は、言語拡張に該当するため、移植性を低下させます。

6.684.3 サンプルコード

#define ASM_CODE asm("movl %ecx, %eax")

void foo(int arg1, int *arg2, int arg3)
{
    asm("movl %ecx, %eax"); /* W0832 */
    __asm__("movl %ecx, (%eax)"); /* W0832 */

    asm { /* W0832 */
        xorl eax, eax
    }

    ASM_CODE; /* W0832 */

    __asm__ volatile ( /* W0832 */
            "int $0x80"
            : "=a" (r)
              "+b" (arg1),
              "+c" (arg2),
              "+d" (arg3)
            : "a" (128)
            : "memory", "cc");
}

6.684.4 関連メッセージ

  • W0831 これはインラインアセンブリ用の言語拡張です。#asm と #endasm の間は無視します。

6.684.5 対応バージョン

1.8.0


Next: , Previous: W0832, Up: Messages

6.685 W0833

6.685.1 メッセージ本文

接尾語 LL を使っています。

6.685.2 内容

接尾語 LL は、言語拡張に該当するため、移植性を低下させます。

6.685.3 サンプルコード

long long ll = 123LL; /* W0833 */

6.685.4 関連メッセージ

  • W0834 long long 型を使っています。

6.685.5 対応バージョン

1.18.0


Next: , Previous: W0833, Up: Messages

6.686 W0834

6.686.1 メッセージ本文

long long 型を使っています。

6.686.2 内容

long long 型は、言語拡張に該当するため、移植性を低下させます。

6.686.3 サンプルコード

extern long long ll; /* W0834 */

6.686.4 関連メッセージ

  • W0833 接尾語 LL を使っています。

6.686.5 対応バージョン

1.18.0


Next: , Previous: W0834, Up: Messages

6.687 W0835

6.687.1 メッセージ本文

可変引数を受け取るマクロが定義されています。

6.687.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

可変個引数マクロの定義は、言語拡張に該当するため、移植性を低下させます。

6.687.3 サンプルコード

/* 追記予定 */

6.687.4 関連メッセージ

なし。

6.687.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W0835, Up: Messages

6.688 W0947

6.688.1 メッセージ本文

文字列リテラルが直接使われています。

6.688.2 内容

リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。

6.688.3 サンプルコード

func("Apple, Banana, Chocolate"); /* W0947 */

6.688.4 関連メッセージ

  • W0948 文字定数 %s が直接使われています。
  • W0949 ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。
  • W0950 配列のサイズ定義に、数値 `%s' が直接使われています。

6.688.5 対応バージョン

1.0.0


Next: , Previous: W0947, Up: Messages

6.689 W0948

6.689.1 メッセージ本文

文字定数 %s が直接使われています。

6.689.2 内容

リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。

6.689.3 サンプルコード

func('a'); /* W0948 */

6.689.4 関連メッセージ

  • W0947 文字列リテラルが直接使われています。
  • W0949 ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。
  • W0950 配列のサイズ定義に、数値 `%s' が直接使われています。

6.689.5 対応バージョン

1.0.0


Next: , Previous: W0948, Up: Messages

6.690 W0949

6.690.1 メッセージ本文

ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。

6.690.2 内容

リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。

6.690.3 サンプルコード

struct ST {
    unsigned int a:1;
    unsigned int a:2; /* W0949 */
    unsigned int a:3; /* W0949 */
};

6.690.4 関連メッセージ

  • W0947 文字列リテラルが直接使われています。
  • W0948 文字定数 %s が直接使われています。
  • W0950 配列のサイズ定義に、数値 `%s' が直接使われています。

6.690.5 対応バージョン

1.0.0


Next: , Previous: W0949, Up: Messages

6.691 W0950

6.691.1 メッセージ本文

配列のサイズ定義に、数値 `%s' が直接使われています。

6.691.2 内容

リテラルが何を表しているのか分かり難く、保守性に悪影響を及ぼします。

6.691.3 サンプルコード

int a[10]; /* W0950 */

6.691.4 関連メッセージ

  • W0947 文字列リテラルが直接使われています。
  • W0948 文字定数 %s が直接使われています。
  • W0949 ビットフィールドのサイズ定義に、数値 `%s' が直接使われています。

6.691.5 対応バージョン

1.0.0


Next: , Previous: W0950, Up: Messages

6.692 W1026

6.692.1 メッセージ本文

%s 番目の実引数がオブジェクト型ではありません。

6.692.2 内容

不完全型の構造体や配列を仮引数にしています。関数の全ての仮引数はオブジェクト型の式である必要があります。

6.692.3 サンプルコード

extern struct st s;
extern void foo(struct st);

void bar(void)
{
    foo(s); /* W1026 */
}

6.692.4 関連メッセージ

なし。

6.692.5 対応バージョン

1.18.0


Next: , Previous: W1026, Up: Messages

6.693 W1027

6.693.1 メッセージ本文

配列の基本型が関数型です。これは意味がありません。

6.693.2 内容

関数の配列が存在しています。

6.693.3 サンプルコード

int (fun_tbl[20])(void); /* W1027 */

6.693.4 関連メッセージ

  • W1028 配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。
  • W1029 配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。

6.693.5 対応バージョン

1.0.0


Next: , Previous: W1027, Up: Messages

6.694 W1028

6.694.1 メッセージ本文

配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。

6.694.2 内容

この配列は不完全型で定義されています。これは誤りです。

6.694.3 サンプルコード

int a[4][]; /* W1028 */

6.694.4 関連メッセージ

  • W1027 配列の基本型が関数型です。これは意味がありません。
  • W1029 配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。

6.694.5 対応バージョン

1.0.0


Next: , Previous: W1028, Up: Messages

6.695 W1029

6.695.1 メッセージ本文

配列の基本型が内容不明の構造体あるいは共用体です。不完全型の配列は構築できません。

6.695.2 内容

この配列は、不完全な要素を持つ構造体または共用体を型として定義しています。

6.695.3 サンプルコード

struct ST a[5]; /* W1029 */

6.695.4 関連メッセージ

  • W1027 配列の基本型が関数型です。これは意味がありません。
  • W1028 配列の基本型がサイズ不明の配列です。不完全型の配列は構築できません。

6.695.5 対応バージョン

1.0.0


Next: , Previous: W1029, Up: Messages

6.696 W1030

6.696.1 メッセージ本文

ラベル `%s' がこの関数の中で二回以上使われています。

6.696.2 内容

同じ名前のラベルが、関数内で 2 回以上使われています。このような使い方は誤りです。

6.696.3 サンプルコード

void func(int a, int b)
{
    if (a == 0) {
        int c = 0;
RETRY:
        b = 10;
    }

    if (b != 0) {
        goto RETRY;
    }
RETRY: /* W1030 */
    b = 1;

    ...snip...
}

6.696.4 関連メッセージ

なし。

6.696.5 対応バージョン

1.6.0


Next: , Previous: W1030, Up: Messages

6.697 W1031

6.697.1 メッセージ本文

オブジェクト `%s' は、外部結合と内部結合の両方で宣言されています。その動作は未定義です。

6.697.2 内容

同じ名前の変数が 2 回以上定義されていて、その 1 つには static 宣言がついています。このような使い方は誤りです。

6.697.3 サンプルコード

test.h

extern int a;

test.c

#include "test.h"

static int a; /* W1031 */

6.697.4 関連メッセージ

なし。

6.697.5 対応バージョン

1.0.0


Next: , Previous: W1031, Up: Messages

6.698 W1032

6.698.1 メッセージ本文

内部結合をもつ変数 '%s' の仮定義は、不完全型ではいけません。

6.698.2 内容

内部結合を持つオブジェクトの仮定義でのうち、後で示されたほうにに明示的な定義が見つかりません。このような使い方は誤りです。

6.698.3 サンプルコード

static struct ST a[3]; /* W1032 */

6.698.4 関連メッセージ

なし。

6.698.5 対応バージョン

1.0.0


Next: , Previous: W1032, Up: Messages

6.699 W1033

6.699.1 メッセージ本文

関数の戻り値の型に volatile あるいは const 修飾子を使っています。その動作は未定義です。

6.699.2 内容

関数の戻り値の型が、volatile 型の場合の動作は処理系定義です。 また、const 型の場合は未定義です。

6.699.3 サンプルコード

extern const int func1(int); /* W1033 */

const int func2(int i) /* W1033 */
{
    return i + 1;
}

const int *func3(int i) /* OK */
{
    static int j;

    j = i;
    return &j;
}

6.699.4 関連メッセージ

なし。

6.699.5 対応バージョン

1.4.0


Next: , Previous: W1033, Up: Messages

6.700 W1034

6.700.1 メッセージ本文

ブロックスコープで、関数 `%s()' に static 記憶域クラス指定子を使って宣言されています。この用法は意味がありません。

6.700.2 内容

static な関数がブロックスコープ内で宣言されています。 関数宣言はブロック・スコープの場合 static を使用できません。

6.700.3 サンプルコード

int func(void)
{
    static int func1(void); /* W1034 */
    extern int func2(void);
}

6.700.4 関連メッセージ

なし。

6.700.5 対応バージョン

1.0.0


Next: , Previous: W1034, Up: Messages

6.701 W1035

6.701.1 メッセージ本文

`%s' は typedef として宣言されています。明示的な型指定子を使わずに、より内側のスコープで再宣言することはできません。

6.701.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

typedef の再定義は未定義の動作になります。

6.701.3 サンプルコード

/* 追記予定 */

6.701.4 関連メッセージ

  • W1036 `%s' は typedef として宣言されています。明示的な型指定子を使わずに、構造体または共用体のメンバとして再宣言することはできません。

6.701.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W1035, Up: Messages

6.702 W1036

6.702.1 メッセージ本文

`%s' は typedef として宣言されています。明示的な型指定子を使わずに、構造体または共用体のメンバとして再宣言することはできません。

6.702.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

typedef の再定義は未定義の動作になります。

6.702.3 サンプルコード

/* 追記予定 */

6.702.4 関連メッセージ

  • W1035 `%s' は typedef として宣言されています。明示的な型指定子を使わずに、より内側のスコープで再宣言することはできません。

6.702.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W1036, Up: Messages

6.703 W1037

6.703.1 メッセージ本文

外部結合をもつ `%s' が、二つ以上宣言されていますが互換性がありません。

6.703.2 内容

外部結合を持つ同一の識別子を複数宣言する際は、すべての宣言において、 その型(関数の宣言の場合は、戻り値の型、結合、例外仕様)に互換性を保証する必要があります。

6.703.3 サンプルコード

test1.c

extern void func(void); /* W1037 */
extern int a; /* W1037 */

test2.c

extern int func(int); /* W1037 */
extern long a; /* W1037 */

6.703.4 関連メッセージ

なし。

6.703.5 対応バージョン

1.0.0


Next: , Previous: W1037, Up: Messages

6.704 W1039

6.704.1 メッセージ本文

%s 番目の指定子に `ll' が使われています。

6.704.2 内容

'll' を変換指定子に使用しています。このような記述は ISO C90 では認められていません。

6.704.3 サンプルコード

extern int printf(const char *, ...);

void foo(long long ll)
{
    printf("%lld", ll); /* W1039 */
}

6.704.4 関連メッセージ

なし。

6.704.5 対応バージョン

1.18.0


Next: , Previous: W1039, Up: Messages

6.705 W1040

6.705.1 メッセージ本文

前処理指令の後に認識できない文字列が記述されています。

6.705.2 内容

このような前処理指令の記述は、ISO C90 標準規格ではサポートされていません。

6.705.3 サンプルコード

#define TEST

#ifdef TEST
#if defined(CASE_1)
int i = 1;
#elif defined(CASE_2)
int i = 2;
#endif CASE /* W1040 */
#else
int i = 0;
#endif TEST /* W1040 */

6.705.4 関連メッセージ

  • W1041 `%s' は、ISO C 標準規格の正式な前処理指令ではありません。
  • W1042 前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。

6.705.5 対応バージョン

1.16.0


Next: , Previous: W1040, Up: Messages

6.706 W1041

6.706.1 メッセージ本文

`%s' は、ISO C 標準規格の正式な前処理指令ではありません。

6.706.2 内容

このような前処理指令の記述は、ISO C90 標準規格ではサポートされていません。

6.706.3 サンプルコード

#compiler_specific_extension 1 2.3 "4" /* W1041 */

6.706.4 関連メッセージ

  • W1040 前処理指令の後に認識できない文字列が記述されています。
  • W1042 前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。

6.706.5 対応バージョン

1.16.0


Next: , Previous: W1041, Up: Messages

6.707 W1042

6.707.1 メッセージ本文

前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。

6.707.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

このような前処理指令の記述は、ISO C90 標準規格ではサポートされていません。

6.707.3 サンプルコード

/* 追記予定 */

6.707.4 関連メッセージ

  • W1040 前処理指令の後に認識できない文字列が記述されています。
  • W1041 `%s' は、ISO C 標準規格の正式な前処理指令ではありません。

6.707.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W1042, Up: Messages

6.708 W1043

6.708.1 メッセージ本文

`@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。

6.708.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

このような構文記述は、ISO C90 標準規格ではサポートされていないため、言語拡張とみなされます。

6.708.3 サンプルコード

/* 追記予定 */

6.708.4 関連メッセージ

  • W1045 この `@ word' 構文は無視されます。

6.708.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W1043, Up: Messages

6.709 W1045

6.709.1 メッセージ本文

この `@ word' 構文は無視されます。

6.709.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

このような構文記述は、ISO C90 標準規格ではサポートされていないため、言語拡張とみなされます。

6.709.3 サンプルコード

/* 追記予定 */

6.709.4 関連メッセージ

  • W1043 `@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。

6.709.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W1045, Up: Messages

6.710 W1046

6.710.1 メッセージ本文

`\' と改行の間にある空白文字類が無視されています。

6.710.2 内容

ISO C 規格ではバックスラッシュ文字の後に直接改行文字が続くべきであると規定しています。

6.710.3 サンプルコード

#define FOO(a, b)   /* OK */    \
    (               /* W1046 */ \ 
        (a) + (b)   /* W1046 */ \	
    )

6.710.4 関連メッセージ

なし。

6.710.5 対応バージョン

1.16.0


Next: , Previous: W1046, Up: Messages

6.711 W1047

6.711.1 メッセージ本文

構造体、共用体、あるいは配列の初期化子がリテラルではありません。

6.711.2 内容

初期化子が定数式になっていません。

6.711.3 サンプルコード

int foo(int i, int j)
{
    int a[] = { 0, i, j }; /* W1047 */
    return a[1];
}

6.711.4 関連メッセージ

なし。

6.711.5 対応バージョン

1.18.0


Next: , Previous: W1047, Up: Messages

6.712 W1048

6.712.1 メッセージ本文

マルチバイト文字リテラルは処理系定義の値になります。

6.712.2 内容

このメッセージは AdLint 2.0.0 以降で出力する予定です。

マルチバイト文字定数が使用されています。この値やサイズは処理系によって異なるため、移植性が低下します。

6.712.3 サンプルコード

/* 追記予定 */

6.712.4 関連メッセージ

なし。

6.712.5 対応バージョン

2.0.0 以降の予定


Next: , Previous: W1048, Up: Messages

6.713 W1049

6.713.1 メッセージ本文

この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。

6.713.2 内容

char が 8bit の場合、signed char 型は -128~127 の範囲しか表現できません。したがって、例 1 では表現できないことがあります。この場合、結果は "処理系定義" になります。 符号なし演算の結果は、オーバーフローせず、ラップアラウンドします。例 2 では、ラップアラウンドし結果が切り詰められる可能性があります。

6.713.3 サンプルコード

例 1

void func1(signed int si)
{
    signed char sc = (signed char) si + 10; /* W1049 */
}

例 2

void func(unsigned int ui)
{
    unsigned int a = ui * ui;
}

6.713.4 関連メッセージ

  • W1050 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。
  • W1051 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。
  • W1052 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.713.5 対応バージョン

1.0.0


Next: , Previous: W1049, Up: Messages

6.714 W1050

6.714.1 メッセージ本文

この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。

6.714.2 内容

char が 8bit の場合、signed char 型は -128~127 の範囲しか表現できません。したがって、例 1 では表現できないことがあります。この場合、結果は "処理系定義" になります。 符号なし演算の結果は、オーバーフローせず、ラップアラウンドします。例 2 では、ラップアラウンドし結果が切り詰められる可能性があります。

6.714.3 サンプルコード

例 1

void func(signed int si)
{
    signed char sc = 0;

    if (si > 127) {
        sc = (signed char) si + 1; /* W1050 */
    }
}

例 2

void func(unsigned int ui)
{
    unsigned int a = ui * ui;
}

6.714.4 関連メッセージ

  • W1049 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。
  • W1051 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。
  • W1052 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。
  • C1000 次の実行パスで警告を検知しました。
  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1006 ここで該当変数に値を割り当てました。

6.714.5 対応バージョン

1.0.0


Next: , Previous: W1050, Up: Messages

6.715 W1051

6.715.1 メッセージ本文

符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。

6.715.2 内容

符号なし演算の結果は、オーバーフローせずラップアラウンドし、結果が切り詰められる可能性があります。

6.715.3 サンプルコード

unsigned int func(unsigned int ui)
{
    if (ui > 0xEFFFFFFFU) {
        return ui + 0x10000000U; /* W1051 */
    }

    return 0U;
}

6.715.4 関連メッセージ

  • W1049 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。
  • W1050 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。
  • W1052 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。

6.715.5 対応バージョン

1.0.0


Next: , Previous: W1051, Up: Messages

6.716 W1052

6.716.1 メッセージ本文

符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込むことがあります。

6.716.2 内容

符号なし演算の結果は、オーバーフローせずラップアラウンドし、結果が切り詰められる可能性があります。

6.716.3 サンプルコード

unsigned int func(unsigned int a, unsigned int b)
{
    if (a > 0xEFFFFFFFU && b < 0x20000000U) {
        return a + b; /* W1052 */
    }

    return 0U;
}

6.716.4 関連メッセージ

  • W1049 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。
  • W1050 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。
  • W1051 符号無し型 `%s' の算術演算結果は、桁あふれによって 0 を回り込みます。

6.716.5 対応バージョン

1.0.0


Next: , Previous: W1052, Up: Messages

6.717 W1053

6.717.1 メッセージ本文

仮引数が列挙型である関数の実引数に数値定数が渡されています。

6.717.2 内容

非列挙型から列挙型への変換が生じています。

6.717.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern void func1(enum Color);

void func2(void)
{
    func1(4); /* W1053 */
}

6.717.4 関連メッセージ

  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.717.5 対応バージョン

1.6.0


Next: , Previous: W1053, Up: Messages

6.718 W1054

6.718.1 メッセージ本文

列挙型に、列挙型ではない式が代入されています。

6.718.2 内容

非列挙型から列挙型への変換が生じています。

6.718.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern enum Color col;

void func2(void)
{
    col = 4; /* W1054 */
}

6.718.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.718.5 対応バージョン

1.6.0


Next: , Previous: W1054, Up: Messages

6.719 W1055

6.719.1 メッセージ本文

戻り値が列挙型の関数から、列挙型ではない式が返されています。

6.719.2 内容

列挙型から非列挙型への変換が生じています。

6.719.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

enum Color func(void)
{
    return 4; /* W1055 */
}

6.719.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.719.5 対応バージョン

1.6.0


Next: , Previous: W1055, Up: Messages

6.720 W1056

6.720.1 メッセージ本文

仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。

6.720.2 内容

列挙型から異なる列挙型への変換が生じています。

6.720.3 サンプルコード

enum Color { RED = 1, GREEN= 2, BLUE = 4 };
enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER };

extern void func1(enum Color);

void func2(enum Season ssn)
{
    func1(ssn); /* W1056 */
}

6.720.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.720.5 対応バージョン

1.6.0


Next: , Previous: W1056, Up: Messages

6.721 W1057

6.721.1 メッセージ本文

列挙型に、異なる列挙型のオブジェクトが代入されています。

6.721.2 内容

列挙型から異なる列挙型への変換が生じています。

6.721.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };
enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER };

extern enum Color col;

void func(enum Season ssn)
{
    col = ssn; /* W1057 */
}

6.721.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.721.5 対応バージョン

1.6.0


Next: , Previous: W1057, Up: Messages

6.722 W1058

6.722.1 メッセージ本文

戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。

6.722.2 内容

列挙型から異なる列挙型への変換が生じています。

6.722.3 サンプルコード

enum Color { RED  = 1, GREEN = 2, BLUE = 4 };
enum Season { SPRING = 1, SUMMER, AUTUMN, WINTER };

enum Color func(enum Season ssn)
{
    return ssn; /* W1058 */
}

6.722.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.722.5 対応バージョン

1.6.0


Next: , Previous: W1058, Up: Messages

6.723 W1059

6.723.1 メッセージ本文

仮引数が列挙型でない関数の実引数に列挙型が渡されています。

6.723.2 内容

列挙型から非列挙型への変換が生じています。

6.723.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern void func1(int num);

void func2(enum Color col)
{
    func1(col); /* W1059 */
}

6.723.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.723.5 対応バージョン

1.6.0


Next: , Previous: W1059, Up: Messages

6.724 W1060

6.724.1 メッセージ本文

戻り値が列挙型でない関数から、列挙型が返されています。

6.724.2 内容

非列挙型から列挙型への変換が生じています。

6.724.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

int func2(enum Color col)
{
    return col; /* W1060 */
}

6.724.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.724.5 対応バージョン

1.6.0


Next: , Previous: W1060, Up: Messages

6.725 W1061

6.725.1 メッセージ本文

仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。

6.725.2 内容

非列挙型から列挙型への変換が生じています。

6.725.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern void func1(enum Color);

void func2(int num)
{
    func1(num); /* W1061 */
}

6.725.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.725.5 対応バージョン

1.6.0


Next: , Previous: W1061, Up: Messages

6.726 W1062

6.726.1 メッセージ本文

異なる型の非定数式の値が列挙型オブジェクトに代入されています。

6.726.2 内容

非列挙型から列挙型への変換が生じています。

6.726.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

extern enum Color col;

void func(int num)
{
    col = num + 1; /* W1062 */
}

6.726.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.726.5 対応バージョン

1.6.0


Next: , Previous: W1062, Up: Messages

6.727 W1063

6.727.1 メッセージ本文

戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。

6.727.2 内容

非列挙型から列挙型への変換が生じています。

6.727.3 サンプルコード

enum Color { RED = 1, GREEN = 2, BLUE = 4 };

enum Color func(int num)
{
    return num / 2; /* W1063 */
}

6.727.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.727.5 対応バージョン

1.6.0


Next: , Previous: W1063, Up: Messages

6.728 W1064

6.728.1 メッセージ本文

列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。

6.728.2 内容

非列挙型から列挙型への変換が生じています。

6.728.3 サンプルコード

enum Color { RED, BLUE, GREEN };

int func(enum Color c)
{
    switch (c) {
    case RED: /* OK */
        return 1;
    case 1: /* W1064 */
        return 2;
    }

    return 0;
}

6.728.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1065 列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.728.5 対応バージョン

1.4.0


Next: , Previous: W1064, Up: Messages

6.729 W1065

6.729.1 メッセージ本文

列挙型の制御式が使われている switch 文で、異なる列挙型の値が case ラベルに使われています。

6.729.2 内容

列挙型から異なる列挙型への変換が生じています。

6.729.3 サンプルコード

enum Color { RED, BLUE, GREEN };
enum Fruits { APPLE, BANANA, ORANGE, GRAPE };

int func(enum Color c)
{
    switch (c) {
    case RED: /* OK */
        return 1;
    case ORANGE: /* W1065 */
        return 2;
    }

    return 0;
}

6.729.4 関連メッセージ

  • W1053 仮引数が列挙型である関数の実引数に数値定数が渡されています。
  • W1054 列挙型に、列挙型ではない式が代入されています。
  • W1055 戻り値が列挙型の関数から、列挙型ではない式が返されています。
  • W1056 仮引数が列挙型である関数の実引数が異なる列挙型のオブジェクトです。
  • W1057 列挙型に、異なる列挙型のオブジェクトが代入されています。
  • W1058 戻り値が列挙型の関数から、異なる列挙型のオブジェクトが返されています。
  • W1059 仮引数が列挙型でない関数の実引数に列挙型が渡されています。
  • W1060 戻り値が列挙型でない関数から、列挙型が返されています。
  • W1061 仮引数が列挙型である関数の実引数に異なる型の非定数式の値が渡されています。
  • W1062 異なる型の非定数式の値が列挙型オブジェクトに代入されています。
  • W1063 戻り値が列挙型の関数から、異なる型の非定数式の値が返されています。
  • W1064 列挙型の制御式が使われている switch 文で、整数定数が case ラベルに使われています。

6.729.5 対応バージョン

1.4.0


Next: , Previous: W1065, Up: Messages

6.730 W1066

6.730.1 メッセージ本文

明示的に float 型の複合式の値を double 型に変換しています。

6.730.2 内容

例えばサンプルコードでは float 型変数 a の 2 乗した値が float 型の範囲に収まらないことを想定して double 型変数 b へ代入しています。しかし、環境によっては a * a の演算はいったん float 型として 結果を出したあとに double 型にキャストされ、b へ代入される場合があります。その場合、a の値によっては精度落ちが起こります。

6.730.3 サンプルコード

void func(float a)
{
    double b = (double) (a * a);
}

6.730.4 関連メッセージ

  • W1067 明示的に float 型の複合式の値を long double 型に変換しています。
  • W1068 明示的に double 型の複合式の値を long double 型に変換しています。

6.730.5 対応バージョン

1.14.0


Next: , Previous: W1066, Up: Messages

6.731 W1067

6.731.1 メッセージ本文

明示的に float 型の複合式の値を long double 型に変換しています。

6.731.2 内容

例えばサンプルコードでは float 型変数 a の 2 乗した値が float 型の範囲に収まらないことを想定して long double 型変数 b へ代入しています。しかし、環境によっては a * a の演算はいったん float 型として 結果を出したあとに long double 型にキャストされ、b へ代入される場合があります。その場合、a の値によっては精度落ちが起こります。

6.731.3 サンプルコード

void func(float a)
{
    long double b = (long double) (a * a);
}

6.731.4 関連メッセージ

  • W1066 明示的に float 型の複合式の値を double 型に変換しています。
  • W1068 明示的に double 型の複合式の値を long double 型に変換しています。

6.731.5 対応バージョン

1.14.0


Next: , Previous: W1067, Up: Messages

6.732 W1068

6.732.1 メッセージ本文

明示的に double 型の複合式の値を long double 型に変換しています。

6.732.2 内容

例えばサンプルコードでは double 型変数 a の 2 乗した値が double 型の範囲に収まらないことを想定して long double 型変数 b へ代入しています。しかし、環境によっては a * a の演算はいったん double 型として 結果を出したあとに long double 型にキャストされ、b へ代入される場合があります。その場合、a の値によっては精度落ちが起こります。

6.732.3 サンプルコード

void func(double a)
{
    long double b = (long double) (a * a);
}

6.732.4 関連メッセージ

  • W1066 明示的に float 型の複合式の値を double 型に変換しています。
  • W1067 明示的に float 型の複合式の値を long double 型に変換しています。

6.732.5 対応バージョン

1.14.0


Next: , Previous: W1068, Up: Messages

6.733 W1069

6.733.1 メッセージ本文

この `if-else-if' 文には、末尾の `else' 節がありません。

6.733.2 内容

else 節がないと、 else 節を書き忘れているのか、 else 節が発生しない if-else if 文なのかが分からず、混乱を招きます。

6.733.3 サンプルコード

static int func(int i)
{
    if (i == 2) { /* W1069 */
        return 0;
    }
    else if (i == 4) {
        return 1;
    }
    return 2;
}

6.733.4 関連メッセージ

なし。

6.733.5 対応バージョン

1.14.0


Next: , Previous: W1069, Up: Messages

6.734 W1070

6.734.1 メッセージ本文

この `switch' 文には実行経路が 2 つしか無いため、`if-else' 文に変換可能です。

6.734.2 内容

深刻な問題ではありませんが、通常 switch 文は 2 つ以上の分岐があることが想定されるので、 case 節が 1 つしかない switch 文では、実行パスの定義漏れが疑われます。

6.734.3 サンプルコード

switch (x) { /* W1070 */
case 1:
    ...
    break;
default:
    ...
}

6.734.4 関連メッセージ

なし。

6.734.5 対応バージョン

1.14.0


Next: , Previous: W1070, Up: Messages

6.735 W1071

6.735.1 メッセージ本文

関数 `%s' には複数の終了点があります。

6.735.2 内容

出口となる return 文が関数内に複数個存在しています。

6.735.3 サンプルコード

void foo(int i) /* W1071 */
{
    if (i == 0) {
        return;
    }
}

6.735.4 関連メッセージ

なし。

6.735.5 対応バージョン

1.18.0


Next: , Previous: W1071, Up: Messages

6.736 W1072

6.736.1 メッセージ本文

`goto' 文を使用しています。

6.736.2 内容

ファイル内で goto 文が使用されています。

6.736.3 サンプルコード

static int func(int i)
{
    if (i == 1) {
        goto Label1; /* W1072 */
    }

    goto Label2; /* W1072 */

Label1:
    i = 10;
Label2:
    i = 20;
    return i;
}

6.736.4 関連メッセージ

なし。

6.736.5 対応バージョン

1.14.0


Next: , Previous: W1072, Up: Messages

6.737 W1073

6.737.1 メッセージ本文

関数 `%s' の戻り値を破棄しています。

6.737.2 内容

関数の戻り値が使用されていない場合、その戻り値は無駄な要素といえます。コード中に無駄な要素があることで解析性が低下します。 また、使用されない戻り値が多いことは、戻り値のチェックも怠っていることが推測されるため、障害許容性が低下している可能性が高いといえます。

6.737.3 サンプルコード

extern int bar(void);
static void foo(void)
{
    int i;
    int j;
    for (i = 0, bar(); i < 10; i++) { /* W1073 */
        j = bar(); /* OK */
    }
}

6.737.4 関連メッセージ

なし。

6.737.5 対応バージョン

1.16.0


Next: , Previous: W1073, Up: Messages

6.738 W1074

6.738.1 メッセージ本文

`sizeof' 演算子のオペランドは実行されないため、副作用が発生しません。

6.738.2 内容

サンプルコードで示したソースコードの場合、sizeof 演算子は式を評価しないため、data++ は実行されません。 従って data++ が実行されていることが前提だとすると様々な予期しない問題が起きる可能性があります。

6.738.3 サンプルコード

static int foo(void)
{
    int i = 0;

    if (sizeof(i++) == 4) { /* W1074 */
        return 0;
    }
    else {
        return 1;
    }
}

6.738.4 関連メッセージ

なし。

6.738.5 対応バージョン

1.16.0


Next: , Previous: W1074, Up: Messages

6.739 W1075

6.739.1 メッセージ本文

`%s' は以前に内部結合として宣言されていますが、この宣言には `static' がありません。

6.739.2 内容

static 記憶域クラス指定子が明示されていません。

6.739.3 サンプルコード

static int func(void);
int func(void) /* W1075 */
{
    ...
}

6.739.4 関連メッセージ

なし。

6.739.5 対応バージョン

1.16.0


Next: , Previous: W1075, Up: Messages

6.740 W1076

6.740.1 メッセージ本文

関数 `%s' は内部結合を持ちますが、事前に内部結合として宣言していません。

6.740.2 内容

関数プロトタイプ宣言がないまま static 記憶域クラス指定子付きの関数が定義されています。

6.740.3 サンプルコード

static int func(void) /* W1076 */
{
    return 0;
}

6.740.4 関連メッセージ

なし。

6.740.5 対応バージョン

1.16.0


Next: , Previous: W1076, Up: Messages

6.741 W1077

6.741.1 メッセージ本文

サイズが省略された配列を宣言しています。

6.741.2 内容

この配列は、サイズが明示されていません。

6.741.3 サンプルコード

extern int a[]; /* W1077 */

6.741.4 関連メッセージ

なし。

6.741.5 対応バージョン

1.16.0


Next: , Previous: W1077, Up: Messages

6.742 W9001

6.742.1 メッセージ本文

この文には制御が到達しません。

6.742.2 内容

この実行経路に至るための分岐条件が常に偽と評価されるため、この文は実行されるこ とがありません。

6.742.3 サンプルコード

extern int all_possible_values_of_int(void);
extern unsigned int zero_if_succeeded(void);

void func(void)
{
    int i = all_possible_values_of_int();

    if (i < 0) {
        unsigned int ui = zero_if_succeeded();

        if (ui > 0) {
            return;
        }

        /* "ui" is equal to zero at this point */

        /* Always be true?  No, it'll be false all the time */
        if (i < ui) {
            return; /* W9001: Control never reaches here! */
        }
        /*
         * ISO standard says;
         *   Usual Arithmetic Conversion performed before evaluating
         *   the expression "i < ui".
         * Usual Arithmetic Conversion makes "i < ui" into
         * "(unsigned int) i < ui" and then the value of "i" which
         * is less than 0 will be converted into a new value which
         * is greater than 0 because of the wrap-around.
         * So, the expression ("a value greater than 0" < 0) makes
         * always false.
         */
    }
}

6.742.4 関連メッセージ

なし。

6.742.5 対応バージョン

1.0.0


Next: , Previous: W9001, Up: Messages

6.743 W9002

6.743.1 メッセージ本文

ファイルの末尾に改行文字がありません。

6.743.2 内容

プリプロセッサによって処理する行は、すべて末尾に改行文字が必要です。

6.743.3 サンプルコード

なし。

6.743.4 関連メッセージ

なし。

6.743.5 対応バージョン

1.0.0


Next: , Previous: W9002, Up: Messages

6.744 W9003

6.744.1 メッセージ本文

暗黙的に `%s' 型のオブジェクトが `%s' 型のオブジェクトに変換されています。

6.744.2 内容

変換元または変換先の型が非標準型である暗黙的な変換が発生することを示します。

6.744.3 サンプルコード

enum Color { RED, BLUE, GREEN };
enum Fruit { APPLE, BANANA, ORANGE };

extern void foo(enum Color);

static void bar(void)
{
    int i = RED; /* W9003 */
    foo(ORANGE); /* W9003 */
}

6.744.4 関連メッセージ

なし。

6.744.5 対応バージョン

1.12.0


Next: , Previous: W9003, Up: Messages

6.745 C0001

6.745.1 メッセージ本文

この識別名 `%s' で警告を検知しました。

6.745.2 内容

W0051W0052W0491W0492W0703W0770W0771W0787W0788W0789W0790W0791W1037 メッセージの直後に出力され、問題となる識別子の対となる識別子の位置を示します。

6.745.3 サンプルコード

int very_long_long_long_long_long_long_long_identifier_2 = 1; /* W0052 */
int very_long_long_long_long_long_long_long_identifier_1 = 0; /* C0001 */

6.745.4 関連メッセージ

  • W0051 外部識別子 `%s' が他の識別子名と、リンカ特性で指定された文字数の範囲内で区別できません。
  • W0052 識別子名 `%s' が他の識別子名と、コンパイラ特性で指定された文字数の範囲内で区別できません。

6.745.5 対応バージョン

1.0.0


Next: , Previous: C0001, Up: Messages

6.746 C1000

6.746.1 メッセージ本文

次の実行パスで警告を検知しました。

6.746.2 内容

W0093W0096W0097W0115W0116W0421W0422W0423W0424W0459W0460W0461W0462W0568W0569W0570W0607W0608W0705W0707W0720W0745W1049W1050 メッセージの直後に出力され、このメッセージの後に問題を検出した状況を補足するメ ッセージが続くことを示します。

6.746.3 サンプルコード

 1: int foo(int i)
 2: {
 3:     int j; /* C1003 */
 4: 
 5:     if (i < 0) { /* C1001 */
 6:         if (i < -10) { /* C1002 */
 7:             j = 2;
 8:         }
 9:         else if (i < -5) { /* C1002 */
10:             j = 3;
11:         }
12:     }
13:     else {
14:         j = 1;
15:     }
16: 
17:     return j; /* W0460 */
18: }

a.c:17:12:warning:c_builtin:W0460:UNC:X99:変数 `j' の値は、この式の評価時点では設定されていないことがあります。
:::context:c_builtin:C1000:INF:X99:次の実行パスで警告を検知しました。
a.c:3:9:context:c_builtin:C1003:INF:X99:ここで該当変数が初期値を指定せずに定義されています。
a.c:5:11:context:c_builtin:C1001:INF:X99:この制御式を真として評価しました。
a.c:6:15:context:c_builtin:C1002:INF:X99:この制御式を偽として評価しました。
a.c:9:20:context:c_builtin:C1002:INF:X99:この制御式を偽として評価しました。

6.746.4 関連メッセージ

  • C1001 この制御式を真として評価しました。
  • C1002 この制御式を偽として評価しました。
  • C1003 ここで該当変数が初期値を指定せずに定義されています。
  • C1004 ここで該当変数に NULL の値を割り当てました。
  • C1005 ここで該当変数に NULL の可能性がある値を割り当てました。
  • C1006 ここで該当変数に値を割り当てました。

6.746.5 対応バージョン

3.2.0


Next: , Previous: C1000, Up: Messages

6.747 C1001

6.747.1 メッセージ本文

この制御式を真として評価しました。

6.747.2 内容

W0093W0096W0097W0115W0116W0421W0422W0423W0424W0459W0460W0461W0462W0568W0569W0570W0607W0608W0705W0707W0720W0745W1049W1050 メッセージを検出した状況として、該当制御式を真と評価したことを示します。

6.747.3 サンプルコード

int foo(int i)
{
    int j; /* C1003 */

    if (i < 0) { /* C1001 */
        if (i < -10) { /* C1002 */
            j = 2;
        }
        else if (i < -5) { /* C1002 */
            j = 3;
        }
    }
    else {
        j = 1;
    }

    return j; /* W0460 */
}

6.747.4 関連メッセージ

  • W0093 ゼロで除算される恐れがあります。
  • W0096 ゼロになる定数式で除算しています。
  • W0097 ゼロの値で除算しています。
  • W0115 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。
  • W0116 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。
  • W0421 値が NULL になるポインタに対して間接参照が行われています。
  • W0422 値が NULL になることがあるポインタに対して間接参照が行われています。
  • W0423 値が NULL になるポインタに対して算術演算を行っています。
  • W0424 値が NULL になることがあるポインタに対して算術演算を行っています。
  • W0459 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。
  • W0460 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。
  • W0461 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。
  • W0462 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。
  • W0568 符号付き定数式の値を左シフト演算した結果は、未定義になります。
  • W0569 符号付きの式の値を左シフト演算した結果は、未定義になります。
  • W0570 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。
  • W0607 値が負になる整数式が符号無し型に変換されています。
  • W0608 値が負になることがありうる整数式が符号無し型に変換されています。
  • W0705 配列の添字が領域外を指すことがあります。
  • W0707 配列の添字が領域外を指す定数です。
  • W0720 浮動小数点型の値が変換先の型の範囲に入りきりません。
  • W0745 配列の添字が、領域外を指しています。
  • W1049 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。
  • W1050 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。

6.747.5 対応バージョン

3.2.0


Next: , Previous: C1001, Up: Messages

6.748 C1002

6.748.1 メッセージ本文

この制御式を偽として評価しました。

6.748.2 内容

W0093W0096W0097W0115W0116W0421W0422W0423W0424W0459W0460W0461W0462W0568W0569W0570W0607W0608W0705W0707W0720W0745W1049W1050 メッセージを検出した状況として、該当制御式を偽と評価したことを示します。

6.748.3 サンプルコード

int foo(int i)
{
    int j; /* C1003 */

    if (i < 0) { /* C1001 */
        if (i < -10) { /* C1002 */
            j = 2;
        }
        else if (i < -5) { /* C1002 */
            j = 3;
        }
    }
    else {
        j = 1;
    }

    return j; /* W0460 */
}

6.748.4 関連メッセージ

  • W0093 ゼロで除算される恐れがあります。
  • W0096 ゼロになる定数式で除算しています。
  • W0097 ゼロの値で除算しています。
  • W0115 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。
  • W0116 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。
  • W0421 値が NULL になるポインタに対して間接参照が行われています。
  • W0422 値が NULL になることがあるポインタに対して間接参照が行われています。
  • W0423 値が NULL になるポインタに対して算術演算を行っています。
  • W0424 値が NULL になることがあるポインタに対して算術演算を行っています。
  • W0459 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。
  • W0460 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。
  • W0461 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。
  • W0462 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。
  • W0568 符号付き定数式の値を左シフト演算した結果は、未定義になります。
  • W0569 符号付きの式の値を左シフト演算した結果は、未定義になります。
  • W0570 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。
  • W0607 値が負になる整数式が符号無し型に変換されています。
  • W0608 値が負になることがありうる整数式が符号無し型に変換されています。
  • W0705 配列の添字が領域外を指すことがあります。
  • W0707 配列の添字が領域外を指す定数です。
  • W0720 浮動小数点型の値が変換先の型の範囲に入りきりません。
  • W0745 配列の添字が、領域外を指しています。
  • W1049 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。
  • W1050 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。

6.748.5 対応バージョン

3.2.0


Next: , Previous: C1002, Up: Messages

6.749 C1003

6.749.1 メッセージ本文

ここで該当変数が初期値を指定せずに定義されています。

6.749.2 内容

W0459W0460W0461W0462 メッセージを検出した状況として、どの位置で該当変数を定義したかを示します。

6.749.3 サンプルコード

int foo(int i)
{
    int j; /* C1003 */

    if (i < 0) { /* C1001 */
        if (i < -10) { /* C1002 */
            j = 2;
        }
        else if (i < -5) { /* C1002 */
            j = 3;
        }
    }
    else {
        j = 1;
    }

    return j; /* W0460 */
}

6.749.4 関連メッセージ

  • W0459 変数 `%s' の値は、この式の評価時点では設定されていません。このプログラムは危険です。
  • W0460 変数 `%s' の値は、この式の評価時点では設定されていないことがあります。
  • W0461 値が定まっていない変数を指すポインタを関数の実引数として使っています。このプログラムは危険です。
  • W0462 値が設定されていないことがありうる変数を指すポインタを関数の実引数として使っています。

6.749.5 対応バージョン

3.2.0


Next: , Previous: C1003, Up: Messages

6.750 C1004

6.750.1 メッセージ本文

ここで該当変数に NULL の値を割り当てました。

6.750.2 内容

W0421W0422W0423W0424 メッセージを検出した状況として、どの位置で該当変数に NULL を割り当てたかを示し ます。

6.750.3 サンプルコード

extern int *bar(void);
extern int *baz(void);

void foo(int i)
{
    int *p = NULL; /* C1004 */

    if (i < 0) { /* C1002 */
        p = bar();
        if (!p) {
            return;
        }
    }
    else {
        p = baz(); /* C1005 */
    }

    *p += 2; /* W0422 */
}

6.750.4 関連メッセージ

  • W0421 値が NULL になるポインタに対して間接参照が行われています。
  • W0422 値が NULL になることがあるポインタに対して間接参照が行われています。
  • W0423 値が NULL になるポインタに対して算術演算を行っています。
  • W0424 値が NULL になることがあるポインタに対して算術演算を行っています。

6.750.5 対応バージョン

3.2.0


Next: , Previous: C1004, Up: Messages

6.751 C1005

6.751.1 メッセージ本文

ここで該当変数に NULL の可能性がある値を割り当てました。

6.751.2 内容

W0421W0422W0423W0424 メッセージを検出した状況として、どの位置で該当変数に NULL となり得る値を割り当 てたかを示します。

6.751.3 サンプルコード

extern int *bar(void);
extern int *baz(void);

void foo(int i)
{
    int *p = NULL; /* C1004 */

    if (i < 0) { /* C1002 */
        p = bar();
        if (!p) {
            return;
        }
    }
    else {
        p = baz(); /* C1005 */
    }

    *p += 2; /* W0422 */
}

6.751.4 関連メッセージ

  • W0421 値が NULL になるポインタに対して間接参照が行われています。
  • W0422 値が NULL になることがあるポインタに対して間接参照が行われています。
  • W0423 値が NULL になるポインタに対して算術演算を行っています。
  • W0424 値が NULL になることがあるポインタに対して算術演算を行っています。

6.751.5 対応バージョン

3.2.0


Previous: C1005, Up: Messages

6.752 C1006

6.752.1 メッセージ本文

ここで該当変数に値を割り当てました。

6.752.2 内容

W0093W0096W0097W0115W0116W0568W0569W0570W0607W0608W0705W0707W0720W0745W1049W1050 メッセージを検出した状況として、どの位置で該当変数に問題の値を割り当てたかを示 します。

6.752.3 サンプルコード

int foo(int i)
{
    int j = 0; /* C1006 */

    if (i < 0) { /* C1002 */
        j = -i;
    }
    else if (i > 0) { /* C1002 */
        j = i;
    }

    return 5 / j; /* W0093 */
}

6.752.4 関連メッセージ

  • W0093 ゼロで除算される恐れがあります。
  • W0096 ゼロになる定数式で除算しています。
  • W0097 ゼロの値で除算しています。
  • W0115 符号無し左シフト演算 `<<' は、上位ビットを切り捨てます。
  • W0116 符号無し左シフト演算 `<<' は、上位ビットを切り捨てる恐れがあります。
  • W0568 符号付き定数式の値を左シフト演算した結果は、未定義になります。
  • W0569 符号付きの式の値を左シフト演算した結果は、未定義になります。
  • W0570 符号付きの式の値を左シフト演算した結果は、未定義になることがあります。
  • W0607 値が負になる整数式が符号無し型に変換されています。
  • W0608 値が負になることがありうる整数式が符号無し型に変換されています。
  • W0705 配列の添字が領域外を指すことがあります。
  • W0707 配列の添字が領域外を指す定数です。
  • W0720 浮動小数点型の値が変換先の型の範囲に入りきりません。
  • W0745 配列の添字が、領域外を指しています。
  • W1049 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できないことがあります。
  • W1050 この整数式の符号付き整数型への変換結果は、符号付きの結果の型で表現できません。

6.752.5 対応バージョン

3.2.0


Next: , Previous: Messages, Up: Top

7 メトリクス一覧


Next: , Up: Metrics

7.1 FL_STMT

7.1.1 メトリック名

ファイル内の文の数

7.1.2 内容

ファイル内に言語の構文規則としてステートメント(文)と認識されるものの数を示しま す。

7.1.3 サンプルコード

int foo(int a)
{
    int i = 0;  /* A declaration is not a statement */

    if (a > 0) {  /* An if-else-statement makes FL_STMT += 1 */
        i = a + 1;  /* An expression-statement makes FL_STMT += 1 */
    }
    else {
        ;  /* An empty expression-statement makes FL_STMT += 1 */
    }

    return i;  /* A jump-statement makes FL_STMT += 1 */
}

/* Now, FL_STMT == 4 */

void bar(int a)
{
    struct {  /* A declaration is not a statement */
        int i;
    } s;

    /* A for-statement which has 2 expression-statements (`s.i=0;' and `s.i<a;') makes FL_STMT += 3 */
    for (s.i = 0; s.i < a; s.i++) {
        switch (s.i % 3) {  /* A switch-statement makes FL_STMT += 1 */
        case 0:             /* A label is part of a labeled-statement, but it makes FL_STMT += 1 */
            puts("A\n");    /* A labeled expression-statement makes FL_STMT += 1 */
            break;          /* A jump-statement makes FL_STMT += 1 */
        case 1:             /* A label is part of a labeled-statement, but it makes FL_STMT += 1 */
            puts("B\n");    /* A labeled expression-statement makes FL_STMT += 1 */
            break;          /* A jump-statement makes FL_STMT += 1 */
        case 2:             /* A label is part of a labeled-statement, but it makes FL_STMT += 1 */
            puts("C\n");    /* A labeled expression-statement makes FL_STMT += 1 */
            break;          /* A jump-statement makes FL_STMT += 1 */
        }
    }
}

/* Finally, FL_STMT == 17 */
     MET,FL_STMT,test.c,17

7.1.4 対応バージョン

1.0.0


Next: , Previous: FL_STMT, Up: Metrics

7.2 FL_FUNC

7.2.1 メトリック名

ファイル内の関数定義の数

7.2.2 内容

ファイル内に定義されている関数の数を示します。

7.2.3 サンプルコード

void foo(void) {}  /* A function-definition makes FL_FUNC += 1 */

static void bar(void) {}  /* A function-definition makes FL_FUNC += 1 */

extern void baz(void);  /* A declaration is not a function-definition */

int qux(a, b)  /* An old style function-definition makes FL_FUNC += 1 */
    int a, b;
{
    return a + b;
}

/* FL_FUNC == 3 */
     MET,FL_FUNC,test.c,3

7.2.4 対応バージョン

1.0.0


Next: , Previous: FL_FUNC, Up: Metrics

7.3 FN_STMT

7.3.1 メトリック名

関数内の文の数

7.3.2 内容

関数内に言語の構文規則としてステートメント(文)と認識されるものの数を示します。

7.3.3 サンプルコード

int foo(int a)
{
    int i = 0;  /* A declaration is not a statement */

    if (a > 0) {  /* An if-else-statement makes foo's FN_STMT += 1 */
        i = a + 1;  /* An expression-statement makes foo's FN_STMT += 1 */
    }
    else {
        ;  /* An empty expression-statement makes foo's FN_STMT += 1 */
    }

    return i;  /* A jump-statement makes foo's FN_STMT += 1 */

    /* foo's FN_STMT == 4 */
}

void bar(int a)
{
    struct {  /* A declaration is not a statement */
        int i;
    } s;

    /* A for-statement which has 2 expression-statements (`s.i=0;' and * `s.i<a;') makes bar's FN_STMT += 3 */
    for (s.i = 0; s.i < a; s.i++) {
        switch (s.i % 3) {  /* A switch-statement makes bar's FN_STMT += 1 */
        case 0:             /* A label is part of a labeled-statement, but it makes bar's FN_STMT += 1 */
            puts("A\n");    /* A labeled expression-statement makes bar's FN_STMT += 1 */
            break;          /* A jump-statement makes bar's FN_STMT += 1 */
        case 1:             /* A label is part of a labeled-statement, but it makes bar's FN_STMT += 1 */
            puts("B\n");    /* A labeled expression-statement makes bar's FN_STMT += 1 */
            break;          /* A jump-statement makes bar's FN_STMT += 1 */
        case 2:             /* A label is part of a labeled-statement, but it makes bar's FN_STMT += 1 */
            puts("C\n");    /* A labeled expression-statement makes bar's FN_STMT += 1 */
            break;          /* A jump-statement makes bar's FN_STMT += 1 */
        }
    }

    /* bar's FN_STMT == 13 */
}
     MET,FN_STMT,foo,int foo(int),test.c,1,5,4
     MET,FN_STMT,bar,void bar(int),test.c,14,6,13

7.3.4 対応バージョン

1.0.0


Next: , Previous: FN_STMT, Up: Metrics

7.4 FN_UNRC

7.4.1 メトリック名

関数内の制御が到達しない文の数

7.4.2 内容

いかなる条件でも実行されることのないステートメントの数を示します。

7.4.3 サンプルコード

#include <stdlib.h>

int foo(int i)
{
    unsigned int ui;

    if (i < 0) {
        switch (i) {
        case -3:
            ui = 0;
            break;
        /* Control never reaches to this "case 3:" clause because "i" is less than 0 at this point */
        case 3:      /* This label is part of an unreachable labeled-statement, but it makes foo's FN_UNRC += 1 */
            ui = 1;  /* An unreachable labeled expression-statement makes FN_UNRC += 1 */
            break;   /* An unreachable jump-statement makes FN_UNRC += 1 */
        default:
            ui = 0;
        }

        /* "ui" is equal to 0 at this point */

        /*
         * The usual-arithmetic-conversion makes "i < ui" into "(unsigned int) i < ui".
         * Then, the value of "i" which is less than 0 will be converted into the new value which is greater than 0
         * because of the wrap-around.
         * So, "(value which is greater than 0) < 0" makes false at all times.
         */
        if (i < ui) {
            exit(0);  /* An unreachable expression-statement makes FN_UNRC += 1 */
        }
    }
    else {
        /* "i" is greater than or equal to 0 at this point */

        abort();  /* The abort() standard function terminates this execution path */
    }

    /* "i" is less than 0 at this point */

    if (i == 3) {   /* "(value which is less than 0) == 3" makes false at all times */
        return -1;  /* An unreachable jump-statement makes FN_UNRC += 1 */
    }

    return 0;

    /* foo's FN_UNRC == 5 */
}
     MET,FN_UNRC,foo,int foo(int),test.c,3,5,5

7.4.4 対応バージョン

1.0.0


Next: , Previous: FN_UNRC, Up: Metrics

7.5 FN_LINE

7.5.1 メトリック名

関数内の保守コード行数

7.5.2 内容

関数定義の開始行から関数定義の終了行までの物理行数を示します。

7.5.3 サンプルコード

int foo(void)  /* foo's function definition starts here */
{
    return 0;
}  /* foo's function definition ends here */

/* foo's FN_LINE == 3 */

int
bar  /* bar's function definition starts here */
(void)
{
    return 0;
}  /* bar's function definition ends here */

/* bar's FN_LINE == 5 */

int
baz  /* baz's old style function definition starts here */
(a)
int a;
{
    return 0;
}  /* baz's old style function definition ends here */

/* baz's FN_LINE == 6 */
     MET,FN_LINE,foo,int foo(void),test.c,1,5,3
     MET,FN_LINE,bar,int bar(void),test.c,8,1,5
     MET,FN_LINE,baz,int baz(int),test.c,17,1,6

7.5.4 対応バージョン

1.0.0


Next: , Previous: FN_LINE, Up: Metrics

7.6 FN_PARA

7.6.1 メトリック名

関数の仮引数の数

7.6.2 内容

関数定義の引数リスト内に宣言された仮引数の数を示します。

7.6.3 サンプルコード

int foo(int a, long b, char *p)
{
    return 0;
}
/* foo's FN_PARA == 3 */

int bar(a, b, p)  /* An old style function definition */
    long b;  /* A type-specifier of "a" is omitted */
    char *p;
{
    return 0;
}
/* bar's FN_PARA == 3 */
     MET,FN_PARA,foo,"int foo(int,long,char *)",test.c,1,5,3
     MET,FN_PARA,bar,"int bar(int,long,char *)",test.c,6,5,3

7.6.4 対応バージョン

1.0.0


Next: , Previous: FN_PARA, Up: Metrics

7.7 FN_UNUV

7.7.1 メトリック名

関数内の未使用および再使用されない変数の数

7.7.2 内容

使用されないにも関わらず宣言されている変数、および、値を割り当てた後に使用され ない変数の数を示します。

7.7.3 サンプルコード

void foo(int i, int j)  /* A useless declaration of "j" makes FN_UNUV += 1 */
{
    int a;
    int b;
    int c = 0;  /* A useless declaration of "c" makes FN_UNUV += 1 */

    if (i < 0) {
        a = -i;
    }
    else {
        a = i;
    }

    b = a * 2;  /* A useless assignment to "b" makes FN_UNUV += 1 */
    printf("%d\n", a);

    /* foo's FN_UNUV == 3 */
}
     MET,FN_UNUV,foo,"void foo(int,int)",test.c,1,6,3

7.7.4 対応バージョン

1.0.0


Next: , Previous: FN_UNUV, Up: Metrics

7.8 FN_CSUB

7.8.1 メトリック名

関数内の子関数コールの数

7.8.2 内容

関数内にて他の関数を呼び出す箇所数を示します。

7.8.3 サンプルコード

extern int foo(int);

static int bar(int);

int baz(int i)
{
    int j = foo(i);  /* A function-call-expression makes baz's FN_CSUB += 1 */

    return foo(bar(j)); /* 2 function-call-expressions makes baz's FN_CSUB += 2 */

    /* baz's FN_CSUB == 3 */
}
     MET,FN_CSUB,baz,int baz(int),test.c,5,5,3

7.8.4 対応バージョン

1.0.0


Next: , Previous: FN_CSUB, Up: Metrics

7.9 FN_CALL

7.9.1 メトリック名

他の関数から被呼び出し箇所数

7.9.2 内容

該当する関数がプロジェクト中の他の関数から呼び出される箇所数を示します。

7.9.3 サンプルコード

test1.c

int foo(int i) { return i + 1; }

int bar(int i)
{
    return foo(i) + 1;  /* A function-call-expression makes foo's FN_CALL += 1 */
}

test2.c

extern int bar(int);

static void baz(void)
{
    int i = bar(0);  /* A function-call-expression makes bar's FN_CALL += 1 and foo's FN_CALL += 1 */
}

project-name.met.csv

     MET,FN_CALL,foo,int foo(int),test1.c,1,5,2
     MET,FN_CALL,bar,int bar(int),test1.c,3,5,1
     MET,FN_CALL,baz,void baz(void),test2.c,3,13,0

7.9.4 対応バージョン

1.0.0


Next: , Previous: FN_CALL, Up: Metrics

7.10 FN_GOTO

7.10.1 メトリック名

関数内の goto 文の数

7.10.2 内容

関数内に記された goto 文の数を示します。

7.10.3 サンプルコード

int foo(int i)
{
    switch (i) {
    case 0:
        goto ZERO;  /* A goto-statement makes foo's FN_GOTO += 1 */
    case 1:
        goto ONE;   /* A goto-statement makes foo's FN_GOTO += 1 */
    default:
        return 0;
    }

ZERO:
    return 1;

ONE:
    return 2;

    /* foo's FN_GOTO == 2 */
}
     MET,FN_GOTO,foo,int foo(int),test.c,1,5,2

7.10.4 対応バージョン

1.0.0


Next: , Previous: FN_GOTO, Up: Metrics

7.11 FN_RETN

7.11.1 メトリック名

関数内の戻り点の数

7.11.2 内容

実行される return 文の数、および、関数末尾にある暗黙の return 文 の数を示します。

7.11.3 サンプルコード

void foo(int i)
{
    if (i < 0) {
        return;  /* A return-statement makes foo's FN_RETN += 1 */
    }

    if (i >= 10) {
        return;  /* A return-statement makes foo's FN_RETN += 1 */
    }
    else {
        for (; i < 10; i++) {
          printf("%d\n", i);
        }
    }

    /* An implicit return from the function whose return type is void makes foo's FN_RETN * += 1 */

    /* foo's FN_RETN == 3 */
}

int bar(int i)
{
    if (i < 0) {
        return -1;  /* A return-statement makes bar's FN_RETN += 1 */
    }

    if (i >= 10) {
        return -1;  /* A return-statement makes bar's FN_RETN += 1 */
    }
    else {
        for (; i < 10; i++) {
          printf("%d\n", i);
        }
    }

    return 0;  /* A return-statement makes bar's FN_RETN += 1 */

    /* bar's FN_RETN == 3 */
}
     MET,FN_RETN,foo,void foo(int),test.c,1,6,3
     MET,FN_RETN,bar,int bar(int),test.c,20,5,3

7.11.4 対応バージョン

1.0.0


Next: , Previous: FN_RETN, Up: Metrics

7.12 FN_UELS

7.12.1 メトリック名

関数内の完結していない if-else 文の数

7.12.2 内容

関数内の if-else 文で、明示的な else 節を持たないものの数を示しま す。

7.12.3 サンプルコード

int foo(int i)
{
    int j;

    if (i < 0) {
        return -1;
    }
    else {
        j = i + 1;
    }

    if (j % 2) {
        return -1;
    }
    /* A standalone if-statement does nothing to the FN_UELS metric */

    if (i == 2) {
        return 0;
    }
    else if (i == 4) {
        return 1;
    }
    /* An implicit else clause makes foo's FN_UELS += 1 */

    return 5;

    /* foo's FN_UELS == 1 */
}
     MET,FN_UELS,foo,int foo(int),test.c,1,5,1

7.12.4 対応バージョン

1.0.0


Next: , Previous: FN_UELS, Up: Metrics

7.13 FN_NEST

7.13.1 メトリック名

関数内のネスティングの最深段数

7.13.2 内容

関数内で制御構造のネストが一番深い部分のネスト段数を示します。

7.13.3 サンプルコード

void foo(int i)
{
    /* Nesting level == 0 */

    if (i < 0) {
        /* Nesting level == 1 */

        switch (i) {
            /* Nesting level == 2 */
        case -1:
            return;
        case -2:
            puts("A\n");
            break;
        }

        /* Nesting level == 1 */
    }
    else {
        /* Nesting level == 1 */
        int j;
        int k;

        for (j = 0; j < i; j++) {
            /* Nesting level == 2 */

            for (k = 0; k < 10; k++) {
                /* Nesting level == 3 */

                if (j == k) {
                    /* Nesting level == 4 */
                    puts("B\n");
                }
            }
        }
    }

    /* foo's FN_NEST == 4 */
}
     MET,FN_NEST,foo,void foo(int),test.c,1,6,4

7.13.4 対応バージョン

1.0.0


Next: , Previous: FN_NEST, Up: Metrics

7.14 FN_PATH

7.14.1 メトリック名

関数内の推定静的パス数

7.14.2 内容

関数の制御フロー内で考えられるすべての実行経路の数を示します。

7.14.3 サンプルコード

static int foo(int i)
{
    /* A */
    if (i == 0) {
        /* B */
        i = 0;
    }
    else {
        /* C */
        i = 1;
    }
    /* D */
    return i;

    /* Possible execute paths A->B->D and A->C->D makes foo's FN_PATH = 2 */
}

static int bar(int i)
{
    /* A */
    if (i == 0) {
        /* B */
        i = 0;
    }
    /* C */
    if (i == 1) {
        /* D */
        i = 1;
    }
    /* E */
    if (i == 2) {
        /* F */
        i = 2;
    }
    /* G */
    return i;

    /* Possible execute paths
         A->B->C->D->E->F->G,
         A->B->C->D->E->G,
         A->B->C->E->F->G,
         A->B->C->E->G,
         A->C->D->E->F->G,
         A->C->D->E->G,
         A->C->E->F->G,
         A->C->E->G
       makes bar's FN_PATH = 8 */
}

static int baz(int i)
{
    /* A */
    switch (i) {
    case 0:
        /* B */
        if (rand()) {
            /* C */
            i = 0;
        }
        else {
            /* D */
            i = 0;
        }
        /* E */
        i = 0;
        break;
    default:
        /* F */
        if (rand()) {
            /* G */
            i = 1;
        }
        else {
            /* H */
            i = 1;
        }
        /* I */
        i = 1;
        break;
    }
    /* J */
    return i;

    /* Possible execute paths
         A->B->C->E->J,
         A->B->D->E->J,
         A->F->G->I->J,
         A->F->H->I->J
       makes baz's FN_PATH = 4 */
}

static int qux(int i)
{
    /* A */
    while (i < 5) {
        /* B */
        if (i == 0) {
            /* C */
            return 0;
        }
        /* D */
        if (i == 1) {
            /* E */
            return 1;
        }
    }
    /* F */
    if (i == 2) {
        /* G */
        return 2;
    }
    /* H */
    return 3;

    /* Possible execute paths
         A->B->C,
         A->B->D->E,
         A->B->D->F->G,
         A->B->D->F->H,
         A->F->G,
         A->F->H
       makes qux's FN_PATH = 6 */
}
     MET,FN_PATH,foo,int foo(int),test.c,1,12,2
     MET,FN_PATH,bar,int bar(int),test.c,18,12,8
     MET,FN_PATH,baz,int baz(int),test.c,42,12,4
     MET,FN_PATH,qux,int qux(int),test.c,80,12,6

7.14.4 対応バージョン

1.0.0


Previous: FN_PATH, Up: Metrics

7.15 FN_CYCM

7.15.1 メトリック名

関数の経路複雑度

7.15.2 内容

McCabe(マッケーブ)の提唱したメトリックで、プログラムを構成する線上にある独立し たパスの数を示します。

計算式「制御フローグラフのエッジ数 - ノード数 + 2」で算出し、関数中の分 岐の数に 1 を足したものに等しくなります。

7.15.3 サンプルコード

static int foo(int i)
{
    if (i == 0) {  /* Complexity += 1 */
        i = 0;
    }
    else {  /* An else branch does not grow the complexity */
        i = 1;
    }
    return i;

    /* foo's FN_CYCM == 2 */
}

static int bar(int i)
{
    if (i == 0) {  /* Complexity += 1 */
        i = 0;
    }
    if (i == 1) {  /* Complexity += 1 */
        i = 1;
    }
    if (i == 2) {  /* Complexity += 1 */
        i = 2;
    }
    return i;

    /* bar's FN_CYCM == 4 */
}

static int baz(int i)
{
    switch (i) {
    case 0:  /* Complexity += 1 */
        if (rand()) {  /* Complexity += 1 */
            i = 0;
        }
        else {  /* An else branch does not grow the complexity */
            i = 0;
        }
        i = 0;
        break;
    default:  /* A default clause does not grow the complexity */
        if (rand()) {  /* Complexity += 1 */
            i = 1;
        }
        else {  /* An else branch does not grow the complexity */
            i = 1;
        }
        i = 1;
        break;
    }
    return i;

    /* baz's FN_CYCM == 4 */
}

static int qux(int i)
{
    while (i < 5) {  /* An iteration does not grow the complexity */
        if (i == 0) {  /* Complexity += 1 */
            return 0;
        }
        if (i == 1) {  /* Complexity += 1 */
            return 1;
        }
    }
    if (i == 2) {  /* Complexity += 1 */
        return 2;
    }
    return 3;

    /* qux's FN_CYCM == 4 */
}
     MET,FN_CYCM,foo,int foo(int),test.c,1,12,2
     MET,FN_CYCM,bar,int bar(int),test.c,13,12,4
     MET,FN_CYCM,baz,int baz(int),test.c,28,12,4
     MET,FN_CYCM,qux,int qux(int),test.c,54,12,4

7.15.4 対応バージョン

1.0.0


Next: , Previous: Metrics, Up: Top

8 コード情報一覧


Next: , Up: CodeStructures

8.1 VER

8.1.1 コード情報名

バージョンレコード

8.1.2 内容

解析に使用した AdLint のバージョンや、実行日時を記録します。

8.1.3 サンプルコード

バージョンレコードの出力例を参照。

8.1.4 対応バージョン

1.0.0


Next: , Previous: VER, Up: CodeStructures

8.2 DCL(T)

8.2.1 コード情報名

型宣言レコード

8.2.2 内容

typedefstructunionenum による型宣言について、 宣言位置、型の種別、型名などを出力します。

8.2.3 サンプルコード

宣言レコードの出力例を参照。

8.2.4 対応バージョン

1.0.0


Next: , Previous: DCL(T), Up: CodeStructures

8.3 DCL(V)

8.3.1 コード情報名

外部変数宣言レコード

8.3.2 内容

外部リンケージを持つグローバル変数の宣言について、宣言位置、変数名、変数型を出 力します。

8.3.3 サンプルコード

宣言レコードの出力例を参照。

8.3.4 対応バージョン

1.0.0


Next: , Previous: DCL(V), Up: CodeStructures

8.4 DCL(F)

8.4.1 コード情報名

関数宣言レコード

8.4.2 内容

外部リンケージを持つ関数宣言について、宣言位置、関数名、関数シグニチャ情報を出 力します。

8.4.3 サンプルコード

宣言レコードの出力例を参照。

8.4.4 対応バージョン

1.0.0


Next: , Previous: DCL(F), Up: CodeStructures

8.5 DEF(V)

8.5.1 コード情報名

変数定義レコード

8.5.2 内容

関数の仮引数を含む全ての変数定義について、定義位置、変数名、変数型などを出力し ます。

8.5.3 サンプルコード

定義レコードの出力例を参照。

8.5.4 対応バージョン

1.0.0


Next: , Previous: DEF(V), Up: CodeStructures

8.6 DEF(F)

8.6.1 コード情報名

関数定義レコード

8.6.2 内容

全ての関数定義について、定義位置、関数名、関数シグニチャなどを出力します。

8.6.3 サンプルコード

定義レコードの出力例を参照。

8.6.4 対応バージョン

1.0.0


Next: , Previous: DEF(F), Up: CodeStructures

8.7 DEF(M)

8.7.1 コード情報名

マクロ定義レコード

8.7.2 内容

すべてのマクロ定義について、定義位置、マクロ名、マクロの種別を出力します。

8.7.3 サンプルコード

定義レコードの出力例を参照。

8.7.4 対応バージョン

1.0.0


Next: , Previous: DEF(M), Up: CodeStructures

8.8 DEF(L)

8.8.1 コード情報名

ラベル定義レコード

8.8.2 内容

関数内の全てのラベルについて、定義位置、ラベル名を出力します。

8.8.3 サンプルコード

定義レコードの出力例を参照。

8.8.4 対応バージョン

1.0.0


Next: , Previous: DEF(L), Up: CodeStructures

8.9 INI

8.9.1 コード情報名

初期化レコード

8.9.2 内容

変数定義時の初期化について、初期化位置、初期化する変数名、初期値を出力します。

8.9.3 サンプルコード

初期化レコードの出力例を参照。

8.9.4 対応バージョン

1.0.0


Next: , Previous: INI, Up: CodeStructures

8.10 ASN

8.10.1 コード情報名

代入式レコード

8.10.2 内容

変数への代入式について、代入式の位置、代入する変数名、代入値を出力します。

8.10.3 サンプルコード

代入式レコードの出力例を参照。

8.10.4 対応バージョン

1.0.0


Next: , Previous: ASN, Up: CodeStructures

8.11 DEP(I)

8.11.1 コード情報名

インクルードレコード

8.11.2 内容

#include ディレクティブで他のファイルをインクルードした場合に、 #include ディレクティブの位置、インクルードするファイルのパス名を出力し ます。

8.11.3 サンプルコード

依存レコードの出力例を参照。

8.11.4 対応バージョン

1.0.0


Next: , Previous: DEP(I), Up: CodeStructures

8.12 DEP(C)

8.12.1 コード情報名

呼び出しレコード

8.12.2 内容

関数から他の関数を呼び出した場合、呼び出し位置、呼び出し元の関数名、呼び出し先 の関数名などを出力します。

8.12.3 サンプルコード

依存レコードの出力例を参照。

8.12.4 対応バージョン

1.0.0


Next: , Previous: DEP(C), Up: CodeStructures

8.13 DEP(X)

8.13.1 コード情報名

外部参照レコード

8.13.2 内容

関数からグローバル変数をアクセス、関数から他の関数のアドレスを参照した場合に、 アクセス位置、アクセス元の関数名、アクセス先のオブジェクト名などを出力します。

8.13.3 サンプルコード

依存レコードの出力例を参照。

8.13.4 対応バージョン

1.0.0


Next: , Previous: DEP(X), Up: CodeStructures

8.14 LIT

8.14.1 コード情報名

リテラルレコード

8.14.2 内容

定数、文字列リテラルを使用した場合、使用した位置、定数や文字列リテラルの内容な どを出力します。

8.14.3 サンプルコード

リテラルレコードの出力例を参照。

8.14.4 対応バージョン

1.0.0


Previous: LIT, Up: CodeStructures

8.15 PRE

8.15.1 コード情報名

プリプロセスレコード

8.15.2 内容

プリプロセッサディレクティブについて、使用位置、ディレクティブ名、ディレクティ ブに指定した引数を出力します。

8.15.3 サンプルコード

プリプロセスレコードの出力例を参照。

8.15.4 対応バージョン

1.0.0


Next: , Previous: CodeStructures, Up: Top

Appendix A 付録

A.1 スクリーンショット

A.1.1 Adqua との連携

AdLint の静的解析結果を Adqua で処理することにより、ソースコード品質を定量的に 評価することができます。

Adqua は株式会社オージス総研から入手可能です 。詳しくは Adqua 製 品情報をご覧ください。

adlint_on_adqua.png

A.1.2 テキストエディタ Vim との連携

AdLint は、標準的なコンパイラと同様の形式で警告メッセージを出力するので、テキス トエディタと容易に連携して開発中にコードチェックすることができます。

adlint_on_vim_ja.png

A.1.3 統合開発環境 Eclipse との連携

AdLint は、標準的なコンパイラと同様の形式で警告メッセージを出力するので、統合開 発環境と容易に連携して開発中にコードチェックすることができます。

adlint_on_eclipse_ja.png

A.2 特性ファイルのサンプル

#     ___    ____  __    ___   _________
#    /   |  / _  |/ /   / / | / /__  __/           Source Code Static Analyzer
#   / /| | / / / / /   / /  |/ /  / /                   AdLint - Advanced Lint
#  / __  |/ /_/ / /___/ / /|  /  / /
# /_/  |_|_____/_____/_/_/ |_/  /_/   Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.
#
# This file is part of AdLint.
#
# AdLint is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# AdLint is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# AdLint.  If not, see <http://www.gnu.org/licenses/>.
#

# Schema version of the traits file.
# DO NOT EDIT MANUALLY!
version: "3.0.0"

# List of names of source code examination packages.
#
# "c_builtin" is a builtin source code examination package for C language.
# You can install optional examination packages and append (or replace) this
# list to specify which examination packages are to be run.
exam_packages:
  - "c_builtin"

#
# Project specific traits section
#
project_traits:

  # Project name.
  project_name: "screen-4.0.3"

  # Project root directory.
  project_root: ".."

  # Analysys target selection.
  # Ex.
  #   target_files:
  #     inclusion_paths:
  #       - "../foo"
  #       - "../bar"
  #     exclusion_paths:
  #       - "../bar/baz"
  target_files:
    inclusion_paths:
      - ".."
    exclusion_paths:

  # Pathname of the project specific initial header file.
  # This header file is automatically included above the first line of the
  # target source file.
  initial_header: "adlint_pinit.h"

  # Project specific additional include paths.
  # Ex.
  #   file_search_paths:
  #     - "include/foo"
  #     - "../include/bar"
  #     - "/opt/baz/include"
  file_search_paths:
    - "../screen-4.0.3"

  #
  # Project specific coding style section
  #
  coding_style:

    # Indent style which is a convention governing the identation of blocks.
    # Select from "K&R", "Allman" and "GNU".
    #
    # The value "K&R" means...
    #   int foo(int i)
    #   {
    #       if (i == 0) {
    #           return 0;
    #       }
    #       return i;
    #   }
    #
    # The value "Allman" means...
    #   int foo(int i)
    #   {
    #       if (i == 0)
    #       {
    #           return 0;
    #       }
    #       return i;
    #   }
    #
    # The value "GNU" means...
    #   int
    #   foo(int i)
    #   {
    #     if (i == 0)
    #       {
    #         return 0;
    #       }
    #     return i;
    #   }
    indent_style: "GNU"

    # Appearance width of a TAB character.
    tab_width: 8

    # Appearance width of 1-level of the indentation.
    indent_width: 2

  # Character encoding of source files.
  file_encoding:

#
# Compiler specific traits section
#
compiler_traits:

  # Pathname of the compiler specific initial header file.
  # This header file is automatically included above the first line of the
  # project specific initial header file.
  initial_header: "adlint_cinit.h"

  # Compiler specific include paths.
  # Ex.
  #   file_search_paths:
  #     - "/usr/include"
  #     - "/usr/local/include"
  file_search_paths:
    - "/usr/local/include"
    - "/usr/include"
    - "/usr/lib/gcc/i686-redhat-linux/4.5.1/include"

  #
  # Compiler specific standard type section
  #
  standard_types:

    # Bit size of the `char' type family.
    char_size: 8
    # Bit size of the alignment of the `char' type family.
    char_alignment: 8

    # Bit size of the `short' type family.
    short_size: 16
    # Bit size of the alignment of the `short' type family.
    short_alignment: 16

    # Bit size of the `int' type family.
    int_size: 32
    # Bit size of the alignment of the `int' type family.
    int_alignment: 32

    # Bit size of the `long int' type family.
    long_size: 32
    # Bit size of the alignment of the `long int' type family.
    long_alignment: 32

    # Bit size of the `long long int' type family.
    long_long_size: 64
    # Bit size of the alignment of the `long long int' type family.
    long_long_alignment: 64

    # Bit size of the `float' type.
    float_size: 32
    # Bit size of the alignment of the `float' type.
    float_alignment: 32

    # Bit size of the `double' type.
    double_size: 64
    # Bit size of the alignment of the `double' type.
    double_alignment: 64

    # Bit size of the `long double' type.
    long_double_size: 96
    # Bit size of the alignment of the `long double' type.
    long_double_alignment: 96

    # Bit size of the pointer to functions.
    code_ptr_size: 32
    # Bit size of the alignment of the pointer to functions.
    code_ptr_alignment: 32

    # Bit size of the pointer to data.
    data_ptr_size: 32
    # Bit size of the alignment of the pointer to data.
    data_ptr_alignment: 32

    # Treat the `char' type as same as the `unsigned char' type?
    char_as_unsigned_char: true

  # Treat the `>>' operator as a logical shift, not an arithmetic shift?
  arithmetic:
    logical_right_shift: true

  # Max length of all symbols can be identified by the compiler.
  identifier_max: 128

  # Token substitution setting to warn the use of compiler specific extensions.
  #
  # If your compiler supports `__attribute__(...)' extension and you want to
  # know the use of this extension, specify as below.
  #   extension_substitutions:
  #     "__attribute__(__adlint__any)": ""
  # The token sequence consists of `__attribute__', `(', any kind of tokens,
  # `)' will be replaced with nothing (erased) after the preprocessing phase.
  # And this substitution will be warned by the message W0061.
  extension_substitutions:
    "__extension__": ""
    "__attribute__(__adlint__any)": ""
    "__inline__": "inline"
    "__asm__ __adlint__any(__adlint__any)": ""

  # Token substitution setting to silently ignore the use of compiler specific
  # extensions.
  #
  # If your compiler supports `__asm__ volatile (...)' extension and you do not
  # mind the use of this extension, specify as below.
  #   arbitrary_substitutions:
  #     "__asm__ __adlint__any(__adlint__any)": ""
  # The token sequence consists of `__asm__', any kind of tokens, `(', any kind
  # of tokens, `)' will be replaced with nothing (erased) silently after the
  # preprocessing phase.
  arbitrary_substitutions:
    "typeof": "__typeof__"
    "__typeof": "__typeof__"
    "alignof": "__alignof__"
    "__alignof": "__alignof__"
    "__signed__": "signed"

#
# Linker specific traits section
#
linker_traits:

  # Max length of external symbols can be identified by the linker.
  identifier_max: 128

  # Are external symbols identified without case by the linker?
  identifier_ignore_case: false

#
# Message traits section
#
message_traits:

  # Language of the message text.
  # Currently, "en_US" and "ja_JP" are supported.
  # Please help to translate the message catalog into your language.
  language: "ja_JP"

  # Enable inline annotation based message suppression?
  individual_suppression: true

  # Project-wide code check exclusion settings.
  # Ex.
  #   exclusion:
  #     categories:
  #       - "REL"
  #       - "PRT"
  #     severities: "[ABC][5-9][0-9]"
  #     messages:
  #       W0001: "c_builtin"
  #       W0002: "c_ansi"
  exclusion:

  # Project-wide code check inclusion settings.
  # Ex.
  #   inclusion:
  #     messages:
  #       W0001: "c_builtin"
  #       W0002: "c_ansi"
  inclusion:

  # Message text replacement.
  # Ex.
  #   change_list:
  #     W9999:
  #       package: "c_builtin"
  #       classes:
  #         - "REL:A10"
  #         - "PRT:B20"
  #       format: "Your custom message for the warning of W9999."
  #     X9999:
  #       package: "core"
  #       classes:
  #         - "ERR:X99"
  #       format: "Your custom message for the warning of X9999."
  #     E9999:
  #       package: "core"
  #       classes:
  #         - "ERR:X99"
  #       format: "Your custom message for the warning of E9999."
  change_list:

A.3 解析手順 GNUmakefile のサンプル

#     ___    ____  __    ___   _________
#    /   |  / _  |/ /   / / | / /__  __/           Source Code Static Analyzer
#   / /| | / / / / /   / /  |/ /  / /                   AdLint - Advanced Lint
#  / __  |/ /_/ / /___/ / /|  /  / /
# /_/  |_|_____/_____/_/_/ |_/  /_/   Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.
#
# This file is part of AdLint.
#
# AdLint is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# AdLint is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# AdLint.  If not, see <http://www.gnu.org/licenses/>.
#
# How...
#   - to validate configuration files
#     % make check
#   - to analyze whole project with compiler like messages
#     % make all
#   - to do only single module analyses with compiler like messages
#     % make sma-only
#   - to analyze whole project with progress report
#     % make verbose-all
#   - to do only single module analyses with progress report
#     % make verbose-sma-only
#   - to do only cross module analysis with progress report
#     % make verbose-cma-only
#   - to analyze whole project *FAST* on 4-core processor machine
#     % make -j 4 all
#   - to analyze whole project *FAST* and silently with elapsed time
#     % time make -j 4 all 2>/dev/null
#   - to delete all result files
#     % make clean
#

PROJECT = screen-4.0.3

SOURCES = \
  screen-4.0.3/screen.c \
  screen-4.0.3/ansi.c \
  screen-4.0.3/fileio.c \
  screen-4.0.3/mark.c \
  screen-4.0.3/misc.c \
  screen-4.0.3/resize.c \
  screen-4.0.3/socket.c \
  screen-4.0.3/search.c \
  screen-4.0.3/tty.c \
  screen-4.0.3/term.c \
  screen-4.0.3/window.c \
  screen-4.0.3/utmp.c \
  screen-4.0.3/loadav.c \
  screen-4.0.3/putenv.c \
  screen-4.0.3/help.c \
  screen-4.0.3/termcap.c \
  screen-4.0.3/input.c \
  screen-4.0.3/attacher.c \
  screen-4.0.3/pty.c \
  screen-4.0.3/process.c \
  screen-4.0.3/display.c \
  screen-4.0.3/comm.c \
  screen-4.0.3/kmapdef.c \
  screen-4.0.3/acls.c \
  screen-4.0.3/braille.c \
  screen-4.0.3/braille_tsi.c \
  screen-4.0.3/logfile.c \
  screen-4.0.3/layer.c \
  screen-4.0.3/sched.c \
  screen-4.0.3/teln.c \
  screen-4.0.3/nethack.c \
  screen-4.0.3/encoding.c

VPATH = ..
VPATH_COMPONENTS = 1

RUBY = ruby

ADLINT = adlint
ADLINT_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS)

ADLINT_SMA = adlint_sma
ADLINT_SMA_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS)

ADLINT_CMA = adlint_cma
ADLINT_CMA_FLAGS = -t adlint_traits.yml -o .

ADLINT_CHK = adlint_chk
ADLINT_CHK_FLAGS = -t adlint_traits.yml -o . -p $(VPATH_COMPONENTS)

RM = $(RUBY) -r fileutils -e 'FileUtils.rm_f(ARGV)'

VPATHED_SOURCES = $(addprefix $(VPATH)/, $(SOURCES))

SMA_MSG_FILES = $(addsuffix .msg.csv, $(SOURCES))
SMA_MET_FILES = $(addsuffix .met.csv, $(SOURCES))
SMA_I_FILES = $(addsuffix .i, $(basename $(SOURCES)))
SMA_LOG_FILES = $(addsuffix .log, $(SOURCES))

CMA_MSG_FILE = $(PROJECT).msg.csv
CMA_MET_FILE = $(PROJECT).met.csv
CMA_LOG_FILE = $(PROJECT).log

.SUFFIXES:

%.c.msg.csv %.c.met.csv : %.c
	$(ADLINT_SMA) $(ADLINT_SMA_FLAGS) $<

$(CMA_MET_FILE) : $(SMA_MET_FILES)
	$(ADLINT_CMA) $(ADLINT_CMA_FLAGS) $^

.PHONY: adlint_sma-all
adlint_sma-all : $(SMA_MET_FILES)

.PHONY: adlint_cma-all
adlint_cma-all : $(CMA_MET_FILE)

.PHONY: adlint_chk-all
adlint_chk-all :
	$(ADLINT_CHK) $(ADLINT_CHK_FLAGS) -v $(VPATHED_SOURCES)

.PHONY: adlint_verbose-all
adlint_verbose-all :
	$(ADLINT) $(ADLINT_FLAGS) -v $(VPATHED_SOURCES)

.PHONY: adlint_verbose-sma-only
adlint_verbose-sma-only :
	$(ADLINT_SMA) $(ADLINT_SMA_FLAGS) -v $(VPATHED_SOURCES)

.PHONY: adlint_verbose-cma-only
adlint_verbose-cma-only : $(SMA_MET_FILES)
	$(ADLINT_CMA) $(ADLINT_CMA_FLAGS) -v $^

.PHONY: adlint_clean
adlint_clean :
	@$(RM) $(SMA_MSG_FILES) $(SMA_MET_FILES) $(SMA_I_FILES) \
	       $(SMA_LOG_FILES) $(CMA_MSG_FILE) $(CMA_MET_FILE) $(CMA_LOG_FILE)

.PHONY: all
all : adlint_cma-all

.PHONY: sma-only
sma-only : adlint_sma-all

.PHONY: verbose-all
verbose-all : adlint_verbose-all

.PHONY: verbose-sma-only
verbose-sma-only : adlint_verbose-sma-only

.PHONY: verbose-cma-only
verbose-cma-only : adlint_verbose-cma-only

.PHONY: check
check : adlint_chk-all

.PHONY: clean
clean : adlint_clean


Previous: Appendix, Up: Top

索引

adlint-3.2.0/share/logo/0000755000004100000410000000000012224440633015061 5ustar www-datawww-dataadlint-3.2.0/share/logo/adlint-110.png0000644000004100000410000002763412224440633017355 0ustar www-datawww-dataPNG  IHDRnn[&tEXtSoftwareAdobe ImageReadyqe</>IDATx}|յZJ^-ɲdYލ p0I^I /IHCy! SB轺6EqeUYiw9wfVʖɟVssgt$6F>RNs꿧^>^'7ΗQPPީ vu!G MG~VK_| @SO>4yh `:ۯFz 9bN@uIX) ,sWrܾ 7TΑppqW)єo"p_Pg{-o31!/I#o@IWR I/aF4 %;S Q{?h>bZJ,y.uXxgo9~^E\!H>_>mMxdUEC}{|TX&;;(;%F 3Dg[cb)*iۋ}JkGO9( O+ #Ʉvc0KMlZRC~7] d{[ GY><1ʀ1Rcs)hD|Z˯3cwI+@؄! +>WN,$E3HB$>zauh_wO_ fWR/>[$!_+DuOLwR~4x(l׊ <|EG<;[ Ev^^ .Ӥ !s31).L0XUܩIGSn$n.IK';_-avF$63!q:e~ :hМ fioh"Σv?ܾd°q2"g#2ğ(V Į~#B|܎ |HJ%Mǡ,[ ܏?`u I%{2`.VosB91GA2߾m&V_P:&S0+)r4Zf]]x|:4]{lt5q<^W94^]V|p^\Jp " |[!6Fğ Ξ-ÄAH* q>gORY鱸h4?CIss˞v7#:i]]MLCKj)Q|CWPqĶX@ ~I}Y1`ܴ` &6MɎ`[6!O3lk?[\!\U X1qR,&P祒sEU37P|O}QINÛpTxI..^+| 90N ҇s焻BuȌ.Vekq&\ Ʈ nld$n5EWC96^7ɂU38';U/y&q]Ig0ibbMHHZhu$*ђIEu[/^_/˴${2ko>kTGiAo3&\SPT3"(.VdO }j3kO8N W_O2|g =Kk6iB B"C 2_W\ p }}# "eݑ4uH$ Yp>qw\6Ywj@z|[K6G W,RZ5|6 e}5)9I^ S|"P$foYբ: F7<r&Slou|h}7$֙pdpdI2#{/rxoqJ{'8r&gL U"ߙMJ^IWs|)?<( (0=+,&9EMԤ36cr{〃d`'ph uK&0փV LԤlěiX!䖷1` LTIt^*~pqkjw|gG־j@j4/_81lOjDO`L7":IoeV{&g5Hz~2{nn{$ʭ9--XA<B#pEYqyVrȲtrЗ}]s!9T=gg-EXJ/11 D[.Z59z"ydYs&FU3،Hu(kZ_q-~h+>%l$<XH,v@N#pYN8*4_2pʁ$ ĺ[GY>#= "ӓM&B٣cu_Ԩ!goE6N AZTL}}8Pގ]ŭȭD[?pIJui|z<&ɣVR\!g4U4 -w8^ `PGtJ?L2ôÛIH%+-iš/fHyud X"21HjZ{~=۠{y#I+M0GR\,AlvbHBӈ 6Oιꊄ`S}ߡ/`$tWƱyiLAeVn֣7' #z&ER\->S„q;_Xi 7#;V&$\Mz!mςܨcHb/:*$5`Jl= 8^w;hb +U‚)G{0PQi+}>>v'a&,\F^ |ZtXLBA(0pNӉEچNֵc2ĄaINf!|GYM D޸<.8lvc*t\fF`W)5HvĖ'!SGe@7.H 6+nƢ(Ŭ^9jI 9+g~~ғĄHޑ$p:QTD k G_mh1qd-g'`FF'קPzϒ$ MEx0QtMCeq*`j@,񡘛+g0}Ip& 4o8a K.ѦfaizG /?9XZԠ-MĪTڟW+f laB<wFMߗSemq&.~;D}bV2% VLS()oŶ bV(KM1I*@ym O/j&YEi&mpbfĊ 29,+O¼ X8]Eˀ)ؤ;Iֱ cד,cu;kĥ3vW >_eDRH .ۊYM\ s^v~rn 7Zy$#qi/qzi*G[g/9  Iqo4V6bH80W:`T; Ċ >9X%R@ UqI.ώơ9?Y6.UqmWeb 1).٘PM]xCjT7lIǓ9&=Jڊf۾ZfUީҢpĒ giЇ^1̈,!(o2 jezy3tR]5kn*ݲbX09~NQ%$; yxIqGcU fӡ'ӨI?"}kЪ Q9qiNS_Hce㷗ljt[~6M%3+j˗]p/ !HH;Obז#+kU^8罨 Ne{\WK8Mov#o$NhGA[ _]8gc Zi`7$Dq#>9 %{h9`UdϬl zukΪN FW/Ar^%ma`4twU?[?~g2IjA^)JBM^0ăKO㋍w=}V xԿ(wQ[;2;IIHDi޴ E%ru;+2ޭ3Mh%'a.;zPuեxz*/mgc Ou1O\9|GzuMnZHm끲#*D@_Gg$>oS-BUTʓםoŁa^uu kQQRA2-Ԯ4{дcuS*p9N}:zj Ԧc50s9|goRcN>MrRX_REH`Nٯހ@ENO.Ѐn%{y` /reIe'G`DNĬ"i\0k?JňbU%ۜAcL̡Pi_1;ctwӾ9q@ɡZ-kFǾ}\vY.t[}y0 <7ui,H5i?96ݑ YHI`35bwaӰUf6l=Yo_m$d&lwp6Ls* u:` BvW(98G{;.cte[J,N\PZFq<'`{Q7 8v$s+4=bIF<7ml6)9R'pA |h!g{ڋՁQi%8gB+nOq{~ !h'8n}8:nyY"!Z(~qFy$fb0N1UUј0;^[7mJ\r/OԡKW U;ȇ 5JsgkvV\d=[Rڍ'HCZ[:#'DpݬXOukwrb5wbk~V>7ub `J*8<@-?kcc{;yȯ&&M:S|GQ#&ِNN(;1=gzCW\uQ;r8W3`(H>bxȖݥmX\t.‡ܠ81 peFgiqh; *a U+h"i}`ќD;dFpxDDތW[7t>O/GltĆ!Խb}7+"::.vlpN0LDv伷miKor>h⳱Eb+3L:ѧ]R",}bQ!l)"Yy^ՖҏHLWfV%@[`9A_N0*eHD Ɇ _Bu[|Kf؟jζf^JRi ImrƢ ۍMkŠ'dbr6[mWnw7uomiN.o1m[WF>'f ZZ2' EݣhD*Zn4;wyGSXA#n7twOk `&AC@ Gh%iT举GOWOڕv mpqU_<}}K}׉:D:b5|OR9ce߬?rP^Y܅{^?>Ec)OEB\z:TFkQvnzSxHN>ŊP.7oO!P%5#9R5*qه$avM]]Sb:&ı5;+ <yt7\SIIE# hE8XQ\&8$0+ +ojվe^V_-;m%~Uvr3-&I\Աj[ uM$q^A](\Sϴ̖rnLB޻mڧlj@?|&AF$rXfBͤ|uI&]W+0 CK$Ռ#~qwlO!_{.K*_.#.UMLv{șg~N!*)uNp8k&%h˿~s$6yǬ\zHQs&h kX\.Dڟ%Z\(iڅs&VO*),|wOI F 1[}uJv6_I.ۘEU*mBj1T°74?DοuL-h/)h 8ĵأ,l+{J &L'{wӂT$Aq ᪶nqi{&ILH`n5N>R~|pWqt&43xzubv|V*~I"n)܁bgx ȢHMT8qW; ƵYإ|gGvIYXu,qHqqڌw'U9US[rd[4kScmK@\0Q]|v4^egv,LHlw4gXU"Sirs+݈ _o&C<$Iq>gdVva*6lvXӮ'ߤ ff,6=ɺٌKP~_ݸƿGrt>vSa ,i&d:>Z8G 7FJU!gke#ly;Թ_ztK ~$D.(:XUehD!b;30UVrSDNʈ,cGcGUp! k^ =;ާ%xӠÃ0;9\L=.:0J߫tmŴh#I\ϒ ۉ)vCƹr9\q4za5;'솼ڊfԿfj X yq )(4Cp q &ŵU>cmDrfveB(~mC^߶ ;mop ç+LIENDB`adlint-3.2.0/share/logo/adlint-524.png0000644000004100000410000011555512224440633017366 0ustar www-datawww-dataPNG  IHDR  tEXtSoftwareAdobe ImageReadyqe<IDATx} tUǙf $$]m"؎@;i39ӋMkL7fz'N˱؀UBH,ysw[Uw;wZ c@ @ @ @ @ @ @ @@0HzWjL6u322.#a p ל(A(B@^h3J BHZj:"~o=e@ KڈiN ]D!qh@ D8j%tE@0SUhVR@0,̷^#f<6D@iB&0 qr\AW@@$Tbsb~bߝїY @ @ 8XCv őߒhl@\RDHaKkNf;XT&/\_Tf@@?q4F_ӣ$ u& u eE @ S r0}b)-EM'ù&8" BSt9=JDC@PkFmC @ MQr0'NGlg4vVąXsiy:k4ƕƚB6zPQAR7K]rҪCla/έc/̭u>ΙA0pO !xqXXiVc/NTfP%!>FEOg`a4GCh*e(o6a;bji_uK0F@=%tFNh$)lL@]K@0?$!(@,UE0IEh cBB1D[נˉ_Hd.ZWY@ds{gbzDR$X&, y sIB:&LVQ`ME9,"H?L$g''N3g.`g/߰g:O @$ Z#TuQ})eT((`}Ġ"oB5\#YP3L.!H6`1E"u"^+( 5@ @ `$RO *mu(MV@ * 2ɫ&@]25~C(?3WYE(/Hr/E'Ő4cM" " Z rE&G BMwD6ՖۯzT}{]e/$%N嗣=މ@DDʢ>` `1%aDD8fglđ'.ږF /Xq;$k@ O@ 5& 'nM*@D3"v ᐈqQu>t;}~%l1n(zi:hOi1%!xvDD}&wNk܆@3E p,~0A(X 5Um0{lMTMpP숈cuDE `]q8t"NkO0"I @ ' B2VdAOvIٱ#&wvxO|ea,Yuߺxj"" BQhb}F,ѩ٨|O&/}m>TZ4T/uh<w[zOXDDDɏ1 MIFWɎpOXVEI9ٙ U+Ϡ88vq)@*),۾Cv œ)P*+ dG# j2~?vvZ!miͮjE @*YX|Y `98)r(|i؄T .U#(vԱG UڇlҰ~g7;$`)(w8eA DA! g @tFJ§=4, vW}3r2,8n۲8${^epv4'N#&ƱG HcO [b;ϦAmH[3wy44I>|" #KY5q%*D'Q[@u:ru+Cn=j-DZ]P8of?es/O9{8t(JU|lev ٙ0V,D&]a#|B_D$I_ Di[[b^ apԆ,2D% dFH|iա;lI'Hnɋw ;B:±]#'/vŶBEՆ6]0HU u vXg;$ɎHH֎7dt U%7ff7<+ PHK@Bl +lEV+{cǶ#'oa !DJR! OΞ}pmA<>s!uĿ.qTIzZ D*' _ u'MŚ_5i7Xl?IA`5^#QW$ykQ(*$pUX2)0 $ (E*Xn`2=VȎ,^Z@U"0 ! KG:DGQ0َPnO`=dG`6YcX-t:0# QUɤK@#Ko<45#O6#d&@MՆx" h&@Od>IeaE9~vE72iLW;B @v'x1:nQ@$FfA4E+wdSl Bf0Ɏ@YcOf2OǘͭUEvp"b`q w瀀F~mVMN6zk>`LFvɰ1(0ԑ`k!jɪC8Ii.XlGD4Ma#8vxns_k (,@]Oq `?<0"@IvDv a7ױOe/έ3eW5ͥ0(GB'\ Rb"kxɎݯ#p7uNupXSȖ?;z/0iȃ4a zhg?4֕ت˜|NwN pvE:%^yu\aoK7XMbrMdduwNx[Y'# w_MjeT6Ⱦ#ƙۊA6 4w=~R(Cɂu@ Êr\N $ nP~fPqx=0*eAv Ƈcl,]mE6P0$В{IUg@ ~# ;wB@mwo++I9 !~&g=|M R2)nCӸRH5"*y ,v71UŃܬpqb" @&TqȎWL# wc.~Sc 2(0,,avZ}E>!{(JfGD1ct9CcXYL$ 辽v U"_ V_KA!Y4m2Q`6֠.`;:1 x`0e8fgջaa#%2\LcQI変0YƊMlO[cٟ|n2 aŽٶ.: 8sԱO5֤]qc ɯ ƇV(g&i @@" XUaDC? cQ "Š3`G" Gzeo -g?6~U0C m؆ciH@HdA,x߂Q=@$ bCT0:mU4␛)|fGFnqqY{bQP D xdR%g tt's)&-D4ݶ.~?suVuh>E4?377}i4/չv@X~ D, 1]?^a\U<`-| n\h﷒@76rM\C:@YyP5!HC0I dR}C!y5A {נ v:^;wAJ:zoPJ&͝@0" 2JEĠAqdgeNc6khn?:] =H#{B (! dT؉IBv:#ʎ~㵝 PT  dbuHV4 P-< #o:#tf'Ouc8"i}|q @B$ւxP_3 hva$;]y`e\ & fO:-;0DŽ!rqDBݦULKЇŹuD0& %6 aOnG%;"~XjVܽlJSԇ=lYK'Z&5 I }aaėp?_rlkqvmQi @d#Ř,8ƿiG/4ݙP^VH&T Mƞ{tD$; kG;( ?[uqy%%" % ŘPs *v+k׷v)=0=g[{b[>1Aux??ĕƶ#xmAY: ^vDcٞC}<i .(dB$HaUAe&g@_rS'%qErc2(l Î00 [='C}2(4aYτãרnpd!D!q+5iXCL#d {{w6" fPip*$#Ÿ>=9%YPBtmw (j^a Y:|[b$/u [ڼ]yK$S;$9(CDH"?yl%{Y_eH ^<"McDt u`uw'cR XŚT dV8Ҝǟi+*@8XҠX6t6ԝIQҐ>2Xj iF# ,hXX[pT+"` Do! 27@+@D& ?yTx}BDbLp<_{bi,ˉ4aPE@3I/V6܈I`B.Z O@t ;žz𽡂*U(vD<*JIq{Hi €I(hr_2ZRU=ls oE;0„q]_ c4ѥ4yv6~HTҰqIZ" D0ɂg$,`hL#m'Z! |8_:- &;ΈM&IW",`)74GIC==Dܐ`KuꍼdAh4oAFRt3 QdЎ.|w~;!սȺR(w(i񭍺[dix-2O EFo$ǑXN$Y.aԢ߳H5 eϪK;"eiI #OeJ1@A,IXnY[U 1ӎ8sV\?֪\@y°ra==<͎GHC4@Z 3( hVf~k }{&ňNHæ}gaB׎ ;-0[ :xjGۆq P_B0HX.P7ٓ!5c)eCӏO54, DґHv@TdAWvnI`MdP_B0H `σ u1 A3R%dda>Әer,:!X`۞`dG oi81K'ݒ2'0 "Wp|h6DD;yqWV,@$A?iБr \xt9ֹQזr48 DgD$" f'T eG@+{դdMY?Ub$[2 ń1~cIeNad49B΂oo,|fpjvPfEe/!7?Hed '}c$d/`F] GS1%[?Oˀ;>(ϙT"LƠ ?}汩\@r;Fu]ŨM!d.HWb8@YHۦ{6`p^{:kHp1έSzbUtɎwiI{3HÂWZu^0,_0vD{q +2+W(ؚؼGv F$*LF1nt%2/b]i eAzݬh#'@VքTȘˠr وcfQOj9xNgư30[' 3J؋WDP*[lqu"Ȋ@eH@ fbGHll=t8ۢĎ MDABj[V>98PV&({&q vqY0`gAO a^0-}y9B%DA&2&ƀ+JI nUUQs=DxUtZQabE9BR=x#$H]XSw5";<`GW @x" 0@]I߉/ ƼlxQUv6% 5<.T~섇Ԏ@Y /hlk*8CVu'Lp͎pv5 {UyŘ!0͎N;" j385!YAR[mu0-zbƎ#XhvsB(i:xj3܎GΖ`#/ZOi 5 ˊo<=I`?qWJ mDRBe@\%T4_ E{L)ANAΚ=aeE sF ƃcoZhBiY5"\ezKw(vԵ5j)!P&0("Ɗ兘]9 #0M* WҬp9#;B8H7{6.ꤧ>CS :0X35;pc-Vļ&a7ۨ'-|_'>T1 _**;gcO4KMSɷ!+By$K w,dMa#(1PeK8{Eٳt;"3\k b؊%q ӇH$;NkBvDTk +_]dG#GōȮZqZM&Gq"  MLqj'2вR(UNnQOZ bG@v*%{M9 7Hq5XȚ<{m0(wM%yxpfG6")2\h)PR)U#jg cB6qpSpR-U/t0ܩ. W u%M#"s0*H9K#/|ÎR(T)Dj&|+s\HdE@]Q$f{HaTojiG` IL Ѭ -7XiY2Dç)~`K`ę+Jόj.;i@kF`M457!ZbsʿȊDL#T pBtC\)YW6# dc彳rh&|'Ayc|SP aZfq#¬2c85%`Gdt4ݎiC5Q|  cߚ3NT1юtECt..7x~&fL0UVqoɚxo~Q +"@4rzEhciV4Rqn&#Ua(0vT& ^2`9Sln A# ўJYX"4`@1ю&K"+Sba!;=R ]C~jm4ao}G-D5TLnȄB’8|ڳ|6 َM:  xh3a _M~rgLg+eGv !' effȨ2">gg9@#Q'g 92͎Uƍ.t4@.61i Ru4ʯ;2aUP+UEԁ5lT P5m?np!eqv`` aP.@ZW4J еAv 9vDDb? V@V2&V]` ( *46D^!7+y#;BɎpLkP $JUTˋvD^6ߠ p`洗HPD'hvD, UEISx>`kUϵ]|)9&<;BS9Ԋ2Ps2Je0AaT]нj5xaG8 [fSdG!h>#b?G*!kꩺ;"`j")A1+'( &~#;"BeH4 Ø fFH++/(9C %4#"Q&S0 )Zv !.{(.vmx(1G!=;j툠v;ΙdG8dc&2`= LT+^]!`j$)).01[#jΗB֎A[B0? Z ,1͌VV4<ߧCf$=>8s56"A&vpKb`'K *9m?F[J#e؅0+tV^<"K",x3zx1ҳ8;`Ơڎ05/8VkP`]sN0A lG$+#ixMp!'ŝ,=Kԭ0(+qjYZ Pz"1X+0 `G`ߘ28c})(s"0DQ$J$;B/i=' ܘALTkcOLbCӪ !~#dSHm}p#M 6u) T};&" fL#>! X^vu$ #)IJ_ c2 U+kSW;B*eߧj%rZ(e@J8R#c7+u,j%dZBdG8A 9i%t( P_=&̈́[A*C`E`G+ 4exeG8(,γ_ b1HAJ6|qŠF1k"-<ֵ}:5AW+7v aڱMʠ0Dk/(a?ɂ:ϳ7wl5`#|Q)u xQfMB8" +[;£ 8 J ^YwDJv!U:Aq`]SG]mGV_>Um9KP˖PM;)Uo#RfLuКL]u~h@,sIY!O$bUKC*e!xU|7oU!;؁,,? |jCzr1q3Kk2(V*e2CĪ|us;"8 c2ES*5 B݅#&ճJϾzeG`cqNtlO$(Q*Z%aP u]6coR6ȬhTN*WAXTߜ;.6"%!d!Y`4^J!0qHDUJ<(l7O=0#DY, I%b ;MMcTʘ70Uv$vWM QƖPlϷ 2;B24Tʘ7Yp.(OYwH;fS)m*%l Vd*%T%;uYjz#:Y~9EmȘkN`0|Wz.3 A#v"Ci9" bM*vM"% RQՎ@&K3`E€9cܯ~'|jCG MWՐQ;AeeT#Q@x.2`5!GPq])FTl'J8 JdXAj>Y''\R?Vd=1Y=a &;!*ÈRGTmeݼMdGdM$gypgNH9 !OlG`Yy*( m e vu{nZHK'g kl6Yuvj5+;BpcU=BrZ^+%%vD,#QQǤF;"~??Lr7eM P:Bdq "V@ĀFHGBd;" YA-ZUr0$R0ՀT=G*xt o'6 ," h!8k#䎝܎LGl 4,V*XX*D;‹! |_4@Ypg0@",ǧ`GuϛZ;)RՓ`U)( 2U+ zG`*[&LdG _Ko2=\J@4w|J;""5E] ;BJl N0  Y@WWy@;6w0Nn Zi" q @@Yp3i ;BXe2͎UdefN0LiyYdpTW +8ik A_%msN=U0*d1c@OBRT-bDf)f֠ &|iIѵM*0wf" C,6'Y0юXEm& v̱e)G$ytJѓn;*0;"H7n RC%_&)&P8\S^" YMg3VDR'ɎGΗB,;"Rax ErS 锉J i6}*U܎0aoy4(ddd!LvVED1؎`Hv W2AЈǀA<_eMԄG&RY ҋ>ڪvP^b#k2,!iK@ _;ͻ'+n3#aGpnTWh vF%kXڜ1*qv myؤ;֤;OLd 9Y+E+ь/ ΂L#7vM#gUH/vW)2׬\ΖhA=c- c˓߽c~ET0&t̬aY"NMzym6P 1M S툈gs ;") Xb\An4ғ8i@V2q2ʀ1i*_+^ Agefg|k56/7 e kbIȎX]paȤN$Pe0FaPCtd0HHe<&RdGhW($%F@OOEV"5YvrF?{2Lv:"¡D|lG8%LcpK* 0)@d^|^~*vW;B8++q?C,OL`S,NaMR>j:I xĬ:;nAua s #LJ_4T:Xށ;NV+Vj2̝į2K gt;O5Lf810{ ^"Ǝ(f;o:b[;/a6aTIT/⋂*_+_K |$"}~ng׳(qLA%A&ь(Er+}MDj~+̪ǀ՘b[%EiT&~(p=0\Ɏx腲 X5lUk{z]J" 5셹ulվ' pLpτ*va6I\ue)W(V ~#TCXM@e+n/UŹؗ-^OAV])3Ͷnvf7h *C"&;efBIL>V~z/ݰI])'6y/ I1 ZDaNCuKR=)V~_UrU)( ;y-}=mW}]>Jh3bQO6>kQ!vm#JÓٯ]غ=zːj/P͟^i,yK[DAsèrUf+ .XG xbG0y"?ӫ?0DȎP F)[B*tɀ&L)fٳea?obG{،^VJ6z<܀P^c\)ϷBMxNdG.h@QmGD$8]V|\=# M*n Zw |ah1kY~NծI3Lv> :<4y{zt&{/yaE$k ) ("Y0()IUWs@vڳ$eG0ϻvD9y՛RϺ'ҘѦ0ԩ8խ[⭶ns)}h-S 0,mT^ÞQc@bEX`ɸ ŹClQ}wP_{1;BrpK".I¸&D\{ 9e9DaaDPz72o#l/3ݻTWV%݀]c#dW;s(F˹e:>AYAHˆ"($;*XGQ@1H8QߢZRQ$),"Ws1)BL/a8Mj[ġ{CZ%LN&gx͏va}~z[ ZԂ>`|;žG 𤵭 #5?K;#`2s`k*#J!U9L+D]lFUfxq{jٰOTwğv䏽3M :v"PYaMxƈ{g%4Baq쓛L Eq d%aX=nN"痯`I#=xRX4E,?ccS ʳMvZ ) 0@h(t dl"1jH({„&MF 7'vDĥҢ,soG؄E&,(g)"MdCaV/^/jeG5.V m<;c2 :W&:QIQ_  aPԥO~^ 2w@*L#U1zahW(\( |I@NPRapT&p8fG{ofG0q#4)dG Q5K`DУW0.C^Y۱ qd1,%E&Ȍ`p'&{;]PL@=n&@4B[sE!5L+)PI\'Ө$K@eX3ȎPr}x;s.PahS< defGD]vDNaQy, 6x* =gCX'EYO$lvb%;R 0C#* S+tY@P@$r ?D5tMX!#0[#vVa) x{Rt[e(ȶIÏ7:3&RM8=A{I `HwH$FQ1vD+Iѵa Yd5Mjexy@/  ڎSGU;Np ?o?>4!z h? O\_0"><_l4#iGUL4B:xfGH[ Ҷ^p.WNLO6 @hc%;"IWLѼM* & YU ';BJqT%}.@ WE5 dJ4& 5E:tZGW?l9Ξjx N*;|o_>i2b[_@Xaj}{M#XR٘P;BYa6י^H<;\%V~-ʀ`T7SA&@=pH) V8 2-@qxpZu Evڱ+(]KTZPJV w'+;dGs>eqzFmFaք*&;<j&63K~0KBPbyS^bsb\[{jٰm$ H$FMX& Wr0'^a?jxe~:äj^ 2jvڎ~K" J˞TFElOEσ v?U' >owv/qx`Z 5@xdGȜʈ[feG~rhA "A%=Y#ٟw/OڪDl*tx=l@ γkb6s|k|Խa$Hc2E[+$A$0L=dbuukz\`5N;_#09qe?ofv5yeG@U+DG=Ð~`$@=.#qV  J|B}Y91th"t@$ێGc3UP+WIAf_M#vDķf;P0gB%[710Ɏz#$(8$.ɊL(tNx #qxdfmW$p}cGHF1lUÎ\+% \ddЧ2& ;U*nT;"mXS,Bd]H۩1ǒ @j3mݗ)ӉumHU0D83l5E19BÂN _US@!$S@hJ^@e_|/K;b3lEAc Q2`Bz~oR$M7:N^`yT_>3{4+v@ydGx|g"g;] 2P~${|p Nu\a-9@`޽TT@ @EɃiboY]u#X֐Lg&Lv";6a! Y `Zmq'Tgfd+:R M.&!617~7!+4EIӬyG*sXmS<9{4TW̄ʎ("MȎ)D: G SɆ'AXA¡"@v)|AO$̷¼2=!پ8W7uf@xp wq gE98x=!;dLWIqɞ6Mepxs&O~ }qg&t{v4{uUH`GN NrcŲ#n^i#*, b>@U?C*$<*AG 7~ئC:^[QU]!ޢ ;aeB"߫/No}1;0k}K/,0 "*r:} ˎY@Gqďַ4oGDD΋&29?@B^[Y%0 c҈B!Wt?R(<81 +Xu6qqߒ!ლvDEvΎ鲈8iBed"  cxW` Qe #@1  `9o,vv 'vۀ舂}o}{m{zԘ" F ]+e0Ɏ@ŸΆP,˵'H,'] ]eine&#O $uz*k_^A% DFqynEq [(^!6N(N|C=`W kުv~IG|!~ĎHOvč7فbP3ɶ ~ $Ij-]MA#D)#\ wv) lZ:G h$@U'm:lj;ٷn ' Ea fAAEh{Vf *Õ8 ێLL2Y]Z*jdaC1m |#{/v=[4:q }2=aЈW h-:@YXH/dAt7Tz"=Bt%9h۸mmm4$& >o Wn'UHez h;|0U/2@!d*C d# @04ȠiM ?x{'x qB!SYv?;{نw١ݘ8[C|Q ADe~$YeY /U{Uܫ]CPD_qh[1 (p( $ =0@e3lqŸ, Hi[L>yl y6юf-ץ WN\OM;H10Cx=*̺R[_(uHcek71OA$JuomCТ0\K:߯l .*m" " xؾM D`!qw[f(2a| *C2V5 " " |k7&s"0zA",E. Q80J!gIԪ0P*7FHex~V$Ā _~G$ RxQiG$l%lCxDvT */,a(UB:UއclT2$u04`wes. m 샵28# H.J ؼ5BS P#ȑ!PN:=˵5<͇̇_=%J04k0{l0)!, r!NKl8.]~Ԭ.KW(}4V h`p$n #_ז>[BDe w^[p#k5!Xl.ΆL҂ ɱ'7[qv$P=/DlD]{& KZ=Eֺ焱Bz "~.֋2|H$cұĮśǠRep1r;!(g>å+7؎'QdUvMNt% rAp3$z)2IapTƑ% >4,pM#KDaϮlY'fC2|l?d?CB0Ma|tG;45dMȎ<0|e( 5!°0ˡ @t#iM;|IPD=;Qز@DqU0Za୓6K2CV LkbVo,$?_8mvF% ~SH9Scw0[j%[ Ww/έGS헑A2 alU-!}B2(MRfneZc HHP%S+R( 95#=a2_H-kq(4OR)Ed >ocXPWzY(kʊ ܯ+L bGtX7;AMEE2N!tF[gm@GVUl )DK͟mc?8L2)RѶ3["lFf,}fb! ==ջٚջp3@Q0 -(bEb@WvHO -j ̎K9p~w9% a "EՄ`_!<xyQvz8Q |!x?kymR@Cd3MR\(v%L1w\  rϾ'?vZ D { -n`93%:F> & * g/YuuN/?7ns숮sml۶[a@'d W@"u0r=g5 >aPbE{TWt%l}xDBܹqt =acz5) c+>&@@ MuwNc4QȲBV&UhD& PHA:EtSJTo[s8_d Q0 X!z6ʒGƎ t:9z 9AnƱ& ( 2(NX^<랯ɟ ow0'@[5s9efg`a0%*Cmk~ZW7@a @ kVdĀG3`7oNexG2 #gC40,eATxʼnd1 i/B0.dW܌=H*;;wUxYmuTG&7Zr/=^[0$kS@#*0 VeXA |pWjG& gYn_PRlŦnz BN~n}r-9Q*B3x>8tƶ&% ã Lƽ-2UX!// ɢFSd(h:cR`E+ XBDen /!wh2>̊_@  JR+y60Ksol˕P5h:idl()>қ*w}D 8yV1%j/@11jM `J0?,:Q2-a-!kG<&#B$l Rw-A00IZ2,q PIHG@ hl b@d{ w 8;ΈH KVKnKT/`* Jvn>IþƑ%\=/Bi1" P*0a\ݽ%hʩȋ TA`KdAA) l}8;uI\]-<( 2:U%,a2?B a\lOę+7ٱ#xX<%2PkA h/thVrߧ@eg~% ~A2bR 蓗Љ NوpjCD>8Q\pQ Yp̬9R @ ЂWZTeB`S.ʆSa kvCeQDbQ,I*(|h>6Xsi:!a`)ۢ& ѝDg6" lS[pM& s'[=) Cs{ BT,_JASwzĮ.KȨ C+7&Ci^kOK+6u`=# "pcG)լPagnKdGBaP$ԷȞN!J a,z[5d H!7+SHeX!:.lں. !DgQf{=Q&X/@J!Ya)=_ey_!)`4IYF eES",;vj.ۗZkQ PVRkB"q 6((Bɂԩwī:[5a@g=%`^cHc o*~a00@3  h" 9lEsZ|Cq uݢZ!jK` MB7%Q  z@@#< h0UgāصucMV֯:t9#a k PHdH_p2P_*3.xe;Z@c^V&PYȪ$ S`Q=$0>7y_e 1 *ôbRdƔe,2 vh>V;B;aFg@$T]=& b NtP̨Z@0иh>ԀF C83& h3~Lyk)aC) .Ԥ(^)u%)*Ï $ ^mJ2|WBMP6UQ ̈((&( JTH)V[TCĔaJ$ `9@)gh|a %vd&4P2A,vw=`) Cs{ϱ{X] 4B.aDeTAdU^C,MH,( 0'q+s26eg@Gߦ7Ejj)2 T"^U;NK7J2<4$иVԀ(̬)a5,g`_" .>Z^j202@?Ƶ&D+7?ugÅ_CBVqJ9<ͰhC9!`K&4>T=ٖhQW C_'e!UΆ<]2$|.02^}zd2<8BHeyar^W0d({pt0RM P>3)i q*C'RexP %{!G@lŒomK9c4BG l`f>\w1ȸF *L l %?wgI HPkRm]8q5[[fTs+T~m*XgKƞ.(' /v^-A*k!N+d>=d7nQDҭR])aR$ TNۚBD2̪+%!@DؤB4"t-)`B]8#¤.0(;inS0tO^('/Q `_h c+ ؜1th()C@Gc CTex{k Y* wՕڗ20ks#c+ٸ|Vht JJY`JP7TM?&?ɠ2wf([虫_7tH푂icor2M*hЈE}eqD-" 1Td*ҤH]0gN{zE@?$ 48"@+ce! hLD iZSg-щ*[ Okk7#'0LaQ>83r#j@ccu1{t|x#_/."ij`e h$`4cH7q*y?mE,)IU;RT,<8F5vuKg& cSR@$.$ ' . X|Fk{@VtVi?mf1V?fJ8x`L, 4br.ʵpvOm R|@[n@F!1iGtv؀gmL_AӁS}\˨ : :w-x5G[U(5ԍ(CsҊJWe~J=aB7h؟<;:?=%*jfIbE+q Q3/+;=–*qd/"c2o%~>$  n w7vcg) ZX %He2s1\\je ˖3#402ӑF]piUBOȠew w/Pށ%uY1,̅hCv#a! &U⡷ NIAYco}&K9s@^ \q ḣɲD'flWʒB,W09f,(^$9@C7T ѻfBVuiF26Vgjw6(?tW=_zN*,XkuA ̜`hzbi78] <7S kHmoeE9Hyѷ#[RbLXzq'R& #˗e`0ӛ8"kaR2d @?/m\wC :"TC$IE2, L,dDҲ2AA  NqMmeค\yvmč2"+`jqJ G(–)7``a&V72" BGb&48$k:CRToL7!15:US X`g  }d``hK[K?~t3} ; j.[S^[袊ˆ! sK$XDFAh0:͂_fkTA_//|{C 4Օܺ /@pn&&hFX0 dp␗z?[+C O @!Pzm!kd b`X`˂wAjBA$U|Hh`U8 ZWF6~`OE`K5=VDxK )⸅~ݷjm )];o`X@X d`3- ?3غ>{H H+[2mu]y-(`>hh8h;_ZT%Օ _B_^OE.4BKE!@G;D$n2a",t.0RT-Y"yMik1 +n<6mH#"6ذy(Dr 1 BpHh*]qZ6ߤhK]-rbdZ;e%!PJk34gɝˈYMvm)ʝUA:M dz `著6#?[4sETRQuiƒ6Y_}MZ%i__?QҞe'3q/{)_~iOZ>/cbQ=>Is/9O1sxb7JZ}-y"1Ow#IU J ]b1N\Q"α=ao> ֹITCY.̭ f咃+<0,@J=3 h#WD Y?`08ƪ2'?<1Gy$%Ә *ermt #=#k2 9Nwf|aʋ Y@feX#98F `4v+T^auv󸠐`OWnjDTi"h`΃9+:1<`40G~@ÿpŐ2X0KkSZ X0@&Bp_oH.Wq1!eaXdF@+``Gh6&oO}GT.&XH++^qr̈́0 ,Y0̨z~݃!߿4J+d?XrXXLUvF 2Ѝ`38 Ek: GlY08^3YdRLH, |9]iAu}b VcE Y26+ X08 oTa[~A\DȲbP>1gp㺵8 ǟxf|, f@oXqkXi +)F}V P|;Fp NN orzkx]3YBPozir>hg AtpOpX0 4 | ש^CGWib.Tܡ aasm93%uskjTX`˂gO ( .5?BQ'(w7aDFĺRr]lUnە:7!Xz<\74@/&ʘ9n1Ȉ#],Tos 8IWm~6g001wOe:j;<>e=}mgCXkŒK߯RދPN '코/i?H^'-߿d1H1Ǩ񗜧9ˎ]Zz<s]"깣Zdh{3}*ÂϤ^-i-B={|_1n6F]&ZXH08ʫp[u?O]#o p6j,'[2Aw`&S]*"V%9|LkD2! (/YYvzf/Tӓ{`ߜys]_-y0Du]L! NXN 7Ev6# IS)1߁٪`R/'En08 ^T` ;/\zXM=M`HaIbX)-Ҝ;aJY?ˏͬ2}+2(t`p(dbw컗K^}*[E9]!0p(΂0۪%%!,/w6373QjOSx Xrqim`X`0kl=4]Ά62,.e f|4 hrdUS`6SXp|AyepuH^L/Ĝb\kV'WV?g Rµ75-]2UPEqA9DoQy+K+Cynip8 ~98=遍`aS <]Yt2,Ş- j`P`+ZqOl1۪:& <] 6{3]C~̈uEK:|N4 ~A]9ES&ႰH ]8D;Kfaf=>ПݞC^1k,Kb3\"N$}1:3 WPkͲcI%Y7sSf d/_}j;up75T>o aC^L,Wд6)2мXaδpAZeE DT- ~rĜ?rԨ .ca \]ohj&EwBNdp0ʠ0䝷j-5i,XC(;3>[C\1Gc ,t5찀D3r6|@^֑6dGT̶RVطkc c~6>K}neHJiP|'ߍh4YVlQxU NMJ2$pLfl:<*v>p6oa]˰\Ek`0pyQ**ruTRZx19nwKV9~B!&C S ؊pϗ2Bv93>~=T186U|l $k\9=hh8cN,-28R!o!2eU\?e G~ѯk|b`0|2$ҭ)%w֊kl@dXG$Ǎ]ldB*κq#?6k͇ny5]а*5 >995/2(&쨯Qt|Q@``pJ#[!Ml~OCa0v!]XX[F%E.giiq )4VҞ!``CXѵʋHp2 hA- 9DUK8v-ݿN-LbzpK-}eg5ɰHBGfµq6F.%/lW=MJ7?|ngl4 w83\/&bhh**-mn4 \P~HO2* <ٶ~a80TX3\ 5 Mtm 9>9\K:+> (ia;'34Dh\Vŀ A+ T!0iCԖv&C7<Q_dEA"*@ʪҸa C/we jۛ~w DWLSυŤp[\wue%LRY*4 {qGAK G;,Dq !W*-#7}kNsc!]Z)qSwoYTXZl̃DMˠ0Bʆ2PI~ˑzAux.B@Rű [(X*kbQՂ 9b0lHrx)HkqN0M42,H Q>ROj )`Xdpc63PoqLS2(XIG(J#`90rAA<R'%E내$^A72>+E?VsEP4HmmX0XR ~l6Vѽ"󠾺T@¬?Doſjr?;c\"8Z:tȫP2NcnrMR3[l33kL;O~lhlaAաgّm.d0pC)^KXrIVh-Hl0^tf_2 edFcu= +XXjlEzA"kB7E"aM deP#og=WŃ-$fa%% L$vCݙ‚G7ey}h`x7v AROЊb`~#!32eЊglmfV#bJijAޗ,gG Rq. qh\az<N lqPKl1uƖW.?G.aB֩^ $xp: sC^:Őjj*Vg`nkpBaDj>$@Th,]B\64+yBPXӀh8kN\K5e"o $ &0@ =6,m`lUTjo;wW^A'9(\ﯥa!5vӢ {aE C:Y۔cY%ЋX0 9.^nyX8eY?q7Z}@  >e6I(қ'*@tΰZ8hM `grQw2ټ&zTg(Vn|'V@%OX `XuSo}>C6 xXxhU` z`X `?n($x<Ԓ }q}AR*Bqx;R,^ ٻ^<`iM~„Tj@B 'ȣ,*^@qWTbЄ|ֈXDkYc˃q,G`܃,"pN6fAAAAAAAAAAAAAAAAAAAAAAAAA 0$v8IENDB`adlint-3.2.0/share/logo/adlint.svg0000644000004100000410000127067712224440633017101 0ustar www-datawww-data adlint-3.2.0/share/HEADER0000644000004100000410000000361412224440633015000 0ustar www-datawww-data#-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ -- ___ ____ __ ___ _________ / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer / /| | / / / / / / / |/ / / / AdLint - Advanced Lint / __ |/ /_/ / /___/ / /| / / / /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. This file is part of AdLint. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see . ++ adlint-3.2.0/lib/0000755000004100000410000000000012224440633013565 5ustar www-datawww-dataadlint-3.2.0/lib/adlint/0000755000004100000410000000000012224440633015040 5ustar www-datawww-dataadlint-3.2.0/lib/adlint/version.rb0000644000004100000410000000477412224440633017066 0ustar www-datawww-data# Version information. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: MAJOR_VERSION = 3 MINOR_VERSION = 2 PATCH_VERSION = 0 RELEASE_DATE = "2013-08-28" TRAITS_SCHEMA_VERSION = "3.0.0" SHORT_VERSION = "#{MAJOR_VERSION}.#{MINOR_VERSION}.#{PATCH_VERSION}" VERSION = "#{SHORT_VERSION} (#{RELEASE_DATE})" COPYRIGHT = <. EOS AUTHOR = < # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/mediator" require "adlint/cc1/const" require "adlint/cc1/conv" require "adlint/cc1/seqp" module AdLint #:nodoc: module Cc1 #:nodoc: module ExpressionEvaluator # NOTE: Host class of this module must include InterpreterMediator and # MonitorUtil. include NotifierMediator include ConstantEvaluator include Conversion def visit_error_expression(node) checkpoint(node.location) create_tmpvar end def visit_object_specifier(node) checkpoint(node.location) eval_object_specifier(node) end def visit_constant_specifier(node) checkpoint(node.location) if const_var = eval_constant(node) notify_constant_referred(node, const_var) const_var else create_tmpvar end end def visit_string_literal_specifier(node) checkpoint(node.location) case node.literal.value when /\A"(.*)"\z/ create_tmpvar(array_type(char_t, $1.length + 1), create_array_value_of_string($1)) when /\AL"(.*)"\z/i create_tmpvar(array_type(wchar_t, $1.length + 1), create_array_value_of_string($1)) else create_tmpvar(array_type(char_t)) end end def visit_null_constant_specifier(node) checkpoint(node.location) # TODO: NULL may not be 0 on some environments. # Representation of NULL should be configurable? create_tmpvar(pointer_type(void_t), scalar_value_of(0)) end def visit_grouped_expression(node) checkpoint(node.location) node.expression.accept(self) end def visit_array_subscript_expression(node) checkpoint(node.location) eval_array_subscript_expr(node, node.expression.accept(self), node.array_subscript.accept(self)) end def visit_function_call_expression(node) checkpoint(node.location) args = node.argument_expressions.map { |expr| [expr.accept(self), expr] } eval_function_call_expr(node, node.expression.accept(self), args) end def visit_member_access_by_value_expression(node) checkpoint(node.location) eval_member_access_by_value_expr(node, node.expression.accept(self)) end def visit_member_access_by_pointer_expression(node) checkpoint(node.location) eval_member_access_by_pointer_expr(node,node.expression.accept(self)) end def visit_bit_access_by_value_expression(node) checkpoint(node.location) # TODO: Should support the GCC extension. create_tmpvar end def visit_bit_access_by_pointer_expression(node) checkpoint(node.location) # TODO: Should support the GCC extension. create_tmpvar end def visit_postfix_increment_expression(node) checkpoint(node.location) eval_postfix_increment_expr(node, node.operand.accept(self)) end def visit_postfix_decrement_expression(node) checkpoint(node.location) eval_postfix_decrement_expr(node, node.operand.accept(self)) end def visit_compound_literal_expression(node) checkpoint(node.location) # TODO: Should support C99 features. create_tmpvar(node.type_name.type) end def visit_prefix_increment_expression(node) checkpoint(node.location) eval_prefix_increment_expr(node, node.operand.accept(self)) end def visit_prefix_decrement_expression(node) checkpoint(node.location) eval_prefix_decrement_expr(node, node.operand.accept(self)) end def visit_address_expression(node) checkpoint(node.location) eval_address_expr(node, node.operand.accept(self)) end def visit_indirection_expression(node) checkpoint(node.location) eval_indirection_expr(node, node.operand.accept(self)) end def visit_unary_arithmetic_expression(node) checkpoint(node.location) eval_unary_arithmetic_expr(node, node.operand.accept(self)) end def visit_sizeof_expression(node) checkpoint(node.location) ope_obj = rslt_var = nil eval_without_side_effect do rslt_type = type_of(UserTypeId.new("size_t")) || unsigned_long_t ope_obj = node.operand.accept(self) if ope_obj.variable? size = ope_obj.type.aligned_byte_size rslt_var = create_tmpvar(rslt_type, scalar_value_of(size)) else return create_tmpvar(rslt_type) end end notify_sizeof_expr_evaled(node, ope_obj, rslt_var) rslt_var end def visit_sizeof_type_expression(node) checkpoint(node.location) resolve_unresolved_type(node.operand) rslt_var = nil eval_without_side_effect do rslt_type = type_of(UserTypeId.new("size_t")) || unsigned_long_t size = node.operand.type.aligned_byte_size rslt_var = create_tmpvar(rslt_type, scalar_value_of(size)) end notify_sizeof_type_expr_evaled(node, node.operand.type, rslt_var) rslt_var end def visit_alignof_expression(node) checkpoint(node.location) eval_without_side_effect do rslt_type = type_of(UserTypeId.new("size_t")) || unsigned_long_t ope_obj = node.operand.accept(self) if ope_obj.variable? align = ope_obj.type.byte_alignment create_tmpvar(rslt_type, scalar_value_of(align)) else create_tmpvar(rslt_type) end end end def visit_alignof_type_expression(node) checkpoint(node.location) resolve_unresolved_type(node.operand) eval_without_side_effect do rslt_type = type_of(UserTypeId.new("size_t")) || unsigned_long_t align = node.operand.type.aligned_byte_size create_tmpvar(rslt_type, scalar_value_of(align)) end end def visit_cast_expression(node) checkpoint(node.location) eval_cast_expr(node, node.operand.accept(self)) end def visit_multiplicative_expression(node) checkpoint(node.location) eval_multiplicative_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_additive_expression(node) checkpoint(node.location) eval_additive_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_shift_expression(node) checkpoint(node.location) eval_shift_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_relational_expression(node) checkpoint(node.location) eval_relational_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_equality_expression(node) checkpoint(node.location) eval_equality_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_and_expression(node) checkpoint(node.location) eval_and_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_exclusive_or_expression(node) checkpoint(node.location) eval_exclusive_or_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_inclusive_or_expression(node) checkpoint(node.location) eval_inclusive_or_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_and_expression(node) checkpoint(node.location) lhs_obj = node.lhs_operand.accept(self) if lhs_obj.variable? lhs_var = lhs_obj else return create_tmpvar(int_t) end # NOTE: The ISO C99 standard says; # # 6.5.13 Logical AND operator # # Semantics # # 4 Unlike the bitwise binary & operator, the && operator guarantees # left-to-right evaluation; there is a sequence point after the # evaluation of the first operand. If the first operand compares equal # to 0, the second operand is not evaluated. notify_sequence_point_reached(SequencePoint.new(node.lhs_operand)) lhs_val = lhs_var.value if lhs_val.scalar? && lhs_val.test_must_be_false.true? # NOTE: Doing the short-circuit evaluation. notify_variable_value_referred(node, lhs_var) return create_tmpvar(int_t, scalar_value_of_false) end rhs_obj = node.rhs_operand.accept(self) if rhs_obj.variable? rhs_var = rhs_obj else return create_tmpvar(int_t) end notify_sequence_point_reached(SequencePoint.new(node.rhs_operand)) rhs_val = rhs_var.value if lhs_val.scalar? && rhs_val.scalar? # NOTE: No usual-arithmetic-conversion. rslt_var = create_tmpvar(int_t, lhs_val.logical_and(rhs_val)) else rslt_var = create_tmpvar(int_t) end notify_variable_value_referred(node, lhs_var) notify_variable_value_referred(node, rhs_var) notify_logical_and_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def visit_logical_or_expression(node) checkpoint(node.location) lhs_obj = node.lhs_operand.accept(self) if lhs_obj.variable? lhs_var = lhs_obj else return create_tmpvar(int_t) end # NOTE: The ISO C99 standard says; # # 6.5.14 Logical OR operator # # Semantics # # 4 Unlike the bitwise | operator, the || operator guarantees # left-to-right evaluation; there is a sequence point after the # evaluation of the first operand. If the first operand compares # unequal to 0, the second operand is not evaluated. notify_sequence_point_reached(SequencePoint.new(node.lhs_operand)) lhs_val = lhs_var.value if lhs_val.scalar? && lhs_val.test_must_be_true.true? # NOTE: Doing the short-circuit evaluation. notify_variable_value_referred(node, lhs_var) return create_tmpvar(int_t, scalar_value_of_true) end rhs_obj = node.rhs_operand.accept(self) if rhs_obj.variable? rhs_var = rhs_obj else return create_tmpvar(int_t) end notify_sequence_point_reached(SequencePoint.new(node.rhs_operand)) rhs_val = rhs_var.value if lhs_val.scalar? && rhs_val.scalar? # NOTE: No usual-arithmetic-conversion. rslt_var = create_tmpvar(int_t, lhs_val.logical_or(rhs_val)) else rslt_var = create_tmpvar(int_t) end notify_variable_value_referred(node, lhs_var) notify_variable_value_referred(node, rhs_var) notify_logical_or_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def visit_simple_assignment_expression(node) checkpoint(node.location) eval_simple_assignment_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_compound_assignment_expression(node) checkpoint(node.location) eval_compound_assignment_expr(node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_comma_separated_expression(node) checkpoint(node.location) node.expressions.map { |expr| expr.accept(self) }.last end private def eval_without_side_effect(&block) originally_quiet = interpreter.quiet_without_side_effect? unless originally_quiet interpreter._quiet_without_side_effect = true end yield ensure unless originally_quiet interpreter._quiet_without_side_effect = false # FIXME: Evaluation of an object-specifier doesn't refer to value # of a variable. Thus, no cross-reference record on a # sizeof-expression because cross-reference extraction # watches variable value reference not variable reference. # collect_object_specifiers(node).each { |os| os.accept(self) } end end def create_array_value_of_string(str) ArrayValue.new(str.chars.map { |ch| scalar_value_of(ch.ord) } + [scalar_value_of("\0".ord)]) end module Impl # NOTE: Host class of this module must include InterpreterMediator, # NotifierMediator and Conversion. def eval_object_specifier(node) if var = variable_named(node.identifier.value) var.declarations_and_definitions.each do |dcl_or_def| dcl_or_def.mark_as_referred_by(node.identifier) end _notify_object_referred(node, var) # NOTE: Array object will be converted into its start address by the # outer expression. So, it is correct to return an array # object itself. return var end if fun = function_named(node.identifier.value) fun.declarations_and_definitions.each do |dcl_or_def| dcl_or_def.mark_as_referred_by(node.identifier) end _notify_object_referred(node, fun) return fun end if enum = enumerator_named(node.identifier.value) enum.mark_as_referred_by(node.identifier) return create_tmpvar(enum.type, scalar_value_of(enum.value)) end fun = declare_implicit_function(node.identifier.value) _notify_implicit_function_declared(node, fun) _notify_object_referred(node, fun) fun end def eval_array_subscript_expr(node, obj, subs) unless obj.variable? and obj.type.array? || obj.type.pointer? return create_tmpvar end rslt_type = obj.type.unqualify.base_type case when obj.type.array? ary = obj # NOTE: An array-subscript-expression with an array object only # refers the array object, never refer the value of the array # object. when obj.type.pointer? ptr = obj if pointee = pointee_of(ptr) and pointee.type.array? ary = pointee end # NOTE: An array-subscript-expression with a pointer object do refers # the value of the pointer object. _notify_variable_value_referred(node, ptr) end unless subs.variable? and subs.value.scalar? && subs.value.exist? or subs.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar(rslt_type) end _notify_variable_value_referred(node, subs) # NOTE: An array subscript converted to `int' implicitly. unless subs.type.same_as?(int_t) if int_subs = do_conversion(subs, int_t) notify_implicit_conv_performed(node.array_subscript, subs, int_subs) subs = int_subs else return create_tmpvar(rslt_type) end end rslt_var = _pick_array_element(node, ary, subs, rslt_type) notify_array_subscript_expr_evaled(node, obj, subs, ary, rslt_var) rslt_var end def eval_function_call_expr(node, obj, args) if obj.function? fun = obj else return create_tmpvar unless obj.type.pointer? obj_base_type = obj.type.unqualify.base_type if obj_base_type.function? if pointee = pointee_of(obj) and pointee.function? fun = pointee else fun = define_anonymous_function(obj_base_type) end end end _notify_variable_value_referred(node, obj) # NOTE: The ISO C99 standard says; # # 6.5.2.2 Function calls # # Semantics # # 10 The order of evaluation of the function designator, the actual # arguments, and subexpressions within the actual arguments is # unspecified, but there is a sequence point before the actual call. unless args.empty? notify_sequence_point_reached(SequencePoint.new(node)) end rslt_var = nil break_event = BreakEvent.catch { rslt_var = fun.call(interpreter, node, args) } unless fun.builtin? arg_vars = args.map { |arg_obj, arg_expr| object_to_variable(arg_obj, arg_expr) } notify_function_call_expr_evaled(node, fun, arg_vars, rslt_var) end if break_event break_event.throw else rslt_var end end def eval_member_access_by_value_expr(node, obj) if obj.variable? && obj.type.composite? outer_var = obj else return create_tmpvar end memb_var = outer_var.inner_variable_named(node.identifier.value) # NOTE: A member-access-by-value-expression only refers the composite # object, never refer the value of the composite object. # NOTE: `memb_var' is nil when this expression represents the direct # member access extension. notify_member_access_expr_evaled(node, outer_var, memb_var) if memb_var _notify_object_referred(node, memb_var) memb_var else create_tmpvar end end def eval_member_access_by_pointer_expr(node, obj) obj_type = obj.type.unqualify if obj.variable? && obj_type.pointer? && obj_type.base_type.composite? ptr = obj else return create_tmpvar end if pointee = pointee_of(ptr) if pointee.type.array? if first_elem = pointee.inner_variable_at(0) pointee = first_elem else pointee = create_tmpvar(obj_type.base_type) end end end # NOTE: A member-access-by-pointer-expression do refers the value of # the pointer object. _notify_variable_value_referred(node, ptr) if pointee && pointee.type.composite? outer_var = pointee memb_var = outer_var.inner_variable_named(node.identifier.value) else if memb = obj_type.base_type.member_named(node.identifier.value) memb_var = create_tmpvar(memb.type) end end # NOTE: `memb_var' is nil when this expression represents the direct # member access extension. notify_member_access_expr_evaled(node, ptr, memb_var) if memb_var _notify_object_referred(node, memb_var) memb_var else create_tmpvar end end def eval_postfix_increment_expr(node, obj) var = object_to_variable(obj, node) if !var.type.scalar? && !var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rslt_var = create_tmpvar(var.type, var.value.dup) # NOTE: Value of the variable is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, var) if var.value.scalar? var.assign!(var.value + scalar_value_of(1), node, current_branch) _notify_variable_value_updated(node, var) end notify_postfix_increment_expr_evaled(node, var, rslt_var) rslt_var end def eval_postfix_decrement_expr(node, obj) var = object_to_variable(obj, node) if !var.type.scalar? && !var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rslt_var = create_tmpvar(var.type, var.value.dup) # NOTE: Value of the variable is referred at this point. But value # reference should not be notified not to confuse sequence-point # warnings detections. # _notify_variable_value_referred(node, var) if var.value.scalar? var.assign!(var.value - scalar_value_of(1), node, current_branch) _notify_variable_value_updated(node, var) end notify_postfix_decrement_expr_evaled(node, var, rslt_var) rslt_var end def eval_prefix_increment_expr(node, obj) var = object_to_variable(obj, node) if !var.type.scalar? && !var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end orig_val = var.value.dup # NOTE: Value of the variable is referred at this point. But value # reference should not be notified not to confuse sequence-point # warnings detections. # _notify_variable_value_referred(node, var) if var.value.scalar? var.assign!(var.value + scalar_value_of(1), node, current_branch) _notify_variable_value_updated(node, var) end notify_prefix_increment_expr_evaled(node, var, orig_val) create_tmpvar(var.type, var.value) end def eval_prefix_decrement_expr(node, obj) var = object_to_variable(obj, node) if !var.type.scalar? && !var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end orig_val = var.value.dup # NOTE: Value of the variable is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, var) if var.value.scalar? var.assign!(var.value - scalar_value_of(1), node, current_branch) _notify_variable_value_updated(node, var) end notify_prefix_decrement_expr_evaled(node, var, orig_val) create_tmpvar(var.type, var.value) end def eval_address_expr(node, obj) # NOTE: An address-expression does not read the value of the object. # But value reference should be notified to emphasize global # variable cross-references. _notify_variable_value_referred(node, obj) ptr = object_to_pointer(obj, node) notify_address_expr_evaled(node, obj, ptr) ptr end def eval_indirection_expr(node, obj) var = object_to_variable(obj, node) if var.type.pointer? ptr = var else return create_tmpvar end pointee = pointee_of(ptr) _notify_variable_value_referred(node, ptr) ptr_base_type = ptr.type.unqualify.base_type case when pointee _notify_object_referred(node, pointee) if pointee.type.array? if first_elem = pointee.inner_variable_at(0) pointee = first_elem else pointee = create_tmpvar(ptr_base_type) end end unless ptr_base_type.same_as?(pointee.type) pointee = do_conversion(pointee, ptr_base_type) || create_tmpvar(ptr_base_type) end when ptr_base_type.function? pointee = define_anonymous_function(ptr_base_type) else pointee = create_tmpvar(ptr_base_type) end notify_indirection_expr_evaled(node, ptr, pointee) pointee end def eval_unary_arithmetic_expr(node, obj) var = object_to_variable(obj, node) if !var.type.scalar? && !var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end case node.operator.type when "+" rslt_var = create_tmpvar(var.type, +var.value) when "-" rslt_var = create_tmpvar(var.type, -var.value) when "~" rslt_var = create_tmpvar(var.type, ~var.value) when "!" rslt_var = create_tmpvar(int_t, !var.value) else __NOTREACHED__ end _notify_variable_value_referred(node, var) notify_unary_arithmetic_expr_evaled(node, var, rslt_var) rslt_var end def eval_cast_expr(node, obj) resolve_unresolved_type(node.type_name) var = object_to_variable(obj, node) rslt_var = do_conversion(var, node.type_name.type) || create_tmpvar(node.type_name.type) notify_explicit_conv_performed(node, var, rslt_var) # NOTE: A cast-expression does not refer a source value essentially. # But, to avoid misunderstand that a return value of a function # is discarded when the return value is casted before assigning # to a variable. _notify_variable_value_referred(node, var) rslt_var end def eval_multiplicative_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value case node.operator.type when "*" # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val * rhs_val) when "/" # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. # NOTE: "Div by 0" semantics is implemented in value-value # arithmetic. rslt_var = create_tmpvar(lhs_conved.type, lhs_val / rhs_val) when "%" # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. # NOTE: "Div by 0" semantics is implemented in value-value # arithmetic. rslt_var = create_tmpvar(lhs_conved.type, lhs_val % rhs_val) else __NOTREACHED__ end _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_multiplicative_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_additive_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value case node.operator.type when "+" # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val + rhs_val) when "-" # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val - rhs_val) else __NOTREACHED__ end _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_additive_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_shift_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end # NOTE: The ISO C99 standard says; # # 6.5.7 Bitwise shift operators # # 3 The integer promotions are performed on each of the operands. The # type of the result is that of the promoted left operand. If the # value of the right operand is negative or is greater than or equal # to the width of the promoted left operand, the behavior is # undefined. lhs_conved = do_integer_promotion(lhs_var) rhs_conved = do_integer_promotion(rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value case node.operator.type when "<<" # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val << rhs_val) when ">>" # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val >> rhs_val) else __NOTREACHED__ end _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_shift_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_relational_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar(int_t, scalar_value_of_arbitrary) end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar(int_t, scalar_value_of_arbitrary) end lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value case node.operator.type when "<" rslt_var = create_tmpvar(int_t, lhs_val < rhs_val) when ">" rslt_var = create_tmpvar(int_t, lhs_val > rhs_val) when "<=" rslt_var = create_tmpvar(int_t, lhs_val <= rhs_val) when ">=" rslt_var = create_tmpvar(int_t, lhs_val >= rhs_val) else __NOTREACHED__ end _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_relational_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_equality_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar(int_t, scalar_value_of_arbitrary) end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar(int_t, scalar_value_of_arbitrary) end lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value case node.operator.type when "==" rslt_var = create_tmpvar(int_t, lhs_val == rhs_val) when "!=" rslt_var = create_tmpvar(int_t, lhs_val != rhs_val) else __NOTREACHED__ end _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_equality_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_and_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val & rhs_val) _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_and_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_exclusive_or_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val ^ rhs_val) _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_exclusive_or_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_inclusive_or_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return create_tmpvar end lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end lhs_val = lhs_conved.value rhs_val = rhs_conved.value # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. rslt_var = create_tmpvar(lhs_conved.type, lhs_val | rhs_val) _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_inclusive_or_expr_evaled(node, lhs_var, rhs_var, rslt_var) rslt_var end def eval_simple_assignment_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if rhs_var.type.same_as?(lhs_var.type) rhs_conved = rhs_var else rhs_conved = do_conversion(rhs_var, lhs_var.type) || create_tmpvar(lhs_var.type) notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. # NOTE: Even if rhs_obj is a NamedVariable, new value will be # instantiated in value-coercing. # So, value-aliasing never occurs. defined_val = rhs_conved.value.to_defined_value lhs_var.assign!(defined_val, node, current_branch) _notify_variable_value_referred(node, rhs_var) _notify_variable_value_updated(node, lhs_var) notify_assignment_expr_evaled(node, lhs_var, rhs_var) lhs_var end def eval_compound_assignment_expr(node, lhs_obj, rhs_obj) lhs_var = object_to_variable(lhs_obj, node.lhs_operand) if !lhs_var.type.scalar? && !lhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return lhs_obj end rhs_var = object_to_variable(rhs_obj, node.rhs_operand) if !rhs_var.type.scalar? && !rhs_var.type.void? # NOTE: To detect bad value reference of `void' expressions. return lhs_var end case node.operator.type when "*=" _do_mul_then_assign(node, lhs_var, rhs_var) when "/=" _do_div_then_assign(node, lhs_var, rhs_var) when "%=" _do_mod_then_assign(node, lhs_var, rhs_var) when "+=" _do_add_then_assign(node, lhs_var, rhs_var) when "-=" _do_sub_then_assign(node, lhs_var, rhs_var) when "<<=" _do_shl_then_assign(node, lhs_var, rhs_var) when ">>=" _do_shr_then_assign(node, lhs_var, rhs_var) when "&=" _do_and_then_assign(node, lhs_var, rhs_var) when "^=" _do_xor_then_assign(node, lhs_var, rhs_var) when "|=" _do_ior_then_assign(node, lhs_var, rhs_var) end lhs_var end private def _do_mul_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val * rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_multiplicative_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_div_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value # NOTE: "Div by 0" semantics is implemented in value-value arithmetic. rslt_var = create_tmpvar(lhs_conved.type, lhs_val / rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_multiplicative_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_mod_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value # NOTE: "Div by 0" semantics is implemented in value-value arithmetic. rslt_var = create_tmpvar(lhs_conved.type, lhs_val % rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_multiplicative_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_add_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val + rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_additive_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_sub_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val - rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_additive_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_shl_then_assign(node, lhs_var, rhs_var) # NOTE: The ISO C99 standard says; # # 6.5.7 Bitwise shift operators # # 3 The integer promotions are performed on each of the operands. The # type of the result is that of the promoted left operand. If the # value of the right operand is negative or is greater than or equal # to the width of the promoted left operand, the behavior is # undefined. lhs_conved, rhs_conved = _do_integer_promotions(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val << rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_shift_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_shr_then_assign(node, lhs_var, rhs_var) # NOTE: The ISO C99 standard says; # # 6.5.7 Bitwise shift operators # # 3 The integer promotions are performed on each of the operands. The # type of the result is that of the promoted left operand. If the # value of the right operand is negative or is greater than or equal # to the width of the promoted left operand, the behavior is # undefined. lhs_conved, rhs_conved = _do_integer_promotions(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val >> rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_shift_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_and_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val & rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_and_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_xor_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val ^ rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_exclusive_or_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_ior_then_assign(node, lhs_var, rhs_var) lhs_conved, rhs_conved = _do_uarith_conversion(node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(lhs_conved.type, lhs_val | rhs_val) # NOTE: Value of the lhs_var is referred at this point. But value # reference should not be notified not to confuse sequence-point # warning detections. # _notify_variable_value_referred(node, lhs_var) _notify_variable_value_referred(node, rhs_var) notify_inclusive_or_expr_evaled(node, lhs_var, rhs_var, rslt_var) _do_assign(node, lhs_var, rslt_var) end def _do_uarith_conversion(node, lhs_var, rhs_var) lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end return lhs_conved, rhs_conved end def _do_integer_promotions(node, lhs_var, rhs_var) lhs_conved = do_integer_promotion(lhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end rhs_conved = do_integer_promotion(rhs_var) unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end return lhs_conved, rhs_conved end def _do_assign(node, lhs_var, rhs_var) if rhs_var.type.same_as?(lhs_var.type) rhs_conved = rhs_var else rhs_conved = do_conversion(rhs_var, lhs_var.type) || create_tmpvar(lhs_var.type) notify_implicit_conv_performed(node.lhs_operand, rhs_var, rhs_conved) end # NOTE: Domain of the arithmetic result value will be restricted by # min-max of the variable type. defined_val = rhs_conved.value.to_defined_value lhs_var.assign!(defined_val, node, current_branch) _notify_variable_value_updated(node, lhs_var) notify_assignment_expr_evaled(node, lhs_var, rhs_conved) end def _pick_array_element(expr, ary, subs, rslt_type) if ary if subs.value.definite? inner_var = ary.inner_variable_at(subs.value.unique_sample) if inner_var && inner_var.type.same_as?(rslt_type) _notify_object_referred(expr, inner_var) return inner_var end else # NOTE: To improve heuristics of array subscript evaluation with an # indefinite subscript. inner_var = ary.representative_element _notify_object_referred(expr, inner_var) return inner_var end end create_tmpvar(rslt_type) end def _notify_object_referred(node, obj) case obj when Variable interpreter.notify_variable_referred(node, obj) when Function interpreter.notify_function_referred(node, obj) end end def _notify_variable_value_referred(node, obj) if obj.variable? interpreter.notify_variable_value_referred(node, obj) end # NOTE: When a value of the inner-variable of array or composite object # is referred, notification of the outer variable's value has # already been done in sub expressions. end def _notify_variable_value_updated(node, obj) if obj.variable? interpreter.notify_variable_value_updated(node, obj) if obj.inner? # NOTE: When a value of the inner-variable of array or composite # object is updated, the outer variable's value should also # be notified to be updated. _notify_variable_value_updated(node, obj.owner) end end end def _notify_implicit_function_declared(node, obj) if obj.function? && obj.implicit? interpreter.notify_implicit_function_declared(node, obj) end end end include Impl end end end adlint-3.2.0/lib/adlint/cc1/builtin.rb0000644000004100000410000000472612224440633017512 0ustar www-datawww-data# Builtin functions actually called by the interpreter. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/type" require "adlint/cc1/object" module AdLint #:nodoc: module Cc1 #:nodoc: class BuiltinFunction < NamedFunction def initialize(type_tbl, name) super(nil, type_tbl.builtin_function_type, name) end def explicit? true end def builtin? true end def call(interp, funcall_expr, args) interp.create_tmpvar(type.return_type) end end class InspectFunction < BuiltinFunction def initialize(type_tbl) super(type_tbl, "__adlint__inspect") end def call(*, args) puts "__adlint__inspect" args.each { |arg, expr| pp arg } puts "EOM" super end end class EvalFunction < BuiltinFunction def initialize(type_tbl) super(type_tbl, "__adlint__eval") end def call(interp, *, args) puts "__adlint__eval" char_ary = args.first.first if char_ary.type.array? without_nil = char_ary.value.to_single_value.values[0..-2] prog_text = without_nil.map { |char| char.unique_sample.chr }.join if prog_text.empty? puts "no program text" else eval prog_text end puts "EOM" end super end end end end adlint-3.2.0/lib/adlint/cc1/value.rb0000644000004100000410000022460112224440633017154 0ustar www-datawww-data# Values associated with memory blocks. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/domain" require "adlint/cc1/operator" module AdLint #:nodoc: module Cc1 #:nodoc: module BuggyValueSampler def unique_sample # NOTE: A value may have multiple sample values. # So, callers of this method have potential bugs! to_enum.to_a.min end end # == DESCRIPTION # === TestEvidence class hierarchy # TestEvidence # <-- TrivialTestEvidence # <-- NontrivialTestEvidence # <-- UndefinableTestEvidence # <-- NullabilityTestEvidence # <-- DefinableTestEvidence class TestEvidence def fulfilled? subclass_responsibility end def emit_context_messages(report, loc) subclass_responsibility end end # == DESCRIPTION # === ValueTest class hierarchy # ValueTest # <-- TrivialValueTest # <-- NontrivialValueTest class ValueTest def initialize(evid) @evidence = evid end attr_reader :evidence def result subclass_responsibility end def true? !!result end def false? !true? end end # == DESCRIPTION # === Value class hierarchy # Value # <-- SingleValue # <-- ScalarValue # <-- ArrayValue # <-- CompositeValue # <-- MultipleValue # <-- VersionedValue class Value include BuggyValueSampler def scalar? subclass_responsibility end def array? subclass_responsibility end def composite? subclass_responsibility end def undefined? subclass_responsibility end def ambiguous? subclass_responsibility end def exist? subclass_responsibility end def definite? subclass_responsibility end def contain?(val) subclass_responsibility end def multiple? subclass_responsibility end def overwrite!(val, tag) subclass_responsibility end def narrow_domain!(op, ope_val) subclass_responsibility end def widen_domain!(op, ope_val) subclass_responsibility end def invert_domain! subclass_responsibility end def single_value_unified_with(rhs_val) subclass_responsibility end def ~ subclass_responsibility end def +@ subclass_responsibility end def -@ subclass_responsibility end def +(rhs_val) subclass_responsibility end def -(rhs_val) subclass_responsibility end def *(rhs_val) subclass_responsibility end def /(rhs_val) subclass_responsibility end def %(rhs_val) subclass_responsibility end def &(rhs_val) subclass_responsibility end def |(rhs_val) subclass_responsibility end def ^(rhs_val) subclass_responsibility end def <<(rhs_val) subclass_responsibility end def >>(rhs_val) subclass_responsibility end def ! subclass_responsibility end def <(rhs_val) subclass_responsibility end def >(rhs_val) subclass_responsibility end def ==(rhs_val) subclass_responsibility end def !=(rhs_val) subclass_responsibility end def <=(rhs_val) subclass_responsibility end def >=(rhs_val) subclass_responsibility end def logical_and(rhs_val) # NOTE: Operator && cannot be defined as a method in Ruby. subclass_responsibility end def logical_or(rhs_val) # NOTE: Operator || cannot be defined as a method in Ruby. subclass_responsibility end def test_must_be_undefined subclass_responsibility end def test_may_be_undefined subclass_responsibility end def test_must_be_equal_to(val) subclass_responsibility end def test_may_be_equal_to(val) subclass_responsibility end def test_must_not_be_equal_to(val) subclass_responsibility end def test_may_not_be_equal_to(val) subclass_responsibility end def test_must_be_less_than(val) subclass_responsibility end def test_may_be_less_than(val) subclass_responsibility end def test_must_be_greater_than(val) subclass_responsibility end def test_may_be_greater_than(val) subclass_responsibility end def test_must_be_null subclass_responsibility end def test_may_be_null subclass_responsibility end def test_must_be_true subclass_responsibility end def test_may_be_true subclass_responsibility end def test_must_be_false subclass_responsibility end def test_may_be_false subclass_responsibility end def coerce_to(type) subclass_responsibility end def to_enum subclass_responsibility end def to_single_value subclass_responsibility end def to_defined_value subclass_responsibility end def eql?(rhs_val) subclass_responsibility end def hash subclass_responsibility end def dup subclass_responsibility end end class TrivialTestEvidence < TestEvidence def fulfilled? true end def emit_context_messages(report, loc) # NOTE: Evidence of the test result about SingleValue is trivial. # So, nothing to be complemented. [] end end class TrivialValueTest < ValueTest def initialize(rslt) super(TrivialTestEvidence.new) @result = rslt end attr_reader :result end class SingleValue < Value def multiple? false end def test_must_be_undefined TrivialValueTest.new(self.undefined?) end def test_may_be_undefined # NOTE: SingleValue has exactly one value domain. # So, the value of SingleValue may be undefined when the value # must be undefined. self.test_must_be_undefined end def to_single_value self end private def scalar_value_of_null ScalarValue.of(0, logical_shr?) end def scalar_value_of_true ScalarValue.of_true(logical_shr?) end def scalar_value_of_false ScalarValue.of_false(logical_shr?) end def scalar_value_of_nil ScalarValue.of_nil(logical_shr?) end def logical_shr? subclass_responsibility end end module ScalarValueFactory def of(numeric_or_range, logical_shr) case numeric_or_range when Numeric new(ValueDomain.equal_to(numeric_or_range, logical_shr)) when Range new(ValueDomain.greater_than_or_equal_to( numeric_or_range.first, logical_shr ).intersection(ValueDomain.less_than_or_equal_to( numeric_or_range.last, logical_shr ))) else raise TypeError, "argument must be a Numeric or a Range." end end def not_of(numeric_or_range, logical_shr) case numeric_or_range when Numeric new(ValueDomain.not_equal_to(numeric_or_range, logical_shr)) when Range new(ValueDomain.less_than( numeric_or_range.first, logical_shr ).union(ValueDomain.greater_than( numeric_or_range.last, logical_shr ))) else raise TypeError, "argument must be a Numeric or a Range." end end def of_true(logical_shr) not_of(0, logical_shr) end def of_false(logical_shr) of(0, logical_shr) end def of_arbitrary(logical_shr) new(ValueDomain.of_unlimited(logical_shr)) end def of_undefined(range, logical_shr) new(ValueDomain.of_undefined(ValueDomain.greater_than_or_equal_to( range.first, logical_shr ).intersection(ValueDomain.less_than_or_equal_to( range.last, logical_shr )))) end def of_nil(logical_shr) new(ValueDomain.of_nil(logical_shr)) end def of_nan(logical_shr) new(ValueDomain.of_nan(logical_shr)) end end class ScalarValue < SingleValue extend ScalarValueFactory def initialize(domain) @domain = domain end def scalar? true end def array? false end def composite? false end def exist? !@domain.empty? end def definite? @domain.kind_of?(EqualToValueDomain) end def contain?(val) case sval = val.to_single_value when ScalarValue @domain.contain?(sval.domain) else false end end def undefined? @domain.undefined? end def ambiguous? @domain.ambiguous? end def overwrite!(val, *) case sval = val.to_single_value when ScalarValue @domain = sval.domain else raise TypeError, "cannot overwrite scalar with non-scalar." end end def narrow_domain!(op, ope_val) case ope_sval = ope_val.to_single_value when ScalarValue @domain = @domain.narrow(op, ope_sval.domain) else raise TypeError, "cannot narrow scalar value domain with non-scalar." end end def widen_domain!(op, ope_val) case ope_sval = ope_val.to_single_value when ScalarValue @domain = @domain.widen(op, ope_sval.domain) else raise TypeError, "cannot widen scalar value domain with non-scalar." end end def invert_domain! @domain = @domain.inversion end def single_value_unified_with(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain.union(rhs_sval.domain)) else raise TypeError, "cannot unify scalar value with non-scalar." end end def ~ ScalarValue.new(~@domain) end def +@ ScalarValue.new(+@domain) end def -@ ScalarValue.new(-@domain) end def +(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain + rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def -(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain - rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def *(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain * rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def /(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain / rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def %(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain % rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def &(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain & rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def |(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain | rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def ^(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain ^ rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def <<(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain << rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def >>(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain >> rhs_sval.domain) else raise TypeError, "binary operation between scalar and non-scalar." end end def ! ScalarValue.new(!@domain) end def <(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain < rhs_sval.domain) else raise TypeError, "comparison between scalar and non-scalar." end end def >(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain > rhs_sval.domain) else raise TypeError, "comparison between scalar and non-scalar." end end def ==(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain == rhs_sval.domain) else raise TypeError, "comparison between scalar and non-scalar." end end def !=(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain != rhs_sval.domain) else raise TypeError, "comparison between scalar and non-scalar." end end def <=(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain <= rhs_sval.domain) else raise TypeError, "comparison between scalar and non-scalar." end end def >=(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain >= rhs_sval.domain) else raise TypeError, "comparison between scalar and non-scalar." end end def logical_and(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain.logical_and(rhs_sval.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def logical_or(rhs_val) case rhs_sval = rhs_val.to_single_value when ScalarValue ScalarValue.new(@domain.logical_or(rhs_sval.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_must_be_equal_to(val) case sval = val.to_single_value.dup when ScalarValue comp_val = (self == sval) sval.invert_domain! sval.narrow_domain!(Operator::EQ, self) TrivialValueTest.new( comp_val.domain.intersect?(scalar_value_of_true.domain) && !comp_val.domain.contain?(scalar_value_of_false.domain) && !@domain.intersect?(sval.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_may_be_equal_to(val) case sval = val.to_single_value when ScalarValue TrivialValueTest.new( (self == sval).domain.intersect?(scalar_value_of_true.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_must_not_be_equal_to(val) case sval = val.to_single_value when ScalarValue comp_val = (self != sval) TrivialValueTest.new( comp_val.domain.intersect?(scalar_value_of_true.domain) && !comp_val.domain.contain?(scalar_value_of_false.domain) && !@domain.intersect?(sval.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_may_not_be_equal_to(val) case sval = val.to_single_value when ScalarValue TrivialValueTest.new( (self != sval).domain.intersect?(scalar_value_of_true.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_must_be_less_than(val) case sval = val.to_single_value when ScalarValue comp_val = (self < sval) TrivialValueTest.new( comp_val.domain.intersect?(scalar_value_of_true.domain) && !comp_val.domain.contain?(scalar_value_of_false.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_may_be_less_than(val) case sval = val.to_single_value when ScalarValue TrivialValueTest.new( (self < sval).domain.intersect?(scalar_value_of_true.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_must_be_greater_than(val) case sval = val.to_single_value when ScalarValue comp_val = (self > sval) TrivialValueTest.new( comp_val.domain.intersect?(scalar_value_of_true.domain) && !comp_val.domain.contain?(scalar_value_of_false.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_may_be_greater_than(val) case sval = val.to_single_value when ScalarValue TrivialValueTest.new( (self > sval).domain.intersect?(scalar_value_of_true.domain)) else raise TypeError, "comparison between scalar and non-scalar." end end def test_must_be_null test_must_be_equal_to(scalar_value_of_null) end def test_may_be_null test_may_be_equal_to(scalar_value_of_null) end def test_must_be_true TrivialValueTest.new( test_may_be_equal_to(scalar_value_of_true).true? && test_must_not_be_equal_to(scalar_value_of_false).true?) end def test_may_be_true test_may_be_equal_to(scalar_value_of_true) end def test_must_be_false test_must_be_equal_to(scalar_value_of_false) end def test_may_be_false test_may_be_equal_to(scalar_value_of_false) end def coerce_to(type) type.coerce_scalar_value(self) end def to_enum @domain.each_sample end def to_defined_value ScalarValue.new(@domain.to_defined_domain) end def eql?(rhs_val) rhs_val.kind_of?(ScalarValue) && @domain.eql?(rhs_val.domain) end def hash @domain.hash end def dup ScalarValue.new(@domain) end protected attr_reader :domain private def logical_shr? @domain.logical_shr? end end class ArrayValue < SingleValue def initialize(vals) @values = vals end attr_reader :values def scalar? false end def array? true end def composite? false end def exist? @values.empty? ? true : @values.all? { |val| val.exist? } end def definite? @values.empty? ? true : @values.all? { |val| val.definite? } end def contain?(val) case sval = val.to_single_value when ArrayValue if @values.size == sval.values.size @values.zip(sval.values).all? { |lhs, rhs| lhs.contain?(rhs) } else false end else false end end def undefined? @values.empty? ? false : @values.all? { |val| val.undefined? } end def ambiguous? @values.empty? ? false : @values.all? { |val| val.ambiguous? } end def overwrite!(val, tag) case sval = val.to_single_value when ArrayValue @values.zip(sval.values).each do |lhs, rhs| rhs && lhs.overwrite!(rhs, tag) end else raise TypeError, "cannot overwrite array with non-array." end end def narrow_domain!(op, ope_val) case ope_sval = ope_val.to_single_value when ArrayValue @values.zip(ope_sval.values).each do |lhs, rhs| if rhs lhs.narrow_domain!(op, rhs) else next end end else raise TypeError, "cannot narrow array value domain with non-array." end end def widen_domain!(op, ope_val) case ope_sval = ope_val.to_single_value when ArrayValue @values.zip(ope_sval.values).each do |lhs, rhs| if rhs lhs.widen_domain!(op, rhs) else next end end else raise TypeError, "cannot widen array value domain with non-array." end end def invert_domain! @values.each { |val| val.invert_domain! } end def single_value_unified_with(rhs_val) case rhs_sval = rhs_val.to_single_value when ArrayValue ArrayValue.new(@values.zip(rhs_sval.values).map { |lhs, rhs| lhs.single_value_unified_with(rhs) }) else raise TypeError, "cannot unify array value with non-array." end end def ~ # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def +@ # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def -@ # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def +(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def -(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def *(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def /(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def %(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def &(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def |(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def ^(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def <<(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def >>(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. dup # NOTREACHED end def ! # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. scalar_value_of_false # NOTREACHED end def <(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs < rhs) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def >(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs > rhs) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def ==(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs == rhs) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def !=(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs != rhs) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def <=(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs <= rhs) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def >=(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs >= rhs) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def logical_and(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs.logical_and(rhs)) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def logical_or(rhs_val) # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this comparison operator should not be reached. case rhs_sval = rhs_val.to_single_value when ArrayValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs.logical_or(rhs)) end else scalar_value_of_false end else raise TypeError, "comparison between array and non-array." end end def test_must_be_equal_to(val) case sval = val.to_single_value when ArrayValue TrivialValueTest.new((self == sval).test_must_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_may_be_equal_to(val) case sval = val.to_single_value when ArrayValue TrivialValueTest.new((self == sval).test_may_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_must_not_be_equal_to(val) case sval = val.to_single_value when ArrayValue TrivialValueTest.new((self != sval).test_must_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_may_not_be_equal_to(val) case sval = val.to_single_value when ArrayValue TrivialValueTest.new((self != sval).test_may_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_must_be_less_than(val) case sval = value.to_single_value when ArrayValue TrivialValueTest.new((self < sval).test_must_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_may_be_less_than(val) case sval = val.to_single_value when ArrayValue TrivialValueTest.new((self < sval).test_may_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_must_be_greater_than(val) case sval = val.to_single_value when ArrayValue TrivialValueTest.new((self > sval).test_must_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_may_be_greater_than(val) case sval = val.to_single_value when ArrayValue TrivialValueTest.new((self > sval).test_may_be_true.result) else raise TypeError, "comparison between array and non-array." end end def test_must_be_null TrivialValueTest.new(@values.all? { |val| val.test_must_be_null.result }) end def test_may_be_null TrivialValueTest.new(@values.all? { |val| val.test_may_be_null.result }) end def test_must_be_true # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this method should not be reached. TrivialValueTest.new(@values.all? { |val| val.test_must_be_true.result }) end def test_may_be_true # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this method should not be reached. TrivialValueTest.new(@values.all? { |val| val.test_may_be_true.result }) end def test_must_be_false # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this method should not be reached. TrivialValueTest.new( @values.all? { |val| val.test_must_be_false.result }) end def test_may_be_false # NOTE: When an array variable appears in expressions, object-specifier # of an array variable should be evaluated into a pointer to the # array body. # So, this method should not be reached. TrivialValueTest.new(@values.all? { |val| val.test_may_be_false.result }) end def coerce_to(type) type.coerce_array_value(self) end def to_enum # FIXME: This method generates only one of sample values. @values.map { |val| val.to_enum.first } end def to_defined_value ArrayValue.new(@values.map { |val| val.to_defined_value }) end def eql?(rhs_val) rhs_val.kind_of?(ArrayValue) && @values.eql?(rhs_val.values) end def hash @values.hash end def dup ArrayValue.new(@values.map { |val| val.dup }) end private def logical_shr? @values.all? { |val| val.logical_shr? } end memoize :logical_shr? end class CompositeValue < SingleValue def initialize(vals) @values = vals end attr_reader :values def scalar? false end def array? false end def composite? true end def exist? @values.empty? ? true : @values.all? { |val| val.exist? } end def definite? @values.empty? ? true : @values.all? { |val| val.definite? } end def contain?(val) case sval = val.to_single_value when CompositeValue if @values.size == sval.values.size @values.zip(sval.values).all? { |lhs, rhs| lhs.contain?(rhs) } else false end else false end end def undefined? @values.empty? ? false : @values.all? { |val| val.undefined? } end def ambiguous? @values.empty? ? false : @values.all? { |val| val.ambiguous? } end def overwrite!(val, tag) case sval = val.to_single_value when CompositeValue @values.zip(sval.values).each do |lhs, rhs| rhs && lhs.overwrite!(rhs, tag) end else raise TypeError, "cannot overwrite composite with non-composite." end end def narrow_domain!(op, ope_val) case ope_sval = ope_val.to_single_value when CompositeValue @values.zip(ope_sval.values).each do |lhs, rhs| if rhs lhs.narrow_domain!(op, rhs) else next end end else raise TypeError, "cannot narrow composite value domain with non-composite." end end def widen_domain!(op, ope_val) case ope_sval = ope_val.to_single_value when CompositeValue @values.zip(ope_sval.values).each do |lhs, rhs| if rhs lhs.widen_domain!(op, rhs) else next end end else raise TypeError, "cannot widen composite value domain with non-composite." end end def invert_domain! @values.each { |val| val.invert_domain! } end def single_value_unified_with(rhs_val) case rhs_sval = rhs_val.to_single_value when CompositeValue CompositeValue.new( @values.zip(rhs_sval.values).map { |lhs, rhs| lhs.single_value_unified_with(rhs) }) else raise TypeError, "cannot unify composite value with non-composite." end end def ~ # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def +@ # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def -@ # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def +(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def -(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def *(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def /(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def %(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def &(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def |(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def ^(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def <<(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def >>(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). dup # NOTREACHED end def ! # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). scalar_value_of_false # NOTREACHED end def <(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs < rhs) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def >(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs > rhs) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def ==(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs == rhs) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def !=(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs != rhs) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def <=(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs <= rhs) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def >=(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs >= rhs) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def logical_and(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs.logical_and(rhs)) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def logical_or(rhs_val) # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). case rhs_sval = rhs_val.to_single_value when CompositeValue if @values.size == rhs_sval.values.size zipped = @values.zip(rhs_sval.values) zipped.reduce(scalar_value_of_nil) do |rslt_val, (lhs, rhs)| rslt_val.single_value_unified_with(lhs.logical_or(rhs)) end else scalar_value_of_false end else raise TypeError, "comparison between composite and non-composite." end end def test_must_be_equal_to(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self == sval).test_must_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_may_be_equal_to(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self == sval).test_may_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_must_not_be_equal_to(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self != sval).test_must_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_may_not_be_equal_to(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self != sval).test_may_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_must_be_less_than(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self < sval).test_must_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_may_be_less_than(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self < sval).test_may_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_must_be_greater_than(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self > sval).test_must_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_may_be_greater_than(val) case sval = val.to_single_value when CompositeValue TrivialValueTest.new((self > sval).test_may_be_true.result) else raise TypeError, "comparison between composite and non-composite." end end def test_must_be_null TrivialValueTest.new(@values.all? { |val| val.test_must_be_null.result }) end def test_may_be_null TrivialValueTest.new(@values.all? { |val| val.test_may_be_null.result }) end def test_must_be_true # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). TrivialValueTest.new(@values.all? { |val| val.test_must_be_true.result }) end def test_may_be_true # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). TrivialValueTest.new(@values.all? { |val| val.test_may_be_true.result }) end def test_must_be_false # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). TrivialValueTest.new( @values.all? { |val| val.test_must_be_false.result }) end def test_may_be_false # NOTE: A composite variable cannot appear in expressions except the # primary-expression(object-specifier followed by `.'). TrivialValueTest.new(@values.all? { |val| val.test_may_be_false.result }) end def coerce_to(type) type.coerce_composite_value(self) end def to_enum # FIXME: This method generates only one of sample values. @values.map { |val| val.to_enum.first } end def to_defined_value CompositeValue.new(@values.map { |val| val.to_defined_value }) end def eql?(rhs_val) rhs_val.kind_of?(CompositeValue) && @values.eql?(rhs_val.values) end def hash @values.hash end def dup CompositeValue.new(@values.map { |val| val.dup }) end private def logical_shr? @values.all? { |val| val.logical_shr? } end memoize :logical_shr? end class NontrivialTestEvidence < TestEvidence def initialize(exact) @exact = exact @positive_contribs = [] @negative_contribs = [] end attr_reader :positive_contribs attr_reader :negative_contribs def fulfilled? if @exact @negative_contribs.any? { |mval| mval._base.tag.traceable? } else @positive_contribs.any? { |mval| mval._base.tag.traceable? } && @negative_contribs.any? { |mval| mval._base.tag.traceable? } end end def add_positive_contributor(mval) @positive_contribs.push(mval) end def add_negative_contributor(mval) @negative_contribs.push(mval) end end class UndefinableTestEvidence < NontrivialTestEvidence # NOTE: Context tracing feature will be mixed-in at trace.rb later. end class NullabilityTestEvidence < NontrivialTestEvidence # NOTE: Context tracing feature will be mixed-in at trace.rb later. end class DefinableTestEvidence < NontrivialTestEvidence # NOTE: Context tracing feature will be mixed-in at trace.rb later. def initialize(pred, exact) super(exact) @predicate = pred end end class NontrivialValueTest < ValueTest def initialize(evid, exact) super(evid) @exact = exact end def result # NOTE: TestEvidence of an NontrivialValueTest must be a kind of # NontrivialTestEvidence. if @exact !evidence.positive_contribs.empty? && evidence.negative_contribs.empty? else !evidence.positive_contribs.empty? end end end class TransitionTag def initialize(by = nil, at = nil) self.by = by self.at = at end # NOTE: This value is generated by `by' points to AST nodes. attr_reader :by def by=(by) @by = by ? by.dup.compact.uniq : [] end # NOTE: This value is generated in `at' points to branch trees. attr_reader :at def at=(at) @at = at ? at.dup.compact.uniq : [] end def traceable? !@by.empty? end def merge!(tag) if tag if at == tag.at self.by = tag.by + by self.at = tag.at + at else self.by = tag.by self.at = tag.at end end end def pretty_print(pp) { by: @by.map(&:location), at: @at.map { |br| br.ctrlexpr.to_expr }.compact.map(&:location) }.pretty_print(pp) end end class ValueTransition include Enumerable Snapshot = Struct.new(:value, :tag) private_constant :Snapshot def initialize(mval) @ordered_snapshots = create_ordered_snapshots(mval) end def first @ordered_snapshots.first end def last @ordered_snapshots.last end def each(&block) if block_given? @ordered_snapshots.each(&block) else to_enum(:each) end end private def create_ordered_snapshots(mval) if mval.ancestor older = create_ordered_snapshots(mval.ancestor) else older = [] end older.push(Snapshot.new(mval._base.value, mval._base.tag)) end end class MultipleValue < Value Base = Struct.new(:value, :tag) private_constant :Base def initialize(val, ancestor, tag) @base = Base.new(val.to_single_value, tag) @ancestor = ancestor @descendants = [] end attr_reader :ancestor def scalar? _base.value.scalar? end def array? _base.value.array? end def composite? _base.value.composite? end def undefined? effective_values.all? { |mval| mval._base.value.undefined? } end def ambiguous? effective_values.all? { |mval| mval._base.value.ambiguous? } end def exist? effective_values.any? { |mval| mval._base.value.exist? } end def definite? effective_values.all? { |mval| mval._base.value.definite? } end def contain?(val) sval = val.to_single_value effective_values.any? { |mval| mval._base.value.contain?(sval) } end def multiple? true end def overwrite!(val, tag) sval = val.to_single_value effective_values.each do |mval| mval._base.value.overwrite!(sval, nil) mval._base.tag.merge!(tag) end end def narrow_domain!(op, ope_val) ope_sval = ope_val.to_single_value effective_values.each do |mval| if anc = mval.ancestor anc._base.value.narrow_domain!(op.for_complement, ope_sval) end mval._base.value.narrow_domain!(op, ope_sval) end end def widen_domain!(op, ope_val) ope_sval = ope_val.to_single_value effective_values.each do |mval| # NOTE: Value domain widening is used to widen the controlling # variables's value only when the interpreter simulates an # iteration statement. # So, domain complementing is unnecessary for this purpose. # # if anc = mval.ancestor # anc._base.value.narrow_domain!(op.for_complement, ope_sval) # end mval._base.value.widen_domain!(op, ope_sval) # NOTE: No code is corresponding to the controlling variable's value # widenning. mval._base.tag.by = nil mval._base.tag.at = nil end end def invert_domain! effective_values.each do |mval| mval._base.value.invert_domain! end end def single_value_unified_with(rhs_val) to_single_value.single_value_unified_with(rhs_val) end def fork same_val = @descendants.find { |desc| desc.eql?(_base.value) } if same_val same_val._base.tag.by = _base.tag.by + same_val._base.tag.by same_val._base.tag.at = _base.tag.at + same_val._base.tag.at same_val else MultipleValue.new(_base.value.dup, self, _base.tag.dup).tap do |desc| @descendants.push(desc) end end end def rollback! @descendants.pop end def delete_descendants! @descendants.clear end def ~ ~to_single_value end def +@ +to_single_value end def -@ -to_single_value end def +(rhs_val) to_single_value + rhs_val.to_single_value end def -(rhs_val) to_single_value - rhs_val.to_single_value end def *(rhs_val) to_single_value * rhs_val.to_single_value end def /(rhs_val) to_single_value / rhs_val.to_single_value end def %(rhs_val) to_single_value % rhs_val.to_single_value end def &(rhs_val) to_single_value & rhs_val.to_single_value end def |(rhs_val) to_single_value | rhs_val.to_single_value end def ^(rhs_val) to_single_value ^ rhs_val.to_single_value end def <<(rhs_val) to_single_value << rhs_val.to_single_value end def >>(rhs_val) to_single_value >> rhs_val.to_single_value end def ! !to_single_value end def <(rhs_val) to_single_value < rhs_val.to_single_value end def >(rhs_val) to_single_value > rhs_val.to_single_value end def ==(rhs_val) to_single_value == rhs_val.to_single_value end def !=(rhs_val) to_single_value != rhs_val.to_single_value end def <=(rhs_val) to_single_value <= rhs_val.to_single_value end def >=(rhs_val) to_single_value >= rhs_val.to_single_value end def logical_and(rhs_val) to_single_value.logical_and(rhs_val.to_single_value) end def logical_or(rhs_val) to_single_value.logical_or(rhs_val.to_single_value) end def test_must_be_undefined evid = UndefinableTestEvidence.new(true) effective_values.each do |mval| if mval._base.value.test_must_be_undefined.true? evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end def test_may_be_undefined evid = UndefinableTestEvidence.new(false) effective_values.each do |mval| if mval._base.value.test_may_be_undefined.true? evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def test_must_be_equal_to(val) sval = val.to_single_value non_nil_vals = effective_values.select { |mval| mval._base.value.exist? } if non_nil_vals.empty? TrivialValueTest.new(false) else pred = lambda { |v| v.test_must_be_equal_to(sval).true? } evid = DefinableTestEvidence.new(pred, true) non_nil_vals.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end end def test_may_be_equal_to(val) sval = val.to_single_value pred = lambda { |v| v.test_may_be_equal_to(sval).true? } evid = DefinableTestEvidence.new(pred, false) effective_values.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def test_must_not_be_equal_to(val) sval = val.to_single_value non_nil_vals = effective_values.select { |mval| mval._base.value.exist? } if non_nil_vals.empty? TrivialValueTest.new(false) else pred = lambda { |v| v.test_must_not_be_equal_to(sval).true? } evid = DefinableTestEvidence.new(pred, true) non_nil_vals.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end end def test_may_not_be_equal_to(val) sval = val.to_single_value pred = lambda { |v| v.test_may_not_be_equal_to(sval).true? } evid = DefinableTestEvidence.new(pred, false) effective_values.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def test_must_be_less_than(val) sval = val.to_single_value non_nil_vals = effective_values.select { |mval| mval._base.value.exist? } if non_nil_vals.empty? TrivialValueTest.new(false) else pred = lambda { |v| v.test_must_be_less_than(sval).true? } evid = DefinableTestEvidence.new(pred, true) non_nil_vals.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end end def test_may_be_less_than(val) sval = val.to_single_value pred = lambda { |v| v.test_may_be_less_than(sval).true? } evid = DefinableTestEvidence.new(pred, false) effective_values.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def test_must_be_greater_than(val) sval = val.to_single_value non_nil_vals = effective_values.select { |mval| mval._base.value.exist? } if non_nil_vals.empty? TrivialValueTest.new(false) else pred = lambda { |v| v.test_must_be_greater_than(sval).true? } evid = DefinableTestEvidence.new(pred, true) non_nil_vals.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end end def test_may_be_greater_than(val) sval = val.to_single_value pred = lambda { |v| v.test_may_be_greater_than(sval).true? } evid = DefinableTestEvidence.new(pred, false) effective_values.any? do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def test_must_be_null non_nil_vals = effective_values.select { |mval| mval._base.value.exist? } if non_nil_vals.empty? TrivialValueTest.new(false) else evid = NullabilityTestEvidence.new(true) non_nil_vals.each do |mval| if mval._base.value.test_must_be_null.true? evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end end def test_may_be_null evid = NullabilityTestEvidence.new(false) effective_values.each do |mval| if mval._base.value.test_may_be_null.true? evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def test_must_be_true non_nil_vals = effective_values.select { |mval| mval._base.value.exist? } if non_nil_vals.empty? TrivialValueTest.new(false) else pred = lambda { |val| val.test_must_be_true.true? } evid = DefinableTestEvidence.new(pred, true) non_nil_vals.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end end def test_may_be_true pred = lambda { |val| val.test_may_be_true.true? } evid = DefinableTestEvidence.new(pred, false) effective_values.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def test_must_be_false non_nil_vals = effective_values.select { |mval| mval._base.value.exist? } if non_nil_vals.empty? TrivialValueTest.new(false) else pred = lambda { |val| val.test_must_be_false.true? } evid = DefinableTestEvidence.new(pred, true) non_nil_vals.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, true) end end def test_may_be_false pred = lambda { |val| val.test_may_be_false.true? } evid = DefinableTestEvidence.new(pred, false) effective_values.each do |mval| if pred.call(mval._base.value) evid.add_positive_contributor(mval) else evid.add_negative_contributor(mval) end break if evid.fulfilled? end NontrivialValueTest.new(evid, false) end def transition ValueTransition.new(self) end def coerce_to(type) sval = to_single_value.coerce_to(type) MultipleValue.new(sval, nil, _base.tag.dup) end def to_enum to_single_value.to_enum end def to_single_value # NOTE: The _base.value of the MultipleValue object must be a # SingleValue. effective_values.map { |mval| mval._base.value }.reduce { |unified, sval| unified.single_value_unified_with(sval) } end def to_defined_value to_single_value.to_defined_value end def eql?(rhs_val) to_single_value.eql?(rhs_val.to_single_value) end def hash to_single_value.hash end def dup MultipleValue.new(to_single_value.dup, nil, _base.tag.dup) end def effective_values @descendants.empty? ? [self] : @descendants end def descendants if @descendants.empty? [self] else @descendants.map { |mval| mval.descendants }.flatten end end def _base # NOTE: This method will be invoked only from this file. @base end end class VersionedValue < MultipleValue def initialize(orig_val, tag) # NOTE: `orig_val.to_single_value' will be done in # MultipleValue#initialize. super(orig_val, nil, tag) @version_controller = ValueVersionController.new(self) end def enter_versioning_group @version_controller.enter_new_versioning_group end def leave_versioning_group(raise_complement) @version_controller.copy_current_version if raise_complement @version_controller.merge_forked_versions @version_controller.leave_current_versioning_group invalidate_memo! end def begin_versioning @version_controller.begin_forking end def end_versioning @version_controller.end_forking invalidate_memo! end def thin_latest_version!(with_rollback) @version_controller.thin_current_version(with_rollback) invalidate_memo! end def rollback_all_versions! delete_descendants! orig_val = @version_controller.original_value @version_controller = nil _orig_overwrite!(orig_val, TransitionTag.new) @version_controller = ValueVersionController.new(self) invalidate_memo! end alias :_orig_overwrite! :overwrite! def overwrite!(val, tag) @version_controller.fork_current_version super @version_controller.mark_current_versioning_group_as_sticky invalidate_memo! end def force_overwrite!(val) # NOTE: This method will be invoked only from VariableTable#define. sval = val.to_single_value @version_controller.original_value.overwrite!(sval, nil) _orig_overwrite!(sval, nil) invalidate_memo! end def narrow_domain!(op, ope_val) @version_controller.fork_current_version super invalidate_memo! end def widen_domain!(op, ope_val) @version_controller.fork_current_version super @version_controller.mark_current_versioning_group_as_sticky invalidate_memo! end def invert_domain! @version_controller.fork_current_version super invalidate_memo! end def coerce_to(type) VersionedValue.new(to_single_value.coerce_to(type), _base.tag.dup) end def effective_values @version_controller ? @version_controller.current_values : [self] end memoize :to_single_value def invalidate_memo! forget_memo_of__to_single_value end private def compact_descendants! @descendants = @version_controller.current_values.reject { |mval| mval.equal?(self) }.uniq end end class ValueVersionController def initialize(orig_val) @versioning_group_stack = [RootVersioningGroup.new(orig_val)] end def original_value root_versioning_group.initial_values.first end def current_values current_versioning_group.current_values end def enter_new_versioning_group new_group = VersioningGroup.new(current_versioning_group.current_version) @versioning_group_stack.push(new_group) end def leave_current_versioning_group @versioning_group_stack.pop end def begin_forking current_versioning_group.begin_new_version end def end_forking current_versioning_group.end_current_version end def fork_current_version fork_all_versions end def thin_current_version(with_rollback) # NOTE: This method must be called in the forking section. forked = current_version.forked? if with_rollback initial_vals = current_version.initial_values current_versioning_group.delete_current_version_completely base_vals = current_versioning_group.base_values base_vals.zip(initial_vals).each do |mval, init_val| mval.rollback! if forked mval.overwrite!(init_val, TransitionTag.new) if init_val end begin_forking else current_versioning_group.delete_current_version if forked current_versioning_group.base_values.each { |mval| mval.rollback! } end end mark_current_versioning_group_as_sticky end def mark_current_versioning_group_as_sticky @versioning_group_stack.reverse_each do |group| if group.sticky? break else group.sticky = true end end end def copy_current_version # NOTE: This method must be called between ending of the forking section # and ending of the versioning group. if current_versioning_group.sticky? current_values.each { |mval| mval.fork } end end def merge_forked_versions # NOTE: This method must be called between ending of the forking section # and ending of the versioning group. base_ver = current_versioning_group.base_version case when current_versioning_group.sticky? fork_all_versions base_vals = base_ver.values.map { |mval| mval.descendants }.flatten base_ver.values = base_vals.each_with_object({}) { |mval, hash| if eql_mval = hash[mval] eql_mval._base.tag.by = mval._base.tag.by + eql_mval._base.tag.by eql_mval._base.tag.at = mval._base.tag.at + eql_mval._base.tag.at else hash[mval] = mval end }.keys when current_versioning_group.versions_forked? # NOTE: When versions in the current versioning group have been forked, # base_version of the current versioning group has already been # forked. So, it is safe to overwrite the base_version's values # with the current versioning group's initial snapshot values. init_vals = current_versioning_group.initial_values vals = base_ver.values.zip(init_vals) vals.each do |base_mval, init_sval| base_mval.delete_descendants! if base_mval.kind_of?(VersionedValue) base_mval._orig_overwrite!(init_sval, TransitionTag.new) else base_mval.overwrite!(init_sval, TransitionTag.new) end end else # NOTE: Nothing to be done when base_version of the current versioning # group has not been forked. end end private def fork_all_versions parent_group = root_versioning_group active_versioning_groups.each do |active_group| active_group.base_version = parent_group.current_version active_group.fork_all_versions parent_group = active_group end end def root_versioning_group @versioning_group_stack.first end def active_versioning_groups @versioning_group_stack[1..-1] end def current_versioning_group @versioning_group_stack.last end def current_version current_versioning_group.current_version end class VersioningGroup def initialize(base_ver, sticky = false) @base_version = base_ver @sticky = sticky @initial_values = base_ver.values.map { |mval| mval._base.value.dup } @current_version = nil @all_versions = [] end attr_accessor :base_version attr_writer :sticky attr_reader :initial_values def sticky? @sticky end def versions_forked? @all_versions.any? { |ver| ver.forked? } end def base_values @base_version.values end def current_version @current_version || @base_version end def current_values current_version.values end def begin_new_version @current_version = Version.new(base_values) @all_versions.push(@current_version) end def end_current_version @current_version = nil end def delete_current_version_completely end_current_version delete_current_version end def delete_current_version @all_versions.pop end def fork_all_versions @all_versions.each { |ver| ver.fork_from(@base_version) } end end private_constant :VersioningGroup class RootVersioningGroup < VersioningGroup def initialize(orig_val) super(Version.new([orig_val], true), true) end end private_constant :RootVersioningGroup class Version def initialize(vals, original = false) @values = vals @initial_values = [] @state = original ? :original : :forking end attr_accessor :values attr_reader :initial_values def original? @state == :original end def forking? @state == :forking end def forked? @state == :forked end def fork_from(base_ver) if forking? @values = base_ver.values.map { |mval| mval.fork } @initial_values = @values.each_with_object([]) { |val, ary| ary.push(val.to_single_value.dup) } @state = :forked end end end private_constant :Version end end end adlint-3.2.0/lib/adlint/cc1/branch.rb0000644000004100000410000001613612224440633017277 0ustar www-datawww-data# C runtime branch of execution path. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/ctrlexpr" require "adlint/cc1/option" module AdLint #:nodoc: module Cc1 #:nodoc: class Branch include BranchOptions def initialize(branch_group, *opts) @group = branch_group @options = opts @break_event = nil @ctrlexpr = nil end attr_reader :group attr_reader :break_event attr_reader :ctrlexpr def trunk @group.trunk end def add_options(*new_opts) @options = (@options + new_opts).uniq @group.add_options(*new_opts) end def narrowing? @options.include?(NARROWING) end def widening? @options.include?(WIDENING) end def first? @options.include?(FIRST) end def final? @options.include?(FINAL) end def smother_break? @options.include?(SMOTHER_BREAK) end def implicit_condition? @options.include?(IMPLICIT_COND) end def complemental? @options.include?(COMPLEMENTAL) end def execute(interp, expr = nil, &block) env.enter_versioning_group if first? env.begin_versioning @ctrlexpr = ControllingExpression.new(interp, self, expr) if ensure_condition(@ctrlexpr) @break_event = BreakEvent.catch { yield(self) } else unless final? && @group.branches.size == 1 @break_event = BreakEvent.of_return end end ensure if @ctrlexpr.complexly_compounded? && !complemental? # NOTE: Give up value domain thinning of the controlling variables, # because the controlling expression is too complex to manage # value domains correctly. # TODO: Study about introducing inter-value-constraints to correctly # manage value domains of controlling variables related with each # other. if @group.in_iteration? && !smother_break? env.end_versioning(break_with_return? || break_with_break?, true) else env.end_versioning(break_with_return?, true) end else if @group.in_iteration? && !smother_break? env.end_versioning(break_with_return? || break_with_break?, false) else env.end_versioning(break_with_return?, false) end end if final? env.leave_versioning_group(!@group.complete?) if @group.complete? rethrow_break_event end end end def restart_versioning(&block) @ctrlexpr.save_affected_variables env.end_versioning(false) env.leave_versioning_group(true) env.enter_versioning_group env.begin_versioning yield @ctrlexpr.restore_affected_variables end def break_with_break? @break_event && @break_event.break? end def break_with_continue? @break_event && @break_event.continue? end def break_with_return? @break_event && @break_event.return? end private def ensure_condition(ctrlexpr) case when narrowing? ctrlexpr.ensure_true_by_narrowing.commit! when widening? ctrlexpr.ensure_true_by_widening.commit! end @group.all_controlling_variables_value_exist? end def rethrow_break_event case when @group.all_branches_break_with_break? BreakEvent.of_break.throw unless smother_break? when @group.all_branches_break_with_return? BreakEvent.of_return.throw end end def env @group.environment end end class BranchGroup include BranchOptions include BranchGroupOptions def initialize(env, trunk, *opts) @environment = env @trunk = trunk @options = opts @branches = [] end attr_reader :environment attr_reader :trunk attr_reader :branches def trunk_group @trunk ? @trunk.group : nil end def branches_to_trunk(acc = []) if @trunk acc.push(@trunk) @trunk.group.branches_to_trunk(acc) else acc end end def add_options(*new_opts) @options = (@options + new_opts).uniq end def complete? @options.include?(COMPLETE) end def iteration? @options.include?(ITERATION) end def in_iteration? branch_group = trunk_group while branch_group return true if branch_group.iteration? branch_group = branch_group.trunk_group end false end def create_first_branch(*opts) @branches.push(new_branch = Branch.new(self, FIRST, *opts)) new_branch end def create_trailing_branch(*opts) @branches.push(new_branch = Branch.new(self, *opts)) new_branch end def all_controlling_variables @branches.map { |br| ctrlexpr = br.ctrlexpr and ctrlexpr.affected_variables }.compact.flatten.uniq end def all_controlling_variables_value_exist? all_controlling_variables.all? { |var| var.value.exist? } end def all_branches_break_with_break? @branches.all? { |br| br.break_with_break? } end def all_branches_break_with_continue? @branches.all? { |br| br.break_with_continue? } end def all_branches_break_with_return? @branches.all? { |br| br.break_with_return? } end def current_branch @branches.last end end class BreakEvent class << self def catch(&block) Kernel.catch(:break) { yield; nil } end def of_break new(:break) end memoize :of_break def of_continue new(:continue) end memoize :of_continue def of_return new(:return) end memoize :of_return end def initialize(type) @type = type end private_class_method :new def break? @type == :break end def continue? @type == :continue end def return? @type == :return end def throw Kernel.throw(:break, self) end end end end adlint-3.2.0/lib/adlint/cc1/phase.rb0000644000004100000410000000701512224440633017136 0ustar www-datawww-data# Analysis phases for C language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/phase" require "adlint/error" require "adlint/cc1/lexer" require "adlint/cc1/parser" require "adlint/cc1/syntax" require "adlint/cc1/interp" require "adlint/cc1/util" module AdLint #:nodoc: module Cc1 #:nodoc: class CPhase < Phase def initialize(phase_ctxt, phase_name) super(phase_ctxt, "cc1", phase_name) end end class Prepare1Phase < CPhase def initialize(phase_ctxt) super(phase_ctxt, "pr3") end private def do_execute(phase_ctxt, *) phase_ctxt[:cc1_ast_traversal] = SyntaxTreeMulticastVisitor.new phase_ctxt[:cc1_parser] = Parser.new(phase_ctxt) end end class ParsePhase < CPhase def initialize(phase_ctxt) super(phase_ctxt, "prs") end private def do_execute(phase_ctxt, *) phase_ctxt[:cc1_ast] = phase_ctxt[:cc1_parser].execute ensure phase_ctxt[:cc1_tokens] = phase_ctxt[:cc1_parser].token_array DebugUtil.dump_token_array(phase_ctxt) end end class ResolvePhase < CPhase def initialize(phase_ctxt) super(phase_ctxt, "typ") end private def do_execute(phase_ctxt, *) resolver = StaticTypeResolver.new(TypeTable.new(traits, monitor, logger)) phase_ctxt[:cc1_type_table] = resolver.resolve(phase_ctxt[:cc1_ast]) end end class Prepare2Phase < CPhase def initialize(phase_ctxt) super(phase_ctxt, "pr4") end private def do_execute(phase_ctxt, *) phase_ctxt[:cc1_interpreter] = Interpreter.new(phase_ctxt[:cc1_type_table]) end end class InterpPhase < CPhase def initialize(phase_ctxt) super(phase_ctxt, "int") end private def do_execute(phase_ctxt, *) Program.new(phase_ctxt[:cc1_interpreter], phase_ctxt[:cc1_ast]).execute ValueDomain.clear_memos ensure DebugUtil.dump_syntax_tree(phase_ctxt) end end class ReviewPhase < CPhase def initialize(phase_ctxt) super(phase_ctxt, "rv2") end private def do_execute(phase_ctxt, *) phase_ctxt[:cc1_ast].accept(phase_ctxt[:cc1_ast_traversal]) end end class ExaminationPhase < CPhase def initialize(phase_ctxt) super(phase_ctxt, "ex2") end private def do_execute(phase_ctxt, *) examinations.each { |exam| exam.execute } end end end end adlint-3.2.0/lib/adlint/cc1/const.rb0000644000004100000410000004241312224440633017165 0ustar www-datawww-data# C constant-expression evaluator. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/traits" module AdLint #:nodoc: module Cc1 #:nodoc: module ConstantEvaluator # NOTE: Host class of this module must include InterpreterMediator. def eval_constant(const_spec) eval_as_integer_constant(const_spec.constant.value) or eval_as_floating_constant(const_spec.constant.value) or eval_as_character_constant(const_spec.constant.value) end private def eval_as_integer_constant(str) # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 5 The type of an integer constant is the first of the corresponding # list in which its value can be represented. # # | decimal | octal or hexadecimal # ------------+------------------------+------------------------ # unsuffixed | int | int # | long int | unsigned int # | long long int | long int # | | unsigned long int # | | long long int # | | unsigned long long int # ------------+------------------------+------------------------ # u or U | unsigned int | unsigned int # | unsigned long int | unsigned long int # | unsigned long long int | unsigned long long int # ------------+------------------------+------------------------ # l or L | long int | long int # | long long int | unsigned long int # | | long long int # | | unsigned long long int # ------------+------------------------+------------------------ # u or U and | unsigned long int | unsigned long int # l or L | unsigned long long int | unsigned long long int # ------------+------------------------+------------------------ # ll or LL | long long int | long long int # | | unsigned long long int # ------------+------------------------+------------------------ # u or U and | unsigned long long int | unsigned long long int # ll or LL | | # NOTE: For binary constants. case str when /\A0b([01]+)(?:ULL|LLU)\z/i return eval_as_non_decimal_integer_constant_with_ull($1.to_i(2)) when /\A0b([01]+)LL\z/i return eval_as_non_decimal_integer_constant_with_ll($1.to_i(2)) when /\A0b([01]+)(?:UL|LU)\z/i return eval_as_non_decimal_integer_constant_with_ul($1.to_i(2)) when /\A0b([01]+)L\z/i return eval_as_non_decimal_integer_constant_with_l($1.to_i(2)) when /\A0b([01]+)U\z/i return eval_as_non_decimal_integer_constant_with_u($1.to_i(2)) when /\A0b([01]+)\z/i return eval_as_non_decimal_integer_constant_unsuffixed($1.to_i(2)) end # NOTE: For octal constants. case str when /\A0([0-9]+)(?:ULL|LLU)\z/i return eval_as_non_decimal_integer_constant_with_ull($1.to_i(8)) when /\A0([0-9]+)LL\z/i return eval_as_non_decimal_integer_constant_with_ll($1.to_i(8)) when /\A0([0-9]+)(?:UL|LU)\z/i return eval_as_non_decimal_integer_constant_with_ul($1.to_i(8)) when /\A0([0-9]+)L\z/i return eval_as_non_decimal_integer_constant_with_l($1.to_i(8)) when /\A0([0-9]+)U\z/i return eval_as_non_decimal_integer_constant_with_u($1.to_i(8)) when /\A0([0-9]+)\z/ return eval_as_non_decimal_integer_constant_unsuffixed($1.to_i(8)) end # NOTE: For decimal constants. case str when /\A([0-9]+)(?:ULL|LLU)\z/i return eval_as_decimal_integer_constant_with_ull($1.to_i(10)) when /\A([0-9]+)LL\z/i return eval_as_decimal_integer_constant_with_ll($1.to_i(10)) when /\A([0-9]+)(?:UL|LU)\z/i return eval_as_decimal_integer_constant_with_ul($1.to_i(10)) when /\A([0-9]+)L\z/i return eval_as_decimal_integer_constant_with_l($1.to_i(10)) when /\A([0-9]+)U\z/i return eval_as_decimal_integer_constant_with_u($1.to_i(10)) when /\A([0-9]+)\z/ return eval_as_decimal_integer_constant_unsuffixed($1.to_i(10)) end # NOTE: For hexadecimal constants. case str when /\A0x([0-9A-F]+)(?:ULL|LLU)\z/i return eval_as_non_decimal_integer_constant_with_ull($1.to_i(16)) when /\A0x([0-9A-F]+)LL\z/i return eval_as_non_decimal_integer_constant_with_ll($1.to_i(16)) when /\A0x([0-9A-F]+)(?:UL|LU)\z/i return eval_as_non_decimal_integer_constant_with_ul($1.to_i(16)) when /\A0x([0-9A-F]+)L\z/i return eval_as_non_decimal_integer_constant_with_l($1.to_i(16)) when /\A0x([0-9A-F]+)U\z/i return eval_as_non_decimal_integer_constant_with_u($1.to_i(16)) when /\A0x([0-9A-F]+)\z/i return eval_as_non_decimal_integer_constant_unsuffixed($1.to_i(16)) end nil end def eval_as_floating_constant(str) # TODO: Must implement hexadecimal-floating-constant evaluation. case str when /\A([0-9]*\.[0-9]*E[+-]?[0-9]+)\z/i, /\A([0-9]+\.?E[+-]?[0-9]+)\z/i, /\A([0-9]*\.[0-9]+|[0-9]+\.)\z/ return create_tmpvar(double_t, scalar_value_of($1.to_f)) when /\A([0-9]*\.[0-9]*E[+-]?[0-9]+)F\z/i, /\A([0-9]+\.?E[+-]?[0-9]+)F\z/i, /\A([0-9]*\.[0-9]+|[0-9]+\.)F\z/i return create_tmpvar(float_t, scalar_value_of($1.to_f)) when /\A([0-9]*\.[0-9]*E[+-]?[0-9]+)L\z/i, /\A([0-9]+\.?E[+-]?[0-9]+)L\z/i, /\A([0-9]*\.[0-9]+|[0-9]+\.)L\z/i return create_tmpvar(long_double_t, scalar_value_of($1.to_f)) end nil end def eval_as_character_constant(str) if str =~ /\A(L?)'(.*)'\z/i case $2.length when 0 char_code = 0 when 1 char_code = $2[0].ord else char_code = $2[0] == "\\" ? EscapeSequence.new($2).value : $2[0].ord end if $1 == "L" create_tmpvar(wchar_t, scalar_value_of(char_code)) else create_tmpvar(int_t, scalar_value_of(char_code)) end else nil end end def eval_as_decimal_integer_constant_unsuffixed(i) case when int_range.include?(i) create_tmpvar(int_t, scalar_value_of(i)) when long_int_range.include?(i) create_tmpvar(long_int_t, scalar_value_of(i)) when long_long_int_range.include?(i) create_tmpvar(long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_decimal_integer_constant_with_u(i) case when unsigned_int_range.include?(i) create_tmpvar(unsigned_int_t, scalar_value_of(i)) when unsigned_long_int_range.include?(i) create_tmpvar(unsigned_long_int_t, scalar_value_of(i)) when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_decimal_integer_constant_with_l(i) case when long_int_range.include?(i) create_tmpvar(long_int_t, scalar_value_of(i)) when long_long_int_range.include?(i) create_tmpvar(long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_decimal_integer_constant_with_ul(i) case when unsigned_long_int_range.include?(i) create_tmpvar(unsigned_long_int_t, scalar_value_of(i)) when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_decimal_integer_constant_with_ll(i) case when long_long_int_range.include?(i) create_tmpvar(long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_decimal_integer_constant_with_ull(i) case when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_non_decimal_integer_constant_unsuffixed(i) case when int_range.include?(i) create_tmpvar(int_t, scalar_value_of(i)) when unsigned_int_range.include?(i) create_tmpvar(unsigned_int_t, scalar_value_of(i)) when long_int_range.include?(i) create_tmpvar(long_int_t, scalar_value_of(i)) when unsigned_long_int_range.include?(i) create_tmpvar(unsigned_long_int_t, scalar_value_of(i)) when long_long_int_range.include?(i) create_tmpvar(long_long_int_t, scalar_value_of(i)) when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_non_decimal_integer_constant_with_u(i) case when unsigned_int_range.include?(i) create_tmpvar(unsigned_int_t, scalar_value_of(i)) when unsigned_long_int_range.include?(i) create_tmpvar(unsigned_long_int_t, scalar_value_of(i)) when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_non_decimal_integer_constant_with_l(i) case when long_int_range.include?(i) create_tmpvar(long_int_t, scalar_value_of(i)) when unsigned_long_int_range.include?(i) create_tmpvar(unsigned_long_int_t, scalar_value_of(i)) when long_long_int_range.include?(i) create_tmpvar(long_long_int_t, scalar_value_of(i)) when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_non_decimal_integer_constant_with_ul(i) case when unsigned_long_int_range.include?(i) create_tmpvar(unsigned_long_int_t, scalar_value_of(i)) when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_non_decimal_integer_constant_with_ll(i) case when long_long_int_range.include?(i) create_tmpvar(long_long_int_t, scalar_value_of(i)) when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def eval_as_non_decimal_integer_constant_with_ull(i) case when unsigned_long_long_int_range.include?(i) create_tmpvar(unsigned_long_long_int_t, scalar_value_of(i)) else # NOTE: The ISO C99 standard says; # # 6.4.4.1 Integer constants # # 6 If an integer constant cannot be represented by any type in its # list and has no extended integer type, then the integer constant # has no type. # # NOTE: Use ExtendedBigIntType for unrepresentable integer constants. create_tmpvar(extended_big_int_t, scalar_value_of(i)) end end def int_range int_t.min..int_t.max end def long_int_range long_int_t.min..long_int_t.max end def long_long_int_range long_long_int_t.min..long_long_int_t.max end def unsigned_int_range unsigned_int_t.min..unsigned_int_t.max end def unsigned_long_int_range unsigned_long_int_t.min..unsigned_long_int_t.max end def unsigned_long_long_int_range unsigned_long_long_t.min..unsigned_long_long_t.max end end end end adlint-3.2.0/lib/adlint/cc1/mediator.rb0000644000004100000410000002777012224440633017654 0ustar www-datawww-data# C interpreter mediator. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/traits" require "adlint/cc1/type" require "adlint/cc1/object" require "adlint/cc1/enum" require "adlint/cc1/syntax" module AdLint #:nodoc: module Cc1 #:nodoc: module TypeTableMediator # NOTE: Host class must respond to #type_table. include StandardTypeCatalogAccessor extend Forwardable def_delegator :type_table, :lookup, :type_of def_delegator :type_table, :undeclared_type def_delegator :type_table, :wchar_t def_delegator :type_table, :array_type def_delegator :type_table, :function_type def_delegator :type_table, :bitfield_type def_delegator :type_table, :pointer_type def_delegator :type_table, :qualified_type private def standard_type_catalog type_table.standard_type_catalog end end module MemoryPoolMediator # NOTE: Host class must respond to #memory_pool. extend Forwardable def_delegator :memory_pool, :lookup, :memory_at def pointee_of(ptr) # FIXME: This method should return multiple objects, because domain of # the pointer_value may have multiple address values. # # ptr.value.to_enum.map { |addr| # mem = memory_at(addr) ? mem.binding.object : nil # }.compact if ptr.value.definite? if addr = ptr.value.to_enum.first and mem = memory_at(addr) obj = mem.binding.object if obj.variable? or obj.function? && ptr.type.unqualify.base_type.function? return obj end end end nil end end module VariableTableMediator # NOTE: Host class must respond to #variable_table. extend Forwardable def_delegator :variable_table, :lookup, :variable_named def_delegator :variable_table, :declare, :declare_variable def_delegator :variable_table, :define, :define_variable def_delegator :variable_table, :storage_duration_of def_delegator :variable_table, :designators, :variable_designators def local_variables variable_table.all_named_variables.select { |var| var.scope.local? } end def create_tmpvar(type = undeclared_type, val = type.undefined_value) variable_table.define_temporary(type, val) end end module FunctionTableMediator # NOTE: The host class of this module must include TypeTableMediator. # NOTE: Host class must respond to #function_table. extend Forwardable def_delegator :function_table, :lookup, :function_named def_delegator :function_table, :designators, :function_designators def declare_explicit_function(fun_dcl) function_table.declare_explicitly(fun_dcl) end def declare_implicit_function(name) function_table.declare_implicitly( ImplicitFunction.new(default_function_type, name)) end def define_explicit_function(fun_dcl_or_def) function_table.define(ExplicitFunction.new(fun_dcl_or_def)) end def define_anonymous_function(type) function_table.define(AnonymousFunction.new(type)) end private def default_function_type function_type(int_t, []) end end module EnumeratorTableMediator # NOTE: Host class must respond to #enumerator_table. extend Forwardable def_delegator :enumerator_table, :lookup, :enumerator_named def_delegator :enumerator_table, :define, :define_enumerator def_delegator :enumerator_table, :designators, :enumerator_designators end module NotifierMediator # NOTE: Host class must respond to #interpreter. extend Forwardable def_delegator :interpreter, :notify_variable_declared def_delegator :interpreter, :notify_variable_defined def_delegator :interpreter, :notify_variable_initialized def_delegator :interpreter, :notify_explicit_function_declared def_delegator :interpreter, :notify_explicit_function_defined def_delegator :interpreter, :notify_struct_declared def_delegator :interpreter, :notify_union_declared def_delegator :interpreter, :notify_enum_declared def_delegator :interpreter, :notify_typedef_declared def_delegator :interpreter, :notify_function_started def_delegator :interpreter, :notify_function_ended def_delegator :interpreter, :notify_parameter_defined def_delegator :interpreter, :notify_variable_referred def_delegator :interpreter, :notify_constant_referred def_delegator :interpreter, :notify_variable_value_referred def_delegator :interpreter, :notify_variable_value_updated def_delegator :interpreter, :notify_function_referred def_delegator :interpreter, :notify_implicit_function_declared def_delegator :interpreter, :notify_sizeof_expr_evaled def_delegator :interpreter, :notify_sizeof_type_expr_evaled def_delegator :interpreter, :notify_explicit_conv_performed def_delegator :interpreter, :notify_implicit_conv_performed def_delegator :interpreter, :notify_address_derivation_performed def_delegator :interpreter, :notify_array_subscript_expr_evaled def_delegator :interpreter, :notify_function_call_expr_evaled def_delegator :interpreter, :notify_unary_arithmetic_expr_evaled def_delegator :interpreter, :notify_multiplicative_expr_evaled def_delegator :interpreter, :notify_additive_expr_evaled def_delegator :interpreter, :notify_shift_expr_evaled def_delegator :interpreter, :notify_relational_expr_evaled def_delegator :interpreter, :notify_equality_expr_evaled def_delegator :interpreter, :notify_and_expr_evaled def_delegator :interpreter, :notify_exclusive_or_expr_evaled def_delegator :interpreter, :notify_inclusive_or_expr_evaled def_delegator :interpreter, :notify_logical_and_expr_evaled def_delegator :interpreter, :notify_logical_or_expr_evaled def_delegator :interpreter, :notify_conditional_expr_evaled def_delegator :interpreter, :notify_address_expr_evaled def_delegator :interpreter, :notify_indirection_expr_evaled def_delegator :interpreter, :notify_member_access_expr_evaled def_delegator :interpreter, :notify_prefix_increment_expr_evaled def_delegator :interpreter, :notify_postfix_increment_expr_evaled def_delegator :interpreter, :notify_prefix_decrement_expr_evaled def_delegator :interpreter, :notify_postfix_decrement_expr_evaled def_delegator :interpreter, :notify_assignment_expr_evaled def_delegator :interpreter, :notify_expression_stmt_started def_delegator :interpreter, :notify_expression_stmt_ended def_delegator :interpreter, :notify_switch_stmt_started def_delegator :interpreter, :notify_switch_stmt_ended def_delegator :interpreter, :notify_while_stmt_started def_delegator :interpreter, :notify_while_stmt_ended def_delegator :interpreter, :notify_do_stmt_started def_delegator :interpreter, :notify_do_stmt_ended def_delegator :interpreter, :notify_for_stmt_started def_delegator :interpreter, :notify_for_stmt_ended def_delegator :interpreter, :notify_c99_for_stmt_started def_delegator :interpreter, :notify_c99_for_stmt_ended def_delegator :interpreter, :notify_goto_stmt_evaled def_delegator :interpreter, :notify_return_stmt_evaled def_delegator :interpreter, :notify_implicit_return_evaled def_delegator :interpreter, :notify_if_ctrlexpr_evaled def_delegator :interpreter, :notify_if_else_ctrlexpr_evaled def_delegator :interpreter, :notify_switch_ctrlexpr_evaled def_delegator :interpreter, :notify_case_ctrlexpr_evaled def_delegator :interpreter, :notify_while_ctrlexpr_evaled def_delegator :interpreter, :notify_do_ctrlexpr_evaled def_delegator :interpreter, :notify_for_ctrlexpr_evaled def_delegator :interpreter, :notify_c99_for_ctrlexpr_evaled def_delegator :interpreter, :notify_label_defined def_delegator :interpreter, :notify_block_started def_delegator :interpreter, :notify_block_ended def_delegator :interpreter, :notify_branch_started def_delegator :interpreter, :notify_branch_ended def_delegator :interpreter, :notify_translation_unit_started def_delegator :interpreter, :notify_translation_unit_ended def_delegator :interpreter, :notify_sequence_point_reached end module InterpreterMediator # NOTE: Host class must respond to #interpreter. include TypeTableMediator include MemoryPoolMediator include VariableTableMediator include FunctionTableMediator include EnumeratorTableMediator include ArithmeticAccessor include InterpObjectBridge include InterpSyntaxBridge def interpret(node, *opts) interpreter.execute(node, *opts) end def reset_environment environment.reset end def current_branch environment.current_branch end def scalar_value_of(numeric) ScalarValue.of(numeric, logical_right_shift?) end def scalar_value_of_true ScalarValue.of_true(logical_right_shift?) end def scalar_value_of_false ScalarValue.of_false(logical_right_shift?) end def scalar_value_of_arbitrary ScalarValue.of_arbitrary(logical_right_shift?) end def constant_expression?(expr) expr.constant?(_interp_syntax_bridge_) end def object_to_variable(obj, init_or_expr = nil) obj.to_variable(_interp_object_bridge_).tap do |var| if init_or_expr && !obj.type.pointer? && var.type.pointer? notify_address_derivation_performed(init_or_expr, obj, var) end end end def object_to_pointer(obj, init_or_expr = nil) obj.to_pointer(_interp_object_bridge_).tap do |ptr| if init_or_expr notify_address_derivation_performed(init_or_expr, obj, ptr) end end end def value_of(obj) obj.to_value(_interp_object_bridge_) end def pointer_value_of(obj) obj.to_pointer_value(_interp_object_bridge_) end private def scoped_eval(&block) environment.enter_scope yield ensure environment.leave_scope end def branched_eval(expr = nil, *opts, &block) cur_branch = environment.enter_branch(*opts) interpreter.notify_branch_started(cur_branch) cur_branch.execute(interpreter, expr, &block) ensure interpreter.notify_branch_ended(cur_branch) environment.leave_branch_group if cur_branch.final? environment.leave_branch end def resolve_unresolved_type(node) interpreter.type_resolver.resolve(node) if node.type.unresolved? end extend Forwardable def_delegator :environment, :type_table private :type_table def_delegator :environment, :memory_pool private :memory_pool def_delegator :environment, :variable_table private :variable_table def_delegator :environment, :function_table private :function_table def_delegator :environment, :enumerator_table private :enumerator_table def_delegator :interpreter, :environment private :environment def_delegator :interpreter, :traits private :traits end end end adlint-3.2.0/lib/adlint/cc1/parser.rb0000644000004100000410000033767412224440633017353 0ustar www-datawww-data# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.9 # from Racc grammer file "". # require 'racc/parser.rb' require "adlint/error" require "adlint/symbol" require "adlint/monitor" require "adlint/util" require "adlint/cc1/lexer" require "adlint/cc1/syntax" module AdLint module Cc1 class Parser < Racc::Parser module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1847) include ReportUtil include MonitorUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt @lexer = create_lexer(phase_ctxt[:cc1_source]) @sym_tbl = phase_ctxt[:symbol_table] @token_array = [] @anon_tag_no = 0 end attr_reader :token_array def execute do_parse end extend Pluggable def_plugin :on_string_literals_concatenated private def create_lexer(pp_src) Lexer.new(pp_src).tap { |lexer| attach_lexer_plugin(lexer) } end def attach_lexer_plugin(lexer) lexer.on_string_literals_concatenated += lambda { |*args| on_string_literals_concatenated.invoke(*args) } end def next_token if tok = @lexer.next_token @token_array.push(tok) [tok.type, tok] else nil end end def on_error(err_tok, err_val, *) if fst_tok = @token_array[-2] and snd_tok = @token_array[-1] E(:E0008, loc_of(fst_tok), "#{val_of(fst_tok)} #{val_of(snd_tok)}") raise ParseError.new(loc_of(fst_tok), @phase_ctxt.msg_fpath, @phase_ctxt.log_fpath) else E(:E0008, loc_of(err_val), val_of(err_val)) raise ParseError.new(loc_of(err_val), @phase_ctxt.msg_fpath, @phase_ctxt.log_fpath) end end def loc_of(val) val == "$" ? Location.new : val.location end def val_of(tok) tok == "$" ? "EOF" : tok.value end def create_anon_tag_name(base_tok) Token.new(:IDENTIFIER, "__adlint__anon_#{@anon_tag_no += 1}", base_tok.location) end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def_delegator :@phase_ctxt, :monitor private :monitor # vim:ft=racc:sw=2:ts=2:sts=2:et: ...end parser.y/module_eval... ##### State transition tables begin ### clist = [ '216,335,84,85,95,42,38,347,151,346,437,283,57,338,335,36,37,140,141', '65,140,141,67,42,42,70,194,195,42,227,228,235,42,236,237,238,239,240', '241,242,243,86,399,96,87,325,78,356,283,43,90,91,60,150,384,92,93,97', '98,99,100,101,216,335,84,85,95,43,43,340,416,66,43,360,68,57,370,69', '252,44,44,355,404,83,44,84,85,95,234,283,402,227,228,235,283,236,237', '238,239,240,241,242,243,86,261,96,87,380,379,56,59,385,90,91,60,283', '381,92,93,97,98,99,100,101,86,383,96,87,433,382,347,42,346,90,91,251', '452,252,92,93,97,98,99,100,101,283,42,29,194,195,234,12,13,14,15,16', '39,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,370,349,252', '203,189,216,335,84,85,95,190,191,44,32,408,43,214,410,215,251,349,252', '73,38,72,204,83,44,84,85,95,44,36,37,227,228,235,375,236,237,238,239', '240,241,242,243,86,321,96,87,196,197,198,199,413,90,91,60,152,49,92', '93,97,98,99,100,101,86,44,96,87,280,196,197,198,199,90,91,374,282,281', '92,93,97,98,99,100,101,283,290,29,291,373,234,12,13,14,15,16,39,38,18', '19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,200,201,454,429,318', '319,216,335,84,85,95,283,283,32,38,189,451,427,428,140,141,190,191,36', '37,283,283,283,196,197,198,199,73,417,72,227,228,235,418,236,237,238', '239,240,241,242,243,86,189,96,87,292,205,293,190,191,90,91,60,44,419', '92,93,97,98,99,100,101,216,335,84,85,95,177,179,180,181,182,183,184', '185,186,187,188,161,393,160,142,162,163,164,165,265,266,234,438,439', '227,228,235,389,236,237,238,239,240,241,242,243,86,366,96,87,194,195', '363,364,377,90,91,60,140,141,92,93,97,98,99,100,101,200,201,194,195', '206,207,194,195,192,193,192,193,83,244,84,85,95,192,193,377,134,202', '42,29,245,129,234,12,13,14,15,16,39,38,18,19,20,21,24,25,22,23,36,37', '17,26,27,28,33,34,35,357,342,86,341,96,87,430,337,118,334,333,90,91', '32,435,43,92,93,97,98,99,100,101,332,395,205,329,44,204,327,-232,267', '-231,448,324,450,203,274,202,284,64,285,457,48,377,,,,,344,,,,,,,,,', '49,216,219,84,85,95,12,13,14,15,16,39,38,18,19,20,21,24,25,22,23,36', '37,17,26,27,28,33,34,35,227,228,235,,236,237,238,239,240,241,242,243', '86,32,96,87,,,,,,90,91,60,,,92,93,97,98,99,100,101,216,335,84,85,95', ',,,,,,,,,,,,,,,,,,,,,234,,,227,228,235,,236,237,238,239,240,241,242', '243,86,,96,87,,,,,,90,91,60,42,29,92,93,97,98,99,100,101,,,38,18,19', '20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,,,,,,,234,,,,,,,32,,43', ',,,,,,,,,,,44,,,,216,335,84,85,95,,,,,,,,,,,,261,,,,,,,,,,,,257,227', '228,235,,236,237,238,239,240,241,242,243,86,,96,87,,,,,,90,91,60,,,92', '93,97,98,99,100,101,216,335,84,85,95,,,,,,,,,,,,,,,,,,,,,,234,,,227', '228,235,,236,237,238,239,240,241,242,243,86,,96,87,,,,,,90,91,60,,,92', '93,97,98,99,100,101,216,335,84,85,95,,,,,,,,,,,,,,,,,83,,84,85,95,234', ',,227,228,235,,236,237,238,239,240,241,242,243,86,,96,87,,,,,,90,91', '60,,,92,93,97,98,99,100,101,86,,96,87,,214,,215,,90,91,117,,,92,93,97', '98,99,100,101,,,,,,234,83,29,84,85,95,12,13,14,15,16,39,38,18,19,20', '21,24,25,22,23,36,37,17,26,27,28,33,34,35,,,,,,,,,,,,,86,32,96,87,,', ',,,90,91,,,,92,93,97,98,99,100,101,,,,,,,,,,,,,83,,84,85,95,,,,,,42', '29,,,234,12,13,14,15,16,39,38,18,19,20,21,24,25,22,23,36,37,17,26,27', '28,33,34,35,,,86,,96,87,,,,,,90,91,32,,43,92,93,97,98,99,100,101,,,', ',44,,,,,,,,,,,,,,,,,,,,,,234,,,,,,,,,,49,216,219,84,85,95,12,13,14,15', '16,39,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,227,228', '235,,236,237,238,239,240,241,242,243,86,32,96,87,,,,,,90,91,60,,,92', '93,97,98,99,100,101,83,,84,85,95,,,,,,,,,,,,,,,,,,,,,,234,,,,,,,,216', '335,84,85,95,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,,227,228', '235,,236,237,238,239,240,241,242,243,86,,96,87,,,,,,90,91,60,,234,92', '93,97,98,99,100,101,216,335,84,85,95,,,,,,,,,,,,,,,,,,,,,,234,,,227', '228,235,,236,237,238,239,240,241,242,243,86,,96,87,,,,,,90,91,60,,,92', '93,97,98,99,100,101,216,335,84,85,95,,,,,,,,,,,,,,,,,83,,84,85,95,234', ',,227,228,235,,236,237,238,239,240,241,242,243,86,,96,87,,,,,,90,91', '60,,,92,93,97,98,99,100,101,86,,96,87,,,412,,,90,91,,,,92,93,97,98,99', '100,101,,,29,,,234,12,13,14,15,16,39,38,18,19,20,21,24,25,22,23,36,37', '17,26,27,28,33,34,35,,,,,,,,,,,,,,32,,,,,,,29,,,60,12,13,14,15,16,39', '38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,59,,,,,,,,,,,', ',32,,,,,,,29,,,60,12,13,14,15,16,39,38,18,19,20,21,24,25,22,23,36,37', '17,26,27,28,33,34,35,59,,,,,,,,83,,84,85,95,32,,146,,,,38,,,,60,,,,', '36,37,83,,84,85,95,,,,,,,,,,,,,,59,86,,96,87,,,147,,,90,91,,,,92,143', '97,98,99,100,101,,86,,96,87,,,406,,,90,91,,,,92,405,97,98,99,100,101', '83,29,84,85,95,,,,,,,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33', '34,35,,,,,,,,,,,,,86,32,96,87,,,,,,90,91,,359,,92,93,97,98,99,100,101', '83,29,84,85,95,,,,,,,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33', '34,35,83,,84,85,95,,,,,,,,86,32,96,87,,,,,,90,91,60,,,92,93,97,98,99', '100,101,83,,84,85,95,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101', '83,,84,85,95,,,,,,,,86,,96,166,,,,,,90,91,,,,92,93,97,98,99,100,101', '83,,84,85,95,,,,86,,96,166,,,,,,90,91,,,,92,93,97,98,99,100,101,83,', '84,85,95,,,,,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84', '85,95,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95', ',,,,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,', ',,86,,96,172,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,', ',,86,,96,174,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,86', ',96,166,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,86', ',96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,86,,96,87', ',,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,86,,96,87,', ',,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,86,,96,87,,,,,,90', '91,,,,92,93,97,98,99,100,101,,,,,,,,,,,,,86,,96,87,,,,,,90,91,117,,', '92,93,97,98,99,100,101,83,29,84,85,95,,,,,,,38,18,19,20,21,24,25,22', '23,36,37,17,26,27,28,33,34,35,83,,84,85,95,,,,,,,,86,32,96,87,,,,,,90', '91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,86,,96,87,,214,,215,,90', '91,117,386,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,86,,96,87,,,', ',,90,91,377,,,92,93,97,98,99,100,101,,83,,84,85,95,,,86,,96,87,,,,,', '90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,38,,86,,96,87,,,', '36,37,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,,,,', '90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,,214', ',215,,90,91,117,208,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87', ',,,,,90,91,117,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96', '87,,,365,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87', ',,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87', ',,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,,352', ',,90,91,,,,92,351,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,,', '434,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,,,,', '90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,445,', ',,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,447,,,,', '90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,,,,,', '90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,214,,215,', '90,91,117,449,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87', ',,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,,269', ',,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,273,,,,38,,86,,96,87', ',,,36,37,90,91,117,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87', ',,272,,,90,91,,,,92,270,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96', '87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,,', ',,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,,,', ',,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,,,,,90,91', ',,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,,,,,,90,91', ',,,92,93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,,,,,,90,91,,,,92', '93,97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,,,,,,90,91,,,,92', '93,97,98,99,100,101,83,,84,85,95,,,86,,96,87,287,,,,,90,91,,,,92,93', '97,98,99,100,101,83,,84,85,95,,,,,,,,,86,,96,87,,,,,,90,91,,,,92,93', '97,98,99,100,101,,,,,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101', '83,29,84,85,95,,,,,,,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33', '34,35,,,,,,,,,,,,,86,32,96,87,,,,,,90,91,60,,,92,93,97,98,99,100,101', '83,29,84,85,95,,,,,,,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33', '34,35,,,,,,,,,,,,,86,32,96,87,,,,,,90,91,60,,,92,93,97,98,99,100,101', '83,29,84,85,95,,,,,,,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33', '34,35,83,,84,85,95,,,,,,,,86,32,96,87,,,,,,90,91,60,,,92,93,97,98,99', '100,101,83,,84,85,95,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101', '83,,84,85,95,,,,,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83', ',84,85,95,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85', '95,,,,,,,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95', ',,,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,', ',,86,,96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,86', ',96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,86,', '96,87,,,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,86,,96,87', ',,,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,,,,,86,,96,87,', ',,,,90,91,,,,92,93,97,98,99,100,101,83,,84,85,95,,,,86,,96,87,,,,,,90', '91,,,,92,93,97,98,99,100,101,,,,,,,,,,,,,86,,96,87,,,,,,90,91,,,,92', '93,97,98,99,100,101,2,,42,29,,,,12,13,14,15,16,39,38,18,19,20,21,24', '25,22,23,36,37,17,26,27,28,33,34,35,,,,,,,,,,,,,,32,,43,,,,,,,,42,29', ',,44,12,13,14,15,16,39,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28', '33,34,35,,,,,,,,,,,,,,32,,370,,252,29,,,,,,,,,44,38,18,19,20,21,24,25', '22,23,36,37,17,26,27,28,33,34,35,,,,,,,,,,,,,,32,,251,,252,29,,,,,,', ',,44,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,,,,,,,,,', ',,,,32,,29,,,,,,,,,263,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28', '33,34,35,,,,,,,,,,,,,,32,,29,,,,,,,,,131,38,18,19,20,21,24,25,22,23', '36,37,17,26,27,28,33,34,35,,,,,,,,,,,,,,32,,29,,,,,,,,,264,38,18,19', '20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,,,,,,,,,,,,,,32,,29,,,', ',,,,,354,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,,,,,', ',,,,,,,,32,,29,,,,,,,,,255,38,18,19,20,21,24,25,22,23,36,37,17,26,27', '28,33,34,35,,,,,,,,,,,,,,32,,29,,,,,,,,,136,38,18,19,20,21,24,25,22', '23,36,37,17,26,27,28,33,34,35,,,,,,,,,,,,,,32,,,,,,,,29,,,254,12,13', '14,15,16,39,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,,', ',,,,,,,,,,,32,,,,,,,29,,,60,12,13,14,15,16,39,38,18,19,20,21,24,25,22', '23,36,37,17,26,27,28,33,34,35,,,,,,,,,,,,,,32,,,,,,,29,,,60,12,13,14', '15,16,39,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,,,,,', ',,,,,,,,32,,,,,,,29,,,60,12,13,14,15,16,39,38,18,19,20,21,24,25,22,23', '36,37,17,26,27,28,33,34,35,,,,,,,,,,,29,,,32,12,13,14,15,16,39,38,18', '19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35,,,,,,,,,,,29,,,32,12', '13,14,15,16,39,38,18,19,20,21,24,25,22,23,36,37,17,26,27,28,33,34,35', ',,,,,,,,,,,,,32' ] racc_action_table = arr = ::Array.new(4469, nil) idx = 0 clist.each do |str| str.split(',', -1).each do |i| arr[idx] = i.to_i unless i.empty? idx += 1 end end clist = [ '454,454,454,454,454,40,146,345,73,345,411,217,50,240,240,146,146,364', '364,33,266,266,34,57,43,35,309,309,356,454,454,454,369,454,454,454,454', '454,454,454,454,454,336,454,454,217,50,258,343,40,454,454,454,73,296', '454,454,454,454,454,454,454,452,452,452,452,452,57,43,240,364,33,356', '266,34,5,369,35,369,57,43,258,343,206,356,206,206,206,454,317,339,452', '452,452,403,452,452,452,452,452,452,452,452,452,356,452,452,288,286', '5,82,317,452,452,452,286,288,452,452,452,452,452,452,452,206,295,206', '206,403,294,250,370,250,206,206,249,444,249,206,206,206,206,206,206', '206,444,3,3,308,308,452,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3', '3,3,370,370,370,110,302,450,450,450,450,450,302,302,370,3,347,3,212', '348,212,251,251,251,41,44,41,111,199,3,199,199,199,251,44,44,450,450', '450,281,450,450,450,450,450,450,450,450,450,212,450,450,107,107,107', '107,353,450,450,450,74,3,450,450,450,450,450,450,450,199,44,199,199', '149,310,310,310,310,199,199,278,156,149,199,199,199,199,199,199,199', '156,162,374,162,277,450,374,374,374,374,374,374,374,374,374,374,374', '374,374,374,374,374,374,374,374,374,374,374,374,374,312,312,446,398', '209,209,447,447,447,447,447,446,398,374,75,303,443,396,397,142,142,303', '303,75,75,443,396,397,311,311,311,311,71,367,71,447,447,447,368,447', '447,447,447,447,447,447,447,447,104,447,447,163,112,163,104,104,447', '447,447,75,374,447,447,447,447,447,447,447,445,445,445,445,445,103,103', '103,103,103,103,103,103,103,103,103,89,328,89,70,89,89,89,89,137,137', '447,421,421,445,445,445,323,445,445,445,445,445,445,445,445,445,271', '445,445,307,307,268,268,382,445,445,445,69,69,445,445,445,445,445,445', '445,108,108,306,306,113,113,106,106,304,304,105,105,243,124,243,243', '243,305,305,384,67,109,218,218,125,65,445,218,218,218,218,218,218,218', '218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,218', '260,242,243,241,243,243,399,239,60,237,236,243,243,218,407,218,243,243', '243,243,243,243,243,235,330,316,228,218,315,226,219,139,216,436,215', '440,314,145,313,157,32,158,451,2,383,,,,,243,,,,,,,,,,218,229,229,229', '229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229', '229,229,229,229,229,229,229,229,229,229,229,229,,229,229,229,229,229', '229,229,229,229,229,229,229,,,,,,229,229,229,,,229,229,229,229,229,229', '229,238,238,238,238,238,,,,,,,,,,,,,,,,,,,,,,229,,,238,238,238,,238', '238,238,238,238,238,238,238,238,,238,238,,,,,,238,238,238,133,133,238', '238,238,238,238,238,238,,,133,133,133,133,133,133,133,133,133,133,133', '133,133,133,133,133,133,133,,,,,,,238,,,,,,,133,,133,,,,,,,,,,,,133', ',,,429,429,429,429,429,,,,,,,,,,,,133,,,,,,,,,,,,133,429,429,429,,429', '429,429,429,429,429,429,429,429,,429,429,,,,,,429,429,429,,,429,429', '429,429,429,429,429,428,428,428,428,428,,,,,,,,,,,,,,,,,,,,,,429,,,428', '428,428,,428,428,428,428,428,428,428,428,428,,428,428,,,,,,428,428,428', ',,428,428,428,428,428,428,428,327,327,327,327,327,,,,,,,,,,,,,,,,,377', ',377,377,377,428,,,327,327,327,,327,327,327,327,327,327,327,327,327', ',327,327,,,,,,327,327,327,,,327,327,327,327,327,327,327,377,,377,377', ',377,,377,,377,377,377,,,377,377,377,377,377,377,377,,,,,,327,337,337', '337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337', '337,337,337,337,337,337,337,337,337,337,,,,,,,,,,,,,337,337,337,337', ',,,,,337,337,,,,337,337,337,337,337,337,337,,,,,,,,,,,,,401,,401,401', '401,,,,,,58,58,,,337,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58', '58,58,58,58,58,58,58,58,,,401,,401,401,,,,,,401,401,58,,58,401,401,401', '401,401,401,401,,,,,58,,,,,,,,,,,,,,,,,,,,,,401,,,,,,,,,,58,119,119', '119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119', '119,119,119,119,119,119,119,119,119,119,119,119,119,,119,119,119,119', '119,119,119,119,119,119,119,119,,,,,,119,119,119,,,119,119,119,119,119', '119,119,400,,400,400,400,,,,,,,,,,,,,,,,,,,,,,119,,,,,,,,329,329,329', '329,329,,,400,,400,400,,,,,,400,400,,,,400,400,400,400,400,400,400,', '329,329,329,,329,329,329,329,329,329,329,329,329,,329,329,,,,,,329,329', '329,,400,329,329,329,329,329,329,329,393,393,393,393,393,,,,,,,,,,,', ',,,,,,,,,,329,,,393,393,393,,393,393,393,393,393,393,393,393,393,,393', '393,,,,,,393,393,393,,,393,393,393,393,393,393,393,427,427,427,427,427', ',,,,,,,,,,,,,,,,351,,351,351,351,393,,,427,427,427,,427,427,427,427', '427,427,427,427,427,,427,427,,,,,,427,427,427,,,427,427,427,427,427', '427,427,351,,351,351,,,351,,,351,351,,,,351,351,351,351,351,351,351', ',,326,,,427,326,326,326,326,326,326,326,326,326,326,326,326,326,326', '326,326,326,326,326,326,326,326,326,326,,,,,,,,,,,,,,326,,,,,,,55,,', '326,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55', '55,55,326,,,,,,,,,,,,,55,,,,,,,11,,,55,11,11,11,11,11,11,11,11,11,11', '11,11,11,11,11,11,11,11,11,11,11,11,11,11,55,,,,,,,,72,,72,72,72,11', ',72,,,,72,,,,11,,,,,72,72,346,,346,346,346,,,,,,,,,,,,,,11,72,,72,72', ',,72,,,72,72,,,,72,72,72,72,72,72,72,,346,,346,346,,,346,,,346,346,', ',,346,346,346,346,346,346,346,340,262,340,340,340,,,,,,,262,262,262', '262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,,,,,,,,', ',,,,340,262,340,340,,,,,,340,340,,262,,340,340,340,340,340,340,340,87', '87,87,87,87,,,,,,,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87', '87,381,,381,381,381,,,,,,,,87,87,87,87,,,,,,87,87,87,,,87,87,87,87,87', '87,87,90,,90,90,90,,,,381,,381,381,,,,,,381,381,,,,381,381,381,381,381', '381,381,91,,91,91,91,,,,,,,,90,,90,90,,,,,,90,90,,,,90,90,90,90,90,90', '90,92,,92,92,92,,,,91,,91,91,,,,,,91,91,,,,91,91,91,91,91,91,91,93,', '93,93,93,,,,,,,,92,,92,92,,,,,,92,92,,,,92,92,92,92,92,92,92,94,,94', '94,94,,,,93,,93,93,,,,,,93,93,,,,93,93,93,93,93,93,93,95,,95,95,95,', ',,,,,,94,,94,94,,,,,,94,94,,,,94,94,94,94,94,94,94,96,,96,96,96,,,,95', ',95,95,,,,,,95,95,,,,95,95,95,95,95,95,95,97,,97,97,97,,,,,,,,96,,96', '96,,,,,,96,96,,,,96,96,96,96,96,96,96,334,,334,334,334,,,,97,,97,97', ',,,,,97,97,,,,97,97,97,97,97,97,97,333,,333,333,333,,,,,,,,334,,334', '334,,,,,,334,334,,,,334,334,334,334,334,334,334,332,,332,332,332,,,', '333,,333,333,,,,,,333,333,,,,333,333,333,333,333,333,333,385,,385,385', '385,,,,,,,,332,,332,332,,,,,,332,332,,,,332,332,332,332,332,332,332', '388,,388,388,388,,,,385,,385,385,,,,,,385,385,,,,385,385,385,385,385', '385,385,,,,,,,,,,,,,388,,388,388,,,,,,388,388,388,,,388,388,388,388', '388,388,388,64,64,64,64,64,,,,,,,64,64,64,64,64,64,64,64,64,64,64,64', '64,64,64,64,64,64,319,,319,319,319,,,,,,,,64,64,64,64,,,,,,64,64,,,', '64,64,64,64,64,64,64,285,,285,285,285,,,,319,,319,319,,319,,319,,319', '319,319,319,,319,319,319,319,319,319,319,283,,283,283,283,,,,,,,,285', ',285,285,,,,,,285,285,285,,,285,285,285,285,285,285,285,,273,,273,273', '273,,,283,,283,283,,,,,,283,283,,,,283,283,283,283,283,283,283,275,', '275,275,275,,,,,,,275,,273,,273,273,,,,275,275,273,273,,,,273,273,273', '273,273,273,273,117,,117,117,117,,,275,,275,275,,,,,,275,275,,,,275', '275,275,275,275,275,275,59,,59,59,59,,,,,,,,,117,,117,117,,117,,117', ',117,117,117,117,,117,117,117,117,117,117,117,270,,270,270,270,,,59', ',59,59,,,,,,59,59,59,,,59,59,59,59,59,59,59,267,,267,267,267,,,,,,,', ',270,,270,270,,,270,,,270,270,,,,270,270,270,270,270,270,270,261,,261', '261,261,,,267,,267,267,,,,,,267,267,,,,267,267,267,267,267,267,267,252', ',252,252,252,,,,,,,,,261,,261,261,,,,,,261,261,,,,261,261,261,261,261', '261,261,405,,405,405,405,,,252,,252,252,,,252,,,252,252,,,,252,252,252', '252,252,252,252,430,,430,430,430,,,,,,,,,405,,405,405,,,405,,,405,405', ',,,405,405,405,405,405,405,405,431,,431,431,431,,,430,,430,430,,,,,', '430,430,,,,430,430,430,430,430,430,430,432,,432,432,432,,,,,,,,,431', ',431,431,431,,,,,431,431,,,,431,431,431,431,431,431,431,227,,227,227', '227,,,432,,432,432,432,,,,,432,432,,,,432,432,432,432,432,432,432,439', ',439,439,439,,,,,,,,,227,,227,227,,,,,,227,227,,,,227,227,227,227,227', '227,227,214,,214,214,214,,,439,,439,439,,439,,439,,439,439,439,439,', '439,439,439,439,439,439,439,143,,143,143,143,,,,,,,,,214,,214,214,,', ',,,214,214,,,,214,214,214,214,214,214,214,211,,211,211,211,,,143,,143', '143,,,143,,,143,143,,,,143,143,143,143,143,143,143,144,,144,144,144', ',,144,,,,144,,211,,211,211,,,,144,144,211,211,211,,,211,211,211,211', '211,211,211,207,,207,207,207,,,144,,144,144,,,144,,,144,144,,,,144,144', '144,144,144,144,144,357,,357,357,357,,,,,,,,,207,,207,207,,,,,,207,207', ',,,207,207,207,207,207,207,207,205,,205,205,205,,,357,,357,357,,,,,', '357,357,,,,357,357,357,357,357,357,357,204,,204,204,204,,,,,,,,,205', ',205,205,,,,,,205,205,,,,205,205,205,205,205,205,205,203,,203,203,203', ',,204,,204,204,,,,,,204,204,,,,204,204,204,204,204,204,204,202,,202', '202,202,,,,,,,,,203,,203,203,,,,,,203,203,,,,203,203,203,203,203,203', '203,160,,160,160,160,,,202,,202,202,,,,,,202,202,,,,202,202,202,202', '202,202,202,161,,161,161,161,,,,,,,,,160,,160,160,,,,,,160,160,,,,160', '160,160,160,160,160,160,201,,201,201,201,,,161,,161,161,161,,,,,161', '161,,,,161,161,161,161,161,161,161,200,,200,200,200,,,,,,,,,201,,201', '201,,,,,,201,201,,,,201,201,201,201,201,201,201,,,,,,,,200,,200,200', ',,,,,200,200,,,,200,200,200,200,200,200,200,166,166,166,166,166,,,,', ',,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166', '166,,,,,,,,,,,,,166,166,166,166,,,,,,166,166,166,,,166,166,166,166,166', '166,166,172,172,172,172,172,,,,,,,172,172,172,172,172,172,172,172,172', '172,172,172,172,172,172,172,172,172,,,,,,,,,,,,,172,172,172,172,,,,', ',172,172,172,,,172,172,172,172,172,172,172,174,174,174,174,174,,,,,', ',174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174', '174,177,,177,177,177,,,,,,,,174,174,174,174,,,,,,174,174,174,,,174,174', '174,174,174,174,174,178,,178,178,178,,,,177,,177,177,,,,,,177,177,,', ',177,177,177,177,177,177,177,189,,189,189,189,,,,,,,,178,,178,178,,', ',,,178,178,,,,178,178,178,178,178,178,178,190,,190,190,190,,,,189,,189', '189,,,,,,189,189,,,,189,189,189,189,189,189,189,191,,191,191,191,,,', ',,,,190,,190,190,,,,,,190,190,,,,190,190,190,190,190,190,190,192,,192', '192,192,,,,191,,191,191,,,,,,191,191,,,,191,191,191,191,191,191,191', '193,,193,193,193,,,,,,,,192,,192,192,,,,,,192,192,,,,192,192,192,192', '192,192,192,194,,194,194,194,,,,193,,193,193,,,,,,193,193,,,,193,193', '193,193,193,193,193,195,,195,195,195,,,,,,,,194,,194,194,,,,,,194,194', ',,,194,194,194,194,194,194,194,196,,196,196,196,,,,195,,195,195,,,,', ',195,195,,,,195,195,195,195,195,195,195,197,,197,197,197,,,,,,,,196', ',196,196,,,,,,196,196,,,,196,196,196,196,196,196,196,198,,198,198,198', ',,,197,,197,197,,,,,,197,197,,,,197,197,197,197,197,197,197,,,,,,,,', ',,,,198,,198,198,,,,,,198,198,,,,198,198,198,198,198,198,198,1,,1,1', ',,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,,,,,,,,,,,,1,,1', ',,,,,,,276,276,,,1,276,276,276,276,276,276,276,276,276,276,276,276,276', '276,276,276,276,276,276,276,276,276,276,276,,,,,,,,,,,,,,276,,276,,276', '126,,,,,,,,,276,126,126,126,126,126,126,126,126,126,126,126,126,126', '126,126,126,126,126,,,,,,,,,,,,,,126,,126,,126,134,,,,,,,,,126,134,134', '134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,,,,', ',,,,,,,,,134,,66,,,,,,,,,134,66,66,66,66,66,66,66,66,66,66,66,66,66', '66,66,66,66,66,,,,,,,,,,,,,,66,,135,,,,,,,,,66,135,135,135,135,135,135', '135,135,135,135,135,135,135,135,135,135,135,135,,,,,,,,,,,,,,135,,253', ',,,,,,,,135,253,253,253,253,253,253,253,253,253,253,253,253,253,253', '253,253,253,253,,,,,,,,,,,,,,253,,130,,,,,,,,,253,130,130,130,130,130', '130,130,130,130,130,130,130,130,130,130,130,130,130,,,,,,,,,,,,,,130', ',68,,,,,,,,,130,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68', ',,,,,,,,,,,,,68,,129,,,,,,,,,68,129,129,129,129,129,129,129,129,129', '129,129,129,129,129,129,129,129,129,,,,,,,,,,,,,,129,,,,,,,,390,,,129', '390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390', '390,390,390,390,390,390,390,,,,,,,,,,,,,,390,,,,,,,79,,,390,79,79,79', '79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,,,,,', ',,,,,,,,79,,,,,,,61,,,79,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61', '61,61,61,61,61,61,61,61,61,,,,,,,,,,,,,,61,,,,,,,350,,,61,350,350,350', '350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350', '350,350,350,350,,,,,,,,,,,148,,,350,148,148,148,148,148,148,148,148', '148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,,,,', ',,,,,,409,,,148,409,409,409,409,409,409,409,409,409,409,409,409,409', '409,409,409,409,409,409,409,409,409,409,409,,,,,,,,,,,,,,409' ] racc_action_check = arr = ::Array.new(4469, nil) idx = 0 clist.each do |str| str.split(',', -1).each do |i| arr[idx] = i.to_i unless i.empty? idx += 1 end end racc_action_pointer = [ nil, 3753, 517, 144, nil, 19, nil, nil, nil, nil, nil, 1493, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 468, 17, 20, 23, nil, nil, nil, nil, 3, 151, nil, 22, 185, nil, nil, nil, nil, nil, -44, nil, nil, nil, nil, 1445, nil, 21, 1004, 2387, 427, 4300, nil, nil, 2172, 394, 3940, 389, 4112, 412, 326, 279, 1530, 6, 186, 294, nil, nil, nil, 4252, nil, nil, 31, nil, nil, nil, nil, 1676, nil, 331, 1738, 1767, 1800, 1829, 1862, 1891, 1924, 1953, nil, nil, nil, nil, nil, 287, 283, 373, 363, 157, 351, 387, 104, 125, 286, 351, nil, nil, nil, 2359, nil, 1093, nil, nil, nil, nil, 389, 400, 3851, nil, nil, 4155, 4069, nil, nil, 647, 3897, 3983, nil, 330, nil, 426, nil, nil, 310, 2759, 2821, 462, -7, nil, 4386, 199, nil, nil, nil, nil, nil, nil, 207, 466, 468, nil, 3041, 3069, 262, 342, nil, nil, 3193, nil, nil, nil, nil, nil, 3255, nil, 3317, nil, nil, 3346, 3379, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3408, 3441, 3470, 3503, 3532, 3565, 3594, 3627, 3656, 3689, 199, 3131, 3103, 3007, 2979, 2945, 2917, 81, 2855, nil, 242, nil, 2793, 143, nil, 2731, 506, 428, -45, 443, 426, nil, nil, nil, nil, nil, nil, 425, 2669, 422, 532, nil, nil, nil, nil, nil, 451, 438, 437, 594, 435, 11, 387, 385, 433, nil, nil, nil, nil, nil, 89, 84, 148, 2511, 4026, nil, nil, nil, nil, -9, nil, 396, 2483, 1614, nil, nil, nil, 18, 2449, 353, nil, 2421, 354, nil, 2297, nil, 2325, 3805, 220, 197, nil, nil, 210, nil, 2263, nil, 2234, 59, nil, 60, nil, nil, nil, nil, nil, 82, 78, 7, nil, nil, nil, nil, nil, 121, 250, 371, 380, 359, 340, 82, -40, 179, 253, 221, 455, 436, 427, 440, 33, nil, 2201, nil, nil, nil, 344, nil, nil, 1397, 831, 300, 1189, 443, nil, 2048, 2015, 1986, nil, 6, 920, nil, 0, 1614, nil, nil, -8, nil, -39, 1552, 142, 145, nil, 4348, 1334, nil, 180, nil, nil, 26, 2883, nil, nil, nil, nil, nil, nil, 15, nil, nil, 277, 282, 30, 129, nil, nil, nil, 262, nil, nil, 852, nil, nil, nil, 1705, 356, 464, 388, 2077, nil, nil, 2110, nil, 4204, nil, nil, 1251, nil, nil, 263, 264, 249, 434, 1155, 994, nil, 38, nil, 2545, nil, 439, nil, 4424, nil, -37, nil, nil, nil, nil, nil, nil, nil, nil, nil, 333, nil, nil, nil, nil, nil, 1313, 769, 707, 2573, 2607, 2635, nil, nil, nil, 460, nil, nil, 2697, 475, nil, nil, 262, 89, 359, 248, 297, nil, nil, 178, 426, 60, nil, -2, nil, nil, nil, nil, nil ] racc_action_default = [ -259, -271, -271, -271, -86, -271, -88, -90, -92, -94, -96, -98, -100, -101, -102, -103, -104, -105, -106, -107, -108, -109, -110, -111, -112, -113, -114, -115, -116, -117, -118, -119, -271, -271, -271, -271, -156, -157, -158, -159, -271, -161, -162, -271, -176, -260, -261, -262, 460, -84, -271, -89, -91, -93, -95, -98, -87, -271, -271, -271, -234, -271, -266, -269, -271, -130, -271, -131, -271, -271, -149, -160, -271, -172, -271, -177, -178, -180, -85, -271, -264, -97, -98, -1, -2, -3, -4, -271, -7, -21, -271, -271, -271, -271, -271, -271, -271, -271, -32, -33, -34, -35, -36, -38, -42, -45, -48, -53, -56, -58, -60, -62, -64, -66, -68, -99, -209, -271, -233, -271, -265, -270, -38, -83, -271, -271, -191, -137, -139, -271, -271, -127, -132, -271, -271, -271, -129, -271, -150, -152, -154, -155, -271, -271, -271, -271, -271, -171, -271, -271, -175, -189, -163, -179, -181, -263, -271, -271, -271, -81, -271, -271, -271, -271, -15, -16, -271, -22, -23, -24, -25, -26, -271, -27, -271, -29, -31, -271, -271, -71, -72, -73, -74, -75, -76, -77, -78, -79, -80, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -210, -271, -213, -271, -271, -218, -271, -271, -1, -271, -271, -117, -222, -223, -224, -225, -226, -227, -271, -271, -271, -235, -237, -239, -240, -241, -242, -271, -271, -271, -271, -271, -271, -271, -271, -271, -120, -121, -136, -138, -192, -193, -195, -204, -271, -271, -123, -126, -133, -134, -271, -140, -142, -271, -271, -125, -128, -145, -271, -271, -271, -170, -271, -271, -165, -271, -166, -271, -188, -271, -182, -184, -174, -271, -5, -271, -6, -271, -271, -9, -271, -19, -11, -13, -12, -14, -271, -271, -271, -69, -70, -39, -40, -41, -43, -44, -46, -47, -49, -50, -51, -52, -54, -55, -57, -59, -61, -63, -65, -271, -211, -271, -214, -217, -219, -271, -221, -243, -98, -271, -271, -271, -271, -238, -271, -271, -271, -232, -271, -271, -231, -271, -271, -255, -256, -271, -257, -194, -271, -207, -271, -203, -271, -271, -197, -271, -122, -135, -271, -271, -143, -124, -147, -151, -153, -146, -271, -169, -164, -271, -271, -193, -204, -186, -187, -173, -271, -190, -82, -271, -37, -8, -10, -271, -271, -28, -30, -271, -212, -215, -271, -220, -271, -268, -228, -271, -230, -236, -271, -271, -271, -271, -271, -271, -253, -271, -258, -271, -199, -271, -206, -271, -196, -271, -201, -198, -141, -144, -148, -168, -167, -183, -185, -271, -20, -67, -216, -267, -229, -271, -271, -271, -271, -271, -271, -254, -202, -200, -271, -205, -17, -271, -244, -246, -247, -271, -271, -271, -271, -271, -208, -18, -271, -271, -271, -249, -271, -251, -245, -248, -250, -252 ] racc_goto_table = [ 3, 4, 115, 71, 62, 123, 116, 61, 156, 11, 209, 55, 124, 248, 75, 277, 256, 388, 76, 145, 345, 256, 230, 361, 137, 167, 168, 420, 259, 81, 173, 175, 176, 130, 54, 135, 126, 51, 47, 400, 310, 311, 144, 306, 307, 308, 309, 5, 80, 153, 178, 79, 304, 305, 120, 302, 303, 149, 148, 126, 258, 121, 316, 315, 116, 82, 82, 409, 314, 322, 313, 125, 155, 312, 339, 229, 119, 330, 288, 121, 157, 286, 45, 46, 1, nil, nil, 156, nil, 54, nil, 271, 51, 156, 158, 156, 253, 268, nil, nil, 249, 262, 431, 432, nil, nil, 122, nil, 289, nil, nil, nil, nil, nil, nil, nil, 275, nil, 218, 231, nil, 361, nil, nil, 297, 298, nil, nil, 317, nil, nil, nil, 331, nil, 169, 170, 171, 388, 126, 256, 345, 260, nil, nil, 126, nil, 126, 276, 256, nil, nil, nil, nil, nil, 320, 123, nil, nil, 116, 157, nil, nil, 323, 372, 343, 157, nil, 157, 123, nil, nil, nil, nil, 294, nil, 328, nil, nil, nil, 295, nil, 296, nil, nil, nil, 170, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 353, nil, nil, 123, nil, nil, nil, nil, nil, 123, 358, nil, nil, nil, nil, nil, 362, 53, 411, nil, nil, 367, nil, 368, nil, nil, 249, 326, nil, 218, 231, 376, 299, 300, 301, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 54, 369, 414, 51, 396, 397, 398, 122, 77, nil, nil, nil, 403, 387, nil, nil, nil, 116, nil, nil, 122, 421, 53, nil, nil, nil, nil, 436, 128, 336, 128, nil, 128, nil, nil, 371, 77, nil, nil, 154, nil, nil, nil, nil, 407, nil, nil, nil, nil, 123, nil, 128, nil, nil, 122, nil, 415, nil, 54, nil, 122, 51, 52, 170, nil, nil, nil, nil, nil, nil, 391, nil, nil, 390, nil, 116, nil, 423, 378, 422, nil, nil, 424, 71, nil, nil, 116, nil, 401, nil, 247, nil, nil, 128, 128, 369, nil, 247, 128, 128, 276, nil, 443, 444, 446, nil, nil, nil, 154, nil, 77, nil, nil, nil, nil, 260, nil, 52, 392, nil, 394, nil, nil, 127, 276, 127, nil, 127, nil, nil, 128, nil, nil, 387, 425, nil, 128, 116, 128, nil, nil, 121, nil, nil, 170, nil, 127, nil, nil, nil, 122, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 122, nil, nil, nil, 53, nil, 426, 246, nil, nil, 127, 127, nil, nil, 246, 127, 127, nil, nil, nil, 170, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, 440, 441, 442, nil, nil, nil, nil, 127, 128, nil, nil, nil, nil, 127, nil, 127, nil, nil, 453, nil, 455, 154, 53, 456, nil, 458, nil, 459, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 127, nil, nil, nil, nil, nil, nil, nil, nil, 127, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 52 ] racc_goto_check = [ 27, 26, 36, 48, 4, 23, 9, 76, 3, 35, 8, 35, 25, 55, 49, 50, 40, 59, 47, 9, 56, 40, 72, 45, 44, 10, 10, 54, 43, 34, 10, 10, 10, 39, 33, 39, 41, 30, 29, 64, 16, 16, 49, 15, 15, 15, 15, 28, 4, 47, 24, 76, 14, 14, 4, 13, 13, 51, 52, 41, 42, 26, 21, 20, 9, 35, 35, 58, 19, 61, 18, 7, 4, 17, 68, 69, 70, 71, 6, 26, 4, 3, 74, 75, 1, nil, nil, 3, nil, 33, nil, 9, 30, 3, 7, 3, 39, 44, nil, nil, 47, 39, 64, 64, nil, nil, 11, nil, 9, nil, nil, nil, nil, nil, nil, nil, 49, nil, 27, 26, nil, 45, nil, nil, 9, 9, nil, nil, 3, nil, nil, nil, 72, nil, 11, 11, 11, 59, 41, 40, 56, 35, nil, nil, 41, nil, 41, 27, 40, nil, nil, nil, nil, nil, 36, 23, nil, nil, 9, 4, nil, nil, 25, 55, 3, 4, nil, 4, 23, nil, nil, nil, nil, 7, nil, 25, nil, nil, nil, 7, nil, 7, nil, nil, nil, 11, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 9, nil, nil, 23, nil, nil, nil, nil, nil, 23, 25, nil, nil, nil, nil, nil, 25, 32, 50, nil, nil, 9, nil, 9, nil, nil, 47, 35, nil, 27, 26, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 33, 47, 43, 30, 3, 3, 3, 11, 32, nil, nil, nil, 3, 36, nil, nil, nil, 9, nil, nil, 11, 8, 32, nil, nil, nil, nil, 50, 32, 62, 32, nil, 32, nil, nil, 35, 32, nil, nil, 32, nil, nil, nil, nil, 9, nil, nil, nil, nil, 23, nil, 32, nil, nil, 11, nil, 25, nil, 33, nil, 11, 30, 31, 11, nil, nil, nil, nil, nil, nil, 4, nil, nil, 76, nil, 9, nil, 23, 11, 9, nil, nil, 36, 48, nil, nil, 9, nil, 26, nil, 32, nil, nil, 32, 32, 47, nil, 32, 32, 32, 27, nil, 3, 3, 3, nil, nil, nil, 32, nil, 32, nil, nil, nil, nil, 35, nil, 31, 62, nil, 62, nil, nil, 31, 27, 31, nil, 31, nil, nil, 32, nil, nil, 36, 4, nil, 32, 9, 32, nil, nil, 26, nil, nil, 11, nil, 31, nil, nil, nil, 11, nil, nil, nil, nil, nil, nil, nil, nil, 27, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 11, nil, nil, nil, 32, nil, 62, 31, nil, nil, 31, 31, nil, nil, 31, 31, 31, nil, nil, nil, 11, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, 62, 62, 62, nil, nil, nil, nil, 31, 32, nil, nil, nil, nil, 31, nil, 31, nil, nil, 62, nil, 62, 32, 32, 62, nil, 62, nil, 62, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 31, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 31, nil, nil, nil, nil, nil, nil, nil, nil, 31, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 31 ] racc_goto_pointer = [ nil, 84, nil, -79, -7, nil, -83, 7, -107, -53, -65, 42, nil, -137, -142, -153, -160, -129, -133, -136, -142, -144, nil, -59, -53, -52, 0, -1, 46, 37, 34, 308, 213, 31, -28, 8, -57, nil, nil, -33, -114, -28, -73, -105, -45, -243, nil, -26, -37, -30, -133, -16, -15, nil, -347, -113, -229, nil, -280, -302, nil, -143, 40, nil, -298, nil, nil, nil, -166, -44, 16, -152, -97, nil, 81, 82, -4 ] racc_goto_default = [ nil, nil, 88, 217, 221, 89, nil, nil, nil, 159, 102, 103, 94, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, nil, nil, 63, 58, 50, nil, 6, 7, 8, 9, 10, 74, 210, 30, 31, nil, 132, 133, nil, nil, nil, 138, 139, 40, 41, nil, nil, nil, nil, 278, 279, 348, 250, 350, nil, 211, 212, 213, 232, 220, 222, 223, 224, 225, 226, nil, nil, nil, nil, 233, nil, nil, nil ] racc_reduce_table = [ 0, 0, :racc_error, 1, 94, :_reduce_1, 1, 94, :_reduce_2, 1, 94, :_reduce_3, 1, 94, :_reduce_4, 3, 94, :_reduce_5, 3, 94, :_reduce_6, 1, 97, :_reduce_none, 4, 97, :_reduce_8, 3, 97, :_reduce_9, 4, 97, :_reduce_10, 3, 97, :_reduce_11, 3, 97, :_reduce_12, 3, 97, :_reduce_13, 3, 97, :_reduce_14, 2, 97, :_reduce_15, 2, 97, :_reduce_16, 6, 97, :_reduce_17, 7, 97, :_reduce_18, 1, 98, :_reduce_19, 3, 98, :_reduce_20, 1, 102, :_reduce_none, 2, 102, :_reduce_22, 2, 102, :_reduce_23, 2, 102, :_reduce_24, 2, 102, :_reduce_25, 2, 102, :_reduce_26, 2, 102, :_reduce_27, 4, 102, :_reduce_28, 2, 102, :_reduce_29, 4, 102, :_reduce_30, 2, 102, :_reduce_31, 1, 104, :_reduce_none, 1, 104, :_reduce_none, 1, 104, :_reduce_none, 1, 104, :_reduce_none, 1, 103, :_reduce_none, 4, 103, :_reduce_37, 1, 105, :_reduce_none, 3, 105, :_reduce_39, 3, 105, :_reduce_40, 3, 105, :_reduce_41, 1, 106, :_reduce_none, 3, 106, :_reduce_43, 3, 106, :_reduce_44, 1, 107, :_reduce_none, 3, 107, :_reduce_46, 3, 107, :_reduce_47, 1, 108, :_reduce_none, 3, 108, :_reduce_49, 3, 108, :_reduce_50, 3, 108, :_reduce_51, 3, 108, :_reduce_52, 1, 109, :_reduce_none, 3, 109, :_reduce_54, 3, 109, :_reduce_55, 1, 110, :_reduce_none, 3, 110, :_reduce_57, 1, 111, :_reduce_none, 3, 111, :_reduce_59, 1, 112, :_reduce_none, 3, 112, :_reduce_61, 1, 113, :_reduce_none, 3, 113, :_reduce_63, 1, 114, :_reduce_none, 3, 114, :_reduce_65, 1, 115, :_reduce_none, 5, 115, :_reduce_67, 1, 101, :_reduce_none, 3, 101, :_reduce_69, 3, 101, :_reduce_70, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 116, :_reduce_none, 1, 95, :_reduce_none, 3, 95, :_reduce_82, 1, 117, :_reduce_none, 2, 118, :_reduce_84, 3, 118, :_reduce_85, 1, 121, :_reduce_none, 2, 121, :_reduce_87, 1, 119, :_reduce_88, 2, 119, :_reduce_89, 1, 119, :_reduce_90, 2, 119, :_reduce_91, 1, 119, :_reduce_92, 2, 119, :_reduce_93, 1, 119, :_reduce_94, 2, 119, :_reduce_95, 1, 120, :_reduce_96, 3, 120, :_reduce_97, 1, 126, :_reduce_98, 3, 126, :_reduce_99, 1, 122, :_reduce_none, 1, 122, :_reduce_none, 1, 122, :_reduce_none, 1, 122, :_reduce_none, 1, 122, :_reduce_none, 1, 123, :_reduce_105, 1, 123, :_reduce_106, 1, 123, :_reduce_107, 1, 123, :_reduce_108, 1, 123, :_reduce_109, 1, 123, :_reduce_110, 1, 123, :_reduce_111, 1, 123, :_reduce_112, 1, 123, :_reduce_113, 1, 123, :_reduce_114, 1, 123, :_reduce_115, 1, 123, :_reduce_116, 1, 123, :_reduce_117, 1, 123, :_reduce_118, 1, 123, :_reduce_119, 4, 123, :_reduce_120, 4, 123, :_reduce_121, 5, 129, :_reduce_122, 4, 129, :_reduce_123, 5, 129, :_reduce_124, 4, 129, :_reduce_125, 4, 129, :_reduce_126, 3, 129, :_reduce_127, 4, 129, :_reduce_128, 3, 129, :_reduce_129, 2, 129, :_reduce_130, 2, 129, :_reduce_131, 1, 131, :_reduce_132, 2, 131, :_reduce_133, 2, 132, :_reduce_134, 3, 132, :_reduce_135, 2, 133, :_reduce_136, 1, 133, :_reduce_137, 2, 133, :_reduce_138, 1, 133, :_reduce_139, 1, 134, :_reduce_140, 3, 134, :_reduce_141, 1, 135, :_reduce_142, 2, 135, :_reduce_143, 3, 135, :_reduce_144, 4, 130, :_reduce_145, 5, 130, :_reduce_146, 5, 130, :_reduce_147, 6, 130, :_reduce_148, 2, 130, :_reduce_149, 1, 136, :_reduce_150, 3, 136, :_reduce_151, 1, 137, :_reduce_152, 3, 137, :_reduce_153, 1, 138, :_reduce_none, 1, 138, :_reduce_155, 1, 124, :_reduce_none, 1, 124, :_reduce_none, 1, 124, :_reduce_none, 1, 125, :_reduce_none, 2, 127, :_reduce_160, 1, 127, :_reduce_161, 1, 140, :_reduce_162, 3, 140, :_reduce_163, 5, 140, :_reduce_164, 4, 140, :_reduce_165, 4, 140, :_reduce_166, 6, 140, :_reduce_167, 6, 140, :_reduce_168, 5, 140, :_reduce_169, 4, 140, :_reduce_170, 3, 140, :_reduce_171, 0, 144, :_reduce_172, 5, 140, :_reduce_173, 4, 140, :_reduce_174, 3, 140, :_reduce_175, 1, 139, :_reduce_176, 2, 139, :_reduce_177, 2, 139, :_reduce_178, 3, 139, :_reduce_179, 1, 141, :_reduce_180, 2, 141, :_reduce_181, 1, 142, :_reduce_182, 3, 142, :_reduce_183, 1, 145, :_reduce_184, 3, 145, :_reduce_185, 2, 146, :_reduce_186, 2, 146, :_reduce_187, 1, 146, :_reduce_188, 1, 143, :_reduce_189, 3, 143, :_reduce_190, 1, 99, :_reduce_191, 2, 99, :_reduce_192, 1, 147, :_reduce_193, 2, 147, :_reduce_194, 1, 147, :_reduce_195, 3, 148, :_reduce_196, 2, 148, :_reduce_197, 3, 148, :_reduce_198, 3, 148, :_reduce_199, 4, 148, :_reduce_200, 3, 148, :_reduce_201, 4, 148, :_reduce_202, 2, 148, :_reduce_203, 0, 149, :_reduce_204, 4, 148, :_reduce_205, 3, 148, :_reduce_206, 0, 150, :_reduce_207, 5, 148, :_reduce_208, 1, 128, :_reduce_209, 2, 128, :_reduce_210, 3, 128, :_reduce_211, 4, 128, :_reduce_212, 1, 100, :_reduce_213, 2, 100, :_reduce_214, 3, 100, :_reduce_215, 4, 100, :_reduce_216, 2, 151, :_reduce_none, 1, 152, :_reduce_none, 2, 152, :_reduce_none, 3, 153, :_reduce_none, 2, 153, :_reduce_none, 1, 154, :_reduce_none, 1, 154, :_reduce_none, 1, 154, :_reduce_none, 1, 154, :_reduce_none, 1, 154, :_reduce_none, 1, 154, :_reduce_none, 3, 155, :_reduce_228, 4, 155, :_reduce_229, 3, 155, :_reduce_230, 1, 160, :_reduce_none, 1, 160, :_reduce_232, 2, 96, :_reduce_233, 0, 162, :_reduce_234, 0, 163, :_reduce_235, 5, 96, :_reduce_236, 1, 161, :_reduce_237, 2, 161, :_reduce_238, 1, 164, :_reduce_none, 1, 164, :_reduce_none, 1, 164, :_reduce_none, 1, 156, :_reduce_242, 2, 156, :_reduce_243, 5, 157, :_reduce_244, 7, 157, :_reduce_245, 5, 157, :_reduce_246, 5, 158, :_reduce_247, 7, 158, :_reduce_248, 6, 158, :_reduce_249, 7, 158, :_reduce_250, 6, 158, :_reduce_251, 7, 158, :_reduce_252, 3, 159, :_reduce_253, 4, 159, :_reduce_254, 2, 159, :_reduce_255, 2, 159, :_reduce_256, 2, 159, :_reduce_257, 3, 159, :_reduce_258, 0, 93, :_reduce_259, 2, 93, :_reduce_260, 1, 166, :_reduce_none, 1, 166, :_reduce_none, 4, 167, :_reduce_263, 3, 167, :_reduce_264, 3, 167, :_reduce_265, 2, 167, :_reduce_266, 4, 165, :_reduce_267, 3, 165, :_reduce_268, 1, 168, :_reduce_269, 2, 168, :_reduce_270 ] racc_reduce_n = 271 racc_shift_n = 460 racc_token_table = { false => 0, :error => 1, :IDENTIFIER => 2, :TYPEDEF_NAME => 3, :CONSTANT => 4, :STRING_LITERAL => 5, :SIZEOF => 6, :TYPEDEF => 7, :EXTERN => 8, :STATIC => 9, :AUTO => 10, :REGISTER => 11, :INLINE => 12, :RESTRICT => 13, :CHAR => 14, :SHORT => 15, :INT => 16, :LONG => 17, :SIGNED => 18, :UNSIGNED => 19, :FLOAT => 20, :DOUBLE => 21, :CONST => 22, :VOLATILE => 23, :VOID => 24, :BOOL => 25, :COMPLEX => 26, :IMAGINARY => 27, :STRUCT => 28, :UNION => 29, :ENUM => 30, :CASE => 31, :DEFAULT => 32, :IF => 33, :ELSE => 34, :SWITCH => 35, :WHILE => 36, :DO => 37, :FOR => 38, :GOTO => 39, :CONTINUE => 40, :BREAK => 41, :RETURN => 42, :NULL => 43, :TYPEOF => 44, :ALIGNOF => 45, "(" => 46, ")" => 47, "[" => 48, "]" => 49, "." => 50, "->" => 51, "++" => 52, "--" => 53, "{" => 54, "}" => 55, "," => 56, "&" => 57, "*" => 58, "&&" => 59, "+" => 60, "-" => 61, "~" => 62, "!" => 63, "/" => 64, "%" => 65, "<<" => 66, ">>" => 67, "<" => 68, ">" => 69, "<=" => 70, ">=" => 71, "==" => 72, "!=" => 73, "^" => 74, "|" => 75, "||" => 76, "?" => 77, ":" => 78, "=" => 79, "*=" => 80, "/=" => 81, "%=" => 82, "+=" => 83, "-=" => 84, "<<=" => 85, ">>=" => 86, "&=" => 87, "^=" => 88, "|=" => 89, ";" => 90, "..." => 91 } racc_nt_base = 92 racc_use_result_var = true Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ "$end", "error", "IDENTIFIER", "TYPEDEF_NAME", "CONSTANT", "STRING_LITERAL", "SIZEOF", "TYPEDEF", "EXTERN", "STATIC", "AUTO", "REGISTER", "INLINE", "RESTRICT", "CHAR", "SHORT", "INT", "LONG", "SIGNED", "UNSIGNED", "FLOAT", "DOUBLE", "CONST", "VOLATILE", "VOID", "BOOL", "COMPLEX", "IMAGINARY", "STRUCT", "UNION", "ENUM", "CASE", "DEFAULT", "IF", "ELSE", "SWITCH", "WHILE", "DO", "FOR", "GOTO", "CONTINUE", "BREAK", "RETURN", "NULL", "TYPEOF", "ALIGNOF", "\"(\"", "\")\"", "\"[\"", "\"]\"", "\".\"", "\"->\"", "\"++\"", "\"--\"", "\"{\"", "\"}\"", "\",\"", "\"&\"", "\"*\"", "\"&&\"", "\"+\"", "\"-\"", "\"~\"", "\"!\"", "\"/\"", "\"%\"", "\"<<\"", "\">>\"", "\"<\"", "\">\"", "\"<=\"", "\">=\"", "\"==\"", "\"!=\"", "\"^\"", "\"|\"", "\"||\"", "\"?\"", "\":\"", "\"=\"", "\"*=\"", "\"/=\"", "\"%=\"", "\"+=\"", "\"-=\"", "\"<<=\"", "\">>=\"", "\"&=\"", "\"^=\"", "\"|=\"", "\";\"", "\"...\"", "$start", "translation_unit", "primary_expression", "expression", "compound_statement", "postfix_expression", "argument_expression_list", "type_name", "initializer_list", "assignment_expression", "unary_expression", "cast_expression", "unary_arithmetic_operator", "multiplicative_expression", "additive_expression", "shift_expression", "relational_expression", "equality_expression", "and_expression", "exclusive_or_expression", "inclusive_or_expression", "logical_and_expression", "logical_or_expression", "conditional_expression", "compound_assignment_operator", "constant_expression", "declaration", "declaration_specifiers", "init_declarator_list", "global_declaration", "storage_class_specifier", "type_specifier", "type_qualifier", "function_specifier", "init_declarator", "declarator", "initializer", "struct_or_union_specifier", "enum_specifier", "struct_declaration_list", "struct_declaration", "specifier_qualifier_list", "struct_declarator_list", "struct_declarator", "enumerator_list", "enumerator", "enumerator_name", "pointer", "direct_declarator", "type_qualifier_list", "parameter_type_list", "identifier_list", "@1", "parameter_list", "parameter_declaration", "abstract_declarator", "direct_abstract_declarator", "@2", "@3", "designation", "designator_list", "designator", "statement", "labeled_statement", "expression_statement", "selection_statement", "iteration_statement", "jump_statement", "label_name", "block_item_list", "@4", "@5", "block_item", "local_function_definition", "external_declaration", "function_definition", "declaration_list" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted module_eval(<<'.,.,', 'parser.y', 90) def _reduce_1(val, _values, result) checkpoint(val[0].location) result = ObjectSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 96) def _reduce_2(val, _values, result) checkpoint(val[0].location) result = ConstantSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 102) def _reduce_3(val, _values, result) checkpoint(val[0].location) result = StringLiteralSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 108) def _reduce_4(val, _values, result) checkpoint(val[0].location) result = NullConstantSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 114) def _reduce_5(val, _values, result) checkpoint(val[0].location) result = GroupedExpression.new(val[1]) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 121) def _reduce_6(val, _values, result) checkpoint(val[0].location) E(:E0013, val[0].location) result = ErrorExpression.new(val[0]) result.head_token = val[0] result.tail_token = val[2] result end .,., # reduce 7 omitted module_eval(<<'.,.,', 'parser.y', 133) def _reduce_8(val, _values, result) checkpoint(val[0].location) result = ArraySubscriptExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 140) def _reduce_9(val, _values, result) checkpoint(val[0].location) result = FunctionCallExpression.new(val[0], [], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 147) def _reduce_10(val, _values, result) checkpoint(val[0].location) result = FunctionCallExpression.new(val[0], val[2], val [1]) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 154) def _reduce_11(val, _values, result) checkpoint(val[0].location) result = MemberAccessByValueExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 161) def _reduce_12(val, _values, result) checkpoint(val[0].location) result = MemberAccessByPointerExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 168) def _reduce_13(val, _values, result) checkpoint(val[0].location) result = BitAccessByValueExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 175) def _reduce_14(val, _values, result) checkpoint(val[0].location) result = BitAccessByPointerExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 182) def _reduce_15(val, _values, result) checkpoint(val[0].location) result = PostfixIncrementExpression.new(val[1], val[0]) result.head_token = val[0].head_token result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 189) def _reduce_16(val, _values, result) checkpoint(val[0].location) result = PostfixDecrementExpression.new(val[1], val[0]) result.head_token = val[0].head_token result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 196) def _reduce_17(val, _values, result) checkpoint(val[0].location) result = CompoundLiteralExpression.new(val[1], val[4], val[0]) result.head_token = val[0] result.tail_token = val[5] result end .,., module_eval(<<'.,.,', 'parser.y', 203) def _reduce_18(val, _values, result) checkpoint(val[0].location) result = CompoundLiteralExpression.new(val[1], val[4], val[0]) result.head_token = val[0] result.tail_token = val[6] result end .,., module_eval(<<'.,.,', 'parser.y', 213) def _reduce_19(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 218) def _reduce_20(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[2]) result end .,., # reduce 21 omitted module_eval(<<'.,.,', 'parser.y', 227) def _reduce_22(val, _values, result) checkpoint(val[0].location) result = PrefixIncrementExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 234) def _reduce_23(val, _values, result) checkpoint(val[0].location) result = PrefixDecrementExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 241) def _reduce_24(val, _values, result) checkpoint(val[0].location) result = AddressExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 248) def _reduce_25(val, _values, result) checkpoint(val[0].location) result = IndirectionExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 255) def _reduce_26(val, _values, result) checkpoint(val[0].location) result = UnaryArithmeticExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 262) def _reduce_27(val, _values, result) checkpoint(val[0].location) result = SizeofExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 269) def _reduce_28(val, _values, result) checkpoint(val[0].location) result = SizeofTypeExpression.new(val[0], val[2]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 276) def _reduce_29(val, _values, result) checkpoint(val[0].location) result = AlignofExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 283) def _reduce_30(val, _values, result) checkpoint(val[0].location) result = AlignofTypeExpression.new(val[0], val[2]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 290) def _reduce_31(val, _values, result) checkpoint(val[0].location) E(:E0014, val[0].location, val[0].value) result = ErrorExpression.new(val[0]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., # reduce 32 omitted # reduce 33 omitted # reduce 34 omitted # reduce 35 omitted # reduce 36 omitted module_eval(<<'.,.,', 'parser.y', 309) def _reduce_37(val, _values, result) checkpoint(val[0].location) result = CastExpression.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[3].tail_token result end .,., # reduce 38 omitted module_eval(<<'.,.,', 'parser.y', 320) def _reduce_39(val, _values, result) checkpoint(val[0].location) result = MultiplicativeExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 327) def _reduce_40(val, _values, result) checkpoint(val[0].location) result = MultiplicativeExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 334) def _reduce_41(val, _values, result) checkpoint(val[0].location) result = MultiplicativeExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 42 omitted module_eval(<<'.,.,', 'parser.y', 345) def _reduce_43(val, _values, result) checkpoint(val[0].location) result = AdditiveExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 352) def _reduce_44(val, _values, result) checkpoint(val[0].location) result = AdditiveExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 45 omitted module_eval(<<'.,.,', 'parser.y', 363) def _reduce_46(val, _values, result) checkpoint(val[0].location) result = ShiftExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 370) def _reduce_47(val, _values, result) checkpoint(val[0].location) result = ShiftExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 48 omitted module_eval(<<'.,.,', 'parser.y', 381) def _reduce_49(val, _values, result) checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 388) def _reduce_50(val, _values, result) checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 395) def _reduce_51(val, _values, result) checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 402) def _reduce_52(val, _values, result) checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 53 omitted module_eval(<<'.,.,', 'parser.y', 413) def _reduce_54(val, _values, result) checkpoint(val[0].location) result = EqualityExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 420) def _reduce_55(val, _values, result) checkpoint(val[0].location) result = EqualityExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 56 omitted module_eval(<<'.,.,', 'parser.y', 431) def _reduce_57(val, _values, result) checkpoint(val[0].location) result = AndExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 58 omitted module_eval(<<'.,.,', 'parser.y', 442) def _reduce_59(val, _values, result) checkpoint(val[0].location) result = ExclusiveOrExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 60 omitted module_eval(<<'.,.,', 'parser.y', 453) def _reduce_61(val, _values, result) checkpoint(val[0].location) result = InclusiveOrExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 62 omitted module_eval(<<'.,.,', 'parser.y', 464) def _reduce_63(val, _values, result) checkpoint(val[0].location) result = LogicalAndExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 64 omitted module_eval(<<'.,.,', 'parser.y', 475) def _reduce_65(val, _values, result) checkpoint(val[0].location) result = LogicalOrExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 66 omitted module_eval(<<'.,.,', 'parser.y', 486) def _reduce_67(val, _values, result) checkpoint(val[0].location) result = ConditionalExpression.new(val[0], val[2], val[4], val[1]) result.head_token = val[0].head_token result.tail_token = val[4].tail_token result end .,., # reduce 68 omitted module_eval(<<'.,.,', 'parser.y', 497) def _reduce_69(val, _values, result) checkpoint(val[0].location) result = SimpleAssignmentExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 504) def _reduce_70(val, _values, result) checkpoint(val[0].location) result = CompoundAssignmentExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 71 omitted # reduce 72 omitted # reduce 73 omitted # reduce 74 omitted # reduce 75 omitted # reduce 76 omitted # reduce 77 omitted # reduce 78 omitted # reduce 79 omitted # reduce 80 omitted # reduce 81 omitted module_eval(<<'.,.,', 'parser.y', 528) def _reduce_82(val, _values, result) checkpoint(val[0].location) case val[0] when CommaSeparatedExpression result = val[0].push(val[2]) else result = CommaSeparatedExpression.new(val[0]).push(val[2]) end result end .,., # reduce 83 omitted module_eval(<<'.,.,', 'parser.y', 548) def _reduce_84(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = Declaration.new(val[0], [], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 556) def _reduce_85(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = Declaration.new(val[0], val[1], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[2] result.items.each do |item| case item when TypedefDeclaration @lexer.add_typedef_name(item.identifier) when FunctionDeclaration, VariableDeclaration, VariableDefinition @lexer.add_object_name(item.identifier) end end result end .,., # reduce 86 omitted module_eval(<<'.,.,', 'parser.y', 576) def _reduce_87(val, _values, result) checkpoint(val[0].first.location) result = Declaration.new(nil, val[0], @sym_tbl) result.head_token = val[0].first.head_token result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 586) def _reduce_88(val, _values, result) checkpoint(val[0].location) result = DeclarationSpecifiers.new result.storage_class_specifier = val[0] result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 593) def _reduce_89(val, _values, result) checkpoint(val[0].location) result = val[0] result.storage_class_specifier = val[1] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 600) def _reduce_90(val, _values, result) checkpoint(val[0].location) result = DeclarationSpecifiers.new result.type_specifiers.push(val[0]) result.head_token = val[0].head_token result.tail_token = val[0].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 608) def _reduce_91(val, _values, result) checkpoint(val[0].location) result = val[0] result.type_specifiers.push(val[1]) result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 615) def _reduce_92(val, _values, result) checkpoint(val[0].location) result = DeclarationSpecifiers.new result.type_qualifiers.push(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 622) def _reduce_93(val, _values, result) checkpoint(val[0].location) result = val[0] result.type_qualifiers.push(val[1]) result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 629) def _reduce_94(val, _values, result) checkpoint(val[0].location) result = DeclarationSpecifiers.new result.function_specifier = val[0] result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 636) def _reduce_95(val, _values, result) checkpoint(val[0].location) result = val[0] result.function_specifier = val[1] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 646) def _reduce_96(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 651) def _reduce_97(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 659) def _reduce_98(val, _values, result) checkpoint(val[0].location) result = InitDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 666) def _reduce_99(val, _values, result) checkpoint(val[0].location) result = InitDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., # reduce 100 omitted # reduce 101 omitted # reduce 102 omitted # reduce 103 omitted # reduce 104 omitted module_eval(<<'.,.,', 'parser.y', 684) def _reduce_105(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 691) def _reduce_106(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 698) def _reduce_107(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 705) def _reduce_108(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 712) def _reduce_109(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 719) def _reduce_110(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 726) def _reduce_111(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 733) def _reduce_112(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 740) def _reduce_113(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 747) def _reduce_114(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 754) def _reduce_115(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 761) def _reduce_116(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 768) def _reduce_117(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = TypedefTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 775) def _reduce_118(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 781) def _reduce_119(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 787) def _reduce_120(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation val[2].full = true result = TypeofTypeSpecifier.new(val[2], nil) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 796) def _reduce_121(val, _values, result) checkpoint(val[0].location) @lexer.disable_identifier_translation result = TypeofTypeSpecifier.new(nil, val[2]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 807) def _reduce_122(val, _values, result) checkpoint(val[0].location) result = StructSpecifier.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[4] result end .,., module_eval(<<'.,.,', 'parser.y', 814) def _reduce_123(val, _values, result) checkpoint(val[0].location) result = StructSpecifier.new(val[1], []) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 821) def _reduce_124(val, _values, result) checkpoint(val[0].location) result = UnionSpecifier.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[4] result end .,., module_eval(<<'.,.,', 'parser.y', 828) def _reduce_125(val, _values, result) checkpoint(val[0].location) result = UnionSpecifier.new(val[1], []) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 835) def _reduce_126(val, _values, result) checkpoint(val[0].location) result = StructSpecifier.new(create_anon_tag_name(val[0]), val[2]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 842) def _reduce_127(val, _values, result) checkpoint(val[0].location) result = StructSpecifier.new(create_anon_tag_name(val[0]), []) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 849) def _reduce_128(val, _values, result) checkpoint(val[0].location) result = UnionSpecifier.new(create_anon_tag_name(val[0]), val[2]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 856) def _reduce_129(val, _values, result) checkpoint(val[0].location) result = UnionSpecifier.new(create_anon_tag_name(val[0]), []) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 863) def _reduce_130(val, _values, result) checkpoint(val[0].location) result = StructSpecifier.new(val[1], nil) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 870) def _reduce_131(val, _values, result) checkpoint(val[0].location) result = UnionSpecifier.new(val[1], nil) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 880) def _reduce_132(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = val result end .,., module_eval(<<'.,.,', 'parser.y', 886) def _reduce_133(val, _values, result) checkpoint(val[0].first.location) @lexer.enable_identifier_translation result = val[0].push(val[1]) result end .,., module_eval(<<'.,.,', 'parser.y', 895) def _reduce_134(val, _values, result) checkpoint(val[0].location) result = StructDeclaration.new(val[0], []) result.head_token = val[0].head_token result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 902) def _reduce_135(val, _values, result) checkpoint(val[0].location) result = StructDeclaration.new(val[0], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 912) def _reduce_136(val, _values, result) checkpoint(val[0].location) result = val[0] result.type_specifiers.push(val[1]) result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 919) def _reduce_137(val, _values, result) checkpoint(val[0].location) result = SpecifierQualifierList.new result.type_specifiers.push(val[0]) result.head_token = val[0].head_token result.tail_token = val[0].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 927) def _reduce_138(val, _values, result) checkpoint(val[0].location) result = val[0] result.type_qualifiers.push(val[1]) result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 934) def _reduce_139(val, _values, result) checkpoint(val[0].location) result = SpecifierQualifierList.new result.type_qualifiers.push(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 944) def _reduce_140(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 949) def _reduce_141(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 957) def _reduce_142(val, _values, result) checkpoint(val[0].location) result = StructDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 964) def _reduce_143(val, _values, result) checkpoint(val[0].location) val[1].full = true result = StructDeclarator.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 972) def _reduce_144(val, _values, result) checkpoint(val[0].location) val[2].full = true result = StructDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 983) def _reduce_145(val, _values, result) checkpoint(val[0].location) result = EnumSpecifier.new(create_anon_tag_name(val[0]), val[2]) result.head_token = val[0] result.tail_token = val[3] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end result end .,., module_eval(<<'.,.,', 'parser.y', 993) def _reduce_146(val, _values, result) checkpoint(val[0].location) result = EnumSpecifier.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[4] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end result end .,., module_eval(<<'.,.,', 'parser.y', 1003) def _reduce_147(val, _values, result) checkpoint(val[0].location) result = EnumSpecifier.new(create_anon_tag_name(val[0]), val[2], val[3]) result.head_token = val[0] result.tail_token = val[4] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end result end .,., module_eval(<<'.,.,', 'parser.y', 1014) def _reduce_148(val, _values, result) checkpoint(val[0].location) result = EnumSpecifier.new(val[1], val[3], val[4]) result.head_token = val[0] result.tail_token = val[5] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end result end .,., module_eval(<<'.,.,', 'parser.y', 1024) def _reduce_149(val, _values, result) checkpoint(val[0].location) result = EnumSpecifier.new(val[1], nil) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1034) def _reduce_150(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1039) def _reduce_151(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 1047) def _reduce_152(val, _values, result) checkpoint(val[0].location) sym = @sym_tbl.create_new_symbol(EnumeratorName, val[0]) result = Enumerator.new(val[0], nil, sym) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 1054) def _reduce_153(val, _values, result) checkpoint(val[0].location) val[2].full = true sym = @sym_tbl.create_new_symbol(EnumeratorName, val[0]) result = Enumerator.new(val[0], val[2], sym) result.head_token = val[0] result.tail_token = val[2].tail_token result end .,., # reduce 154 omitted module_eval(<<'.,.,', 'parser.y', 1067) def _reduce_155(val, _values, result) result = val[0].class.new(:IDENTIFIER, val[0].value, val[0].location) result end .,., # reduce 156 omitted # reduce 157 omitted # reduce 158 omitted # reduce 159 omitted module_eval(<<'.,.,', 'parser.y', 1084) def _reduce_160(val, _values, result) checkpoint(val[0].first.location) result = val[1] result.pointer = val[0] result.head_token = val[0].first result.full = true result end .,., module_eval(<<'.,.,', 'parser.y', 1092) def _reduce_161(val, _values, result) checkpoint(val[0].location) result = val[0] result.full = true result end .,., module_eval(<<'.,.,', 'parser.y', 1101) def _reduce_162(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = IdentifierDeclarator.new(val[0]) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 1108) def _reduce_163(val, _values, result) checkpoint(val[0].location) result = GroupedDeclarator.new(val[1]) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1115) def _reduce_164(val, _values, result) checkpoint(val[0].location) val[3].full = true result = ArrayDeclarator.new(val[0], val[3]) result.head_token = val[0].head_token result.tail_token = val[4] result end .,., module_eval(<<'.,.,', 'parser.y', 1123) def _reduce_165(val, _values, result) checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1130) def _reduce_166(val, _values, result) checkpoint(val[0].location) val[2].full = true result = ArrayDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1139) def _reduce_167(val, _values, result) checkpoint(val[0].location) val[4].full = true result = ArrayDeclarator.new(val[0], val[4]) result.head_token = val[0].head_token result.tail_token = val[5] result end .,., module_eval(<<'.,.,', 'parser.y', 1148) def _reduce_168(val, _values, result) checkpoint(val[0].location) val[4].full = true result = ArrayDeclarator.new(val[0], val[4]) result.head_token = val[0].head_token result.tail_token = val[5] result end .,., module_eval(<<'.,.,', 'parser.y', 1156) def _reduce_169(val, _values, result) checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[4] result end .,., module_eval(<<'.,.,', 'parser.y', 1163) def _reduce_170(val, _values, result) checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1170) def _reduce_171(val, _values, result) checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1175) def _reduce_172(val, _values, result) @lexer.enable_identifier_translation result end .,., module_eval(<<'.,.,', 'parser.y', 1178) def _reduce_173(val, _values, result) checkpoint(val[0].location) result = AnsiFunctionDeclarator.new(val[0], val[3]) result.head_token = val[0].head_token result.tail_token = val[4] result end .,., module_eval(<<'.,.,', 'parser.y', 1185) def _reduce_174(val, _values, result) checkpoint(val[0].location) result = KandRFunctionDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1192) def _reduce_175(val, _values, result) checkpoint(val[0].location) result = AbbreviatedFunctionDeclarator.new(val[0]) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1202) def _reduce_176(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1207) def _reduce_177(val, _values, result) checkpoint(val[0].location) result = val[1].unshift(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 1212) def _reduce_178(val, _values, result) checkpoint(val[0].location) result = val[1].unshift(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 1217) def _reduce_179(val, _values, result) checkpoint(val[0].location) result = val[1].unshift(val[0]).concat(val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 1225) def _reduce_180(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1230) def _reduce_181(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[1]) result end .,., module_eval(<<'.,.,', 'parser.y', 1238) def _reduce_182(val, _values, result) checkpoint(val[0].first.location) result = ParameterTypeList.new(val[0], false) result.head_token = val[0].first.head_token result.tail_token = val[0].last.tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1245) def _reduce_183(val, _values, result) checkpoint(val[0].first.location) result = ParameterTypeList.new(val[0], true) result.head_token = val[0].first.head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1255) def _reduce_184(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1260) def _reduce_185(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 1268) def _reduce_186(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = ParameterDeclaration.new(val[0], val[1]) result.head_token = val[0].head_token result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1276) def _reduce_187(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = ParameterDeclaration.new(val[0], val[1]) result.head_token = val[0].head_token result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1284) def _reduce_188(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = ParameterDeclaration.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1295) def _reduce_189(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1300) def _reduce_190(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 1308) def _reduce_191(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = TypeName.new(val[0], nil, @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[0].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1316) def _reduce_192(val, _values, result) checkpoint(val[0].location) @lexer.enable_identifier_translation result = TypeName.new(val[0], val[1], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1327) def _reduce_193(val, _values, result) checkpoint(val[0].first.location) @lexer.enable_identifier_translation result = PointerAbstractDeclarator.new(nil, val[0]) result.head_token = val[0].first result.tail_token = val[0].last result.full = true result end .,., module_eval(<<'.,.,', 'parser.y', 1336) def _reduce_194(val, _values, result) checkpoint(val[0].first.location) @lexer.enable_identifier_translation result = PointerAbstractDeclarator.new(val[1], val[0]) result.head_token = val[0].first result.tail_token = val[1].tail_token result.full = true result end .,., module_eval(<<'.,.,', 'parser.y', 1345) def _reduce_195(val, _values, result) checkpoint(val[0].location) result = val[0] result.full = true result end .,., module_eval(<<'.,.,', 'parser.y', 1354) def _reduce_196(val, _values, result) checkpoint(val[0].location) result = GroupedAbstractDeclarator.new(val[1]) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1361) def _reduce_197(val, _values, result) checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(nil, nil) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1368) def _reduce_198(val, _values, result) checkpoint(val[0].location) val[1].full = true result = ArrayAbstractDeclarator.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1376) def _reduce_199(val, _values, result) checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1383) def _reduce_200(val, _values, result) checkpoint(val[0].location) val[2].full = true result = ArrayAbstractDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1391) def _reduce_201(val, _values, result) checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(nil, nil) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1398) def _reduce_202(val, _values, result) checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1405) def _reduce_203(val, _values, result) checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(nil, nil) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1410) def _reduce_204(val, _values, result) @lexer.enable_identifier_translation result end .,., module_eval(<<'.,.,', 'parser.y', 1412) def _reduce_205(val, _values, result) checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(nil, val[2]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1419) def _reduce_206(val, _values, result) checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1424) def _reduce_207(val, _values, result) @lexer.enable_identifier_translation result end .,., module_eval(<<'.,.,', 'parser.y', 1427) def _reduce_208(val, _values, result) checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(val[0], val[3]) result.head_token = val[0].head_token result.tail_token = val[4] result end .,., module_eval(<<'.,.,', 'parser.y', 1437) def _reduce_209(val, _values, result) checkpoint(val[0].location) val[0].full = true result = Initializer.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1445) def _reduce_210(val, _values, result) checkpoint(val[0].location) result = Initializer.new(nil, nil) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1452) def _reduce_211(val, _values, result) checkpoint(val[0].location) result = Initializer.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1459) def _reduce_212(val, _values, result) checkpoint(val[0].location) result = Initializer.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1469) def _reduce_213(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1474) def _reduce_214(val, _values, result) checkpoint(val[1].location) result = [val[1]] result end .,., module_eval(<<'.,.,', 'parser.y', 1479) def _reduce_215(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'parser.y', 1484) def _reduce_216(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[3]) result end .,., # reduce 217 omitted # reduce 218 omitted # reduce 219 omitted # reduce 220 omitted # reduce 221 omitted # reduce 222 omitted # reduce 223 omitted # reduce 224 omitted # reduce 225 omitted # reduce 226 omitted # reduce 227 omitted module_eval(<<'.,.,', 'parser.y', 1518) def _reduce_228(val, _values, result) checkpoint(val[0].location) result = GenericLabeledStatement.new(val[0], val[2]) result.head_token = val[0] result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1525) def _reduce_229(val, _values, result) checkpoint(val[0].location) val[1].full = true result = CaseLabeledStatement.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[3].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1533) def _reduce_230(val, _values, result) checkpoint(val[0].location) result = DefaultLabeledStatement.new(val[2]) result.head_token = val[0] result.tail_token = val[2].tail_token result end .,., # reduce 231 omitted module_eval(<<'.,.,', 'parser.y', 1544) def _reduce_232(val, _values, result) result = val[0].class.new(:IDENTIFIER, val[0].value, val[0].location) result end .,., module_eval(<<'.,.,', 'parser.y', 1551) def _reduce_233(val, _values, result) checkpoint(val[0].location) result = CompoundStatement.new([]) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1556) def _reduce_234(val, _values, result) @lexer.enter_scope result end .,., module_eval(<<'.,.,', 'parser.y', 1556) def _reduce_235(val, _values, result) @lexer.leave_scope result end .,., module_eval(<<'.,.,', 'parser.y', 1558) def _reduce_236(val, _values, result) checkpoint(val[0].location) result = CompoundStatement.new(val[2]) result.head_token = val[0] result.tail_token = val[4] result end .,., module_eval(<<'.,.,', 'parser.y', 1568) def _reduce_237(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1573) def _reduce_238(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[1]) result end .,., # reduce 239 omitted # reduce 240 omitted # reduce 241 omitted module_eval(<<'.,.,', 'parser.y', 1587) def _reduce_242(val, _values, result) checkpoint(val[0].location) result = ExpressionStatement.new(nil) result.head_token = result.tail_token = val[0] result end .,., module_eval(<<'.,.,', 'parser.y', 1593) def _reduce_243(val, _values, result) checkpoint(val[0].location) val[0].full = true result = ExpressionStatement.new(val[0]) result.head_token = val[0].head_token result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1604) def _reduce_244(val, _values, result) checkpoint(val[0].location) val[2].full = true result = IfStatement.new(val[2], val[4], val[3]) result.head_token = val[0] result.tail_token = val[4].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1612) def _reduce_245(val, _values, result) checkpoint(val[0].location) val[2].full = true result = IfElseStatement.new(val[2], val[4], val[6], val[3], val[5]) result.head_token = val[0] result.tail_token = val[6].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1620) def _reduce_246(val, _values, result) checkpoint(val[0].location) val[2].full = true result = SwitchStatement.new(val[2], val[4]) result.head_token = val[0] result.tail_token = val[4].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1631) def _reduce_247(val, _values, result) checkpoint(val[0].location) val[2].full = true result = WhileStatement.new(val[2], val[4], val[3]) result.head_token = val[0] result.tail_token = val[4].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1639) def _reduce_248(val, _values, result) checkpoint(val[0].location) val[4].full = true result = DoStatement.new(val[1], val[4], val[0], val[2]) result.head_token = val[0] result.tail_token = val[6] result end .,., module_eval(<<'.,.,', 'parser.y', 1647) def _reduce_249(val, _values, result) checkpoint(val[0].location) result = ForStatement.new(val[2], val[3], nil, val[5], val[4]) result.head_token = val[0] result.tail_token = val[5].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1655) def _reduce_250(val, _values, result) checkpoint(val[0].location) val[4].full = true result = ForStatement.new(val[2], val[3], val[4], val[6], val[5]) result.head_token = val[0] result.tail_token = val[6].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1663) def _reduce_251(val, _values, result) checkpoint(val[0].location) result = C99ForStatement.new(val[2], val[3], nil, val[5], val[4]) result.head_token = val[0] result.tail_token = val[5].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1670) def _reduce_252(val, _values, result) checkpoint(val[0].location) val[4].full = true result = C99ForStatement.new(val[2], val[3], val[4], val[6], val[5]) result.head_token = val[0] result.tail_token = val[6].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1681) def _reduce_253(val, _values, result) checkpoint(val[0].location) result = GotoStatement.new(val[1]) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1688) def _reduce_254(val, _values, result) checkpoint(val[0].location) E(:E0015, val[1].location, val[1].value) result = ErrorStatement.new(val[1]) result.head_token = val[0] result.tail_token = val[3] result end .,., module_eval(<<'.,.,', 'parser.y', 1696) def _reduce_255(val, _values, result) checkpoint(val[0].location) result = ContinueStatement.new result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1703) def _reduce_256(val, _values, result) checkpoint(val[0].location) result = BreakStatement.new result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1710) def _reduce_257(val, _values, result) checkpoint(val[0].location) result = ReturnStatement.new(nil) result.head_token = val[0] result.tail_token = val[1] result end .,., module_eval(<<'.,.,', 'parser.y', 1717) def _reduce_258(val, _values, result) checkpoint(val[0].location) val[1].full = true result = ReturnStatement.new(val[1]) result.head_token = val[0] result.tail_token = val[2] result end .,., module_eval(<<'.,.,', 'parser.y', 1731) def _reduce_259(val, _values, result) result = TranslationUnit.new result end .,., module_eval(<<'.,.,', 'parser.y', 1735) def _reduce_260(val, _values, result) checkpoint(val[0].location) result = val[0] result.push(val[1]) result end .,., # reduce 261 omitted # reduce 262 omitted module_eval(<<'.,.,', 'parser.y', 1749) def _reduce_263(val, _values, result) checkpoint(val[0].location) result = KandRFunctionDefinition.new(val[0], val[1], val[2], val[3], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[3].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1757) def _reduce_264(val, _values, result) checkpoint(val[0].location) case val[1] when AnsiFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) when KandRFunctionDeclarator result = KandRFunctionDefinition.new(val[0], val[1], [], val[2], @sym_tbl) when AbbreviatedFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) end result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1772) def _reduce_265(val, _values, result) checkpoint(val[0].location) result = KandRFunctionDefinition.new(nil, val[0], val[1], val[2], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1780) def _reduce_266(val, _values, result) checkpoint(val[0].location) case val[0] when AnsiFunctionDeclarator result = AnsiFunctionDefinition.new(nil, val[0], val[1], @sym_tbl) when KandRFunctionDeclarator result = KandRFunctionDefinition.new(nil, val[0], [], val[1], @sym_tbl) when AbbreviatedFunctionDeclarator result = AnsiFunctionDefinition.new(nil, val[0], val[1], @sym_tbl) end result.head_token = val[0].head_token result.tail_token = val[1].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1798) def _reduce_267(val, _values, result) checkpoint(val[0].location) result = KandRFunctionDefinition.new(val[0], val[1], val[2], val[3], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[3].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1806) def _reduce_268(val, _values, result) checkpoint(val[0].location) case val[1] when AnsiFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) when KandRFunctionDeclarator result = KandRFunctionDefinition.new(val[0], val[1], [], val[2], @sym_tbl) when AbbreviatedFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) end result.head_token = val[0].head_token result.tail_token = val[2].tail_token result end .,., module_eval(<<'.,.,', 'parser.y', 1824) def _reduce_269(val, _values, result) checkpoint(val[0].location) result = val result end .,., module_eval(<<'.,.,', 'parser.y', 1829) def _reduce_270(val, _values, result) checkpoint(val[0].first.location) result = val[0].push(val[1]) result end .,., def _reduce_none(val, _values, result) val[0] end end # class Parser end # module Cc1 end # module AdLint adlint-3.2.0/lib/adlint/cc1/option.rb0000644000004100000410000000331612224440633017346 0ustar www-datawww-data# Miscellaneous option constants. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cc1 #:nodoc: module InterpreterOptions QUIET = :quiet QUIET_WITHOUT_SIDE_EFFECT = :quiet_without_side_effect end module BranchOptions NARROWING = :narrowing WIDENING = :widening FIRST = :first FINAL = :final SMOTHER_BREAK = :smother_break IMPLICIT_COND = :implicit_cond COMPLEMENTAL = :complemental end module BranchGroupOptions COMPLETE = :complete ITERATION = :iteration end end end adlint-3.2.0/lib/adlint/cc1/scope.rb0000644000004100000410000000335412224440633017151 0ustar www-datawww-data# C runtime scope. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cc1 #:nodoc: class Scope def initialize(depth) @depth = depth end attr_reader :depth def global? @depth == 0 end def local? @depth > 0 end def inner_scope Scope.new(@depth + 1) end def outer_scope Scope.new(@depth - 1) end def eql?(rhs) @depth == rhs.depth end def hash @depth.hash end end class GlobalScope < Scope def initialize super(0) end end end end adlint-3.2.0/lib/adlint/cc1/seqp.rb0000644000004100000410000000544612224440633017014 0ustar www-datawww-data# Sequence points of C language evaluation. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/location" module AdLint #:nodoc: module Cc1 #:nodoc: # NOTE: The ISO C99 standard says; # # Annex C (informative) Sequence points # # 1 The following are the sequence points described in 5.1.2.3: # # -- The call to a function, after the arguments have been evaluated # (6.5.2.2). # -- The end of the first operand of the following operators: logical AND # && (6.5.13); logical OR || (6.5.14); conditional ? (6.5.15); comma , # (6.5.17). # -- The end of a full declarator: declarators (6.7.5). # -- The end of a full expression: an initializer (6.7.8); the expression # in an expression statement (6.8.3); the controlling expression of a # while or do statement (6.8.5); each of the expressions of a for # statement (6.8.5.3); the expression in a return statement (6.8.6.4). # -- Immediately before a library function returns (7.1.4). # -- After the actions associated with each formatted input/output function # conversion specifier (7.19.6, 7.24.2). # -- Immediately before and immediately after each call to a comparison # function, and also between any call to a comparison function and any # movement of the objects passed as arguments to that call (7.20.5). class SequencePoint include LocationHolder def initialize(lst_node, obvious = true) @last_node = lst_node @obvious = obvious end attr_reader :last_node def location @last_node.location end def obvious? @obvious end end end end adlint-3.2.0/lib/adlint/cc1/scanner.rb0000644000004100000410000001540112224440633017465 0ustar www-datawww-data# Scanner for C language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cc1 #:nodoc: # == DESCRIPTION # Constants for scanning the C source code. module ScannerConstants # === DESCRIPTION # C keywords table. KEYWORDS = { "sizeof" => :SIZEOF, "typedef" => :TYPEDEF, "extern" => :EXTERN, "static" => :STATIC, "auto" => :AUTO, "register" => :REGISTER, "inline" => :INLINE, "restrict" => :RESTRICT, "char" => :CHAR, "short" => :SHORT, "int" => :INT, "long" => :LONG, "signed" => :SIGNED, "unsigned" => :UNSIGNED, "float" => :FLOAT, "double" => :DOUBLE, "const" => :CONST, "volatile" => :VOLATILE, "void" => :VOID, "_Bool" => :BOOL, "_Complex" => :COMPLEX, "_Imaginary" => :IMAGINARY, "struct" => :STRUCT, "union" => :UNION, "enum" => :ENUM, "case" => :CASE, "default" => :DEFAULT, "if" => :IF, "else" => :ELSE, "switch" => :SWITCH, "while" => :WHILE, "do" => :DO, "for" => :FOR, "goto" => :GOTO, "continue" => :CONTINUE, "break" => :BREAK, "return" => :RETURN, "__typeof__" => :TYPEOF, "__alignof__" => :ALIGNOF }.freeze KEYWORD_VALUES = KEYWORDS.keys.to_set.freeze # === DESCRIPTION # C punctuators table. PUNCTUATORS = [ "{", "}", "(", ")", "[", "]", ";", ",", "::", ":", "?", "||", "|=", "|", "&&", "&=", "&", "^=", "^", "==", "=", "!=", "!", "<<=", "<=", "<<", "<", ">>=", ">=", ">>", ">", "+=", "++", "+", "->*", "->", "-=", "--", "-", "*=", "*", "/=", "/", "%=", "%", "...", ".*", ".", "~", ].to_set.freeze end # == DESCRIPTION # Utility module for scanning the C source code. module Scanner include ScannerConstants # === DESCRIPTION # Scans C identifier. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C identifier string if found at head of the content. def scan_identifier(cont) cont.scan(/[a-z_][a-z_0-9]*\b/i) end KEYWORDS_RE = Regexp.new(KEYWORD_VALUES.map { |keyword| "#{keyword}\\b" }.join("|")).freeze private_constant :KEYWORDS_RE # === DESCRIPTION # Scans C keyword. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C keyword string if found at head of the content. def scan_keyword(cont) cont.scan(KEYWORDS_RE) end PUNCTUATORS_RE = Regexp.new(PUNCTUATORS.sort { |a, b| b.length <=> a.length }.map { |punct| punct.each_char.map { |ch| '\\' + ch }.join }.join("|")).freeze private_constant :PUNCTUATORS_RE # === DESCRIPTION # Scans C punctuator. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C punctuator string if found at head of the content. def scan_punctuator(cont) cont.scan(PUNCTUATORS_RE) end # === DESCRIPTION # Scans C integer constant. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C integer constant string if found at head of the # content. def scan_integer_constant(cont) cont.scan(/(?:0x[0-9a-f]+|0b[01]+|[0-9]+)[UL]*/i) end FLOATING1_RE = /(?:[0-9]*\.[0-9]*E[+-]?[0-9]+|[0-9]+\.?E[+-]?[0-9]+)[FL]*/i FLOATING2_RE = /(?:[0-9]*\.[0-9]+|[0-9]+\.)[FL]*/i private_constant :FLOATING1_RE, :FLOATING2_RE # === DESCRIPTION # Scans C floating constant. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C floating constant string if found at head of the # content. def scan_floating_constant(cont) cont.scan(FLOATING1_RE) || cont.scan(FLOATING2_RE) end # === DESCRIPTION # Scans C character constant. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C character constant string if found at head of the # content. def scan_char_constant(cont) unless scanned = cont.scan(/L?'/i) return nil end until cont.empty? if str = cont.scan(/.*?(?=\\|')/m) scanned << str end next if cont.scan(/\\[ \t]*\n/) case when cont.check(/\\/) scanned << cont.eat!(2) when quote = cont.scan(/'/) scanned << quote break end end scanned end # === DESCRIPTION # Scans C string literal. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C string literal string if found at head of the # content. def scan_string_literal(cont) unless scanned = cont.scan(/L?"/i) return nil end until cont.empty? if str = cont.scan(/.*?(?=\\|")/m) scanned << str end next if cont.scan(/\\[ \t]*\n/) case when cont.check(/\\/) scanned << cont.eat!(2) when quote = cont.scan(/"/) scanned << quote break end end scanned end # === DESCRIPTION # Scans C NULL constant. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns C NULL constant string if found at head of the content. def scan_null_constant(cont) cont.scan(/NULL\b/) end end end end adlint-3.2.0/lib/adlint/cc1/parser.y0000644000004100000410000015102712224440633017202 0ustar www-datawww-data# The ISO C99 parser. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ class AdLint::Cc1::Parser token IDENTIFIER TYPEDEF_NAME CONSTANT STRING_LITERAL SIZEOF TYPEDEF EXTERN STATIC AUTO REGISTER INLINE RESTRICT CHAR SHORT INT LONG SIGNED UNSIGNED FLOAT DOUBLE CONST VOLATILE VOID BOOL COMPLEX IMAGINARY STRUCT UNION ENUM CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN NULL TYPEOF ALIGNOF start translation_unit expect 1 # NOTE: To ignore dangling-else shift/reduce conflict. rule # # Expressions # primary_expression : IDENTIFIER { checkpoint(val[0].location) result = ObjectSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | CONSTANT { checkpoint(val[0].location) result = ConstantSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | STRING_LITERAL { checkpoint(val[0].location) result = StringLiteralSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | NULL { checkpoint(val[0].location) result = NullConstantSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | "(" expression ")" { checkpoint(val[0].location) result = GroupedExpression.new(val[1]) result.head_token = val[0] result.tail_token = val[2] } | "(" compound_statement ")" { checkpoint(val[0].location) E(:E0013, val[0].location) result = ErrorExpression.new(val[0]) result.head_token = val[0] result.tail_token = val[2] } ; postfix_expression : primary_expression | postfix_expression "[" expression "]" { checkpoint(val[0].location) result = ArraySubscriptExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[3] } | postfix_expression "(" ")" { checkpoint(val[0].location) result = FunctionCallExpression.new(val[0], [], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] } | postfix_expression "(" argument_expression_list ")" { checkpoint(val[0].location) result = FunctionCallExpression.new(val[0], val[2], val [1]) result.head_token = val[0].head_token result.tail_token = val[3] } | postfix_expression "." IDENTIFIER { checkpoint(val[0].location) result = MemberAccessByValueExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] } | postfix_expression "->" IDENTIFIER { checkpoint(val[0].location) result = MemberAccessByPointerExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] } | postfix_expression "." CONSTANT { checkpoint(val[0].location) result = BitAccessByValueExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] } | postfix_expression "->" CONSTANT { checkpoint(val[0].location) result = BitAccessByPointerExpression.new(val[0], val[2], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] } | postfix_expression "++" { checkpoint(val[0].location) result = PostfixIncrementExpression.new(val[1], val[0]) result.head_token = val[0].head_token result.tail_token = val[1] } | postfix_expression "--" { checkpoint(val[0].location) result = PostfixDecrementExpression.new(val[1], val[0]) result.head_token = val[0].head_token result.tail_token = val[1] } | "(" type_name ")" "{" initializer_list "}" { checkpoint(val[0].location) result = CompoundLiteralExpression.new(val[1], val[4], val[0]) result.head_token = val[0] result.tail_token = val[5] } | "(" type_name ")" "{" initializer_list "," "}" { checkpoint(val[0].location) result = CompoundLiteralExpression.new(val[1], val[4], val[0]) result.head_token = val[0] result.tail_token = val[6] } ; argument_expression_list : assignment_expression { checkpoint(val[0].location) result = val } | argument_expression_list "," assignment_expression { checkpoint(val[0].first.location) result = val[0].push(val[2]) } ; unary_expression : postfix_expression | "++" unary_expression { checkpoint(val[0].location) result = PrefixIncrementExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | "--" unary_expression { checkpoint(val[0].location) result = PrefixDecrementExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | "&" cast_expression { checkpoint(val[0].location) result = AddressExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | "*" cast_expression { checkpoint(val[0].location) result = IndirectionExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | unary_arithmetic_operator cast_expression { checkpoint(val[0].location) result = UnaryArithmeticExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | SIZEOF unary_expression { checkpoint(val[0].location) result = SizeofExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | SIZEOF "(" type_name ")" { checkpoint(val[0].location) result = SizeofTypeExpression.new(val[0], val[2]) result.head_token = val[0] result.tail_token = val[3] } | ALIGNOF unary_expression { checkpoint(val[0].location) result = AlignofExpression.new(val[0], val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | ALIGNOF "(" type_name ")" { checkpoint(val[0].location) result = AlignofTypeExpression.new(val[0], val[2]) result.head_token = val[0] result.tail_token = val[3] } | "&&" unary_expression { checkpoint(val[0].location) E(:E0014, val[0].location, val[0].value) result = ErrorExpression.new(val[0]) result.head_token = val[0] result.tail_token = val[1].tail_token } ; unary_arithmetic_operator : "+" | "-" | "~" | "!" ; cast_expression : unary_expression | "(" type_name ")" cast_expression { checkpoint(val[0].location) result = CastExpression.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[3].tail_token } ; multiplicative_expression : cast_expression | multiplicative_expression "*" cast_expression { checkpoint(val[0].location) result = MultiplicativeExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | multiplicative_expression "/" cast_expression { checkpoint(val[0].location) result = MultiplicativeExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | multiplicative_expression "%" cast_expression { checkpoint(val[0].location) result = MultiplicativeExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; additive_expression : multiplicative_expression | additive_expression "+" multiplicative_expression { checkpoint(val[0].location) result = AdditiveExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | additive_expression "-" multiplicative_expression { checkpoint(val[0].location) result = AdditiveExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; shift_expression : additive_expression | shift_expression "<<" additive_expression { checkpoint(val[0].location) result = ShiftExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | shift_expression ">>" additive_expression { checkpoint(val[0].location) result = ShiftExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; relational_expression : shift_expression | relational_expression "<" shift_expression { checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | relational_expression ">" shift_expression { checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | relational_expression "<=" shift_expression { checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | relational_expression ">=" shift_expression { checkpoint(val[0].location) result = RelationalExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; equality_expression : relational_expression | equality_expression "==" relational_expression { checkpoint(val[0].location) result = EqualityExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | equality_expression "!=" relational_expression { checkpoint(val[0].location) result = EqualityExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; and_expression : equality_expression | and_expression "&" equality_expression { checkpoint(val[0].location) result = AndExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; exclusive_or_expression : and_expression | exclusive_or_expression "^" and_expression { checkpoint(val[0].location) result = ExclusiveOrExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; inclusive_or_expression : exclusive_or_expression | inclusive_or_expression "|" exclusive_or_expression { checkpoint(val[0].location) result = InclusiveOrExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; logical_and_expression : inclusive_or_expression | logical_and_expression "&&" inclusive_or_expression { checkpoint(val[0].location) result = LogicalAndExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; logical_or_expression : logical_and_expression | logical_or_expression "||" logical_and_expression { checkpoint(val[0].location) result = LogicalOrExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; conditional_expression : logical_or_expression | logical_or_expression "?" expression ":" conditional_expression { checkpoint(val[0].location) result = ConditionalExpression.new(val[0], val[2], val[4], val[1]) result.head_token = val[0].head_token result.tail_token = val[4].tail_token } ; assignment_expression : conditional_expression | cast_expression "=" assignment_expression { checkpoint(val[0].location) result = SimpleAssignmentExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | cast_expression compound_assignment_operator assignment_expression { checkpoint(val[0].location) result = CompoundAssignmentExpression.new(val[1], val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; compound_assignment_operator : "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "|=" ; expression : assignment_expression | expression "," assignment_expression { checkpoint(val[0].location) case val[0] when CommaSeparatedExpression result = val[0].push(val[2]) else result = CommaSeparatedExpression.new(val[0]).push(val[2]) end } ; constant_expression : conditional_expression ; # # Declarations # declaration : declaration_specifiers ";" { checkpoint(val[0].location) @lexer.enable_identifier_translation result = Declaration.new(val[0], [], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[1] } | declaration_specifiers init_declarator_list ";" { checkpoint(val[0].location) @lexer.enable_identifier_translation result = Declaration.new(val[0], val[1], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[2] result.items.each do |item| case item when TypedefDeclaration @lexer.add_typedef_name(item.identifier) when FunctionDeclaration, VariableDeclaration, VariableDefinition @lexer.add_object_name(item.identifier) end end } ; global_declaration : declaration | init_declarator_list ";" { checkpoint(val[0].first.location) result = Declaration.new(nil, val[0], @sym_tbl) result.head_token = val[0].first.head_token result.tail_token = val[1] } ; declaration_specifiers : storage_class_specifier { checkpoint(val[0].location) result = DeclarationSpecifiers.new result.storage_class_specifier = val[0] result.head_token = result.tail_token = val[0] } | declaration_specifiers storage_class_specifier { checkpoint(val[0].location) result = val[0] result.storage_class_specifier = val[1] result.tail_token = val[1] } | type_specifier { checkpoint(val[0].location) result = DeclarationSpecifiers.new result.type_specifiers.push(val[0]) result.head_token = val[0].head_token result.tail_token = val[0].tail_token } | declaration_specifiers type_specifier { checkpoint(val[0].location) result = val[0] result.type_specifiers.push(val[1]) result.tail_token = val[1].tail_token } | type_qualifier { checkpoint(val[0].location) result = DeclarationSpecifiers.new result.type_qualifiers.push(val[0]) result.head_token = result.tail_token = val[0] } | declaration_specifiers type_qualifier { checkpoint(val[0].location) result = val[0] result.type_qualifiers.push(val[1]) result.tail_token = val[1] } | function_specifier { checkpoint(val[0].location) result = DeclarationSpecifiers.new result.function_specifier = val[0] result.head_token = result.tail_token = val[0] } | declaration_specifiers function_specifier { checkpoint(val[0].location) result = val[0] result.function_specifier = val[1] result.tail_token = val[1] } ; init_declarator_list : init_declarator { checkpoint(val[0].location) result = val } | init_declarator_list "," init_declarator { checkpoint(val[0].first.location) result = val[0].push(val[2]) } ; init_declarator : declarator { checkpoint(val[0].location) result = InitDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token } | declarator "=" initializer { checkpoint(val[0].location) result = InitDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; storage_class_specifier : TYPEDEF | EXTERN | STATIC | AUTO | REGISTER ; type_specifier : VOID { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | CHAR { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | SHORT { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | INT { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | LONG { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | FLOAT { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | DOUBLE { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | SIGNED { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | UNSIGNED { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | BOOL { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | COMPLEX { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | IMAGINARY { checkpoint(val[0].location) @lexer.disable_identifier_translation result = StandardTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | TYPEDEF_NAME { checkpoint(val[0].location) @lexer.disable_identifier_translation result = TypedefTypeSpecifier.new(val[0]) result.head_token = result.tail_token = val[0] } | struct_or_union_specifier { checkpoint(val[0].location) @lexer.disable_identifier_translation result = val[0] } | enum_specifier { checkpoint(val[0].location) @lexer.disable_identifier_translation result = val[0] } | TYPEOF "(" constant_expression ")" { checkpoint(val[0].location) @lexer.disable_identifier_translation val[2].full = true result = TypeofTypeSpecifier.new(val[2], nil) result.head_token = val[0] result.tail_token = val[3] } | TYPEOF "(" type_name ")" { checkpoint(val[0].location) @lexer.disable_identifier_translation result = TypeofTypeSpecifier.new(nil, val[2]) result.head_token = val[0] result.tail_token = val[3] } ; struct_or_union_specifier : STRUCT IDENTIFIER "{" struct_declaration_list "}" { checkpoint(val[0].location) result = StructSpecifier.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[4] } | STRUCT IDENTIFIER "{" "}" { checkpoint(val[0].location) result = StructSpecifier.new(val[1], []) result.head_token = val[0] result.tail_token = val[3] } | UNION IDENTIFIER "{" struct_declaration_list "}" { checkpoint(val[0].location) result = UnionSpecifier.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[4] } | UNION IDENTIFIER "{" "}" { checkpoint(val[0].location) result = UnionSpecifier.new(val[1], []) result.head_token = val[0] result.tail_token = val[3] } | STRUCT "{" struct_declaration_list "}" { checkpoint(val[0].location) result = StructSpecifier.new(create_anon_tag_name(val[0]), val[2]) result.head_token = val[0] result.tail_token = val[3] } | STRUCT "{" "}" { checkpoint(val[0].location) result = StructSpecifier.new(create_anon_tag_name(val[0]), []) result.head_token = val[0] result.tail_token = val[2] } | UNION "{" struct_declaration_list "}" { checkpoint(val[0].location) result = UnionSpecifier.new(create_anon_tag_name(val[0]), val[2]) result.head_token = val[0] result.tail_token = val[3] } | UNION "{" "}" { checkpoint(val[0].location) result = UnionSpecifier.new(create_anon_tag_name(val[0]), []) result.head_token = val[0] result.tail_token = val[2] } | STRUCT IDENTIFIER { checkpoint(val[0].location) result = StructSpecifier.new(val[1], nil) result.head_token = val[0] result.tail_token = val[1] } | UNION IDENTIFIER { checkpoint(val[0].location) result = UnionSpecifier.new(val[1], nil) result.head_token = val[0] result.tail_token = val[1] } ; struct_declaration_list : struct_declaration { checkpoint(val[0].location) @lexer.enable_identifier_translation result = val } | struct_declaration_list struct_declaration { checkpoint(val[0].first.location) @lexer.enable_identifier_translation result = val[0].push(val[1]) } ; struct_declaration : specifier_qualifier_list ";" { checkpoint(val[0].location) result = StructDeclaration.new(val[0], []) result.head_token = val[0].head_token result.tail_token = val[1] } | specifier_qualifier_list struct_declarator_list ";" { checkpoint(val[0].location) result = StructDeclaration.new(val[0], val[1]) result.head_token = val[0].head_token result.tail_token = val[2] } ; specifier_qualifier_list : specifier_qualifier_list type_specifier { checkpoint(val[0].location) result = val[0] result.type_specifiers.push(val[1]) result.tail_token = val[1].tail_token } | type_specifier { checkpoint(val[0].location) result = SpecifierQualifierList.new result.type_specifiers.push(val[0]) result.head_token = val[0].head_token result.tail_token = val[0].tail_token } | specifier_qualifier_list type_qualifier { checkpoint(val[0].location) result = val[0] result.type_qualifiers.push(val[1]) result.tail_token = val[1] } | type_qualifier { checkpoint(val[0].location) result = SpecifierQualifierList.new result.type_qualifiers.push(val[0]) result.head_token = result.tail_token = val[0] } ; struct_declarator_list : struct_declarator { checkpoint(val[0].location) result = val } | struct_declarator_list "," struct_declarator { checkpoint(val[0].first.location) result = val[0].push(val[2]) } ; struct_declarator : declarator { checkpoint(val[0].location) result = StructDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token } | ":" constant_expression { checkpoint(val[0].location) val[1].full = true result = StructDeclarator.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[1].tail_token } | declarator ":" constant_expression { checkpoint(val[0].location) val[2].full = true result = StructDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; enum_specifier : ENUM "{" enumerator_list "}" { checkpoint(val[0].location) result = EnumSpecifier.new(create_anon_tag_name(val[0]), val[2]) result.head_token = val[0] result.tail_token = val[3] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end } | ENUM IDENTIFIER "{" enumerator_list "}" { checkpoint(val[0].location) result = EnumSpecifier.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[4] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end } | ENUM "{" enumerator_list "," "}" { checkpoint(val[0].location) result = EnumSpecifier.new(create_anon_tag_name(val[0]), val[2], val[3]) result.head_token = val[0] result.tail_token = val[4] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end } | ENUM IDENTIFIER "{" enumerator_list "," "}" { checkpoint(val[0].location) result = EnumSpecifier.new(val[1], val[3], val[4]) result.head_token = val[0] result.tail_token = val[5] result.enumerators.each do |enum| @lexer.add_enumerator_name(enum.identifier) end } | ENUM IDENTIFIER { checkpoint(val[0].location) result = EnumSpecifier.new(val[1], nil) result.head_token = val[0] result.tail_token = val[1] } ; enumerator_list : enumerator { checkpoint(val[0].location) result = val } | enumerator_list "," enumerator { checkpoint(val[0].first.location) result = val[0].push(val[2]) } ; enumerator : enumerator_name { checkpoint(val[0].location) sym = @sym_tbl.create_new_symbol(EnumeratorName, val[0]) result = Enumerator.new(val[0], nil, sym) result.head_token = result.tail_token = val[0] } | enumerator_name "=" constant_expression { checkpoint(val[0].location) val[2].full = true sym = @sym_tbl.create_new_symbol(EnumeratorName, val[0]) result = Enumerator.new(val[0], val[2], sym) result.head_token = val[0] result.tail_token = val[2].tail_token } ; enumerator_name : IDENTIFIER | TYPEDEF_NAME { result = val[0].class.new(:IDENTIFIER, val[0].value, val[0].location) } ; type_qualifier : CONST | VOLATILE | RESTRICT ; function_specifier : INLINE ; declarator : pointer direct_declarator { checkpoint(val[0].first.location) result = val[1] result.pointer = val[0] result.head_token = val[0].first result.full = true } | direct_declarator { checkpoint(val[0].location) result = val[0] result.full = true } ; direct_declarator : IDENTIFIER { checkpoint(val[0].location) @lexer.enable_identifier_translation result = IdentifierDeclarator.new(val[0]) result.head_token = result.tail_token = val[0] } | "(" declarator ")" { checkpoint(val[0].location) result = GroupedDeclarator.new(val[1]) result.head_token = val[0] result.tail_token = val[2] } | direct_declarator "[" type_qualifier_list assignment_expression "]" { checkpoint(val[0].location) val[3].full = true result = ArrayDeclarator.new(val[0], val[3]) result.head_token = val[0].head_token result.tail_token = val[4] } | direct_declarator "[" type_qualifier_list "]" { checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[3] } | direct_declarator "[" assignment_expression "]" { checkpoint(val[0].location) val[2].full = true result = ArrayDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[3] } | direct_declarator "[" STATIC type_qualifier_list assignment_expression "]" { checkpoint(val[0].location) val[4].full = true result = ArrayDeclarator.new(val[0], val[4]) result.head_token = val[0].head_token result.tail_token = val[5] } | direct_declarator "[" type_qualifier_list STATIC assignment_expression "]" { checkpoint(val[0].location) val[4].full = true result = ArrayDeclarator.new(val[0], val[4]) result.head_token = val[0].head_token result.tail_token = val[5] } | direct_declarator "[" type_qualifier_list "*" "]" { checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[4] } | direct_declarator "[" "*" "]" { checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[3] } | direct_declarator "[" "]" { checkpoint(val[0].location) result = ArrayDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[2] } | direct_declarator "(" { @lexer.enable_identifier_translation } parameter_type_list ")" { checkpoint(val[0].location) result = AnsiFunctionDeclarator.new(val[0], val[3]) result.head_token = val[0].head_token result.tail_token = val[4] } | direct_declarator "(" identifier_list ")" { checkpoint(val[0].location) result = KandRFunctionDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[3] } | direct_declarator "(" ")" { checkpoint(val[0].location) result = AbbreviatedFunctionDeclarator.new(val[0]) result.head_token = val[0].head_token result.tail_token = val[2] } ; pointer : "*" { checkpoint(val[0].location) result = val } | "*" type_qualifier_list { checkpoint(val[0].location) result = val[1].unshift(val[0]) } | "*" pointer { checkpoint(val[0].location) result = val[1].unshift(val[0]) } | "*" type_qualifier_list pointer { checkpoint(val[0].location) result = val[1].unshift(val[0]).concat(val[2]) } ; type_qualifier_list : type_qualifier { checkpoint(val[0].location) result = val } | type_qualifier_list type_qualifier { checkpoint(val[0].first.location) result = val[0].push(val[1]) } ; parameter_type_list : parameter_list { checkpoint(val[0].first.location) result = ParameterTypeList.new(val[0], false) result.head_token = val[0].first.head_token result.tail_token = val[0].last.tail_token } | parameter_list "," "..." { checkpoint(val[0].first.location) result = ParameterTypeList.new(val[0], true) result.head_token = val[0].first.head_token result.tail_token = val[2] } ; parameter_list : parameter_declaration { checkpoint(val[0].location) result = val } | parameter_list "," parameter_declaration { checkpoint(val[0].first.location) result = val[0].push(val[2]) } ; parameter_declaration : declaration_specifiers declarator { checkpoint(val[0].location) @lexer.enable_identifier_translation result = ParameterDeclaration.new(val[0], val[1]) result.head_token = val[0].head_token result.tail_token = val[1].tail_token } | declaration_specifiers abstract_declarator { checkpoint(val[0].location) @lexer.enable_identifier_translation result = ParameterDeclaration.new(val[0], val[1]) result.head_token = val[0].head_token result.tail_token = val[1].tail_token } | declaration_specifiers { checkpoint(val[0].location) @lexer.enable_identifier_translation result = ParameterDeclaration.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token } ; identifier_list : IDENTIFIER { checkpoint(val[0].location) result = val } | identifier_list "," IDENTIFIER { checkpoint(val[0].first.location) result = val[0].push(val[2]) } ; type_name : specifier_qualifier_list { checkpoint(val[0].location) @lexer.enable_identifier_translation result = TypeName.new(val[0], nil, @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[0].tail_token } | specifier_qualifier_list abstract_declarator { checkpoint(val[0].location) @lexer.enable_identifier_translation result = TypeName.new(val[0], val[1], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[1].tail_token } ; abstract_declarator : pointer { checkpoint(val[0].first.location) @lexer.enable_identifier_translation result = PointerAbstractDeclarator.new(nil, val[0]) result.head_token = val[0].first result.tail_token = val[0].last result.full = true } | pointer direct_abstract_declarator { checkpoint(val[0].first.location) @lexer.enable_identifier_translation result = PointerAbstractDeclarator.new(val[1], val[0]) result.head_token = val[0].first result.tail_token = val[1].tail_token result.full = true } | direct_abstract_declarator { checkpoint(val[0].location) result = val[0] result.full = true } ; direct_abstract_declarator : "(" abstract_declarator ")" { checkpoint(val[0].location) result = GroupedAbstractDeclarator.new(val[1]) result.head_token = val[0] result.tail_token = val[2] } | "[" "]" { checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(nil, nil) result.head_token = val[0] result.tail_token = val[1] } | "[" assignment_expression "]" { checkpoint(val[0].location) val[1].full = true result = ArrayAbstractDeclarator.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[2] } | direct_abstract_declarator "[" "]" { checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[2] } | direct_abstract_declarator "[" assignment_expression "]" { checkpoint(val[0].location) val[2].full = true result = ArrayAbstractDeclarator.new(val[0], val[2]) result.head_token = val[0].head_token result.tail_token = val[3] } | "[" "*" "]" { checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(nil, nil) result.head_token = val[0] result.tail_token = val[2] } | direct_abstract_declarator "[" "*" "]" { checkpoint(val[0].location) result = ArrayAbstractDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[3] } | "(" ")" { checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(nil, nil) result.head_token = val[0] result.tail_token = val[1] } | "(" { @lexer.enable_identifier_translation } parameter_type_list ")" { checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(nil, val[2]) result.head_token = val[0] result.tail_token = val[3] } | direct_abstract_declarator "(" ")" { checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[2] } | direct_abstract_declarator "(" { @lexer.enable_identifier_translation } parameter_type_list ")" { checkpoint(val[0].location) result = FunctionAbstractDeclarator.new(val[0], val[3]) result.head_token = val[0].head_token result.tail_token = val[4] } ; initializer : assignment_expression { checkpoint(val[0].location) val[0].full = true result = Initializer.new(val[0], nil) result.head_token = val[0].head_token result.tail_token = val[0].tail_token } | "{" "}" { checkpoint(val[0].location) result = Initializer.new(nil, nil) result.head_token = val[0] result.tail_token = val[1] } | "{" initializer_list "}" { checkpoint(val[0].location) result = Initializer.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[2] } | "{" initializer_list "," "}" { checkpoint(val[0].location) result = Initializer.new(nil, val[1]) result.head_token = val[0] result.tail_token = val[3] } ; initializer_list : initializer { checkpoint(val[0].location) result = val } | designation initializer { checkpoint(val[1].location) result = [val[1]] } | initializer_list "," initializer { checkpoint(val[0].first.location) result = val[0].push(val[2]) } | initializer_list "," designation initializer { checkpoint(val[0].first.location) result = val[0].push(val[3]) } ; designation : designator_list "=" ; designator_list : designator | designator_list designator ; designator : "[" constant_expression "]" | "." IDENTIFIER ; # # Statements # statement : labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement ; labeled_statement : label_name ":" statement { checkpoint(val[0].location) result = GenericLabeledStatement.new(val[0], val[2]) result.head_token = val[0] result.tail_token = val[2].tail_token } | CASE constant_expression ":" statement { checkpoint(val[0].location) val[1].full = true result = CaseLabeledStatement.new(val[1], val[3]) result.head_token = val[0] result.tail_token = val[3].tail_token } | DEFAULT ":" statement { checkpoint(val[0].location) result = DefaultLabeledStatement.new(val[2]) result.head_token = val[0] result.tail_token = val[2].tail_token } ; label_name : IDENTIFIER | TYPEDEF_NAME { result = val[0].class.new(:IDENTIFIER, val[0].value, val[0].location) } ; compound_statement : "{" "}" { checkpoint(val[0].location) result = CompoundStatement.new([]) result.head_token = val[0] result.tail_token = val[1] } | "{" { @lexer.enter_scope } block_item_list { @lexer.leave_scope } "}" { checkpoint(val[0].location) result = CompoundStatement.new(val[2]) result.head_token = val[0] result.tail_token = val[4] } ; block_item_list : block_item { checkpoint(val[0].location) result = val } | block_item_list block_item { checkpoint(val[0].first.location) result = val[0].push(val[1]) } ; block_item : declaration | statement | local_function_definition ; expression_statement : ";" { checkpoint(val[0].location) result = ExpressionStatement.new(nil) result.head_token = result.tail_token = val[0] } | expression ";" { checkpoint(val[0].location) val[0].full = true result = ExpressionStatement.new(val[0]) result.head_token = val[0].head_token result.tail_token = val[1] } ; selection_statement : IF "(" expression ")" statement { checkpoint(val[0].location) val[2].full = true result = IfStatement.new(val[2], val[4], val[3]) result.head_token = val[0] result.tail_token = val[4].tail_token } | IF "(" expression ")" statement ELSE statement { checkpoint(val[0].location) val[2].full = true result = IfElseStatement.new(val[2], val[4], val[6], val[3], val[5]) result.head_token = val[0] result.tail_token = val[6].tail_token } | SWITCH "(" expression ")" statement { checkpoint(val[0].location) val[2].full = true result = SwitchStatement.new(val[2], val[4]) result.head_token = val[0] result.tail_token = val[4].tail_token } ; iteration_statement : WHILE "(" expression ")" statement { checkpoint(val[0].location) val[2].full = true result = WhileStatement.new(val[2], val[4], val[3]) result.head_token = val[0] result.tail_token = val[4].tail_token } | DO statement WHILE "(" expression ")" ";" { checkpoint(val[0].location) val[4].full = true result = DoStatement.new(val[1], val[4], val[0], val[2]) result.head_token = val[0] result.tail_token = val[6] } | FOR "(" expression_statement expression_statement ")" statement { checkpoint(val[0].location) result = ForStatement.new(val[2], val[3], nil, val[5], val[4]) result.head_token = val[0] result.tail_token = val[5].tail_token } | FOR "(" expression_statement expression_statement expression ")" statement { checkpoint(val[0].location) val[4].full = true result = ForStatement.new(val[2], val[3], val[4], val[6], val[5]) result.head_token = val[0] result.tail_token = val[6].tail_token } | FOR "(" declaration expression_statement ")" statement { checkpoint(val[0].location) result = C99ForStatement.new(val[2], val[3], nil, val[5], val[4]) result.head_token = val[0] result.tail_token = val[5].tail_token } | FOR "(" declaration expression_statement expression ")" statement { checkpoint(val[0].location) val[4].full = true result = C99ForStatement.new(val[2], val[3], val[4], val[6], val[5]) result.head_token = val[0] result.tail_token = val[6].tail_token } ; jump_statement : GOTO label_name ";" { checkpoint(val[0].location) result = GotoStatement.new(val[1]) result.head_token = val[0] result.tail_token = val[2] } | GOTO "*" expression ";" { checkpoint(val[0].location) E(:E0015, val[1].location, val[1].value) result = ErrorStatement.new(val[1]) result.head_token = val[0] result.tail_token = val[3] } | CONTINUE ";" { checkpoint(val[0].location) result = ContinueStatement.new result.head_token = val[0] result.tail_token = val[1] } | BREAK ";" { checkpoint(val[0].location) result = BreakStatement.new result.head_token = val[0] result.tail_token = val[1] } | RETURN ";" { checkpoint(val[0].location) result = ReturnStatement.new(nil) result.head_token = val[0] result.tail_token = val[1] } | RETURN expression ";" { checkpoint(val[0].location) val[1].full = true result = ReturnStatement.new(val[1]) result.head_token = val[0] result.tail_token = val[2] } ; # # External definitions # translation_unit : { result = TranslationUnit.new } | translation_unit external_declaration { checkpoint(val[0].location) result = val[0] result.push(val[1]) } ; external_declaration : function_definition | global_declaration ; function_definition : declaration_specifiers declarator declaration_list compound_statement { checkpoint(val[0].location) result = KandRFunctionDefinition.new(val[0], val[1], val[2], val[3], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[3].tail_token } | declaration_specifiers declarator compound_statement { checkpoint(val[0].location) case val[1] when AnsiFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) when KandRFunctionDeclarator result = KandRFunctionDefinition.new(val[0], val[1], [], val[2], @sym_tbl) when AbbreviatedFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) end result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | declarator declaration_list compound_statement { checkpoint(val[0].location) result = KandRFunctionDefinition.new(nil, val[0], val[1], val[2], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[2].tail_token } | declarator compound_statement { checkpoint(val[0].location) case val[0] when AnsiFunctionDeclarator result = AnsiFunctionDefinition.new(nil, val[0], val[1], @sym_tbl) when KandRFunctionDeclarator result = KandRFunctionDefinition.new(nil, val[0], [], val[1], @sym_tbl) when AbbreviatedFunctionDeclarator result = AnsiFunctionDefinition.new(nil, val[0], val[1], @sym_tbl) end result.head_token = val[0].head_token result.tail_token = val[1].tail_token } ; local_function_definition : declaration_specifiers declarator declaration_list compound_statement { checkpoint(val[0].location) result = KandRFunctionDefinition.new(val[0], val[1], val[2], val[3], @sym_tbl) result.head_token = val[0].head_token result.tail_token = val[3].tail_token } | declaration_specifiers declarator compound_statement { checkpoint(val[0].location) case val[1] when AnsiFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) when KandRFunctionDeclarator result = KandRFunctionDefinition.new(val[0], val[1], [], val[2], @sym_tbl) when AbbreviatedFunctionDeclarator result = AnsiFunctionDefinition.new(val[0], val[1], val[2], @sym_tbl) end result.head_token = val[0].head_token result.tail_token = val[2].tail_token } ; declaration_list : declaration { checkpoint(val[0].location) result = val } | declaration_list declaration { checkpoint(val[0].first.location) result = val[0].push(val[1]) } ; end ---- header require "adlint/error" require "adlint/symbol" require "adlint/monitor" require "adlint/util" require "adlint/cc1/lexer" require "adlint/cc1/syntax" ---- inner include ReportUtil include MonitorUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt @lexer = create_lexer(phase_ctxt[:cc1_source]) @sym_tbl = phase_ctxt[:symbol_table] @token_array = [] @anon_tag_no = 0 end attr_reader :token_array def execute do_parse end extend Pluggable def_plugin :on_string_literals_concatenated private def create_lexer(pp_src) Lexer.new(pp_src).tap { |lexer| attach_lexer_plugin(lexer) } end def attach_lexer_plugin(lexer) lexer.on_string_literals_concatenated += lambda { |*args| on_string_literals_concatenated.invoke(*args) } end def next_token if tok = @lexer.next_token @token_array.push(tok) [tok.type, tok] else nil end end def on_error(err_tok, err_val, *) if fst_tok = @token_array[-2] and snd_tok = @token_array[-1] E(:E0008, loc_of(fst_tok), "#{val_of(fst_tok)} #{val_of(snd_tok)}") raise ParseError.new(loc_of(fst_tok), @phase_ctxt.msg_fpath, @phase_ctxt.log_fpath) else E(:E0008, loc_of(err_val), val_of(err_val)) raise ParseError.new(loc_of(err_val), @phase_ctxt.msg_fpath, @phase_ctxt.log_fpath) end end def loc_of(val) val == "$" ? Location.new : val.location end def val_of(tok) tok == "$" ? "EOF" : tok.value end def create_anon_tag_name(base_tok) Token.new(:IDENTIFIER, "__adlint__anon_#{@anon_tag_no += 1}", base_tok.location) end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def_delegator :@phase_ctxt, :monitor private :monitor # vim:ft=racc:sw=2:ts=2:sts=2:et: adlint-3.2.0/lib/adlint/cc1/type.rb0000644000004100000410000063152512224440633017030 0ustar www-datawww-data# C type models. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/traits" require "adlint/token" require "adlint/util" require "adlint/cc1/syntax" require "adlint/cc1/scope" require "adlint/cc1/object" require "adlint/cc1/conv" require "adlint/cc1/option" require "adlint/cc1/operator" module AdLint #:nodoc: module Cc1 #:nodoc: module StandardTypeCatalogAccessor # NOTE: Host class must respond to #standard_type_catalog. extend Forwardable def_delegator :standard_type_catalog, :void_t def_delegator :standard_type_catalog, :char_t def_delegator :standard_type_catalog, :signed_char_t def_delegator :standard_type_catalog, :unsigned_char_t def_delegator :standard_type_catalog, :short_t def_delegator :standard_type_catalog, :signed_short_t def_delegator :standard_type_catalog, :unsigned_short_t def_delegator :standard_type_catalog, :short_int_t def_delegator :standard_type_catalog, :signed_short_int_t def_delegator :standard_type_catalog, :unsigned_short_int_t def_delegator :standard_type_catalog, :int_t def_delegator :standard_type_catalog, :signed_t def_delegator :standard_type_catalog, :signed_int_t def_delegator :standard_type_catalog, :unsigned_t def_delegator :standard_type_catalog, :unsigned_int_t def_delegator :standard_type_catalog, :long_t def_delegator :standard_type_catalog, :signed_long_t def_delegator :standard_type_catalog, :unsigned_long_t def_delegator :standard_type_catalog, :long_int_t def_delegator :standard_type_catalog, :signed_long_int_t def_delegator :standard_type_catalog, :unsigned_long_int_t def_delegator :standard_type_catalog, :long_long_t def_delegator :standard_type_catalog, :signed_long_long_t def_delegator :standard_type_catalog, :unsigned_long_long_t def_delegator :standard_type_catalog, :long_long_int_t def_delegator :standard_type_catalog, :signed_long_long_int_t def_delegator :standard_type_catalog, :unsigned_long_long_int_t def_delegator :standard_type_catalog, :extended_big_int_t def_delegator :standard_type_catalog, :float_t def_delegator :standard_type_catalog, :double_t def_delegator :standard_type_catalog, :long_double_t end # == DESCRIPTION # === Type class hierarchy # Type # <-- UndeclaredType # <-- UnresolvedType # <-- QualifiedType # <-- VoidType # <-- FunctionType # <-- ScalarDataType --------> UsualArithmeticTypeConversion <> # <-- IntegerType # <-- StandardIntegerType # <-- CharType # <-- SignedCharType # <-- UnsignedCharType # <-- ShortType # <-- SignedShortType # <-- UnsignedShortType # <-- ShortIntType # <-- SignedShortIntType # <-- UnsignedShortIntType # <-- IntType # <-- SignedType # <-- SignedIntType # <-- UnsignedType # <-- UnsignedIntType # <-- LongType # <-- SignedLongType # <-- UnsignedLongType # <-- LongIntType # <-- SignedLongIntType # <-- UnsignedLongIntType # <-- LongLongType # <-- SignedLongLongType # <-- UnsignedLongLongType # <-- LongLongIntType # <-- SignedLongLongIntType # <-- UnsignedLongLongIntType # <-- ExtendedBigIntType # <-- BitfieldType # <-- EnumType ----------------------> Scopeable <> # <-- PointerType ^ # <-- FloatingType | # <-- StandardFloatingType | # <-- FloatType | # <-- DoubleType | # <-- LongDoubleType | # <-- ArrayType | # <-- CompositeDataType -------------------------------+ # <-- StructType | # <-- UnionType | # <-- UserType ----------------------------------------+ # <-- ParameterType -----------------------------------+ class Type include Visitable include StandardTypeCatalogAccessor include ArithmeticAccessor include StandardTypesAccessor def initialize(type_tbl, name, type_dcls = []) @type_table = type_tbl @name = name @declarations = type_dcls end attr_reader :type_table attr_reader :name attr_reader :declarations def id subclass_responsibility end def image subclass_responsibility end def brief_image subclass_responsibility end def location subclass_responsibility end def bit_size subclass_responsibility end def byte_size (bit_size / 8.0).ceil end def bit_alignment subclass_responsibility end def byte_alignment (bit_alignment / 8.0).ceil end def aligned_bit_size bit_size + (bit_alignment - bit_size) end def aligned_byte_size (aligned_bit_size / 8.0).ceil end def real_type subclass_responsibility end def base_type subclass_responsibility end def unqualify subclass_responsibility end def incomplete? subclass_responsibility end def compatible?(to_type) subclass_responsibility end def coercible?(to_type) subclass_responsibility end def convertible?(to_type) self.same_as?(to_type) end def more_cv_qualified?(than_type) false end def same_as?(type) self.real_type.unqualify == type.real_type.unqualify end def parameter? false end def scalar? subclass_responsibility end def integer? subclass_responsibility end def floating? subclass_responsibility end def array? subclass_responsibility end def composite? struct? || union? end def struct? subclass_responsibility end def union? subclass_responsibility end def pointer? subclass_responsibility end def qualified? subclass_responsibility end def function? subclass_responsibility end def enum? subclass_responsibility end def user? subclass_responsibility end def void? subclass_responsibility end def standard? subclass_responsibility end def undeclared? subclass_responsibility end def unresolved? subclass_responsibility end def const? subclass_responsibility end def volatile? subclass_responsibility end def restrict? subclass_responsibility end def bitfield? subclass_responsibility end def signed? subclass_responsibility end def unsigned? !signed? end def explicitly_signed? subclass_responsibility end def have_va_list? subclass_responsibility end def return_type subclass_responsibility end def parameter_types subclass_responsibility end def enumerators subclass_responsibility end def length subclass_responsibility end def length=(len) subclass_responsibility end def impl_length subclass_responsibility end def members subclass_responsibility end def member_named(name) subclass_responsibility end def min subclass_responsibility end def max subclass_responsibility end def nil_value subclass_responsibility end def zero_value subclass_responsibility end def arbitrary_value subclass_responsibility end def undefined_value subclass_responsibility end def parameter_value subclass_responsibility end def return_value subclass_responsibility end def coerce_scalar_value(val) subclass_responsibility end def coerce_array_value(val) subclass_responsibility end def coerce_composite_value(val) subclass_responsibility end def integer_conversion_rank subclass_responsibility end def integer_promoted_type subclass_responsibility end def argument_promoted_type subclass_responsibility end def arithmetic_type_with(type) subclass_responsibility end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_void(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_function(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_char(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_short(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_long(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_float(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_double(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_array(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_union(lhs_type, rhs_type = self) subclass_responsibility end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) subclass_responsibility end def corresponding_signed_type subclass_responsibility end def corresponding_unsigned_type subclass_responsibility end def ==(rhs_type) case rhs_type when Type id == rhs_type.id else super end end def dup subclass_responsibility end def inspect if @name == image if location "#{@name} (#{location.inspect})" else @name end else if location "#{@name}=>#{image} (#{location.inspect})" else "#{@name}=>#{image}" end end end extend Forwardable def_delegator :@type_table, :traits private :traits def_delegator :@type_table, :standard_type_catalog private :standard_type_catalog end class TypeId def initialize(val) @value = val end def ==(rhs_id) @value == rhs_id.value end def eql?(rhs_id) self == rhs_id end def hash @value.hash end protected attr_reader :value end class StandardTypeId < TypeId def initialize(name) super(name.split(" ").sort.join(" ")) end end class UndeclaredType < Type def initialize(type_tbl) super(type_tbl, "__adlint__undeclared_type") end def id @id ||= TypeId.new(name) end def image name end def brief_image name end def location nil end def bit_size 0 end def bit_alignment 0 end def real_type self end def base_type self end def unqualify self end def incomplete? true end def compatible?(to_type) false end def coercible?(to_type) false end def convertible?(to_type) false end def same_as?(type) false end def scalar? false end def integer? false end def floating? false end def array? false end def struct? false end def union? false end def pointer? false end def qualified? false end def function? false end def enum? false end def user? false end def void? false end def standard? false end def undeclared? true end def unresolved? false end def const? false end def volatile? false end def restrict? false end def bitfield? false end def signed? false end def explicitly_signed? false end def have_va_list? false end def return_type self end def parameter_types [] end def enumerators [] end def length 0 end def impl_length 0 end def members [] end def member_named(name) nil end def min 0 end def max 0 end def nil_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def zero_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def arbitrary_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def undefined_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def parameter_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def return_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_scalar_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_array_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_composite_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def integer_conversion_rank 0 # NOTREACHED end def integer_promoted_type self # NOTREACHED end def argument_promoted_type self # NOTREACHED end def arithmetic_type_with(type) # NOTE: An arithmetic operation with UndeclaredType must not be executed! type._arithmetic_type_with_undeclared(self) end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_void(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_function(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `char' and UndeclaredType # makes integer-promoted type of `char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed char' and UndeclaredType # makes integer-promoted type of `signed char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned char' and UndeclaredType # makes integer-promoted type of `unsigned char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `short' and UndeclaredType # makes integer-promoted type of `short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed short' and UndeclaredType # makes integer-promoted type of `signed short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned short' and UndeclaredType # makes integer-promoted type of `unsigned short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `short int' and UndeclaredType # makes integer-promoted type of `short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed short int' and UndeclaredType # makes integer-promoted type of `signed short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned short int' and UndeclaredType # makes integer-promoted type of `unsigned short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `int' and UndeclaredType makes `int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed' and UndeclaredType makes `signed'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed int' and UndeclaredType # makes `signed int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned' and UndeclaredType # makes `unsigned'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned int' and UndeclaredType # makes `unsigned int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `long' and UndeclaredType makes `long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed long' and UndeclaredType # makes `signed long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned long' and UndeclaredType # makes `unsigned long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `long int' and UndeclaredType # makes `long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed long int' and UndeclaredType # makes `signed long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned long int' and UndeclaredType # makes `unsigned long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `long long' and UndeclaredType # makes `long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed long long' and UndeclaredType # makes `signed long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned long long' and UndeclaredType # makes `unsigned long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `long long int' and UndeclaredType # makes `long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `signed long long int' and UndeclaredType # makes `signed long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `unsigned long long int' and UndeclaredType # makes `unsigned long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_float(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `float' and UndeclaredType makes `float'. lhs_type # NOTREACHED end def _arithmetic_type_with_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `double' and UndeclaredType makes `double'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with `long double' and UndeclaredType # makes `long double'. lhs_type # NOTREACHED end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with BitfieldType and UndeclaredType # makes integer-promoted type of BitfieldType. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with EnumType and UndeclaredType makes EnumType. lhs_type # NOTREACHED end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with PointerType and UndeclaredType # makes PointerType. lhs_type # NOTREACHED end def _arithmetic_type_with_array(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_union(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UndeclaredType must not be executed! # NOTE: Binary operation with ExtendedBigIntType and UndeclaredType # makes ExtendedBigIntType. lhs_type # NOTREACHED end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup UndeclaredType.new(type_table) end end class UnresolvedType < Type def initialize(type_tbl) super(type_tbl, "__adlint__unresolved_type") end def id @id ||= TypeId.new(name) end def image name end def brief_image name end def location nil end def bit_size 0 end def bit_alignment 0 end def real_type self end def base_type self end def unqualify self end def incomplete? true end def compatible?(to_type) false end def coercible?(to_type) false end def convertible?(to_type) false end def same_as?(type) false end def scalar? false end def integer? false end def floating? false end def array? false end def struct? false end def union? false end def pointer? false end def qualified? false end def function? false end def enum? false end def user? false end def void? false end def standard? false end def undeclared? false end def unresolved? true end def const? false end def volatile? false end def restrict? false end def bitfield? false end def signed? false end def explicitly_signed? false end def have_va_list? false end def return_type self end def parameter_types [] end def enumerators [] end def length 0 end def impl_length 0 end def members [] end def member_named(name) nil end def min 0 end def max 0 end def nil_value ScalarValue.of_nil(logical_right_shift?) end def zero_value ScalarValue.of_nil(logical_right_shift?) end def arbitrary_value ScalarValue.of_nil(logical_right_shift?) end def undefined_value ScalarValue.of_nil(logical_right_shift?) end def parameter_value ScalarValue.of_nil(logical_right_shift?) end def return_value ScalarValue.of_nil(logical_right_shift?) end def coerce_scalar_value(val) ScalarValue.of_nil(logical_right_shift?) end def coerce_array_value(val) ScalarValue.of_nil(logical_right_shift?) end def coerce_composite_value(val) ScalarValue.of_nil(logical_right_shift?) end def integer_conversion_rank 0 # NOTREACHED end def integer_promoted_type self # NOTREACHED end def argument_promoted_type self # NOTREACHED end def arithmetic_type_with(type) # NOTE: An arithmetic operation with UnresolvedType must not be executed! type._arithmetic_type_with_unresolved(self) end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_void(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_function(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `char' and UnresolvedType # makes integer-promoted type of `char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed char' and UnresolvedType # makes integer-promoted type of `signed char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned char' and UnresolvedType # makes integer-promoted type of `unsigned char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `short' and UnresolvedType # makes integer-promoted type of `short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed short' and UnresolvedType # makes integer-promoted type of `signed short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned short' and UnresolvedType # makes integer-promoted type of `unsigned short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `short int' and UnresolvedType # makes integer-promoted type of `short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed short int' and UnresolvedType # makes integer-promoted type of `signed short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned short int' and UnresolvedType # makes integer-promoted type of `unsigned short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `int' and UnresolvedType makes `int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed' and UnresolvedType makes `signed'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed int' and UnresolvedType # makes `signed int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned' and UnresolvedType # makes `unsigned'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned int' and UnresolvedType # makes `unsigned int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `long' and UnresolvedType makes `long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed long' and UnresolvedType # makes `signed long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned long' and UnresolvedType # makes `unsigned long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `long int' and UnresolvedType # makes `long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed long int' and UnresolvedType # makes `signed long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned long int' and UnresolvedType # makes `unsigned long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `long long' and UnresolvedType # makes `long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed long long' and UnresolvedType # makes `signed long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned long long' and UnresolvedType # makes `unsigned long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `long long int' and UnresolvedType # makes `long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `signed long long int' and UnresolvedType # makes `signed long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `unsigned long long int' and UnresolvedType # makes `unsigned long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_float(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `float' and UnresolvedType makes `float'. lhs_type # NOTREACHED end def _arithmetic_type_with_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `double' and UnresolvedType makes `double'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with `long double' and UnresolvedType # makes `long double'. lhs_type # NOTREACHED end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with BitfieldType and UnresolvedType # makes integer-promoted type of BitfieldType. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with EnumType and UnresolvedType makes EnumType. lhs_type # NOTREACHED end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with PointerType and UnresolvedType # makes PointerType. lhs_type # NOTREACHED end def _arithmetic_type_with_array(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_union(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with UnresolvedType must not be executed! # NOTE: Binary operation with ExtendedBigIntType and UnresolvedType # makes ExtendedBigIntType. lhs_type # NOTREACHED end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup UnresolvedType.new(type_table) end end class QualifiedType < Type def initialize(type_tbl, base_type, *cvr_quals) super(type_tbl, create_name(base_type, cvr_quals)) @base_type = base_type @cvr_qualifiers = cvr_quals end attr_reader :base_type def id @id ||= QualifiedTypeId.new(@base_type, @cvr_qualifiers) end def image @image ||= create_image(@base_type, @cvr_qualifiers) end def brief_image @brief_image ||= create_brief_image(@base_type, @cvr_qualifiers) end extend Forwardable def_delegator :@base_type, :declarations def_delegator :@base_type, :location def_delegator :@base_type, :bit_size def_delegator :@base_type, :bit_alignment def real_type type_table.qualified_type(@base_type.real_type, *@cvr_qualifiers) end def_delegator :@base_type, :unqualify def_delegator :@base_type, :incomplete? def_delegator :@base_type, :compatible? def_delegator :@base_type, :coercible? def convertible?(to_type) real_type.unqualify.convertible?(to_type.real_type.unqualify) end def more_cv_qualified?(than_type) # NOTE: The term `more cv-qualified' means: # const > none # volatile > none # const volatile > none # const volatile > const # const volatile > volatile if than_type.qualified? if than_type.const? && than_type.volatile? false else if self.const? && self.volatile? true else false end end else true end end def_delegator :@base_type, :scalar? def_delegator :@base_type, :integer? def_delegator :@base_type, :floating? def_delegator :@base_type, :array? def_delegator :@base_type, :struct? def_delegator :@base_type, :union? def_delegator :@base_type, :pointer? def qualified? true end def_delegator :@base_type, :function? def_delegator :@base_type, :enum? def_delegator :@base_type, :user? def_delegator :@base_type, :void? def_delegator :@base_type, :standard? def_delegator :@base_type, :undeclared? def_delegator :@base_type, :unresolved? def const? @cvr_qualifiers.include?(:const) end def volatile? @cvr_qualifiers.include?(:volatile) end def restrict? @cvr_qualifiers.include?(:restrict) end def_delegator :@base_type, :bitfield? def_delegator :@base_type, :signed? def_delegator :@base_type, :explicitly_signed? def_delegator :@base_type, :have_va_list? def_delegator :@base_type, :return_type def_delegator :@base_type, :parameter_types def_delegator :@base_type, :enumerators def_delegator :@base_type, :length def_delegator :@base_type, :length= def_delegator :@base_type, :impl_length def_delegator :@base_type, :members def_delegator :@base_type, :member_named def_delegator :@base_type, :min def_delegator :@base_type, :max def_delegator :@base_type, :nil_value def_delegator :@base_type, :zero_value def_delegator :@base_type, :arbitrary_value def_delegator :@base_type, :undefined_value def_delegator :@base_type, :parameter_value def_delegator :@base_type, :return_value def_delegator :@base_type, :coerce_scalar_value def_delegator :@base_type, :coerce_array_value def_delegator :@base_type, :coerce_composite_value def_delegator :@base_type, :integer_conversion_rank def_delegator :@base_type, :integer_promoted_type def_delegator :@base_type, :argument_promoted_type def_delegator :@base_type, :arithmetic_type_with def_delegator :@base_type, :_arithmetic_type_with_undeclared def_delegator :@base_type, :_arithmetic_type_with_unresolved def_delegator :@base_type, :_arithmetic_type_with_void def_delegator :@base_type, :_arithmetic_type_with_function def_delegator :@base_type, :_arithmetic_type_with_char def_delegator :@base_type, :_arithmetic_type_with_signed_char def_delegator :@base_type, :_arithmetic_type_with_unsigned_char def_delegator :@base_type, :_arithmetic_type_with_short def_delegator :@base_type, :_arithmetic_type_with_signed_short def_delegator :@base_type, :_arithmetic_type_with_unsigned_short def_delegator :@base_type, :_arithmetic_type_with_short_int def_delegator :@base_type, :_arithmetic_type_with_signed_short_int def_delegator :@base_type, :_arithmetic_type_with_unsigned_short_int def_delegator :@base_type, :_arithmetic_type_with_int def_delegator :@base_type, :_arithmetic_type_with_signed def_delegator :@base_type, :_arithmetic_type_with_signed_int def_delegator :@base_type, :_arithmetic_type_with_unsigned def_delegator :@base_type, :_arithmetic_type_with_unsigned_int def_delegator :@base_type, :_arithmetic_type_with_long def_delegator :@base_type, :_arithmetic_type_with_signed_long def_delegator :@base_type, :_arithmetic_type_with_unsigned_long def_delegator :@base_type, :_arithmetic_type_with_long_int def_delegator :@base_type, :_arithmetic_type_with_signed_long_int def_delegator :@base_type, :_arithmetic_type_with_unsigned_long_int def_delegator :@base_type, :_arithmetic_type_with_long_long def_delegator :@base_type, :_arithmetic_type_with_signed_long_long def_delegator :@base_type, :_arithmetic_type_with_unsigned_long_long def_delegator :@base_type, :_arithmetic_type_with_long_long_int def_delegator :@base_type, :_arithmetic_type_with_signed_long_long_int def_delegator :@base_type, :_arithmetic_type_with_unsigned_long_long_int def_delegator :@base_type, :_arithmetic_type_with_float def_delegator :@base_type, :_arithmetic_type_with_double def_delegator :@base_type, :_arithmetic_type_with_long_double def_delegator :@base_type, :_arithmetic_type_with_bitfield def_delegator :@base_type, :_arithmetic_type_with_enum def_delegator :@base_type, :_arithmetic_type_with_pointer def_delegator :@base_type, :_arithmetic_type_with_array def_delegator :@base_type, :_arithmetic_type_with_struct def_delegator :@base_type, :_arithmetic_type_with_union def_delegator :@base_type, :_arithmetic_type_with_extended_big_int def_delegator :@base_type, :corresponding_signed_type def_delegator :@base_type, :corresponding_unsigned_type def dup QualifiedType.new(type_table, @base_type.dup, *@cvr_qualifiers) end private def create_name(base_type, cvr_quals) append_cvr_qualifiers(base_type.name, cvr_quals) end def create_image(base_type, cvr_quals) append_cvr_qualifiers(base_type.image, cvr_quals) end def create_brief_image(base_type, cvr_quals) append_cvr_qualifiers(base_type.brief_image, cvr_quals) end def append_cvr_qualifiers(type_str, cvr_quals) qualed_str = type_str qualed_str = "#{qualed_str} const" if cvr_quals.include?(:const) qualed_str = "#{qualed_str} volatile" if cvr_quals.include?(:volatile) qualed_str = "#{qualed_str} restrict" if cvr_quals.include?(:restrict) qualed_str end end class QualifiedTypeId < TypeId def initialize(base_type, cvr_quals) super(create_value(base_type, cvr_quals)) @base_type = base_type @cvr_qualifiers = cvr_quals.sort end def ==(rhs_id) case rhs_id when QualifiedTypeId @cvr_qualifiers == rhs_id.cvr_qualifiers && @base_type == rhs_id.base_type else false end end protected attr_reader :base_type attr_reader :cvr_qualifiers private def create_value(base_type, cvr_quals) value = base_type.real_type.brief_image value = "#{value} const" if cvr_quals.include?(:const) value = "#{value} volatile" if cvr_quals.include?(:volatile) value = "#{value} restrict" if cvr_quals.include?(:restrict) value end end class VoidType < Type def initialize(type_tbl) super(type_tbl, "void") end def id @id ||= StandardTypeId.new("void") end def image name end def brief_image name end def location nil end def bit_size 0 end def bit_alignment 0 end def real_type self end def base_type nil end def unqualify self end def incomplete? true end def compatible?(to_type) false end def coercible?(to_type) false end def convertible?(to_type) to_type.void? end def same_as?(type) false end def scalar? false end def integer? false end def floating? false end def array? false end def struct? false end def union? false end def pointer? false end def qualified? false end def function? false end def enum? false end def user? false end def void? true end def standard? true end def undeclared? false end def unresolved? false end def const? false end def volatile? false end def restrict? false end def bitfield? false end def signed? false end def explicitly_signed? false end def have_va_list? false end def return_type self end def parameter_types [] end def enumerators [] end def length 0 end def impl_length 0 end def members [] end def member_named(name) nil end def min 0 end def max 0 end def nil_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def zero_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def arbitrary_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def undefined_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def parameter_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def return_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_scalar_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_array_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_composite_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def integer_conversion_rank 0 # NOTREACHED end def integer_promoted_type self # NOTREACHED end def argument_promoted_type self # NOTREACHED end def arithmetic_type_with(type) # NOTE: An arithmetic operation with `void' must not be executed! type._arithmetic_type_with_void(self) end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_void(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_function(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `char' and `void' # makes integer-promoted type of `char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed char' and `void' # makes integer-promoted type of `signed char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned char' and `void' # makes integer-promoted type of `unsigned char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `short' and `void' # makes integer-promoted type of `short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed short' and `void' # makes integer-promoted type of `signed short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned short' and `void' # makes integer-promoted type of `unsigned short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `short int' and `void' # makes integer-promoted type of `short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed short int' and `void' # makes integer-promoted type of `signed short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned short int' and `void' # makes integer-promoted type of `unsigned short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `int' and `void' makes `int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed' and `void' makes `signed'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed int' and `void' makes `signed int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned' and `void' makes `unsigned'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned int' and `void' # makes `unsigned int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `long' and `void' makes `long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed long' and `void' # makes `signed long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned long' and `void' # makes `unsigned long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `long int' and `void' makes `long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed long int' and `void' # makes `signed long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned long int' and `void' # makes `unsigned long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `long long' and `void' makes `long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed long long' and `void' # makes `signed long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned long long' and `void' # makes `unsigned long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `long long int' and `void' # makes `long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `signed long long int' and `void' # makes `signed long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `unsigned long long int' and `void' # makes `unsigned long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_float(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `float' and `void' makes `float'. lhs_type # NOTREACHED end def _arithmetic_type_with_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `double' and `void' makes `double'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with `long double' and `void' # makes `long double'. lhs_type # NOTREACHED end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with BitfieldType and `void' # makes integer-promoted type of BitfieldType. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with EnumType and `void' makes EnumType. lhs_type # NOTREACHED end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with PointerType and `void' makes PointerType. lhs_type # NOTREACHED end def _arithmetic_type_with_array(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_union(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with `void' must not be executed! # NOTE: Binary operation with ExtendedBigIntType and `void' # makes ExtendedBigIntType. lhs_type # NOTREACHED end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup VoidType.new(type_table) end end class FunctionType < Type def initialize(type_tbl, ret_type, param_types, have_va_list = false) super(type_tbl, create_name(ret_type, param_types, have_va_list)) @return_type = ret_type @parameter_types = param_types @have_va_list = have_va_list end attr_reader :return_type attr_reader :parameter_types def declarations @return_type.declarations + @parameter_types.reduce([]) { |dcls, type| dcls + type.declarations } end def id @id ||= FunctionTypeId.new(@return_type, @parameter_types, @have_va_list) end def image @image ||= create_image(@return_type, @parameter_types, @have_va_list) end def brief_image @brief_image ||= create_brief_image(@return_type, @parameter_types, @have_va_list) end def location nil end def bit_size 0 end def bit_alignment 0 end def real_type type_table.function_type(@return_type.real_type, @parameter_types.map { |type| type.real_type }, @have_va_list) end def base_type nil end def unqualify self end def incomplete? @return_type.incomplete? && !@return_type.void? or @parameter_types.empty? || @parameter_types.any? { |type| type.incomplete? && !type.void? } end def compatible?(to_type) return false unless to_type.function? lhs_params = @parameter_types rhs_params = to_type.parameter_types @return_type.compatible?(to_type.return_type) && lhs_params.size == rhs_params.size && lhs_params.zip(rhs_params).all? { |lhs, rhs| lhs.compatible?(rhs) } && @have_va_list == to_type.have_va_list? end def coercible?(to_type) false end def scalar? false end def integer? false end def floating? false end def array? false end def struct? false end def union? false end def pointer? false end def qualified? false end def function? true end def enum? false end def user? false end def void? false end def standard? false end def undeclared? false end def unresolved? @return_type.unresolved? || @parameter_types.any? { |type| type.unresolved? } end def const? false end def volatile? false end def restrict? false end def bitfield? false end def signed? false end def explicitly_signed? false end def have_va_list? @have_va_list end def enumerators [] end def length 0 end def impl_length 0 end def members [] end def member_named(name) nil end def min 0 end def max 0 end def nil_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def zero_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def arbitrary_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def undefined_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def parameter_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def return_value ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_scalar_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_array_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def coerce_composite_value(val) ScalarValue.of_nil(logical_right_shift?) # NOTREACHED end def integer_conversion_rank 0 # NOTREACHED end def integer_promoted_type self # NOTREACHED end def argument_promoted_type self # NOTREACHED end def arithmetic_type_with(type) # NOTE: An arithmetic operation with FunctionType must not be executed! type._arithmetic_type_with_function(self) end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_void(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_function(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `char' and FunctionType # makes integer-promoted type of `char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed char' and FunctionType # makes integer-promoted type of `signed char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned char' and FunctionType # makes integer-promoted type of `unsigned char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `short' and FunctionType # makes integer-promoted type of `short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed short' and FunctionType # makes integer-promoted type of `signed short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned short' and FunctionType # makes integer-promoted type of `unsigned short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `short int' and FunctionType # makes integer-promoted type of `short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed short int' and FunctionType # makes integer-promoted type of `signed short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned short int' and FunctionType # makes integer-promoted type of `unsigned short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `int' and FunctionType makes `int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed' and FunctionType makes `signed'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed int' and FunctionType # makes `signed int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned' and FunctionType # makes `unsigned'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned int' and FunctionType # makes `unsigned int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `long' and FunctionType makes `long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed long' and FunctionType # makes `signed long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned long' and FunctionType # makes `unsigned long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `long int' and FunctionType # makes `long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed long int' and FunctionType # makes `signed long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned long int' and FunctionType # makes `unsigned long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `long long' and FunctionType # makes `long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed long long' and FunctionType # makes `signed long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned long long' and FunctionType # makes `unsigned long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `long long int' and FunctionType # makes `long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `signed long long int' and FunctionType # makes `signed long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `unsigned long long int' and FunctionType # makes `unsigned long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_float(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `float' and FunctionType makes `float'. lhs_type # NOTREACHED end def _arithmetic_type_with_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `double' and FunctionType makes `double'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with `long double' and FunctionType # makes `long double'. lhs_type # NOTREACHED end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with BitfieldType and FunctionType # makes integer-promoted type of BitfieldType. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with EnumType and FunctionType makes EnumType. lhs_type # NOTREACHED end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with PointerType and FunctionType # makes PointerType. lhs_type # NOTREACHED end def _arithmetic_type_with_array(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_union(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with FunctionType must not be executed! # NOTE: Binary operation with ExtendedBigIntType and FunctionType # makes ExtendedBigIntType. lhs_type # NOTREACHED end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def ==(rhs_type) case rhs_type when FunctionType if parameter_types.empty? || rhs_type.parameter_types.empty? return_type == rhs_type.return_type else return_type == rhs_type.return_type && parameter_types == rhs_type.parameter_types && have_va_list? == rhs_type.have_va_list? end else false end end def dup FunctionType.new(type_table, @return_type.dup, @parameter_types.map { |t| t.dup }, @have_va_list) end private def create_name(ret_type, param_types, have_va_list) "#{ret_type.name}(" + param_types.map { |type| type.name }.join(", ") + (have_va_list ? ",...)" : ")") end def create_image(ret_type, param_types, have_va_list) "#{ret_type.image}(" + param_types.map { |type| type.image }.join(", ") + (have_va_list ? ",...)" : ")") end def create_brief_image(ret_type, param_types, have_va_list) "#{ret_type.brief_image}(" + param_types.map { |type| type.brief_image }.join(", ") + (have_va_list ? ",...)" : ")") end end class FunctionTypeId < TypeId def initialize(ret_type, param_types, have_va_list) super(create_value(ret_type, param_types, have_va_list)) end private def create_value(ret_type, param_types, have_va_list) "#{ret_type.brief_image}(" + param_types.map { |type| type.brief_image }.join(",") + (have_va_list ? ",...)" : ")") end end class ScalarDataType < Type include UsualArithmeticTypeConversion def initialize(type_tbl, name, bit_size, bit_align, type_dcls = []) super(type_tbl, name, type_dcls) @bit_size = bit_size @bit_alignment = bit_align end attr_reader :bit_size attr_reader :bit_alignment def id subclass_responsibility end def image subclass_responsibility end def brief_image subclass_responsibility end def location subclass_responsibility end def real_type self end def base_type nil end def unqualify self end def compatible?(to_type) subclass_responsibility end def coercible?(to_type) to_type.scalar? end def scalar? true end def integer? subclass_responsibility end def floating? subclass_responsibility end def array? false end def struct? false end def union? false end def pointer? subclass_responsibility end def qualified? false end def function? false end def enum? subclass_responsibility end def user? false end def void? false end def standard? subclass_responsibility end def undeclared? false end def unresolved? false end def const? false end def volatile? false end def restrict? false end def bitfield? subclass_responsibility end def signed? subclass_responsibility end def explicitly_signed? subclass_responsibility end def have_va_list? false end def return_type nil end def parameter_types [] end def enumerators subclass_responsibility end def length 0 end def impl_length 0 end def members [] end def member_named(name) nil end def min subclass_responsibility end def max subclass_responsibility end def nil_value ScalarValue.of_nil(logical_right_shift?) end def zero_value ScalarValue.of(0, logical_right_shift?) end def arbitrary_value ScalarValue.of_arbitrary(logical_right_shift?) end def undefined_value ScalarValue.of_undefined(min..max, logical_right_shift?) end def parameter_value ScalarValue.of(min..max, logical_right_shift?) end def return_value ScalarValue.of(min..max, logical_right_shift?) end def coerce_scalar_value(val) val.dup.tap do |v| v.narrow_domain!(Operator::EQ, ScalarValue.of(min..max, logical_right_shift?)) end end def coerce_array_value(val) fst_val = val.values.first fst_val = fst_val.values.first until fst_val && fst_val.scalar? if fst_val && fst_val.scalar? coerce_scalar_value(fst_val) else undefined_value end end def coerce_composite_value(val) fst_val = val.values.first fst_val = fst_val.values.first until fst_val && fst_val.scalar? if fst_val && fst_val.scalar? coerce_scalar_value(fst_val) else undefined_value end end def integer_conversion_rank subclass_responsibility end def integer_promoted_type subclass_responsibility end def argument_promoted_type subclass_responsibility end def arithmetic_type_with(type) subclass_responsibility end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_void(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_function(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_char(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_short(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_float(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_double(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end def _arithmetic_type_with_array(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_union(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: Binary operation with ExtendedBigIntType and any scalar type # makes ExtendedBigIntType. lhs_type end def corresponding_signed_type subclass_responsibility end def corresponding_unsigned_type subclass_responsibility end def dup subclass_responsibility end end class IntegerType < ScalarDataType def initialize(type_tbl, name, bit_size, bit_align, signed, explicitly_signed, type_dcls = []) super(type_tbl, name, bit_size, bit_align, type_dcls) @signed = signed @explicitly_signed = explicitly_signed end def id subclass_responsibility end def image name end def brief_image name end def location nil end def compatible?(to_type) to_type.integer? && to_type.min <= min && max <= to_type.max end def integer? true end def floating? false end def pointer? subclass_responsibility end def enum? subclass_responsibility end def standard? subclass_responsibility end def bitfield? subclass_responsibility end def signed? @signed end def explicitly_signed? @explicitly_signed end def enumerators subclass_responsibility end def min if @signed -2**(@bit_size - 1) else 0 end end def max if @signed 2**(@bit_size - 1) - 1 else 2**@bit_size - 1 end end def integer_conversion_rank subclass_responsibility end def integer_promoted_type # NOTE: The ISO C99 standard says; # # 6.3.1 Arithmetic operands # 6.3.1.1 Boolean, characters, and integers # # 2 The following may be used in an expression wherever an int or # unsigned int may be used: # # -- An object or expression with an integer type whose integer # conversion rank is less than or equal to the rank of int and # unsigned int. # -- A bit-field of type _Bool, int, signed int, or unsigned int. # # If an int can represent all values of the original type, the value is # converted to an int; otherwise, it is converted to an unsigned int. # These are called the integer promotions. All other types are # unchanged by the integer promotions. if self.integer_conversion_rank <= int_t.integer_conversion_rank self.compatible?(int_t) ? int_t : unsigned_int_t else self end end def argument_promoted_type # NOTE: The ISO C99 standard says; # # 6.5.2.2 Function calls # # 6 If the expression that denotes the called function has a type that # does not include a prototype, the integer promotions are performed on # each argument, and arguments that have type float are promoted to # double. These are called the default argument promotions. If the # number of arguments does not equal the number of parameters, the # behavior is undefined. If the function is defined with a type that # includes a prototype, and either the prototype ends with an ellipsis # (, ...) or the types of the arguments after promotion are not # compatible with the types of the parameters, the behavior is # undefined. If the function is defined with a type that does not # include a prototype, and the types of the arguments after promotion # are not compatible with those of the parameters after promotion, the # behavior is undefined, except for the following cases: # # -- one promoted type is a signed integer type, the other promoted # type is the corresponding unsigned integer type, and the value # is representable in both types; # -- both types are pointers to qualified or unqualified versions of # a character type or void. self.integer_promoted_type end def arithmetic_type_with(type) subclass_responsibility end def corresponding_signed_type subclass_responsibility end def corresponding_unsigned_type subclass_responsibility end def dup subclass_responsibility end end class StandardIntegerType < IntegerType def id subclass_responsibility end def incomplete? false end def pointer? false end def enum? false end def standard? true end def bitfield? false end def enumerators [] end def integer_conversion_rank subclass_responsibility end def arithmetic_type_with(type) subclass_responsibility end def corresponding_signed_type subclass_responsibility end def corresponding_unsigned_type subclass_responsibility end def dup self.class.new(type_table) end end class CharType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "char", char_size, char_alignment, !char_as_unsigned_char?, false) end def id # NOTE: `char' type may be treated as `unsigned char'. # Specialized type comparison is implemented in CharTypeId, # SignedCharTypeId and UnsignedCharTypeId. @id ||= CharTypeId.new(char_as_unsigned_char?) end def integer_conversion_rank # NOTE: The ISO C99 standard says; # # 6.3.1 Arithmetic operands # 6.3.1.1 Boolean, characters, and integers # # 1 Every integer type has an integer conversion rank defined as follows: # # -- No two signed integer types shall have the same rank, even if # they have the same representation. # -- The rank of a signed integer type shall be greater than the rank # of any signed integer type with less precision. # -- The rank of long long int shall be greater than the rank of long # int, which shall be greater than the rank of int, which shall be # greater than the rank of short int, which shall be greater than # the rank of signed char. # -- The rank of any unsigned integer type shall equal the rank of # the corresponding signed integer type, if any. # -- The rank of any standard integer type shall be greater than the # rank of any extended integer type with the same width. # -- The rank of char shall equal the rank of signed char and # unsigned char. # -- The rank of _Bool shall be less than the rank of all other # standard integer types. # -- The rank of any enumerated type shall equal the rank of the # compatible integer type. # -- The rank of any extended signed integer type relative to another # extended signed integer type with the same precision is # implementation-defined, but still subject to the other rules for # determining the integer conversion rank. # -- For all integer types T1, T2, and T3, if T1 has greater rank # than T2 and T2 has greater rank than T3, then T1 has greater # rank than T3. # # NOTE: char = 1, short int = 2, int = 3, long int = 4, long long int = 5 1 end def arithmetic_type_with(type) type._arithmetic_type_with_char(self) end def corresponding_signed_type signed_char_t end def corresponding_unsigned_type unsigned_char_t end end class CharTypeId < StandardTypeId def initialize(char_as_unsigned_char) super("char") @char_as_unsigned_char = char_as_unsigned_char end def ==(rhs_id) if @char_as_unsigned_char case rhs_id when CharTypeId, UnsignedCharTypeId return true end else case rhs_id when CharTypeId, SignedCharTypeId return true end end false end end class SignedCharType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed char", char_size, char_alignment, true, true) end def id # NOTE: `char' type may be treated as `unsigned char'. # Specialized type comparison is implemented in CharTypeId, # SignedCharTypeId and UnsignedCharTypeId. @id ||= SignedCharTypeId.new(char_as_unsigned_char?) end def integer_conversion_rank 1 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_char(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_char_t end end class SignedCharTypeId < StandardTypeId def initialize(char_as_unsigned_char) super("signed char") @char_as_unsigned_char = char_as_unsigned_char end def ==(rhs_id) if @char_as_unsigned_char case rhs_id when SignedCharTypeId return true end else case rhs_id when SignedCharTypeId, CharTypeId return true end end false end end class UnsignedCharType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned char", char_size, char_alignment, false, true) end def id # NOTE: `char' type may be treated as `unsigned char'. # Specialized type comparison is implemented in CharTypeId, # SignedCharTypeId and UnsignedCharTypeId. @id ||= UnsignedCharTypeId.new(char_as_unsigned_char?) end def integer_conversion_rank 1 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_char(self) end def corresponding_signed_type signed_char end def corresponding_unsigned_type self end end class UnsignedCharTypeId < StandardTypeId def initialize(char_as_unsigned_char) super("unsigned char") @char_as_unsigned_char = char_as_unsigned_char end def ==(rhs_id) if @char_as_unsigned_char case rhs_id when UnsignedCharTypeId, CharTypeId return true end else case rhs_id when UnsignedCharTypeId return true end end false end end class ShortType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "short", short_size, short_alignment, true, false) end def id @id ||= ShortTypeId.new end def integer_conversion_rank 2 end def arithmetic_type_with(type) type._arithmetic_type_with_short(self) end def corresponding_signed_type signed_short_t end def corresponding_unsigned_type unsigned_short_t end end class ShortTypeId < StandardTypeId def initialize super("short") end def ==(rhs_id) case rhs_id when ShortTypeId, SignedShortTypeId, ShortIntTypeId, SignedShortIntTypeId true else false end end end class SignedShortType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed short", short_size, short_alignment, true, true) end def id @id ||= SignedShortTypeId.new end def integer_conversion_rank 2 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_short(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_short_t end end class SignedShortTypeId < StandardTypeId def initialize super("signed short") end def ==(rhs_id) case rhs_id when SignedShortTypeId, ShortTypeId, ShortIntTypeId, SignedShortIntTypeId true else false end end end class UnsignedShortType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned short", short_size, short_alignment, false, true) end def id @id ||= UnsignedShortTypeId.new end def integer_conversion_rank 2 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_short(self) end def corresponding_signed_type signed_short_t end def corresponding_unsigned_type self end end class UnsignedShortTypeId < StandardTypeId def initialize super("unsigned short") end def ==(rhs_id) case rhs_id when UnsignedShortTypeId, UnsignedShortIntTypeId true else false end end end class ShortIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "short int", short_size, short_alignment, true, false) end def id @id ||= ShortIntTypeId.new end def integer_conversion_rank 2 end def arithmetic_type_with(type) type._arithmetic_type_with_short_int(self) end def corresponding_signed_type signed_short_int_t end def corresponding_unsigned_type unsigned_short_int_t end end class ShortIntTypeId < StandardTypeId def initialize super("short int") end def ==(rhs_id) case rhs_id when ShortIntTypeId, ShortTypeId, SignedShortTypeId, SignedShortIntTypeId true else false end end end class SignedShortIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed short int", short_size, short_alignment, true, true) end def id @id ||= SignedShortIntTypeId.new end def integer_conversion_rank 2 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_short_int(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_short_int_t end end class SignedShortIntTypeId < StandardTypeId def initialize super("signed short int") end def ==(rhs_id) case rhs_id when SignedShortIntTypeId, ShortTypeId, ShortIntTypeId, SignedShortTypeId true else false end end end class UnsignedShortIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned short int", short_size, short_alignment, false, true) end def id @id ||= UnsignedShortIntTypeId.new end def integer_conversion_rank 2 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_short_int(self) end def corresponding_signed_type signed_short_int_t end def corresponding_unsigned_type self end end class UnsignedShortIntTypeId < StandardTypeId def initialize super("unsigned short int") end def ==(rhs_id) case rhs_id when UnsignedShortIntTypeId, UnsignedShortTypeId true else false end end end class IntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "int", int_size, int_alignment, true, false) end def id @id ||= IntTypeId.new end def integer_conversion_rank 3 end def arithmetic_type_with(type) type._arithmetic_type_with_int(self) end def corresponding_signed_type signed_int_t end def corresponding_unsigned_type unsigned_int_t end end class IntTypeId < StandardTypeId def initialize super("int") end def ==(rhs_id) case rhs_id when IntTypeId, SignedTypeId, SignedIntTypeId true else false end end end class SignedType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed", int_size, int_alignment, true, true) end def id @id ||= SignedTypeId.new end def integer_conversion_rank 3 end def arithmetic_type_with(type) type._arithmetic_type_with_signed(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_t end end class SignedTypeId < StandardTypeId def initialize super("signed") end def ==(rhs_id) case rhs_id when SignedTypeId, IntTypeId, SignedIntTypeId true else false end end end class SignedIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed int", int_size, int_alignment, true, true) end def id @id ||= SignedIntTypeId.new end def integer_conversion_rank 3 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_int(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_int_t end end class SignedIntTypeId < StandardTypeId def initialize super("signed int") end def ==(rhs_id) case rhs_id when SignedIntTypeId, IntTypeId, SignedTypeId true else false end end end class UnsignedType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned", int_size, int_alignment, false, true) end def id @id ||= UnsignedTypeId.new end def integer_conversion_rank 3 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned(self) end def corresponding_signed_type signed_t end def corresponding_unsigned_type self end end class UnsignedTypeId < StandardTypeId def initialize super("unsigned") end def ==(rhs_id) case rhs_id when UnsignedTypeId, UnsignedIntTypeId true else false end end end class UnsignedIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned int", int_size, int_alignment, false, true) end def id @id ||= UnsignedIntTypeId.new end def integer_conversion_rank 3 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_int(self) end def corresponding_signed_type signed_int_t end def corresponding_unsigned_type self end end class UnsignedIntTypeId < StandardTypeId def initialize super("unsigned int") end def ==(rhs_id) case rhs_id when UnsignedIntTypeId, UnsignedTypeId true else false end end end class LongType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "long", long_size, long_alignment, true, false) end def id @id ||= LongTypeId.new end def integer_conversion_rank 4 end def arithmetic_type_with(type) type._arithmetic_type_with_long(self) end def corresponding_signed_type signed_long_t end def corresponding_unsigned_type unsigned_long_t end end class LongTypeId < StandardTypeId def initialize super("long") end def ==(rhs_id) case rhs_id when LongTypeId, SignedLongTypeId, LongIntTypeId, SignedLongIntTypeId true else false end end end class SignedLongType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed long", long_size, long_alignment, true, true) end def id @id ||= SignedLongTypeId.new end def integer_conversion_rank 4 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_long(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_long_t end end class SignedLongTypeId < StandardTypeId def initialize super("signed long") end def ==(rhs_id) case rhs_id when SignedLongTypeId, LongTypeId, LongIntTypeId, SignedLongIntTypeId true else false end end end class UnsignedLongType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned long", long_size, long_alignment, false, true) end def id @id ||= UnsignedLongTypeId.new end def integer_conversion_rank 4 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_long(self) end def corresponding_signed_type signed_long_t end def corresponding_unsigned_type self end end class UnsignedLongTypeId < StandardTypeId def initialize super("unsigned long") end def ==(rhs_id) case rhs_id when UnsignedLongTypeId, UnsignedLongIntTypeId true else false end end end class LongIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "long int", long_size, long_alignment, true, false) end def id @id ||= LongIntTypeId.new end def integer_conversion_rank 4 end def arithmetic_type_with(type) type._arithmetic_type_with_long_int(self) end def corresponding_signed_type signed_long_int_t end def corresponding_unsigned_type unsigned_long_int_t end end class LongIntTypeId < StandardTypeId def initialize super("long int") end def ==(rhs_id) case rhs_id when LongIntTypeId, LongTypeId, SignedLongTypeId, SignedLongIntTypeId true else false end end end class SignedLongIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed long int", long_size, long_alignment, true, true) end def id @id ||= SignedLongIntTypeId.new end def integer_conversion_rank 4 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_long_int(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_long_int_t end end class SignedLongIntTypeId < StandardTypeId def initialize super("signed long int") end def ==(rhs_id) case rhs_id when SignedLongIntTypeId, LongTypeId, LongIntTypeId, SignedLongTypeId true else false end end end class UnsignedLongIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned long int", long_size, long_alignment, false, true) end def id @id ||= UnsignedLongIntTypeId.new end def integer_conversion_rank 4 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_long_int(self) end def corresponding_signed_type signed_long_int_t end def corresponding_unsigned_type self end end class UnsignedLongIntTypeId < StandardTypeId def initialize super("unsigned long int") end def ==(rhs_id) case rhs_id when UnsignedLongIntTypeId, UnsignedLongTypeId true else false end end end class LongLongType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "long long", long_long_size, long_long_alignment, true, false) end def id @id ||= LongLongTypeId.new end def integer_conversion_rank 5 end def arithmetic_type_with(type) type._arithmetic_type_with_long_long(self) end def corresponding_signed_type signed_long_long_t end def corresponding_unsigned_type unsigned_long_long_t end end class LongLongTypeId < StandardTypeId def initialize super("long long") end def ==(rhs_id) case rhs_id when LongLongTypeId, SignedLongLongTypeId, LongLongIntTypeId, SignedLongLongIntTypeId true else false end end end class SignedLongLongType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed long long", long_long_size, long_long_alignment, true, true) end def id @id ||= SignedLongLongTypeId.new end def integer_conversion_rank 5 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_long_long(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_long_long_t end end class SignedLongLongTypeId < StandardTypeId def initialize super("signed long long") end def ==(rhs_id) case rhs_id when SignedLongLongTypeId, LongLongTypeId, LongLongIntTypeId, SignedLongLongIntTypeId true else false end end end class UnsignedLongLongType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned long long", long_long_size, long_long_alignment, false, true) end def id @id ||= UnsignedLongLongTypeId.new end def integer_conversion_rank 5 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_long_long(self) end def corresponding_signed_type signed_long_long_t end def corresponding_unsigned_type self end end class UnsignedLongLongTypeId < StandardTypeId def initialize super("unsigned long long") end def ==(rhs_id) case rhs_id when UnsignedLongLongTypeId, UnsignedLongLongIntTypeId true else false end end end class LongLongIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "long long int", long_long_size, long_long_alignment, true, false) end def id @id ||= LongLongIntTypeId.new end def integer_conversion_rank 5 end def arithmetic_type_with(type) type._arithmetic_type_with_long_long_int(self) end def corresponding_signed_type signed_long_long_int_t end def corresponding_unsigned_type unsigned_long_long_int_t end end class LongLongIntTypeId < StandardTypeId def initialize super("long long int") end def ==(rhs_id) case rhs_id when LongLongIntTypeId, LongLongTypeId, SignedLongLongTypeId, SignedLongLongIntTypeId true else false end end end class SignedLongLongIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "signed long long int", long_long_size, long_long_alignment, true, true) end def id @id ||= SignedLongLongIntTypeId.new end def integer_conversion_rank 5 end def arithmetic_type_with(type) type._arithmetic_type_with_signed_long_long_int(self) end def corresponding_signed_type self end def corresponding_unsigned_type unsigned_long_long_int_t end end class SignedLongLongIntTypeId < StandardTypeId def initialize super("signed long long int") end def ==(rhs_id) case rhs_id when SignedLongLongIntTypeId, LongLongTypeId, LongLongIntTypeId, SignedLongLongType true else false end end end class UnsignedLongLongIntType < StandardIntegerType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "unsigned long long int", long_long_size, long_long_alignment, false, true) end def id @id ||= UnsignedLongLongIntTypeId.new end def integer_conversion_rank 5 end def arithmetic_type_with(type) type._arithmetic_type_with_unsigned_long_long_int(self) end def corresponding_signed_type signed_long_long_int_t end def corresponding_unsigned_type self end end class UnsignedLongLongIntTypeId < StandardTypeId def initialize super("unsigned long long int") end def ==(rhs_id) case rhs_id when UnsignedLongLongIntTypeId, UnsignedLongLongTypeId true else false end end end class BitfieldType < IntegerType def initialize(type_tbl, base_type, field_width) super(type_tbl, "#{base_type.real_type.name}:#{field_width}", field_width, base_type.bit_alignment, base_type.signed?, base_type.explicitly_signed?) @base_type = base_type end attr_reader :base_type def id @id ||= BitfieldTypeId.new(@base_type, bit_size) end def incomplete? @base_type.incomplete? end def pointer? false end def enum? false end def standard? false end def bitfield? true end def undeclared? @base_type.undeclared? end def unresolved? @base_type.unresolved? end def enumerators [] end def integer_conversion_rank -1 end def integer_promoted_type # TODO: Should support the C99 _Bool type. # NOTE: The ISO C99 standard says; # # 6.3.1 Arithmetic operands # 6.3.1.1 Boolean, characters, and integers # # 2 The following may be used in an expression wherever an int or # unsigned int may be used: # # -- An object or expression with an integer type whose integer # conversion rank is less than or equal to the rank of int and # unsigned int. # -- A bit-field of type _Bool, int, signed int, or unsigned int. # # If an int can represent all values of the original type, the value is # converted to an int; otherwise, it is converted to an unsigned int. # These are called the integer promotions. All other types are # unchanged by the integer promotions. if self.undeclared? || self.unresolved? self else if @base_type.same_as?(int_t) || @base_type.same_as?(unsigned_int_t) self.compatible?(int_t) ? int_t : unsigned_int_t else self end end end def arithmetic_type_with(type) type._arithmetic_type_with_bitfield(self) end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup BitfieldType.new(type_table, @base_type.dup, bit_size) end end class BitfieldTypeId < TypeId def initialize(base_type, field_width) super(create_value(base_type, field_width)) end private def create_value(base_type, field_width) "#{base_type.real_type.name.split(" ").sort.join(" ")}:#{field_width}" end end module Scopeable attr_accessor :scope end class EnumType < IntegerType include Scopeable def initialize(type_tbl, type_dcl) # FIXME: StandardTypeCatalogAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, type_dcl.identifier.value, int_size, int_alignment, true, true, [type_dcl]) @image = type_dcl.enum_specifier.to_s @location = type_dcl.location end attr_accessor :image attr_accessor :location def id @id ||= EnumTypeId.new(name) end def incomplete? declarations.all? { |dcl| dcl.enumerators.nil? } end def pointer? false end def enum? true end def standard? false end def bitfield? false end def brief_image "enum #{name}" end def enumerators declarations.map { |dcl| dcl.enumerators }.compact.flatten.uniq end def integer_conversion_rank # NOTE: The ISO C99 standard says; # # 6.3.1 Arithmetic operands # 6.3.1.1 Boolean, characters, and integers # # 1 Every integer type has an integer conversion rank defined as follows: # # -- No two signed integer types shall have the same rank, even if # they have the same representation. # -- The rank of a signed integer type shall be greater than the rank # of any signed integer type with less precision. # -- The rank of long long int shall be greater than the rank of long # int, which shall be greater than the rank of int, which shall be # greater than the rank of short int, which shall be greater than # the rank of signed char. # -- The rank of any unsigned integer type shall equal the rank of # the corresponding signed integer type, if any. # -- The rank of any standard integer type shall be greater than the # rank of any extended integer type with the same width. # -- The rank of char shall equal the rank of signed char and # unsigned char. # -- The rank of _Bool shall be less than the rank of all other # standard integer types. # -- The rank of any enumerated type shall equal the rank of the # compatible integer type. # -- The rank of any extended signed integer type relative to another # extended signed integer type with the same precision is # implementation-defined, but still subject to the other rules for # determining the integer conversion rank. # -- For all integer types T1, T2, and T3, if T1 has greater rank # than T2 and T2 has greater rank than T3, then T1 has greater # rank than T3. # # NOTE: The integer conversion rank of any enumerated type is equal to # the rank of int. int_t.integer_conversion_rank end def integer_promoted_type # NOTE: Any enumerated type should be treated as `int'. # But AdLint internally treats enumerated type as itself, and omits # integer-promotion of any enumerated type in order not to # over-warn about enum-enum expressions like below; # # static void foo(enum Color c) # { # if (c == RED) { /* No usual-arithmetic-conversion of # enumerated types and no W9003 warning */ # ... # } # } self end def arithmetic_type_with(type) type._arithmetic_type_with_enum(self) end def corresponding_signed_type signed_int_t end def corresponding_unsigned_type unsigned_int_t end def dup EnumType.new(type_table, declarations.first) end end class EnumTypeId < TypeId def initialize(name) super("enum #{name}") end end class PointerType < IntegerType def initialize(type_tbl, base_type) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, create_name(base_type), base_type.function? ? code_ptr_size : data_ptr_size, base_type.function? ? code_ptr_alignment : data_ptr_alignment, false, true, base_type.declarations) @base_type = base_type end attr_reader :base_type def id @id ||= PointerTypeId.new(@base_type) end def image create_image(@base_type) end def brief_image create_brief_image(@base_type) end def real_type type_table.pointer_type(@base_type.real_type) end def incomplete? false end def convertible?(to_type) lhs_unqualified = self.real_type.unqualify rhs_unqualified = to_type.real_type.unqualify if rhs_unqualified.pointer? || rhs_unqualified.array? lhs_base = lhs_unqualified.base_type rhs_base = rhs_unqualified.base_type unless lhs_base.more_cv_qualified?(rhs_base) rhs_base.void? || lhs_base.convertible?(rhs_base) else false end else false end end def pointer? true end def enum? false end def standard? false end def undeclared? # NOTE: To avoid the infinite recursive call of #undeclared? when the # composite type contains the pointer to it's owner type. @base_type.kind_of?(UndeclaredType) end def unresolved? # NOTE: To avoid the infinite recursive call of #unresolved? when the # composite type contains the pointer to it's owner type. @base_type.kind_of?(UnresolvedType) end def bitfield? false end def enumerators [] end def integer_conversion_rank # NOTE: Pointer variables must not be converted implicitly. 100 end def integer_promoted_type # NOTE: Pointer variables must not be converted implicitly. self end def arithmetic_type_with(type) type._arithmetic_type_with_pointer(self) end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup PointerType.new(type_table, @base_type.dup) end private def create_name(base_type) if base_type.function? "#{base_type.return_type.name}(*)(" + base_type.parameter_types.map { |type| type.name }.join(",") + (base_type.have_va_list? ? ",...)" : ")") else "#{base_type.name} *" end end def create_image(base_type) if base_type.function? "#{base_type.return_type.image}(*)(" + base_type.parameter_types.map { |type| type.image }.join(",") + (base_type.have_va_list? ? ",...)" : ")") else "#{base_type.image} *" end end def create_brief_image(base_type) if base_type.function? "#{base_type.return_type.brief_image}(*)(" + base_type.parameter_types.map { |type| type.brief_image }.join(",") + (base_type.have_va_list? ? ",...)" : ")") else "#{base_type.brief_image} *" end end end class PointerTypeId < TypeId def initialize(base_type) super(create_value(base_type)) @base_type = base_type end def ==(rhs_id) case rhs_id when PointerTypeId @base_type == rhs_id.base_type else false end end def hash "#{@base_type.id.hash}*".hash end protected attr_reader :base_type private def create_value(base_type) real_type = base_type.real_type if real_type.function? "#{real_type.return_type.brief_image}(*)(" + real_type.parameter_types.map { |type| type.brief_image }.join(",") + (real_type.have_va_list? ? ",...)" : ")") else "#{real_type.brief_image} *" end end end class FloatingType < ScalarDataType def id subclass_responsibility end def image name end def brief_image name end def location nil end def incomplete? false end def compatible?(to_type) type.floating? && to_type.min <= min && max <= to_type.max end def integer? false end def floating? true end def pointer? false end def enum? false end def bitfield? false end def signed? true end def explicitly_signed? true end def enumerators [] end def min (-2**fraction_bit_size * 10**(exponent_bit_size - 1)).to_f end def max (2**fraction_bit_size * 10**(exponent_bit_size - 1)).to_f end def integer_conversion_rank 0 # NOTREACHED end def integer_promoted_type self # NOTREACHED end def argument_promoted_type subclass_responsibility end def arithmetic_type_with(type) subclass_responsibility end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup subclass_responsibility end private def fraction_bit_size subclass_responsibility end def exponent_bit_size subclass_responsibility end end class StandardFloatingType < FloatingType def standard? true end def dup self.class.new(type_table) end end class FloatType < StandardFloatingType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "float", float_size, float_alignment) end def id @id ||= FloatTypeId.new end def argument_promoted_type # NOTE: The ISO C99 standard says; # # 6.5.2.2 Function calls # # 6 If the expression that denotes the called function has a type that # does not include a prototype, the integer promotions are performed on # each argument, and arguments that have type float are promoted to # double. These are called the default argument promotions. If the # number of arguments does not equal the number of parameters, the # behavior is undefined. If the function is defined with a type that # includes a prototype, and either the prototype ends with an ellipsis # (, ...) or the types of the arguments after promotion are not # compatible with the types of the parameters, the behavior is # undefined. If the function is defined with a type that does not # include a prototype, and the types of the arguments after promotion # are not compatible with those of the parameters after promotion, the # behavior is undefined, except for the following cases: # # -- one promoted type is a signed integer type, the other promoted # type is the corresponding unsigned integer type, and the value # is representable in both types; # -- both types are pointers to qualified or unqualified versions of # a character type or void. double_t end def arithmetic_type_with(type) type._arithmetic_type_with_float(self) end private def fraction_bit_size # TODO: Bit size of the fraction part of `float' should be configurable. 23 end def exponent_bit_size # TODO: Bit size of the exponent part of `float' should be configurable. 8 end end class FloatTypeId < StandardTypeId def initialize super("float") end end class DoubleType < StandardFloatingType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "double", double_size, double_alignment) end def id @id ||= DoubleTypeId.new end def argument_promoted_type self end def arithmetic_type_with(type) type._arithmetic_type_with_double(self) end private def fraction_bit_size # TODO: Bit size of the fraction part of `double' should be configurable. 52 end def exponent_bit_size # TODO: Bit size of the exponent part of `double' should be configurable. 11 end end class DoubleTypeId < StandardTypeId def initialize super("double") end end class LongDoubleType < StandardFloatingType def initialize(type_tbl) # FIXME: StandardTypesAccessor is not ready until @type_table is # initialized. @type_table = type_tbl super(type_tbl, "long double", long_double_size, long_double_alignment) end def id @id ||= LongDoubleTypeId.new end def argument_promoted_type self end def arithmetic_type_with(type) type._arithmetic_type_with_long_double(self) end private def fraction_bit_size # TODO: Bit size of the fraction part of `long double' should be # configurable. 52 end def exponent_bit_size # TODO: Bit size of the exponent part of `long double' should be # configurable. 11 end end class LongDoubleTypeId < StandardTypeId def initialize super("long double") end end class ArrayType < Type # NOTE: To avoid huge array allocation in interpreting phase. MAX_LENGTH = 256 private_constant :MAX_LENGTH def initialize(type_tbl, base_type, len = nil) super(type_tbl, create_name(base_type, len)) @base_type = base_type @length = len end attr_reader :base_type # NOTE: Length of the array type may be deducted by the size of the # initializer in interpret phase. attr_accessor :length def impl_length # NOTE: Implementation defined length of this array. @length ? [[0, @length].max, MAX_LENGTH].min : 0 end def id # NOTE: ID of the array type cannot be cached. # Length of the variable length array will be deducted in the # interpret phase. ArrayTypeId.new(@base_type, @length) end def image create_image(@base_type, @length) end def brief_image create_brief_image(@base_type, @length) end def location nil end def bit_size @length ? @base_type.bit_size * @length : 0 end def bit_alignment aligned_bit_size end def aligned_bit_size @length ? @base_type.aligned_bit_size * @length : 0 end def real_type type_table.array_type(@base_type.real_type, @length) end def unqualify self end def incomplete? @base_type.incomplete? || @length.nil? end def compatible?(to_type) to_type.array? && @length == to_type.length && @base_type.compatible?(to_type.base_type) end def coercible?(to_type) to_type.array? && @base_type.coercible?(to_type.base_type) end def convertible?(to_type) lhs_unqualified = self.real_type.unqualify rhs_unqualified = to_type.real_type.unqualify if rhs_unqualified.pointer? || rhs_unqualified.array? lhs_base = lhs_unqualified.base_type rhs_base = rhs_unqualified.base_type unless lhs_base.more_cv_qualified?(rhs_base) rhs_base.void? || lhs_base.convertible?(rhs_base) else false end else false end end def same_as?(type) lhs_unqualified = self.real_type.unqualify rhs_unqualified = type.real_type.unqualify case when rhs_unqualified.array? if lhs_unqualified.length lhs_unqualified.length == rhs_unqualified.length else lhs_unqualified.base_type.same_as?(rhs_unqualified.base_type) end when rhs_unqualified.pointer? lhs_unqualified.base_type.same_as?(rhs_unqualified.base_type) else false end end def scalar? false end def integer? false end def floating? false end def array? true end def struct? false end def union? false end def pointer? false end def qualified? false end def function? false end def enum? false end def user? false end def void? false end def standard? false end def undeclared? @base_type.undeclared? end def unresolved? @base_type.unresolved? end def const? @base_type.const? end def volatile? @base_type.volatile? end def restrict? @base_type.restrict? end def bitfield? false end def signed? false end def explicitly_signed? false end def have_va_list? false end def return_type nil end def parameter_types [] end def enumerators [] end def members [] end def member_named(name) nil end def min 0 end def max 0 end def nil_value ArrayValue.new(impl_length.times.map { @base_type.nil_value }) end def zero_value ArrayValue.new(impl_length.times.map { @base_type.zero_value }) end def arbitrary_value ArrayValue.new(impl_length.times.map { @base_type.arbitrary_value }) end def undefined_value ArrayValue.new(impl_length.times.map { @base_type.undefined_value }) end def parameter_value ArrayValue.new(impl_length.times.map { @base_type.parameter_value }) end def return_value ArrayValue.new(impl_length.times.map { @base_type.return_value }) end def coerce_scalar_value(val) # NOTE: Cannot coerce scalar value into array in C language. undefined_value # NOTREACHED end def coerce_array_value(val) # NOTE: The ISO C99 standard says; # # 6.7.8 Initialization # # Semantics # # 10 If an object that has automatic storage duration is not initialized # explicitly, its value is indeterminate. If an object that has # static storage duration is not initialized explicitly, then: # # -- if it has pointer type, it is initialized to a null pointer; # -- if it has arithmetic type, it is initialized to (positive or # unsigned) zero; # -- if it is an aggregate, every member is initialized (recursively) # according to these rules; # -- if it is a union, the first named member is initialized # (recursively) according to these rules. # # 21 If there are fewer initializers in a brace-enclosed list than there # are elements or members of an aggregate, or fewer characters in a # string literal used to initialize an array of known size that there # are elements in the array, the remainder of the aggregate shall be # initialized implicitly the same as objects that have static storage # duration. vals = ([@base_type] * impl_length).zip(val.values).map { |type, v| v ? v.coerce_to(type) : type.arbitrary_value } ArrayValue.new(vals) end def coerce_composite_value(val) # NOTE: Cannot coerce composite value into array in C language. undefined_value # NOTREACHED end def integer_conversion_rank 0 # NOTREACHED end def integer_promoted_type self # NOTREACHED end def argument_promoted_type self # NOTREACHED end def arithmetic_type_with(type) # NOTE: An arithmetic operation with ArrayType must not be executed! type._arithmetic_type_with_array(self) # NOTREACHED end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_void(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_function(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `char' and ArrayType # makes integer-promoted type of `char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed char' and ArrayType # makes integer-promoted type of `signed char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned char' and ArrayType # makes integer-promoted type of `unsigned char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `short' and ArrayType # makes integer-promoted type of `short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed short' and ArrayType # makes integer-promoted type of `signed short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned short' and ArrayType # makes integer-promoted type of `unsigned short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `short int' and ArrayType # makes integer-promoted type of `short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed short int' and ArrayType # makes integer-promoted type of `signed short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned short int' and ArrayType # makes integer-promoted type of `unsigned short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `int' and ArrayType makes `int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed' and ArrayType makes `signed'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed int' and ArrayType # makes `signed int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned' and ArrayType makes `unsigned'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned int' and ArrayType # makes `unsigned int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `long' and ArrayType makes `long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed long' and ArrayType # makes `signed long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned long' and ArrayType # makes `unsigned long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `long int' and ArrayType makes `long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed long int' and ArrayType # makes `signed long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned long int' and ArrayType # makes `unsigned long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `long long' and ArrayType makes # `long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed long long' and ArrayType # makes `signed long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned long long' and ArrayType # makes `unsigned long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `long long int' and ArrayType # makes `long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `signed long long int' and ArrayType # makes `signed long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `unsigned long long int' and ArrayType # makes `unsigned long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_float(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `float' and ArrayType makes `float'. lhs_type # NOTREACHED end def _arithmetic_type_with_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `double' and ArrayType makes `double'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with `long double' and ArrayType # makes `long double'. lhs_type # NOTREACHED end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with BitfieldType and ArrayType # makes integer-promoted type of BitfieldType. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with EnumType and ArrayType makes EnumType. lhs_type # NOTREACHED end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with PointerType and ArrayType makes # PointerType. lhs_type # NOTREACHED end def _arithmetic_type_with_array(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_union(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! lhs_type # NOTREACHED end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with ArrayType must not be executed! # NOTE: Binary operation with ExtendedBigIntType and ArrayType # makes ExtendedBigIntType. lhs_type # NOTREACHED end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup ArrayType.new(type_table, @base_type.dup, @length) end private def create_name(base_type, len) "(#{base_type.name})[#{len ? len : ""}]" end def create_image(base_type, len) "(#{base_type.image})[#{len ? len : ""}]" end def create_brief_image(base_type, len) "(#{base_type.brief_image})[#{len ? len : ""}]" end end class ArrayTypeId < TypeId def initialize(base_type, len) super(create_value(base_type, len)) end private def create_value(base_type, len) if len "#{base_type.brief_image}[#{len}]" else "#{base_type.brief_image}[]" end end end # == DESCRIPTION # Type of the `struct' or `union' data type. # # The ISO C99 standard specifies that the `struct' and array data type is an # aggregate type. # But the CompositeDataType is not an array type. class CompositeDataType < Type include Scopeable def initialize(type_tbl, name, type_dcls, membs) super(type_tbl, name, type_dcls) @members = membs end attr_reader :members def id subclass_responsibility end def image subclass_responsibility end def brief_image subclass_responsibility end def location subclass_responsibility end def bit_size @members.reduce(0) { |sum, memb| sum + memb.type.bit_size } end def bit_alignment bit_size end def aligned_bit_size @members.reduce(0) { |sum, memb| sum + memb.type.aligned_bit_size } end def real_type self end def base_type nil end def unqualify self end def incomplete? declarations.all? { |dcl| dcl.struct_declarations.nil? } end def compatible?(to_type) to_type.composite? && @members.size == to_type.members.size && @members.zip(to_type.members).all? { |lhs, rhs| lhs.compatible?(rhs) } end def coercible?(to_type) to_type.composite? && @members.zip(to_type.members).all? { |lhs_memb, rhs_memb| rhs_memb && lhs_memb.type.coercible?(rhs_memb.type) } end def scalar? false end def integer? false end def floating? false end def array? false end def pointer? false end def qualified? false end def function? false end def enum? false end def user? false end def void? false end def standard? false end def undeclared? @members.any? { |memb| memb.type.undeclared? } end def unresolved? @members.any? { |memb| memb.type.unresolved? } end def const? false end def volatile? false end def restrict? false end def bitfield? false end def signed? false end def explicitly_signed? false end def have_va_list? false end def return_type nil end def parameter_types [] end def enumerators [] end def length 0 end def impl_length 0 end def member_named(name) # FIXME: Should use the member name index. @members.find { |memb| memb.name == name } end def min 0 end def max 0 end def nil_value CompositeValue.new(@members.map { |memb| memb.type.nil_value }) end def zero_value CompositeValue.new(@members.map { |memb| memb.type.zero_value }) end def arbitrary_value CompositeValue.new(@members.map { |memb| memb.type.arbitrary_value }) end def undefined_value CompositeValue.new(@members.map { |memb| memb.type.undefined_value }) end def parameter_value CompositeValue.new(@members.map { |memb| memb.type.parameter_value }) end def return_value CompositeValue.new(@members.map { |memb| memb.type.return_value }) end def coerce_scalar_value(val) # NOTE: Cannot coerce scalar value into composite in C language. undefined_value # NOTREACHED end def coerce_array_value(val) # NOTE: Cannot coerce array value into composite in C language. undefined_value # NOTREACHED end def coerce_composite_value(val) vals = @members.zip(val.values).map { |memb, v| v ? v.coerce_to(memb.type) : memb.type.undefined_value } CompositeValue.new(vals) end def integer_conversion_rank 0 # NOTREACHED end def integer_promoted_type self # NOTREACHED end def argument_promoted_type self end def arithmetic_type_with(type) subclass_responsibility end def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_void(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_function(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `char' and CompositeDataType makes # integer-promoted type of `char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed char' and CompositeDataType makes # integer-promoted type of `signed char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned char' and CompositeDataType makes # integer-promoted type of `unsigned char'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `short' and CompositeDataType makes # integer-promoted type of `short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed short' and CompositeDataType makes # integer-promoted type of `signed short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned short' and CompositeDataType # makes integer-promoted type of `unsigned short'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `short int' and CompositeDataType makes # integer-promoted type of `short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed short int' and CompositeDataType # makes integer-promoted type of `signed short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned short int' and CompositeDataType # makes integer-promoted type of `unsigned short int'. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `int' and CompositeDataType makes `int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed' and CompositeDataType makes # `signed'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed int' and CompositeDataType makes # `signed int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned' and CompositeDataType makes # `unsigned'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned int' and CompositeDataType makes # `unsigned int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `long' and CompositeDataType makes `long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed long' and CompositeDataType makes # `signed long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned long' and CompositeDataType makes # `unsigned long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `long int' and CompositeDataType makes # `long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed long int' and CompositeDataType # makes `signed long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned long int' and CompositeDataType # makes `unsigned long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `long long' and CompositeDataType makes # `long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed long long' and CompositeDataType # makes `signed long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned long long' and CompositeDataType # makes `unsigned long long'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `long long int' and CompositeDataType makes # `long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `signed long long int' and # CompositeDataType makes `signed long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `unsigned long long int' and # CompositeDataType makes `unsigned long long int'. lhs_type # NOTREACHED end def _arithmetic_type_with_float(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `float' and CompositeDataType makes # `float'. lhs_type # NOTREACHED end def _arithmetic_type_with_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `double' and CompositeDataType makes # `double'. lhs_type # NOTREACHED end def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with `long double' and CompositeDataType makes # `long double'. lhs_type # NOTREACHED end def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with BitfieldType and CompositeDataType makes # integer-promoted type of BitfieldType. lhs_type.integer_promoted_type # NOTREACHED end def _arithmetic_type_with_enum(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with EnumType and CompositeDataType makes # EnumType. lhs_type # NOTREACHED end def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with PointerType and CompositeDataType makes # PointerType. lhs_type # NOTREACHED end def _arithmetic_type_with_array(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end def _arithmetic_type_with_struct(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! lhs_type # NOTREACHED end def _arithmetic_type_with_union(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! lhs_type # NOTREACHED end def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: An arithmetic operation with CompositeDataType must not be # executed! # NOTE: Binary operation with ExtendedBigIntType and CompositeDataType # makes ExtendedBigIntType. lhs_type # NOTREACHED end def corresponding_signed_type self # NOTREACHED end def corresponding_unsigned_type self # NOTREACHED end def dup self.class.new(type_table, declarations.first, @members.map { |memb| memb.dup }) end end class Member def initialize(name, type) @name = name @type = type end attr_reader :name attr_reader :type def dup Member.new(@name, @type.dup) end end class StructType < CompositeDataType def initialize(type_tbl, type_dcl, membs) super(type_tbl, type_dcl.identifier.value, [type_dcl], membs) @image = type_dcl.struct_specifier.to_s @location = type_dcl.location end attr_accessor :image attr_accessor :location def id @id ||= StructTypeId.new(name) end def brief_image "struct #{name}" end def struct? true end def union? false end def arithmetic_type_with(type) type._arithmetic_type_with_struct(self) end end class StructTypeId < TypeId def initialize(name) super("struct #{name}") end end class UnionType < CompositeDataType # TODO: Must implement member overlapping semantics. def initialize(type_tbl, type_dcl, membs) super(type_tbl, type_dcl.identifier.value, [type_dcl], membs) @image = type_dcl.union_specifier.to_s @location = type_dcl.location end attr_accessor :image attr_accessor :location def id @id ||= UnionTypeId.new(name) end def brief_image "union #{name}" end def struct? false end def union? true end def arithmetic_type_with(type) type._arithmetic_type_with_union(self) end end class UnionTypeId < TypeId def initialize(name) super("union #{name}") end end class UserType < Type include Scopeable def initialize(type_tbl, typedef_dcl, base_type) super(type_tbl, typedef_dcl.identifier.value, [typedef_dcl]) @location = typedef_dcl.location @base_type = base_type end attr_reader :location def id @id ||= UserTypeId.new(name) end extend Forwardable def_delegator :@base_type, :image def brief_image name end def_delegator :@base_type, :bit_size def_delegator :@base_type, :bit_alignment def_delegator :@base_type, :real_type def_delegator :@base_type, :base_type def unqualify self end def_delegator :@base_type, :incomplete? def_delegator :@base_type, :compatible? def_delegator :@base_type, :coercible? def_delegator :@base_type, :scalar? def_delegator :@base_type, :integer? def_delegator :@base_type, :floating? def_delegator :@base_type, :array? def_delegator :@base_type, :struct? def_delegator :@base_type, :union? def_delegator :@base_type, :pointer? def_delegator :@base_type, :qualified? def_delegator :@base_type, :function? def_delegator :@base_type, :enum? def user? true end def_delegator :@base_type, :void? def standard? false end def_delegator :@base_type, :undeclared? def_delegator :@base_type, :unresolved? def_delegator :@base_type, :const? def_delegator :@base_type, :volatile? def_delegator :@base_type, :restrict? def_delegator :@base_type, :bitfield? def_delegator :@base_type, :signed? def_delegator :@base_type, :explicitly_signed? def_delegator :@base_type, :have_va_list? def_delegator :@base_type, :return_type def_delegator :@base_type, :parameter_types def_delegator :@base_type, :enumerators def_delegator :@base_type, :length def_delegator :@base_type, :length= def_delegator :@base_type, :impl_length def_delegator :@base_type, :members def_delegator :@base_type, :member_named def_delegator :@base_type, :min def_delegator :@base_type, :max def_delegator :@base_type, :nil_value def_delegator :@base_type, :zero_value def_delegator :@base_type, :arbitrary_value def_delegator :@base_type, :undefined_value def_delegator :@base_type, :parameter_value def_delegator :@base_type, :return_value def_delegator :@base_type, :coerce_scalar_value def_delegator :@base_type, :coerce_array_value def_delegator :@base_type, :coerce_composite_value def_delegator :@base_type, :integer_conversion_rank def_delegator :@base_type, :integer_promoted_type def_delegator :@base_type, :argument_promoted_type def_delegator :@base_type, :arithmetic_type_with def_delegator :@base_type, :_arithmetic_type_with_undeclared def_delegator :@base_type, :_arithmetic_type_with_unresolved def_delegator :@base_type, :_arithmetic_type_with_void def_delegator :@base_type, :_arithmetic_type_with_function def_delegator :@base_type, :_arithmetic_type_with_char def_delegator :@base_type, :_arithmetic_type_with_signed_char def_delegator :@base_type, :_arithmetic_type_with_unsigned_char def_delegator :@base_type, :_arithmetic_type_with_short def_delegator :@base_type, :_arithmetic_type_with_signed_short def_delegator :@base_type, :_arithmetic_type_with_unsigned_short def_delegator :@base_type, :_arithmetic_type_with_short_int def_delegator :@base_type, :_arithmetic_type_with_signed_short_int def_delegator :@base_type, :_arithmetic_type_with_unsigned_short_int def_delegator :@base_type, :_arithmetic_type_with_int def_delegator :@base_type, :_arithmetic_type_with_signed def_delegator :@base_type, :_arithmetic_type_with_signed_int def_delegator :@base_type, :_arithmetic_type_with_unsigned def_delegator :@base_type, :_arithmetic_type_with_unsigned_int def_delegator :@base_type, :_arithmetic_type_with_long def_delegator :@base_type, :_arithmetic_type_with_signed_long def_delegator :@base_type, :_arithmetic_type_with_unsigned_long def_delegator :@base_type, :_arithmetic_type_with_long_int def_delegator :@base_type, :_arithmetic_type_with_signed_long_int def_delegator :@base_type, :_arithmetic_type_with_unsigned_long_int def_delegator :@base_type, :_arithmetic_type_with_long_long def_delegator :@base_type, :_arithmetic_type_with_signed_long_long def_delegator :@base_type, :_arithmetic_type_with_unsigned_long_long def_delegator :@base_type, :_arithmetic_type_with_long_long_int def_delegator :@base_type, :_arithmetic_type_with_signed_long_long_int def_delegator :@base_type, :_arithmetic_type_with_unsigned_long_long_int def_delegator :@base_type, :_arithmetic_type_with_float def_delegator :@base_type, :_arithmetic_type_with_double def_delegator :@base_type, :_arithmetic_type_with_long_double def_delegator :@base_type, :_arithmetic_type_with_bitfield def_delegator :@base_type, :_arithmetic_type_with_enum def_delegator :@base_type, :_arithmetic_type_with_pointer def_delegator :@base_type, :_arithmetic_type_with_array def_delegator :@base_type, :_arithmetic_type_with_struct def_delegator :@base_type, :_arithmetic_type_with_union def_delegator :@base_type, :_arithmetic_type_with_extended_big_int def_delegator :@base_type, :corresponding_signed_type def_delegator :@base_type, :corresponding_unsigned_type def dup UserType.new(type_table, declarations.first, @base_type.dup) end end class UserTypeId < TypeId def initialize(name) super("typedef #{name}") end end # NOTE: ParameterType is a decorator which attaches a parameter name to other # types. class ParameterType < Type include Scopeable def initialize(type_tbl, type, dcl_or_def = nil) super(type_tbl, type.name, type.declarations) @type = type if dcl_or_def and dcr = dcl_or_def.declarator identifier = dcr.identifier end @param_name = identifier ? identifier.value : "" @declaration_or_definition = dcl_or_def end attr_reader :type attr_reader :param_name extend Forwardable def_delegator :@type, :id def location @declaration_or_definition ? @declaration_or_definition.location : @type.location end def_delegator :@type, :image def_delegator :@type, :brief_image def_delegator :@type, :bit_size def_delegator :@type, :bit_alignment def real_type ParameterType.new(type_table, @type.real_type, @declaration_or_definition) end def_delegator :@type, :base_type def_delegator :@type, :unqualify def_delegator :@type, :incomplete? def_delegator :@type, :compatible? def_delegator :@type, :coercible? def_delegator :@type, :convertible? def_delegator :@type, :more_cv_qualified? def parameter? true end def_delegator :@type, :scalar? def_delegator :@type, :integer? def_delegator :@type, :floating? def_delegator :@type, :array? def_delegator :@type, :struct? def_delegator :@type, :union? def_delegator :@type, :pointer? def_delegator :@type, :qualified? def_delegator :@type, :function? def_delegator :@type, :enum? def_delegator :@type, :user? def_delegator :@type, :void? def_delegator :@type, :standard? def_delegator :@type, :undeclared? def_delegator :@type, :unresolved? def_delegator :@type, :const? def_delegator :@type, :volatile? def_delegator :@type, :restrict? def_delegator :@type, :bitfield? def_delegator :@type, :signed? def_delegator :@type, :explicitly_signed? def_delegator :@type, :have_va_list? def_delegator :@type, :return_type def_delegator :@type, :parameter_types def_delegator :@type, :enumerators def_delegator :@type, :length def_delegator :@type, :length= def_delegator :@type, :impl_length def_delegator :@type, :members def_delegator :@type, :member_named def_delegator :@type, :min def_delegator :@type, :max def_delegator :@type, :nil_value def_delegator :@type, :zero_value def_delegator :@type, :arbitrary_value def_delegator :@type, :undefined_value def_delegator :@type, :parameter_value def_delegator :@type, :return_value def_delegator :@type, :coerce_scalar_value def_delegator :@type, :coerce_array_value def_delegator :@type, :coerce_composite_value def_delegator :@type, :integer_conversion_rank def_delegator :@type, :integer_promoted_type def_delegator :@type, :argument_promoted_type def_delegator :@type, :arithmetic_type_with def_delegator :@type, :_arithmetic_type_with_undeclared def_delegator :@type, :_arithmetic_type_with_unresolved def_delegator :@type, :_arithmetic_type_with_void def_delegator :@type, :_arithmetic_type_with_function def_delegator :@type, :_arithmetic_type_with_char def_delegator :@type, :_arithmetic_type_with_signed_char def_delegator :@type, :_arithmetic_type_with_unsigned_char def_delegator :@type, :_arithmetic_type_with_short def_delegator :@type, :_arithmetic_type_with_signed_short def_delegator :@type, :_arithmetic_type_with_unsigned_short def_delegator :@type, :_arithmetic_type_with_short_int def_delegator :@type, :_arithmetic_type_with_signed_short_int def_delegator :@type, :_arithmetic_type_with_unsigned_short_int def_delegator :@type, :_arithmetic_type_with_int def_delegator :@type, :_arithmetic_type_with_signed def_delegator :@type, :_arithmetic_type_with_signed_int def_delegator :@type, :_arithmetic_type_with_unsigned def_delegator :@type, :_arithmetic_type_with_unsigned_int def_delegator :@type, :_arithmetic_type_with_long def_delegator :@type, :_arithmetic_type_with_signed_long def_delegator :@type, :_arithmetic_type_with_unsigned_long def_delegator :@type, :_arithmetic_type_with_long_int def_delegator :@type, :_arithmetic_type_with_signed_long_int def_delegator :@type, :_arithmetic_type_with_unsigned_long_int def_delegator :@type, :_arithmetic_type_with_long_long def_delegator :@type, :_arithmetic_type_with_signed_long_long def_delegator :@type, :_arithmetic_type_with_unsigned_long_long def_delegator :@type, :_arithmetic_type_with_long_long_int def_delegator :@type, :_arithmetic_type_with_signed_long_long_int def_delegator :@type, :_arithmetic_type_with_unsigned_long_long_int def_delegator :@type, :_arithmetic_type_with_float def_delegator :@type, :_arithmetic_type_with_double def_delegator :@type, :_arithmetic_type_with_long_double def_delegator :@type, :_arithmetic_type_with_bitfield def_delegator :@type, :_arithmetic_type_with_enum def_delegator :@type, :_arithmetic_type_with_pointer def_delegator :@type, :_arithmetic_type_with_array def_delegator :@type, :_arithmetic_type_with_struct def_delegator :@type, :_arithmetic_type_with_union def_delegator :@type, :_arithmetic_type_with_extended_big_int def_delegator :@type, :corresponding_signed_type def_delegator :@type, :corresponding_unsigned_type def dup ParameterType.new(type_table, @type.dup, @declaration_or_definition) end end class ExtendedBigIntType < IntegerType def initialize(type_tbl) super(type_tbl, "__adlint__extended_bigint_t", 256, 256, true, true) end def id @id ||= TypeId.new(name) end def incomplete? false end def pointer? false end def enum? false end def standard? false end def bitfield? false end def enumerators [] end def integer_conversion_rank # NOTE: The ISO C99 standard says; # # 6.3.1 Arithmetic operands # 6.3.1.1 Boolean, characters, and integers # # 1 Every integer type has an integer conversion rank defined as follows: # # -- No two signed integer types shall have the same rank, even if # they have the same representation. # -- The rank of a signed integer type shall be greater than the rank # of any signed integer type with less precision. # -- The rank of long long int shall be greater than the rank of long # int, which shall be greater than the rank of int, which shall be # greater than the rank of short int, which shall be greater than # the rank of signed char. # -- The rank of any unsigned integer type shall equal the rank of # the corresponding signed integer type, if any. # -- The rank of any standard integer type shall be greater than the # rank of any extended integer type with the same width. # -- The rank of char shall equal the rank of signed char and # unsigned char. # -- The rank of _Bool shall be less than the rank of all other # standard integer types. # -- The rank of any enumerated type shall equal the rank of the # compatible integer type. # -- The rank of any extended signed integer type relative to another # extended signed integer type with the same precision is # implementation-defined, but still subject to the other rules for # determining the integer conversion rank. # -- For all integer types T1, T2, and T3, if T1 has greater rank # than T2 and T2 has greater rank than T3, then T1 has greater # rank than T3. -2 end def integer_promoted_type # NOTE: ExtendedBigIntType is very big integer. # So, it is not compatible with int or unsigned int. self end def arithmetic_type_with(type) type._arithmetic_type_with_extended_big_int(self) end def corresponding_signed_type self end def corresponding_unsigned_type self end def dup ExtendedBigIntType.new(type_table) end end class StandardTypeCatalog def initialize(type_tbl) @types = {} install_char_t_family(type_tbl) install_short_t_family(type_tbl) install_int_t_family(type_tbl) install_long_t_family(type_tbl) install_long_long_t_family(type_tbl) install_float_t(type_tbl) install_double_t(type_tbl) install_long_double_t(type_tbl) install_void_t(type_tbl) install_extended_bit_int_t(type_tbl) end attr_reader :char_t attr_reader :signed_char_t attr_reader :unsigned_char_t attr_reader :short_t attr_reader :signed_short_t attr_reader :unsigned_short_t attr_reader :short_int_t attr_reader :signed_short_int_t attr_reader :unsigned_short_int_t attr_reader :int_t attr_reader :signed_t attr_reader :signed_int_t attr_reader :unsigned_t attr_reader :unsigned_int_t attr_reader :long_t attr_reader :signed_long_t attr_reader :unsigned_long_t attr_reader :long_int_t attr_reader :signed_long_int_t attr_reader :unsigned_long_int_t attr_reader :long_long_t attr_reader :signed_long_long_t attr_reader :unsigned_long_long_t attr_reader :long_long_int_t attr_reader :signed_long_long_int_t attr_reader :unsigned_long_long_int_t attr_reader :float_t attr_reader :double_t attr_reader :long_double_t attr_reader :void_t attr_reader :extended_big_int_t def lookup_by_type_specifiers(type_specs) type_name = type_specs.map { |ts| ts.to_s }.sort.join(" ") @types[type_name] end def all_types @types.each_value end private def install_char_t_family(type_tbl) install @char_t = CharType.new(type_tbl) install @signed_char_t = SignedCharType.new(type_tbl) install @unsigned_char_t = UnsignedCharType.new(type_tbl) end def install_short_t_family(type_tbl) install @short_t = ShortType.new(type_tbl) install @signed_short_t = SignedShortType.new(type_tbl) install @unsigned_short_t = UnsignedShortType.new(type_tbl) install @short_int_t = ShortIntType.new(type_tbl) install @signed_short_int_t = SignedShortIntType.new(type_tbl) install @unsigned_short_int_t = UnsignedShortIntType.new(type_tbl) end def install_int_t_family(type_tbl) install @int_t = IntType.new(type_tbl) install @signed_t = SignedType.new(type_tbl) install @signed_int_t = SignedIntType.new(type_tbl) install @unsigned_t = UnsignedType.new(type_tbl) install @unsigned_int_t = UnsignedIntType.new(type_tbl) end def install_long_t_family(type_tbl) install @long_t = LongType.new(type_tbl) install @signed_long_t = SignedLongType.new(type_tbl) install @unsigned_long_t = UnsignedLongType.new(type_tbl) install @long_int_t = LongIntType.new(type_tbl) install @signed_long_int_t = SignedLongIntType.new(type_tbl) install @unsigned_long_int_t = UnsignedLongIntType.new(type_tbl) end def install_long_long_t_family(type_tbl) install @long_long_t = LongLongType.new(type_tbl) install @signed_long_long_t = SignedLongLongType.new(type_tbl) install @unsigned_long_long_t = UnsignedLongLongType.new(type_tbl) install @long_long_int_t = LongLongIntType.new(type_tbl) install @signed_long_long_int_t = SignedLongLongIntType.new(type_tbl) install @unsigned_long_long_int_t = UnsignedLongLongIntType.new(type_tbl) end def install_float_t(type_tbl) install @float_t = FloatType.new(type_tbl) end def install_double_t(type_tbl) install @double_t = DoubleType.new(type_tbl) end def install_long_double_t(type_tbl) install @long_double_t = LongDoubleType.new(type_tbl) end def install_void_t(type_tbl) install @void_t = VoidType.new(type_tbl) end def install_extended_bit_int_t(type_tbl) install @extended_big_int_t = ExtendedBigIntType.new(type_tbl) end def install(type) @types[type.name.split(" ").sort.join(" ")] = type end end class TypeTable include StandardTypeCatalogAccessor include InterpreterOptions def initialize(traits, monitor, logger) @traits = traits @monitor = monitor @logger = logger @types_stack = [{}] @scope_stack = [GlobalScope.new] @all_type_names = Set.new @standard_type_catalog = StandardTypeCatalog.new(self) install_standard_types end attr_reader :traits attr_reader :monitor attr_reader :logger attr_reader :standard_type_catalog attr_reader :all_type_names def undeclared_type @undeclared_type ||= UndeclaredType.new(self) end def unresolved_type @unresolved_type ||= UnresolvedType.new(self) end def wchar_t lookup(UserTypeId.new("wchar_t")) or int_t end def array_type(base_type, len = nil) ArrayType.new(self, base_type, len) end def function_type(ret_type, param_types, have_va_list = false) FunctionType.new(self, ret_type, param_types, have_va_list) end def builtin_function_type function_type(undeclared_type, [undeclared_type]) end def bitfield_type(base_type, field_width) BitfieldType.new(self, base_type, field_width) end def pointer_type(base_type) PointerType.new(self, base_type) end def qualified_type(base_type, *cvr_quals) QualifiedType.new(self, base_type, *cvr_quals) end def lookup(type_id) @types_stack.reverse_each { |hash| type = hash[type_id] and return type } nil end def lookup_standard_type(name_str) @standard_type_catalog.lookup_by_name(name_str) end def install(type) @types_stack.last[type.id] = type @all_type_names.add(type.name) type end def enter_scope @types_stack.push({}) @scope_stack.push(Scope.new(@scope_stack.size)) end def leave_scope @types_stack.pop @scope_stack.pop end def lookup_or_install_type(type_quals, type_specs, dcr, interp = nil) case fst_type_spec = type_specs.first when TypeofTypeSpecifier if type_name = fst_type_spec.type_name return type_name.type else if interp return interp.execute(fst_type_spec.expression, QUIET).type else return nil end end else unless base_type = lookup_type(type_specs, interp) case fst_type_spec when StructSpecifier base_type = install_struct_type( PseudoStructTypeDeclaration.new(fst_type_spec)) when UnionSpecifier base_type = install_union_type( PseudoUnionTypeDeclaration.new(fst_type_spec)) when EnumSpecifier base_type = install_enum_type( PseudoEnumTypeDeclaration.new(fst_type_spec)) else return nil end end qualify_type(base_type, type_quals, dcr, interp) end end def lookup_type(type_specs, interp = nil) lookup(create_type_id(type_specs, interp)) end def lookup_function_type(fun_def, interp = nil) if dcl_specs = fun_def.declaration_specifiers type = lookup_or_install_type(dcl_specs.type_qualifiers, dcl_specs.type_specifiers, fun_def.declarator, interp) else type = lookup_or_install_type([], [], fun_def.declarator, interp) end return nil unless type param_types = fun_def.parameter_definitions.map { |pdef| pdef.type } function_type(type.return_type, param_types, type.have_va_list?) end def lookup_parameter_type(dcl_or_def, interp = nil) dcr = dcl_or_def.declarator dcl_specs = dcl_or_def.declaration_specifiers if dcl_specs type_quals = dcl_specs.type_qualifiers type_specs = dcl_specs.type_specifiers else type_quals = [] type_specs = [] end if type = lookup_or_install_type(type_quals, type_specs, dcr, interp) type = pointer_type(type) if type.function? else return nil end ParameterType.new(self, type, dcl_or_def) end def install_struct_type(type_dcl) type_id = StructTypeId.new(type_dcl.identifier.value) if type = lookup(type_id) and type.scope == current_scope if type_dcl.struct_declarations rewrite_struct_type(type, type_dcl) return type end end type = StructType.new(self, type_dcl, []) type.scope = current_scope install(type) if type_dcl.struct_declarations rewrite_struct_type(type, type_dcl) end type end def install_union_type(type_dcl) type_id = UnionTypeId.new(type_dcl.identifier.value) if type = lookup(type_id) and type.scope == current_scope if type_dcl.struct_declarations rewrite_union_type(type, type_dcl) return type end end type = UnionType.new(self, type_dcl, []) type.scope = current_scope install(type) if type_dcl.struct_declarations rewrite_union_type(type, type_dcl) end type end def install_enum_type(type_dcl) type_id = EnumTypeId.new(type_dcl.identifier.value) if type = lookup(type_id) and type.scope == current_scope if type_dcl.enumerators rewrite_enum_type(type, type_dcl) return type end end type = EnumType.new(self, type_dcl) type.scope = current_scope install(type) if type_dcl.enumerators rewrite_enum_type(type, type_dcl) end type end def install_user_type(type_dcl) base_type = lookup_or_install_type(type_dcl.type_qualifiers, type_dcl.type_specifiers, type_dcl.declarator) type = UserType.new(self, type_dcl, base_type) type.scope = current_scope install(type) type end private def create_type_id(type_specs, interp) case type_specs.first when StandardTypeSpecifier type_id = create_standard_type_id(type_specs) when TypedefTypeSpecifier type_id = create_user_type_id(type_specs) when StructSpecifier type_id = create_struct_type_id(type_specs) when UnionSpecifier type_id = create_union_type_id(type_specs) when EnumSpecifier type_id = create_enum_type_id(type_specs) when nil type_id = int_t.id else raise TypeError end type_id end def create_standard_type_id(type_specs) if type = @standard_type_catalog.lookup_by_type_specifiers(type_specs) type.id else int_t.id end end def create_user_type_id(type_specs) UserTypeId.new(type_specs.first.identifier.value) end def create_struct_type_id(type_specs) StructTypeId.new(type_specs.first.identifier.value) end def create_union_type_id(type_specs) UnionTypeId.new(type_specs.first.identifier.value) end def create_enum_type_id(type_specs) EnumTypeId.new(type_specs.first.identifier.value) end def qualify_type(type, type_quals, dcr, interp = nil) cvr_quals = type_quals.map { |tok| case tok.type when :CONST then :const when :VOLATILE then :volatile else # TODO: Should support C99 `restrict' qualifier. end }.compact type = qualified_type(type, *cvr_quals) unless cvr_quals.empty? if dcr dcr_interp = DeclaratorInterpreter.new(self, interp, type) dcr.accept(dcr_interp) else type end end def create_members(struct_dcls) membs = [] struct_dcls.each do |struct_dcl| struct_dcl.items.each do |item| membs.push(Member.new(item.identifier.value, item.type)) end end membs end def rewrite_struct_type(struct_type, type_dcl) struct_type.declarations.push(type_dcl) struct_type.image = type_dcl.struct_specifier.to_s struct_type.location = type_dcl.location struct_type.members.replace(create_members(type_dcl.struct_declarations)) end def rewrite_union_type(union_type, type_dcl) union_type.declarations.push(type_dcl) union_type.image = type_dcl.union_specifier.to_s union_type.location = type_dcl.location union_type.members.replace(create_members(type_dcl.struct_declarations)) end def rewrite_enum_type(enum_type, type_dcl) enum_type.declarations.push(type_dcl) enum_type.image = type_dcl.enum_specifier.to_s enum_type.location = type_dcl.location end def current_scope @scope_stack.last end def install_standard_types @standard_type_catalog.all_types.each { |type| install(type) } end end class DeclaratorInterpreter def initialize(type_tbl, interp, type) @type_table = type_tbl @interpreter = interp @type = type end def visit_identifier_declarator(node) @type = qualify_by_pointer(@type, node) end def visit_grouped_declarator(node) @type = qualify_by_pointer(@type, node) @type = node.base.accept(self) end def visit_array_declarator(node) @type = qualify_by_pointer(@type, node) if size_expr = node.size_expression if ary_size = evaluate_size_expression(size_expr) @type = @type_table.array_type(@type, ary_size) else return @type_table.unresolved_type end else @type = @type_table.array_type(@type) end @type = node.base.accept(self) end def visit_ansi_function_declarator(node) @type = qualify_by_pointer(@type, node) param_types = lookup_parameter_types(node) if param_types.include?(nil) return @type_table.unresolved_type else have_va_list = node.parameter_type_list.have_va_list? @type = @type_table.function_type(@type, param_types, have_va_list) @type = node.base.accept(self) end @type end def visit_kandr_function_declarator(node) @type = qualify_by_pointer(@type, node) @type = @type_table.function_type(@type, []) @type = node.base.accept(self) end def visit_abbreviated_function_declarator(node) @type = qualify_by_pointer(@type, node) @type = @type_table.function_type(@type, []) @type = node.base.accept(self) end def visit_pointer_abstract_declarator(node) @type = qualify_by_pointer(@type, node) @type = node.base.accept(self) if node.base @type end def visit_grouped_abstract_declarator(node) @type = qualify_by_pointer(@type, node) @type = node.base.accept(self) end def visit_array_abstract_declarator(node) @type = qualify_by_pointer(@type, node) if size_expr = node.size_expression if ary_size = evaluate_size_expression(size_expr) @type = @type_table.array_type(@type, ary_size) else return @type_table.unresolved_type end else @type = @type_table.array_type(@type) end @type = node.base.accept(self) if node.base @type end def visit_function_abstract_declarator(node) @type = qualify_by_pointer(@type, node) param_types = lookup_parameter_types(node) if param_types.include?(nil) return @type_table.unresolved_type else @type = @type_table.function_type(@type, param_types) @type = node.base.accept(self) if node.base end @type end private def qualify_by_pointer(type, dcr) if dcr.pointer dcr.pointer.each do |tok| case tok.type when "*" type = @type_table.pointer_type(type) when :CONST type = @type_table.qualified_type(type, :const) when :VOLATILE type = @type_table.qualified_type(type, :volatile) when :RESTRICT # TODO: Should support C99 features. end end end type end def lookup_parameter_types(dcr, interp = nil) if param_type_list = dcr.parameter_type_list param_type_list.parameters.map do |param_dcl| @type_table.lookup_parameter_type(param_dcl, @interpreter) end else [] end end def evaluate_size_expression(size_expr) if @interpreter obj = @interpreter.execute(size_expr) if obj.variable? && obj.value.scalar? size = obj.value.unique_sample end # NOTE: Size of an array should be greater than 0. size = 1 if size.nil? || size <= 0 else if size_expr.object_specifiers.empty? obj = Interpreter.new(@type_table).execute(size_expr) if obj.variable? && obj.value.scalar? size = obj.value.unique_sample end # NOTE: Size of an array should be greater than 0. size = 1 if size.nil? || size <= 0 else size = nil end end size ? size.to_i : nil end end class TypeVisitor def visit_undeclared_type(type) end def visit_unresolved_type(type) end def visit_qualified_type(type) type.base_type.accept(self) end def visit_void_type(type) end def visit_function_type(type) type.return_type.accept(self) type.parameter_types.each { |param_type| param_type.accept(self) } end def visit_char_type(type) end def visit_signed_char_type(type) end def visit_unsigned_char_type(type) end def visit_short_type(type) end def visit_signed_short_type(type) end def visit_unsigned_short_type(type) end def visit_short_int_type(type) end def visit_signed_short_int_type(type) end def visit_unsigned_short_int_type(type) end def visit_int_type(type) end def visit_signed_type(type) end def visit_signed_int_type(type) end def visit_unsigned_type(type) end def visit_unsigned_int_type(type) end def visit_long_type(type) end def visit_signed_long_type(type) end def visit_unsigned_long_type(type) end def visit_long_int_type(type) end def visit_signed_long_int_type(type) end def visit_unsigned_long_int_type(type) end def visit_long_long_type(type) end def visit_signed_long_long_type(type) end def visit_unsigned_long_long_type(type) end def visit_long_long_int_type(type) end def visit_signed_long_long_int_type(type) end def visit_unsigned_long_long_int_type(type) end def visit_extended_big_int_type(type) end def visit_bitfield_type(type) type.base_type.accept(self) end def visit_enum_type(type) end def visit_pointer_type(type) type.base_type.accept(self) end def visit_float_type(type) end def visit_double_type(type) end def visit_long_double_type(type) end def visit_array_type(type) type.base_type.accept(self) end def visit_struct_type(type) type.members.each { |memb| memb.type.accept(self) } end def visit_union_type(type) type.members.each { |memb| memb.type.accept(self) } end def visit_user_type(type) type.real_type.accept(self) end def visit_parameter_type(type) type.type.accept(self) end end end end adlint-3.2.0/lib/adlint/cc1/environ.rb0000644000004100000410000001016512224440633017516 0ustar www-datawww-data# C runtime environment. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/enum" require "adlint/cc1/object" require "adlint/cc1/builtin" require "adlint/cc1/branch" require "adlint/cc1/mediator" module AdLint #:nodoc: module Cc1 #:nodoc: class Environment include TypeTableMediator include MemoryPoolMediator include VariableTableMediator include FunctionTableMediator include EnumeratorTableMediator def initialize(type_tbl) @type_table = type_tbl @memory_pool = MemoryPool.new @variable_table = VariableTable.new(@memory_pool) @function_table = FunctionTable.new(@memory_pool) @enumerator_table = EnumeratorTable.new install_builtin_functions reset end attr_reader :type_table attr_reader :memory_pool attr_reader :variable_table attr_reader :function_table attr_reader :enumerator_table attr_reader :current_scope def reset @current_scope = GlobalScope.new @branch_depth = 0 @branch_groups = {} end def enter_scope @current_scope = current_scope.inner_scope @variable_table.enter_scope @function_table.enter_scope end def leave_scope @current_scope = current_scope.outer_scope @variable_table.leave_scope @function_table.leave_scope end def enter_branch_group(*opts) if trunk_group = @branch_groups[@branch_depth - 1] trunk = trunk_group.current_branch end @branch_groups[@branch_depth] = BranchGroup.new(self, trunk, *opts) end def current_branch_group @branch_groups[@branch_depth] end def leave_branch_group @branch_groups.delete(@branch_depth) end def enter_branch(*opts) @branch_depth += 1 if group = current_branch_group group.add_options(*opts) group.create_trailing_branch(*opts) else group = enter_branch_group(*opts) group.create_first_branch(*opts) end end def current_branch if cur_group = current_branch_group cur_group.current_branch else nil end end def leave_branch # NOTE: Don't delete current branch! @branch_depth -= 1 end def enter_versioning_group @variable_table.enter_variables_value_versioning_group end def leave_versioning_group(raise_complement) @variable_table.leave_variables_value_versioning_group(raise_complement) end def begin_versioning @variable_table.begin_variables_value_versioning end def end_versioning(thin_this_version, with_rollback = thin_this_version) if thin_this_version @variable_table.thin_latest_variables_value_version!(with_rollback) end @variable_table.end_variables_value_versioning end private def install_builtin_functions @function_table.define(InspectFunction.new(@type_table)) @function_table.define(EvalFunction.new(@type_table)) end end end end adlint-3.2.0/lib/adlint/cc1/enum.rb0000644000004100000410000000310412224440633016775 0ustar www-datawww-data# C Enumerators. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cc1 #:nodoc: class EnumeratorTable def initialize @enumerators = {} end def define(enumerator) @enumerators[enumerator.identifier.value] = enumerator end def lookup(name_str) @enumerators[name_str] end def designators @enumerators.keys.to_set end end end end adlint-3.2.0/lib/adlint/cc1/syntax.rb0000644000004100000410000041043712224440633017372 0ustar www-datawww-data# AST of C language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/symbol" require "adlint/location" require "adlint/exam" require "adlint/util" require "adlint/cc1/seqp" require "adlint/cc1/operator" module AdLint #:nodoc: module Cc1 #:nodoc: # == DESCRIPTION # === SyntaxNode class hierarchy # SyntaxNode # <-- Expression # <-- ErrorExpression # <-- PrimaryExpression # <-- ObjectSpecifier # <-- ConstantSpecifier # <-- StringLiteralSpecifier # <-- NullConstantSpecifier # <-- GroupedExpression # <-- PostfixExpression # <-- ArraySubscriptExpression # <-- FunctionCallExpression # <-- MemberAccessByValueExpression # <-- MemberAccessByPointerExpression # <-- BitAccessByValueExpression # <-- BitAccessByPointerExpression # <-- PostfixIncrementExpression # <-- PostfixDecrementExpression # <-- CompoundLiteralExpression # <-- UnaryExpression # <-- PrefixIncrementExpression # <-- PrefixDecrementExpression # <-- AddressExpression # <-- IndirectionExpression # <-- UnaryArithmeticExpression # <-- SizeofExpression # <-- SizeofTypeExpression # <-- AlignofExpression # <-- AlignofTypeExpression # <-- CastExpression # <-- BinaryExpression # <-- MultiplicativeExpression # <-- AdditiveExpression # <-- ShiftExpression # <-- RelationalExpression # <-- EqualityExpression # <-- AndExpression # <-- ExclusiveOrExpression # <-- InclusiveOrExpression # <-- LogicalAndExpression # <-- LogicalOrExpression # <-- ConditionalExpression # <-- SimpleAssignmentExpression # <-- CompoundAssignmentExpression # <-- CommaSeparatedExpression # <-- Declaration # <-- FunctionDeclaration -------------------- SymbolicElement <> # <-- VariableDeclaration ----------------------+ | | | | # <-- Definition | | | | # <-- VariableDefinition --------------------+ | | | # <-- PseudoVariableDefinition | | | # <-- FunctionDefinition -----------------------+ | | # <-- KandRFunctionDefinition | | # <-- AnsiFunctionDefinition | | # <-- ParameterDefinition | | # <-- TypeDeclaration -----------------------------------+ | # <-- TypedefDeclaration | # <-- StructTypeDeclaration | # <-- PseudoStructTypeDeclaration | # <-- UnionTypeDeclaration | # <-- PseudoUnionTypeDeclaration | # <-- EnumTypeDeclaration | # <-- PseudoEnumTypeDeclaration | # <-- DeclarationSpecifiers | # <-- InitDeclarator | # <-- TypeSpecifier | # <-- StandardTypeSpecifier | # <-- TypedefTypeSpecifier | # <-- StructSpecifier | # <-- UnionSpecifier | # <-- TypeofTypeSpecifier | # <-- StructDeclaration | # <-- MemberDeclaration | # <-- SpecifierQualifierList | # <-- StructDeclarator | # <-- EnumSpecifier | # <-- Enumerator -------------------------------------------+ # <-- Declarator # <-- IdentifierDeclarator # <-- GroupedDeclarator # <-- ArrayDeclarator # <-- FunctionDeclarator # <-- AnsiFunctionDeclarator # <-- KandRFunctionDeclarator # <-- AbbreviatedFunctionDeclarator # <-- AbstractDeclarator # <-- PointerAbstractDeclarator # <-- GroupedAbstractDeclarator # <-- ArrayAbstractDeclarator # <-- FunctionAbstractDeclarator # <-- ParameterTypeList # <-- ParameterDeclaration # <-- Statement # <-- ErrorStatement # <-- LabeledStatement # <-- GenericLabeledStatement # <-- CaseLabeledStatement # <-- DefaultLabeledStatement # <-- CompoundStatement # <-- ExpressionStatement # <-- SelectionStatement # <-- IfStatement # <-- IfElseStatement # <-- SwitchStatement # <-- IterationStatement # <-- WhileStatement # <-- DoStatement # <-- ForStatement # <-- C99ForStatement # <-- JumpStatement # <-- GotoStatement # <-- ContinueStatement # <-- BreakStatement # <-- ReturnStatement # <-- TranslationUnit # <-- TypeName # <-- Initializer class SyntaxNode include Visitable include LocationHolder def initialize @head_token = nil @tail_token = nil @subsequent_sequence_point = nil end attr_accessor :head_token attr_accessor :tail_token attr_reader :subsequent_sequence_point def location subclass_responsibility end def head_location @head_token ? @head_token.location : nil end def tail_location @tail_token ? @tail_token.location : nil end def inspect(indent = 0) subclass_responsibility end def short_class_name self.class.name.sub(/\A.*::/, "") end protected # === DESCRIPTION # Append a subsequent sequence-point of this node. def append_sequence_point! @subsequent_sequence_point = SequencePoint.new(self) end # === DESCRIPTION # Delete a subsequent sequence-point of this node. def delete_sequence_point! @subsequent_sequence_point = nil end end module SyntaxNodeCollector def collect_object_specifiers(node) if node ObjectSpecifierCollector.new.tap { |col| node.accept(col) }.object_specifiers else [] end end module_function :collect_object_specifiers def collect_identifier_declarators(node) if node IdentifierDeclaratorCollector.new.tap { |col| node.accept(col) }.identifier_declarators else [] end end module_function :collect_identifier_declarators def collect_typedef_type_specifiers(node) if node TypedefTypeSpecifierCollector.new.tap { |col| node.accept(col) }.typedef_type_specifiers else [] end end module_function :collect_typedef_type_specifiers def collect_function_declarators(node) if node FunctionDeclaratorCollector.new.tap { |col| node.accept(col) }.function_declarators else [] end end module_function :collect_function_declarators def collect_simple_assignment_expressions(node) if node SimpleAssignmentExpressionCollector.new.tap { |col| node.accept(col) }.simple_assignment_expressions else [] end end module_function :collect_simple_assignment_expressions def collect_compound_assignment_expressions(node) if node CompoundAssignmentExpressionCollector.new.tap { |col| node.accept(col) }.compound_assignment_expressions else [] end end module_function :collect_compound_assignment_expressions def collect_prefix_increment_expressions(node) if node PrefixIncrementExpressionCollector.new.tap { |col| node.accept(col) }.prefix_increment_expressions else [] end end module_function :collect_prefix_increment_expressions def collect_prefix_decrement_expressions(node) if node PrefixDecrementExpressionCollector.new.tap { |col| node.accept(col) }.prefix_decrement_expressions else [] end end module_function :collect_prefix_decrement_expressions def collect_postfix_increment_expressions(node) if node PostfixIncrementExpressionCollector.new.tap { |col| node.accept(col) }.postfix_increment_expressions else [] end end module_function :collect_postfix_increment_expressions def collect_postfix_decrement_expressions(node) if node PostfixDecrementExpressionCollector.new.tap { |col| node.accept(col) }.postfix_decrement_expressions else [] end end module_function :collect_postfix_decrement_expressions def collect_additive_expressions(node) if node AdditiveExpressionCollector.new.tap { |col| node.accept(col) }.additive_expressions else [] end end module_function :collect_additive_expressions def collect_relational_expressions(node) if node RelationalExpressionCollector.new.tap { |col| node.accept(col) }.relational_expressions else [] end end module_function :collect_relational_expressions def collect_equality_expressions(node) if node EqualityExpressionCollector.new.tap { |col| node.accept(col) }.equality_expressions else [] end end module_function :collect_equality_expressions def collect_logical_and_expressions(node) if node LogicalAndExpressionCollector.new.tap { |col| node.accept(col) }.logical_and_expressions else [] end end module_function :collect_logical_and_expressions def collect_logical_or_expressions(node) if node LogicalOrExpressionCollector.new.tap { |col| node.accept(col) }.logical_or_expressions else [] end end module_function :collect_logical_or_expressions def collect_generic_labeled_statements(node) if node GenericLabeledStatementCollector.new.tap { |col| node.accept(col) }.generic_labeled_statements else [] end end module_function :collect_generic_labeled_statements def collect_if_statements(node) if node IfStatementCollector.new.tap { |col| node.accept(col) }.if_statements else [] end end module_function :collect_if_statements def collect_if_else_statements(node) if node IfElseStatementCollector.new.tap { |col| node.accept(col) }.if_else_statements else [] end end module_function :collect_if_else_statements def collect_goto_statements(node) if node GotoStatementCollector.new.tap { |col| node.accept(col) }.goto_statements else [] end end module_function :collect_goto_statements def collect_array_declarators(node) if node ArrayDeclaratorCollector.new.tap { |col| node.accept(col) }.array_declarators else [] end end module_function :collect_array_declarators def collect_constant_specifiers(node) if node ConstantSpecifierCollector.new.tap { |col| node.accept(col) }.constant_specifiers else [] end end module_function :collect_constant_specifiers end module InterpSyntaxBridge # NOTE: InterpreterMediator includes this module to bridge constant # designator collector to this layer. def _interp_syntax_bridge_ { enumerator_designators: method(:enumerator_designators), function_designators: method(:function_designators), variable_designators: method(:variable_designators) } end end class Expression < SyntaxNode def initialize super @full = false end def full=(expr_is_full) @full = expr_is_full # NOTE: The ISO C99 standard says; # # Annex C (informative) Sequence points # # 1 The following are the sequence points described in 5.1.2.3: # # -- The end of a full expression: an initializer (6.7.8); the # expression in an expression statement (6.8.3); the controlling # expression of a while or do statement (6.8.5); each of the # expressions of a for statement (6.8.5.3); the expression in a # return statement (6.8.6.4). if expr_is_full append_sequence_point! else delete_sequence_point! end end def have_side_effect? subclass_responsibility end def constant?(interp_bridge) ExpressionConstancy.new(interp_bridge).check(self) end def logical? subclass_responsibility end def arithmetic? subclass_responsibility end def bitwise? subclass_responsibility end def object_specifiers ObjectSpecifierCollector.new.tap { |col| self.accept(col) }.object_specifiers end def to_normalized_logical(parent_expr = nil) subclass_responsibility end def to_complemental_logical # NOTE: This method must be invoked on a normalized expression. subclass_responsibility end def to_s subclass_responsibility end private def create_normalized_logical_of(expr) EqualityExpression.new(Token.new("!=", "!=", expr.location), GroupedExpression.new(expr), ConstantSpecifier.of_zero(expr.location)) end end class ErrorExpression < Expression def initialize(err_tok) super() @error_token = err_tok end def location head_location end def have_side_effect? true end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) self end def to_complemental_logical self end def to_s @error_token.value end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@error_token.value}" end end class PrimaryExpression < Expression; end class ObjectSpecifier < PrimaryExpression def initialize(id) super() @identifier = id end attr_reader :identifier def location @identifier.location end def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s @identifier.value end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@identifier.value}" end end class ConstantSpecifier < PrimaryExpression def self.of_zero(loc = nil) self.new(Token.new(:CONSTANT, "0", loc || Location.new)) end def initialize(const) super() @constant = const end attr_reader :constant def location @constant.location end def prefix @constant.value.scan(/\A(?:0x|0b|0(?=[0-9])|L)/i).first end def suffix @constant.value.scan(/(?:[UL]+|[FL]+)\z/i).first end def character? @constant.value =~ /'.*'/ end def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s @constant.value end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@constant.value}" end end class StringLiteralSpecifier < PrimaryExpression def initialize(lit) super() @literal = lit end attr_reader :literal def location @literal.location end def prefix @literal.value.scan(/\AL/i).first end def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s @literal.value end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@literal.value}" end end class NullConstantSpecifier < PrimaryExpression def initialize(tok) super() @token = tok end attr_reader :token def location @token.location end def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s @token.value end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@token.value}" end end class GroupedExpression < PrimaryExpression def initialize(expr) super() @expression = expr self.head_token = expr.head_token self.tail_token = expr.tail_token end attr_reader :expression def location head_location end def have_side_effect? @expression.have_side_effect? end def logical? @expression.logical? end def arithmetic? @expression.arithmetic? end def bitwise? @expression.bitwise? end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression GroupedExpression.new(@expression.to_normalized_logical(parent_expr)) else self end end def to_complemental_logical GroupedExpression.new(@expression.to_complemental_logical) end def to_s "(#{expression.to_s})" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect})\n" + @expression.inspect(indent + 1) end end class PostfixExpression < Expression def initialize(op) @operator = op end attr_reader :operator def location @operator.location end end class ArraySubscriptExpression < PostfixExpression def initialize(expr, ary_subs, left_bracket) super(left_bracket) @expression = expr @array_subscript = ary_subs end attr_reader :expression attr_reader :array_subscript def have_side_effect? @expression.have_side_effect? || @array_subscript.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@expression.to_s}[#{@array_subscript.to_s}]" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect})\n" + @expression.inspect(indent + 1) + "\n" + @array_subscript.inspect(indent + 1) end end class FunctionCallExpression < PostfixExpression def initialize(expr, arg_exprs, left_paren) super(left_paren) @expression = expr @argument_expressions = arg_exprs end attr_reader :expression attr_reader :argument_expressions def have_side_effect? true end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@expression.to_s}(" + @argument_expressions.map { |expr| expr.to_s }.join(",") + ")" end def inspect(indent = 0) ([" " * indent + "#{short_class_name} (#{location.inspect})"] + [@expression.inspect(indent + 1)] + @argument_expressions.map { |a| a.inspect(indent + 1) }).join("\n") end end class MemberAccessByValueExpression < PostfixExpression def initialize(expr, id, dot) super(dot) @expression = expr @identifier = id end attr_reader :expression attr_reader :identifier def have_side_effect? @expression.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@expression.to_s}.#{@identifier.value}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@expression.inspect}.#{@identifier.value}" end end class MemberAccessByPointerExpression < PostfixExpression def initialize(expr, id, arrow) super(arrow) @expression = expr @identifier = id end attr_reader :expression attr_reader :identifier def have_side_effect? @expression.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@expression.to_s}->#{@identifier.value}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@expression.inspect}->#{@identifier.value}" end end class BitAccessByValueExpression < PostfixExpression def initialize(expr, const, dot) super(dot) @expression = expr @constant = const end attr_reader :expression attr_reader :constant def have_side_effect? @expression.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@expression.to_s}.#{@constant.value}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@expression.inspect}.#{@constant.value}" end end class BitAccessByPointerExpression < PostfixExpression def initialize(expr, const, arrow) super(arrow) @expression = expr @constant = const end attr_reader :expression attr_reader :constant def have_side_effect? @expression.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@expression.to_s}->#{@constant.value}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@expression.inspect}->#{@constant.value}" end end class PostfixIncrementExpression < PostfixExpression def initialize(op, ope) super(op) @operand = ope end attr_reader :operand def have_side_effect? true end def logical? false end def arithmetic? true end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@operand.to_s}++" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + @operand.inspect end end class PostfixDecrementExpression < PostfixExpression def initialize(op, ope) super(op) @operand = ope end attr_reader :operand def have_side_effect? true end def logical? false end def arithmetic? true end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@operand.to_s}--" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + @operand.inspect end end class CompoundLiteralExpression < PostfixExpression def initialize(type_name, inits, left_paren) super(left_paren) @type_name = type_name @initializers = inits end attr_reader :type_name attr_reader :initializers def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "(#{@type_name.to_s}){" + @initializers.map { |ini| ini.to_s }.join(",") + "}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + @initializers.map { |init| init.inspect }.join(",") end end class UnaryExpression < Expression def initialize(op, ope) super() @operator = op @operand = ope end attr_reader :operator attr_reader :operand def location @operator.location end def to_s @operator.value + @operand.to_s end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@operator.value} #{@operand.inspect}" end end class PrefixIncrementExpression < UnaryExpression def have_side_effect? true end def logical? false end def arithmetic? true end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class PrefixDecrementExpression < UnaryExpression def have_side_effect? true end def logical? false end def arithmetic? true end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class AddressExpression < UnaryExpression def have_side_effect? operand.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class IndirectionExpression < UnaryExpression def have_side_effect? operand.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class UnaryArithmeticExpression < UnaryExpression def have_side_effect? operand.have_side_effect? end def logical? operator.type == "!" end def arithmetic? false end def bitwise? operator.type == "~" end def to_normalized_logical(parent_expr = nil) if operator.type == "!" normalized_operand = @operand.to_normalized_logical GroupedExpression.new(normalized_operand.to_complemental_logical) else case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end end def to_complemental_logical if operator.type == "!" # NOTE: `!' expression should be normalized into an equality-expression # before invoking #to_complemental_logical. __NOTREACHED__ else self end end end class SizeofExpression < UnaryExpression def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "sizeof(#{@operand.to_s})" end end class SizeofTypeExpression < UnaryExpression def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "sizeof(#{@operand.to_s})" end end class AlignofExpression < UnaryExpression def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "alignof(#{@operand.to_s})" end end class AlignofTypeExpression < UnaryExpression def have_side_effect? false end def logical? false end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "alignof(#{@operand.to_s})" end end class CastExpression < Expression def initialize(type_name, ope) super() @type_name = type_name @operand = ope end attr_reader :type_name attr_reader :operand def location head_location end def have_side_effect? @operand.have_side_effect? end def logical? @operand.logical? end def arithmetic? @operand.arithmetic? end def bitwise? @operand.bitwise? end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "(#{@type_name.to_s}) #{@operand.to_s}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@type_name.inspect} #{@operand.inspect}" end end class BinaryExpression < Expression def initialize(op, lhs_operand, rhs_operand) super() @operator = op @lhs_operand = lhs_operand @rhs_operand = rhs_operand end attr_reader :operator attr_reader :lhs_operand attr_reader :rhs_operand def location @operator.location end def to_s "#{@lhs_operand.to_s} #{@operator.value} #{@rhs_operand.to_s}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{@operator.value} #{lhs_operand.inspect} #{rhs_operand.inspect}" end end class MultiplicativeExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? false end def arithmetic? true end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class AdditiveExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? false end def arithmetic? true end def bitwise? false end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class ShiftExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? true end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class RelationalExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? true end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) self end def to_complemental_logical op = ComparisonOperator.new(@operator).for_complement.to_s op_tok = Token.new(op, op, @operator.location) RelationalExpression.new(op_tok, @lhs_operand, @rhs_operand) end end class EqualityExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? true end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) self end def to_complemental_logical op = ComparisonOperator.new(@operator).for_complement.to_s op_tok = Token.new(op, op, @operator.location) EqualityExpression.new(op_tok, @lhs_operand, @rhs_operand) end end class AndExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? true end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class ExclusiveOrExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? true end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class InclusiveOrExpression < BinaryExpression def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? false end def arithmetic? false end def bitwise? true end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class LogicalAndExpression < BinaryExpression def initialize(op, lhs_operand, rhs_operand) super # NOTE: The ISO C99 standard says; # # 6.5.13 Logical AND operator # # Semantics # # 4 Unlike the bitwise binary & operator, the && operator guarantees # left-to-right evaluation; there is a sequence point after the # evaluation of the first operand. If the first operand compares equal # to 0, the second operand is not evaluated. # # NOTE: Sequence point will be reached after lhs value reference. # So, notification should be done by ExpressionEvaluator manually. # @lhs_operand.append_sequence_point! end def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? true end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) LogicalAndExpression.new(@operator, @lhs_operand.to_normalized_logical(self), @rhs_operand.to_normalized_logical(self)) end def to_complemental_logical LogicalOrExpression.new(Token.new("||", "||", @operator.location), @lhs_operand.to_complemental_logical, @rhs_operand.to_complemental_logical) end end class LogicalOrExpression < BinaryExpression def initialize(op, lhs_operand, rhs_operand) super # NOTE: The ISO C99 standard says; # # 6.5.14 Logical OR operator # # Semantics # # 4 Unlike the bitwise | operator, the || operator guarantees # left-to-right evaluation; there is a sequence point after the # evaluation of the first operand. If the first operand compares # unequal to 0, the second operand is not evaluated. # # NOTE: Sequence point will be reached after lhs value reference. # So, notification should be done by ExpressionEvaluator manually. # @lhs_operand.append_sequence_point! end def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end def logical? true end def arithmetic? false end def bitwise? false end def to_normalized_logical(parent_expr = nil) LogicalOrExpression.new(@operator, @lhs_operand.to_normalized_logical(self), @rhs_operand.to_normalized_logical(self)) end def to_complemental_logical LogicalAndExpression.new(Token.new("&&", "&&", @operator.location), @lhs_operand.to_complemental_logical, @rhs_operand.to_complemental_logical) end end class ConditionalExpression < Expression def initialize(cond, then_expr, else_expr, question_mark) super() @condition = cond @then_expression = then_expr @else_expression = else_expr @question_mark = question_mark # NOTE: The ISO C99 standard says; # # 6.5.15 Conditional operator # # Semantics # # 4 The first operand is evaluated; there is a sequence poit after its # evaluation. The second operand is evaluated only if the first # compares unequal to 0; the third operand is evaluated only if the # first compares equal to 0; thre result is the value of the second or # third operand (whichever is evaluated), converted to the type # described below. If an attempt is made to modify the result of a # conditional operator or to access it after the next sequence point, # the behavior is undefined. @condition.append_sequence_point! # NOTE: Add extra sequence points in order not to warn about side-effects # in both the 2nd and 3rd expressions because only one of the 2nd # and 3rd expressions is actually executed. @then_expression.append_sequence_point! @else_expression.append_sequence_point! end attr_reader :condition attr_reader :then_expression attr_reader :else_expression def location @question_mark.location end def have_side_effect? @condition.have_side_effect? || @then_expression.have_side_effect? || @else_expression.have_side_effect? end def logical? @then_expression.logical? || @else_expression.logical? end def arithmetic? @then_expression.arithmetic? || @else_expression.arithmetic? end def bitwise? @then_expression.bitwise? || @else_expression.bitwise? end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end def to_s "#{@condition.to_s} ? " + "#{@then_expression.to_s} : #{@else_expression.to_s}" end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @condition.inspect(indent + 1) + "\n" + @then_expression.inspect(indent + 1) + "\n" + @else_expression.inspect(indent + 1) end end class SimpleAssignmentExpression < BinaryExpression def have_side_effect? true end def logical? rhs_operand.logical? end def arithmetic? rhs_operand.arithmetic? end def bitwise? rhs_operand.bitwise? end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class CompoundAssignmentExpression < BinaryExpression def have_side_effect? true end def logical? false end def arithmetic? ["*=", "/=", "%=", "+=", "-="].include?(operator.type) end def bitwise? ["<<=", ">>=", "&=", "^=", "|="].include?(operator.type) end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(self) else self end end def to_complemental_logical self end end class CommaSeparatedExpression < Expression def initialize(fst_expr) super() @expressions = [] push(fst_expr) end attr_reader :expressions def location head_location end def have_side_effect? @expressions.any? { |expr| expr.have_side_effect? } end def logical? @expressions.last.logical? end def arithmetic? @expressions.last.arithmetic? end def bitwise? @expressions.last.bitwise? end def to_normalized_logical(parent_expr = nil) case parent_expr when nil, LogicalAndExpression, LogicalOrExpression create_normalized_logical_of(@expressions.last) else self end end def to_complemental_logical @expressions.last.to_complemental_logical end def to_s @expressions.map { |expr| expr.to_s }.join(",") end def push(expr) self.head_token = expr.head_token if @expressions.empty? @expressions.push(expr) self.tail_token = expr.tail_token # NOTE: The ISO C99 standard says; # # 6.5.17 Comma operator # # Semantics # # 2 The left operand of a comma operator is evaluated as a void # expression; there is a sequence point after its evaluation. Then the # right operand is evaluated; the result has its type and value. If an # attempt is made to modify the result of a comma operator or to access # it after the next sequence point, the behavior is undefined. @expressions[-2].append_sequence_point! if @expressions.size > 1 self end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expressions.map { |expr| expr.inspect(indent + 1) }.join("\n") end end module DeclarationSpecifiersHolder def storage_class_specifier @declaration_specifiers ? @declaration_specifiers.storage_class_specifier : nil end def function_specifier # NOTE: A function-specifier should only be in function-definitions. @declaration_specifiers ? @declaration_specifiers.function_specifier : nil end def type_qualifiers @declaration_specifiers ? @declaration_specifiers.type_qualifiers : [] end def type_specifiers @declaration_specifiers ? @declaration_specifiers.type_specifiers : [] end def explicitly_typed? @declaration_specifiers && @declaration_specifiers.explicitly_typed? end def implicitly_typed? !explicitly_typed? end end class Declaration < SyntaxNode include DeclarationSpecifiersHolder def initialize(dcl_specs, init_dcrs, sym_tbl) super() @declaration_specifiers = dcl_specs @init_declarators = init_dcrs @items = build_items(dcl_specs, init_dcrs, sym_tbl) end attr_reader :declaration_specifiers attr_reader :init_declarators attr_reader :items def location head_location end def inspect(indent = 0) ([" " * indent + "#{short_class_name} (#{location.inspect})"] + @items.map { |item| item.inspect(indent + 1) }).join("\n") end private def build_items(dcl_specs, init_dcrs, sym_tbl) build_type_declaration(dcl_specs, init_dcrs, sym_tbl) + build_function_declaration(dcl_specs, init_dcrs, sym_tbl) + build_variable_declaration(dcl_specs, init_dcrs, sym_tbl) + build_variable_definition(dcl_specs, init_dcrs, sym_tbl) end def build_type_declaration(dcl_specs, init_dcrs, sym_tbl) return [] unless dcl_specs type_dcls = [] dcl_specs.type_specifiers.each do |type_spec| builder = TypeDeclarationBuilder.new(sym_tbl) type_spec.accept(builder) type_dcls.concat(builder.type_declarations) end if sc = dcl_specs.storage_class_specifier and sc.type == :TYPEDEF init_dcrs.each do |init_dcr| id = init_dcr.declarator.identifier sym = sym_tbl.create_new_symbol(TypedefName, id) type_dcls.push(TypedefDeclaration.new(dcl_specs, init_dcr, sym)) end end type_dcls end def build_function_declaration(dcl_specs, init_dcrs, sym_tbl) if dcl_specs && sc_spec = dcl_specs.storage_class_specifier and sc_spec.type == :TYPEDEF return [] end init_dcrs.each_with_object([]) do |init_dcr, fun_dcls| if init_dcr.declarator.function? id = init_dcr.declarator.identifier sym = sym_tbl.create_new_symbol(ObjectName, id) fun_dcls.push(FunctionDeclaration.new(dcl_specs, init_dcr, sym)) end end end def build_variable_declaration(dcl_specs, init_dcrs, sym_tbl) return [] unless dcl_specs unless sc = dcl_specs.storage_class_specifier and sc.type == :EXTERN return [] end init_dcrs.each_with_object([]) do |init_dcr, var_dcls| if init_dcr.declarator.variable? dcr = init_dcr.declarator sym = sym_tbl.create_new_symbol(ObjectName, dcr.identifier) var_dcls.push(VariableDeclaration.new(dcl_specs, dcr, sym)) end end end def build_variable_definition(dcl_specs, init_dcrs, sym_tbl) if dcl_specs && sc = dcl_specs.storage_class_specifier and sc.type == :EXTERN || sc.type == :TYPEDEF return [] end init_dcrs.each_with_object([]) do |init_dcr, var_defs| if init_dcr.declarator.variable? id = init_dcr.declarator.identifier sym = sym_tbl.create_new_symbol(ObjectName, id) var_defs.push(VariableDefinition.new(dcl_specs, init_dcr, sym)) end end end end class FunctionDeclaration < SyntaxNode include SymbolicElement include DeclarationSpecifiersHolder include SyntaxNodeCollector def initialize(dcl_specs, init_dcr, sym) super() @declaration_specifiers = dcl_specs @init_declarator = init_dcr @symbol = sym @type = nil end attr_reader :declaration_specifiers attr_reader :init_declarator attr_reader :symbol attr_accessor :type def identifier @init_declarator.declarator.identifier end def signature FunctionSignature.new(identifier.value, @type) end def function_declarator collect_function_declarators(@init_declarator).first end def location identifier.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + identifier.value end end class VariableDeclaration < SyntaxNode include SymbolicElement include DeclarationSpecifiersHolder def initialize(dcl_specs, dcr, sym) super() @declaration_specifiers = dcl_specs @declarator = dcr @symbol = sym @type = nil end attr_reader :declaration_specifiers attr_reader :declarator attr_reader :symbol attr_accessor :type def identifier @declarator.identifier end def location identifier.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + identifier.value end end class Definition < SyntaxNode include DeclarationSpecifiersHolder def initialize(dcl_specs) @declaration_specifiers = dcl_specs @type = nil end attr_reader :declaration_specifiers attr_accessor :type end class VariableDefinition < Definition include SymbolicElement def initialize(dcl_specs, init_dcr, sym) super(dcl_specs) @init_declarator = init_dcr @symbol = sym end attr_reader :init_declarator attr_reader :symbol def identifier @init_declarator.declarator.identifier end def initializer @init_declarator.initializer end def location identifier.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + identifier.value end end class TypeDeclaration < SyntaxNode include SymbolicElement def initialize(sym) super() @symbol = sym end attr_reader :symbol end class TypedefDeclaration < TypeDeclaration include DeclarationSpecifiersHolder def initialize(dcl_specs, init_dcr, sym) super(sym) @declaration_specifiers = dcl_specs @init_declarator = init_dcr @type = nil end attr_reader :declaration_specifiers attr_reader :init_declarator attr_accessor :type def identifier @init_declarator.declarator.identifier end def declarator @init_declarator.declarator end def location identifier.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + identifier.value end end class StructTypeDeclaration < TypeDeclaration def initialize(struct_spec, sym) super(sym) @struct_specifier = struct_spec @struct_declarations = struct_spec.struct_declarations @type = nil end attr_reader :struct_specifier attr_reader :struct_declarations attr_accessor :type def identifier @struct_specifier.identifier end def location identifier.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{identifier.value}\n" + @struct_declarations.map { |sd| sd.inspect(indent + 1) }.join("\n") end end class PseudoStructTypeDeclaration < StructTypeDeclaration def initialize(struct_spec) super(struct_spec, nil) end def mark_as_referred_by(tok) end end class UnionTypeDeclaration < TypeDeclaration def initialize(union_spec, sym) super(sym) @union_specifier = union_spec @struct_declarations = union_spec.struct_declarations @type = nil end attr_reader :union_specifier attr_reader :struct_declarations attr_accessor :type def identifier @union_specifier.identifier end def location identifier.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{identifier.value}\n" + @struct_declarations.map { |sd| sd.inspect(indent + 1) }.join("\n") end end class PseudoUnionTypeDeclaration < UnionTypeDeclaration def initialize(union_spec) super(union_spec, nil) end def mark_as_referred_by(tok) end end class EnumTypeDeclaration < TypeDeclaration def initialize(enum_spec, sym) super(sym) @enum_specifier = enum_spec @type = nil end attr_reader :enum_specifier attr_accessor :type def identifier @enum_specifier.identifier end def location identifier.location end def enumerators @enum_specifier.enumerators end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{identifier.value}" end end class PseudoEnumTypeDeclaration < EnumTypeDeclaration def initialize(enum_spec) super(enum_spec, nil) end def mark_as_referred_by(tok) end end class DeclarationSpecifiers < SyntaxNode def initialize super @storage_class_specifier = nil @function_specifier = nil @type_qualifiers = [] @type_specifiers = [] end attr_accessor :storage_class_specifier attr_accessor :function_specifier attr_reader :type_qualifiers attr_reader :type_specifiers def location head_location end def explicitly_typed? !implicitly_typed? end def implicitly_typed? @type_specifiers.empty? end def inspect(indent = 0) " " * indent + short_class_name end end class InitDeclarator < SyntaxNode def initialize(dcr, init) super() @declarator = dcr @initializer = init end attr_reader :declarator attr_reader :initializer def location @declarator.identifier.location end def inspect(indent = 0) " " * indent + short_class_name end end class TypeSpecifier < SyntaxNode def to_s subclass_responsibility end end class StandardTypeSpecifier < TypeSpecifier def initialize(tok) super() @token = tok end attr_reader :token def location head_location end def to_s @token.value end def inspect(indent = 0) " " * indent + short_class_name end end class TypedefTypeSpecifier < TypeSpecifier def initialize(tok) super() @token = tok end attr_reader :token def location head_location end def identifier @token end def to_s @token.value end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + @token.value end end class StructSpecifier < TypeSpecifier def initialize(id, struct_dcls) super() @identifier = id @struct_declarations = struct_dcls end attr_reader :identifier attr_reader :struct_declarations def location @identifier.location end def to_s if @struct_declarations if @struct_declarations.empty? "struct #{identifier.value} {}" else "struct #{identifier.value} { " + @struct_declarations.map { |decl| decl.to_s }.join(" ") + " }" end else "struct #{identifier.value}" end end def inspect(indent = 0) " " * indent + short_class_name end end class UnionSpecifier < TypeSpecifier def initialize(id, struct_dcls) super() @identifier = id @struct_declarations = struct_dcls end attr_reader :identifier attr_reader :struct_declarations def location @identifier.location end def to_s if @struct_declarations if @struct_declarations.empty? "union #{identifier.value} {}" else "union #{identifier.value} { " + @struct_declarations.map { |decl| decl.to_s }.join(" ") + " }" end else "union #{identifier.value}" end end def inspect(indent = 0) " " * indent + short_class_name end end class StructDeclaration < SyntaxNode def initialize(spec_qual_list, struct_dcrs) super() @specifier_qualifier_list = spec_qual_list @struct_declarators = struct_dcrs @items = build_items(spec_qual_list, struct_dcrs) end attr_reader :specifier_qualifier_list attr_reader :struct_declarators attr_reader :items def location @specifier_qualifier_list.location end def to_s @items.map { |item| item.to_s + ";" }.join(" ") end def inspect(indent = 0) ([" " * indent + "#{short_class_name} (#{location.inspect})"] + @items.map { |item| item.inspect(indent + 1) }).join("\n") end private def build_items(spec_qual_list, struct_dcrs) struct_dcrs.each_with_object([]) do |struct_dcr, items| # FIXME: Must support unnamed bit padding. next unless struct_dcr.declarator items.push(MemberDeclaration.new(spec_qual_list, struct_dcr)) end end end class MemberDeclaration < SyntaxNode def initialize(spec_qual_list, struct_dcl) super() @specifier_qualifier_list = spec_qual_list @struct_declarator = struct_dcl @type = nil end attr_reader :specifier_qualifier_list attr_reader :struct_declarator attr_accessor :type def identifier @struct_declarator.declarator.identifier end def location identifier.location end def to_s "#{type.brief_image} #{identifier.value}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + identifier.value end end class SpecifierQualifierList < SyntaxNode def initialize super @type_specifiers = [] @type_qualifiers = [] end attr_reader :type_specifiers attr_reader :type_qualifiers def location head_location end def inspect(indent = 0) " " * indent + short_class_name end end class StructDeclarator < SyntaxNode def initialize(dcr, expr) super() @declarator = dcr @expression = expr end attr_reader :declarator attr_reader :expression def location @declarator ? @declarator.location : @expression.location end def bitfield? @expression != nil end def inspect(indent = 0) " " * indent + short_class_name end end class EnumSpecifier < TypeSpecifier def initialize(id, enums, trailing_comma = nil) super() @identifier = id @enumerators = enums @trailing_comma = trailing_comma end attr_reader :identifier attr_reader :enumerators attr_reader :trailing_comma def location @identifier.location end def to_s if @enumerators if @enumerators.empty? "enum #{@identifier.value} {}" else "enum #{@identifier.value} { " + @enumerators.map { |enum| enum.to_s }.join(", ") + " }" end else "enum #{identifier.value}" end end def inspect(indent = 0) " " * indent + short_class_name end end class Enumerator < SyntaxNode include SymbolicElement def initialize(id, expr, sym) super() @identifier = id @expression = expr @symbol = sym end attr_reader :identifier attr_reader :expression attr_reader :symbol attr_accessor :value attr_accessor :type def location @identifier.location end def to_s if @expression "#{@identifier.value} = #{@expression.to_s}" else "#{@identifier.value}" end end def inspect(indent = 0) " " * indent + short_class_name end end class TypeofTypeSpecifier < TypeSpecifier def initialize(expr, type_name) super() @expression = expr @type_name = type_name end attr_reader :expression attr_reader :type_name def location head_location end def to_s if @expression "__typeof__(#{@expression.to_s})" else "__typeof__(#{@type_name.to_s})" end end def inspect(indent = 0) " " * indent + short_class_name end end class Declarator < SyntaxNode def initialize super @pointer = nil @full = false end attr_accessor :pointer def identifier subclass_responsibility end def abstract? false end def full=(dcr_is_full) @full = dcr_is_full # NOTE: The ISO C99 standard says; # # 6.7.5 Declarators # # Semantics # # 3 A full declarator is a declarator that is not part of another # declarator. The end of a full declarator is a sequence point. If, # in the nested sequence of declarators in a full declarator, there is # a declarator specifying a variable length array type, the type # specified by the full declarator is said to be variably modified. # Furthermore, any type derived by declarator type derivation from a # variably modified type is itself variably modified. if dcr_is_full append_sequence_point! else delete_sequence_point! end end def full? @full end def base subclass_responsibility end def function? subclass_responsibility end def variable? !function? end def parameter_type_list subclass_responsibility end def innermost_parameter_type_list subclass_responsibility end def identifier_list subclass_responsibility end end class IdentifierDeclarator < Declarator def initialize(id) super() @identifier = id end attr_reader :identifier def location @identifier.location end def base nil end def parameter_type_list nil end def innermost_parameter_type_list nil end def identifier_list nil end def function?(stack = []) stack.push(:pointer) if pointer stack.last == :function end def inspect(indent = 0) " " * indent + "#{short_class_name} #{@identifier.value}" end end class GroupedDeclarator < Declarator def initialize(base_dcr) super() @base = base_dcr end attr_reader :base def location @base ? @base.location || head_location : head_location end def identifier @base.identifier end def parameter_type_list @base.parameter_type_list end def innermost_parameter_type_list @base.innermost_parameter_type_list end def identifier_list @base.identifier_list end def function?(stack = []) stack.push(:pointer) if pointer @base.function?(stack) stack.last == :function end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @base.inspect(indent + 1) end end class ArrayDeclarator < Declarator def initialize(base_dcr, size_expr) super() @base = base_dcr @size_expression = size_expr end attr_reader :base attr_reader :size_expression def location @base ? @base.location || head_location : head_location end def identifier @base.identifier end def parameter_type_list @base.parameter_type_list end def innermost_parameter_type_list @base.innermost_parameter_type_list end def identifier_list @base.identifier_list end def function?(stack = []) stack.push(:pointer) if pointer stack.push(:array) @base.function?(stack) stack.last == :function end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @base.inspect(indent + 1) end end class FunctionDeclarator < Declarator def initialize(base_dcr) super() @base = base_dcr end attr_reader :base def location @base ? @base.location || head_location : head_location end def identifier @base.identifier end def function?(stack = []) stack.push(:pointer) if pointer stack.push(:function) @base.function?(stack) stack.last == :function end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @base.inspect(indent + 1) end end class AnsiFunctionDeclarator < FunctionDeclarator def initialize(base_dcr, param_type_list) super(base_dcr) @parameter_type_list = param_type_list end attr_accessor :parameter_type_list def innermost_parameter_type_list @base.innermost_parameter_type_list || @parameter_type_list end def identifier_list @base.identifier_list end end class KandRFunctionDeclarator < FunctionDeclarator def initialize(base_dcr, id_list) super(base_dcr) @identifier_list = id_list end attr_reader :identifier_list def parameter_type_list @base.parameter_type_list end def innermost_parameter_type_list @base.innermost_parameter_type_list end end class AbbreviatedFunctionDeclarator < FunctionDeclarator def parameter_type_list @base.parameter_type_list end def innermost_parameter_type_list @base.innermost_parameter_type_list end def identifier_list @base.identifier_list end end class ParameterTypeList < SyntaxNode def initialize(params, have_va_list) super() @parameters = params @have_va_list = have_va_list end attr_reader :parameters def location head_location end def have_va_list? @have_va_list end def inspect(indent = 0) " " * indent + short_class_name end end class ParameterDeclaration < SyntaxNode include DeclarationSpecifiersHolder def initialize(dcl_specs, dcr) super() @declaration_specifiers = dcl_specs @declarator = dcr @type = nil end attr_reader :declaration_specifiers attr_reader :declarator attr_accessor :type def location @declarator ? @declarator.location : @declaration_specifiers.location end def inspect(indent = 0) " " * indent + short_class_name end end class Statement < SyntaxNode def initialize super @executed = false end attr_writer :executed def executed? @executed end end class ErrorStatement < Statement def initialize(err_tok) super() @error_token = err_tok end def location head_location end def inspect(indent = 0) " " * indent + "#{short_class_name}" end end class LabeledStatement < Statement; end class GenericLabeledStatement < LabeledStatement def initialize(label, stmt) super() @label = label @statement = stmt @referrers = [] end attr_reader :label attr_reader :statement attr_reader :referrers def location @label.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@label.inspect})\n" + @statement.inspect(indent + 1) end end class CaseLabeledStatement < LabeledStatement def initialize(expr, stmt) super() @expression = expr @statement = stmt end attr_reader :expression attr_reader :statement attr_accessor :normalized_expression def location head_location end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expression.inspect(indent + 1) + "\n" + @statement.inspect(indent + 1) end end class DefaultLabeledStatement < LabeledStatement def initialize(stmt) super() @statement = stmt end attr_reader :statement attr_accessor :normalized_expression def location head_location end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @statement.inspect(indent + 1) end end class CompoundStatement < Statement def initialize(block_items) super() @block_items = block_items end attr_reader :block_items def location head_location end def inspect(indent = 0) ([" " * indent + short_class_name] + @block_items.map { |item| item.inspect(indent + 1) }).join("\n") end end class ExpressionStatement < Statement def initialize(expr) super() @expression = expr end attr_reader :expression def location head_location end def inspect(indent = 0) " " * indent + "#{short_class_name}" + (@expression ? "\n#{@expression.inspect(indent + 1)}" : "") end end class SelectionStatement < Statement; end class IfStatement < SelectionStatement def initialize(expr, stmt, header_term) super() @expression = expr @statement = stmt @header_terminator = header_term end attr_reader :expression attr_reader :statement attr_reader :header_terminator def location head_location end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expression.inspect(indent + 1) + "\n" + @statement.inspect(indent + 1) end end class IfElseStatement < SelectionStatement def initialize(expr, then_stmt, else_stmt, then_term, else_term) super() @expression = expr @then_statement = then_stmt @else_statement = else_stmt @then_header_terminator = then_term @else_header_terminator = else_term end attr_reader :expression attr_reader :then_statement attr_reader :else_statement attr_reader :then_header_terminator attr_reader :else_header_terminator def location head_location end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expression.inspect(indent + 1) + "\n" + @then_statement.inspect(indent + 1) + "\n" + @else_statement.inspect(indent + 1) end end class SwitchStatement < SelectionStatement def initialize(expr, stmt) super() @expression = expr @statement = stmt derive_clause_conditions end attr_reader :expression attr_reader :statement def location head_location end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expression.inspect(indent + 1) + "\n" + @statement.inspect(indent + 1) end private def derive_clause_conditions case_exprs = [] default_stmt = nil @statement.block_items.each do |item| case item when GenericLabeledStatement item = item.statement redo when CaseLabeledStatement item.normalized_expression = equal_to_expression(@expression, item.expression, item.location) case_exprs.push(item.normalized_expression) item = item.statement redo when DefaultLabeledStatement default_stmt = item item = item.statement redo end end if default_stmt default_stmt.normalized_expression = derive_default_clause_condition(case_exprs, default_stmt.location) end end def derive_default_clause_condition(case_exprs, loc) if case_exprs.empty? equal_to_expression(@expression, @expression, loc) else case_exprs.map { |expr| not_equal_to_expression(expr.lhs_operand, expr.rhs_operand, loc) }.reduce { |cond, expr| logical_and_expression(cond, expr, loc) } end end def equal_to_expression(lhs, rhs, loc) EqualityExpression.new(equal_to_operator(loc), lhs, rhs) end def not_equal_to_expression(lhs, rhs, loc) EqualityExpression.new(not_equal_to_operator(loc), lhs, rhs) end def logical_and_expression(lhs, rhs, loc) LogicalAndExpression.new(logical_and_operator(loc), lhs, rhs) end def equal_to_operator(loc) Token.new("==", "==", loc) end def not_equal_to_operator(loc) Token.new("!=", "!=", loc) end def logical_and_operator(loc) Token.new("&&", "&&", loc) end end class IterationStatement < Statement include SyntaxNodeCollector def deduct_controlling_expression subclass_responsibility end def varying_variable_names collect_varying_variable_names(self).uniq end def varying_expressions collect_varying_binary_expressions(self) + collect_varying_unary_expressions(self) end private def deduct_controlling_expression_candidates(rough_cands) case when rough_cands.empty? [[nil, nil]] when rough_cands.size == 1 rough_cands else varying_var_names = varying_variable_names rough_cands.select do |expr_pair| collect_object_specifiers(expr_pair.first).any? do |os| varying_var_names.include?(os.identifier.value) end end end end def collect_loop_breaking_selection_statements(node) collect_loop_breaking_if_statements(node) + collect_loop_breaking_if_else_statements(node) end def collect_loop_breaking_if_statements(node) collect_if_statements(node).select do |stmt| contain_loop_breaking?(stmt.statement) end end def collect_loop_breaking_if_else_statements(node) collect_if_else_statements(node).select do |stmt| contain_loop_breaking?(stmt.then_statement) || contain_loop_breaking?(stmt.else_statement) end end def contain_loop_breaking?(node) items = node.kind_of?(CompoundStatement) ? node.block_items : [node] items.any? do |item| case item when GenericLabeledStatement item = item.statement redo when GotoStatement # FIXME: Must check whether the goto-statement goes outside of the # loop or not. true when BreakStatement true when ReturnStatement true else false end end end def collect_varying_variable_names(node) collect_varying_variable_names_in_binary_expression(node) + collect_varying_variable_names_in_unary_expression(node) end def collect_varying_variable_names_in_binary_expression(node) collect_varying_binary_expressions(node).map do |expr| expr.lhs_operand.identifier.value end end def collect_varying_binary_expressions(node) all_varying_binary_exprs = collect_simple_assignment_expressions(node) + collect_compound_assignment_expressions(node) all_varying_binary_exprs.select do |expr| expr.lhs_operand.kind_of?(ObjectSpecifier) end end memoize :collect_varying_binary_expressions def collect_varying_variable_names_in_unary_expression(node) collect_varying_unary_expressions(node).map do |expr| expr.operand.identifier.value end end def collect_varying_unary_expressions(node) all_varying_unary_exprs = collect_prefix_increment_expressions(node) + collect_prefix_decrement_expressions(node) + collect_postfix_increment_expressions(node) + collect_postfix_decrement_expressions(node) all_varying_unary_exprs.select do |expr| expr.operand.kind_of?(ObjectSpecifier) end end memoize :collect_varying_unary_expressions end class WhileStatement < IterationStatement def initialize(expr, stmt, header_term) super() @expression = expr @statement = stmt @header_terminator = header_term end attr_reader :expression attr_reader :statement attr_reader :header_terminator def location head_location end def deduct_controlling_expression sels = collect_loop_breaking_selection_statements(@statement) expr = @expression rough_cands = [[expr, expr.to_normalized_logical]] + sels.map { |stmt| [stmt.expression, stmt.expression.to_normalized_logical.to_complemental_logical] } # FIXME: When many loop breaking selection-statements are found, how can # I select one selection-statement? # FIXME: When the loop breaking selection-statement is a # if-else-statement and the loop breaking is in the else branch, # the controlling expression should be inverted. deduct_controlling_expression_candidates(rough_cands).first end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expression.inspect(indent + 1) + "\n" + @statement.inspect(indent + 1) end end class DoStatement < IterationStatement def initialize(stmt, expr, header_term, footer_init) super() @statement = stmt @expression = expr @header_terminator = header_term @footer_initiator = footer_init end attr_reader :statement attr_reader :expression attr_reader :header_terminator attr_reader :footer_initiator def location head_location end def deduct_controlling_expression sels = collect_loop_breaking_selection_statements(@statement) expr = @expression rough_cands = [[expr, expr.to_normalized_logical]] + sels.map { |stmt| [stmt.expression, stmt.expression.to_normalized_logical.to_complemental_logical] } # FIXME: When many loop breaking selection-statements are found, how can # I select one selection-statement? # FIXME: When the loop breaking selection-statement is a # if-else-statement and the loop breaking is in the else branch, # the controlling expression should be inverted. deduct_controlling_expression_candidates(rough_cands).first end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @statement.inspect(indent + 1) + "\n" + @expression.inspect(indent + 1) end end class ForStatement < IterationStatement def initialize(init_stmt, cond_stmt, expr, body_stmt, header_term) super() @initial_statement = init_stmt @condition_statement = cond_stmt @expression = expr @body_statement = body_stmt @header_terminator = header_term end attr_reader :initial_statement attr_reader :condition_statement attr_reader :expression attr_reader :body_statement attr_reader :header_terminator def location head_location end def deduct_controlling_expression sels = collect_loop_breaking_selection_statements(@body_statement) if expr = @condition_statement.expression rough_cands = [[expr, expr.to_normalized_logical]] + sels.map { |stmt| [stmt.expression, stmt.expression.to_normalized_logical.to_complemental_logical] } else rough_cands = sels.map { |stmt| [stmt.expression, stmt.expression.to_normalized_logical.to_complemental_logical] } end # FIXME: When many loop breaking selection-statements are found, how can # I select one selection-statement? # FIXME: When the loop breaking selection-statement is a # if-else-statement and the loop breaking is in the else branch, # the controlling expression should be inverted. deduct_controlling_expression_candidates(rough_cands).first end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @initial_statement.inspect(indent + 1) + "\n" + @condition_statement.inspect(indent + 1) + (@expression ? "\n#{@expression.inspect(indent + 1)}" : "") + "\n" + @body_statement.inspect(indent + 1) end end class C99ForStatement < IterationStatement def initialize(dcl, cond_stmt, expr, body_stmt, header_term) super() @declaration = dcl @condition_statement = cond_stmt @expression = expr @body_statement = body_stmt @header_terminator = header_term end attr_reader :declaration attr_reader :condition_statement attr_reader :expression attr_reader :body_statement attr_reader :header_terminator def location head_location end def deduct_controlling_expression sels = collect_loop_breaking_selection_statements(@body_statement) if expr = @condition_statement.expression rough_cands = [[expr, expr.to_normalized_logical]] + sels.map { |stmt| [stmt.expression, stmt.expression.to_normalized_logical.to_complemental_logical] } else rough_cands = sels.map { |stmt| [stmt.expression, stmt.expression.to_normalized_logical.to_complemental_logical] } end # FIXME: When many loop breaking selection-statements are found, how can # I select one selection-statement? # FIXME: When the loop breaking selection-statement is a # if-else-statement and the loop breaking is in the else branch, # the controlling expression should be inverted. deduct_controlling_expression_candidates(rough_cands).first end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @declaration.inspect(indent + 1) + "\n" + @condition_statement.inspect(indent + 1) + (@expression ? "\n#{@expression.inspect(indent + 1)}" : "") + "\n" + @body_statement.inspect(indent + 1) end end class JumpStatement < Statement def location head_location end end class GotoStatement < JumpStatement def initialize(id) super() @identifier = id end attr_reader :identifier def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@identifier.inspect})" end end class ContinueStatement < JumpStatement def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect})" end end class BreakStatement < JumpStatement def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect})" end end class ReturnStatement < JumpStatement def initialize(expr) super() @expression = expr end attr_reader :expression def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect})" + (@expression ? "\n#{@expression.inspect(indent + 1)}" : "") end end class TranslationUnit < SyntaxNode def initialize super @external_declarations = [] end attr_reader :external_declarations def push(external_dcl) if @external_declarations.empty? self.head_token = external_dcl.head_token end @external_declarations.push(external_dcl) self.tail_token = external_dcl.tail_token self end def location head_location ? head_location : Location.new end def inspect(indent = 0) ([" " * indent + short_class_name] + @external_declarations.map { |d| d.inspect(indent + 1) }).join("\n") end end class FunctionDefinition < Definition include SymbolicElement include SyntaxNodeCollector def initialize(dcl_specs, dcr, param_defs, compound_stmt, sym_tbl) super(dcl_specs) @declarator = dcr @parameter_definitions = param_defs @function_body = compound_stmt @symbol = sym_tbl.create_new_symbol(ObjectName, identifier) @type_declaration = build_type_declaration(dcl_specs, sym_tbl) build_label_references(compound_stmt) end attr_reader :declarator attr_reader :parameter_definitions attr_reader :function_body attr_reader :symbol attr_reader :type_declaration def identifier @declarator.identifier end def signature FunctionSignature.new(identifier.value, @type) end def function_declarator collect_function_declarators(@declarator).first end def lines start_line = identifier.location.line_no end_line = @function_body.tail_location.line_no end_line - start_line + 1 end def location identifier.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + (storage_class_specifier ? "#{storage_class_specifier.value} " : "") + (function_specifier ? "#{function_specifier.value} " : "") + "#{identifier.value}\n" + @parameter_definitions.map { |p| p.inspect(indent + 1) }.join("\n") + "\n#{@function_body.inspect(indent + 1)}" end private def build_type_declaration(dcl_specs, sym_tbl) return nil unless dcl_specs dcl_specs.type_specifiers.each do |type_spec| builder = TypeDeclarationBuilder.new(sym_tbl) type_spec.accept(builder) unless builder.type_declarations.empty? return builder.type_declarations.first end end nil end def build_label_references(compound_stmt) labels = collect_generic_labeled_statements(compound_stmt) gotos = collect_goto_statements(compound_stmt) labels.each do |generic_labeled_stmt| label_name = generic_labeled_stmt.label.value gotos.select { |goto_stmt| goto_stmt.identifier.value == label_name }.each do |goto_stmt| generic_labeled_stmt.referrers.push(goto_stmt) end end end end class KandRFunctionDefinition < FunctionDefinition def initialize(dcl_specs, dcr, dcls, compound_stmt, sym_tbl) param_defs = create_parameters(dcr.identifier_list, dcls, sym_tbl) super(dcl_specs, dcr, param_defs, compound_stmt, sym_tbl) end def identifier_list declarator.identifier_list end private def create_parameters(param_names, dcls, sym_tbl) return [] unless param_names param_names.each_with_object([]) do |name, param_defs| var_def = find_variable_definition(dcls, name, sym_tbl) param_defs.push(variable_definition_to_parameter_definition(var_def)) end end def find_variable_definition(dcls, name, sym_tbl) dcls.each do |dcl| dcl.items.select { |item| item.kind_of?(VariableDefinition) }.each do |var_def| if var_def.identifier.value == name.value return var_def end end end dcls.push(dcl = implicit_parameter_definition(name, sym_tbl)) dcl.items.first end def variable_definition_to_parameter_definition(var_def) dcl_specs = var_def.declaration_specifiers dcr = var_def.init_declarator.declarator param_def = ParameterDefinition.new(dcl_specs, dcr) unless dcl_specs param_def.head_token = dcr.head_token param_def.tail_token = dcr.tail_token end unless dcr param_def.head_token = dcl_specs.head_token param_def.tail_token = dcl_specs.tail_token end param_def end def implicit_parameter_definition(id, sym_tbl) init_dcr = InitDeclarator.new(IdentifierDeclarator.new(id), nil) Declaration.new(nil, [init_dcr], sym_tbl) end end class AnsiFunctionDefinition < FunctionDefinition def initialize(dcl_specs, dcr, compound_stmt, sym_tbl) super(dcl_specs, dcr, create_parameters(dcr.innermost_parameter_type_list), compound_stmt, sym_tbl) end def parameter_type_list declarator.parameter_type_list end private def create_parameters(param_type_list) return [] unless param_type_list param_type_list.parameters.map do |param_dcl| dcl_specs = param_dcl.declaration_specifiers dcr = param_dcl.declarator param_def = ParameterDefinition.new(dcl_specs, dcr) unless dcl_specs param_def.head_token = dcr.head_token param_def.tail_token = dcr.tail_token end unless dcr param_def.head_token = dcl_specs.head_token param_def.tail_token = dcl_specs.tail_token end param_def end end end class ParameterDefinition < Definition def initialize(dcl_specs, dcr) super(dcl_specs) @declarator = dcr end attr_reader :declarator def identifier if @declarator if @declarator.abstract? nil else @declarator.identifier end else nil end end def location case when identifier identifier.location when declaration_specifiers declaration_specifiers.location else Location.new end end def to_variable_definition PseudoVariableDefinition.new(declaration_specifiers, InitDeclarator.new(@declarator, nil), type) end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + (storage_class_specifier ? storage_class_specifier.inspect : "") + (identifier ? identifier.value : "") end end class PseudoVariableDefinition < VariableDefinition def initialize(dcl_specs, init_dcr, type) super(dcl_specs, init_dcr, nil) self.type = type end def mark_as_referred_by(token) end end class TypeName < SyntaxNode def initialize(spec_qual_list, abstract_dcr, sym_tbl) super() @specifier_qualifier_list = spec_qual_list @abstract_declarator = abstract_dcr @type = nil @type_declaration = build_type_declaration(spec_qual_list, sym_tbl) end attr_reader :specifier_qualifier_list attr_reader :abstract_declarator attr_accessor :type attr_reader :type_declaration def location @specifier_qualifier_list.location end def to_s @type.image end def inspect(indent = 0) " " * indent + short_class_name + " (#{@type ? @type.image : "nil"})" end private def build_type_declaration(spec_qual_list, sym_tbl) spec_qual_list.type_specifiers.each do |type_spec| builder = TypeDeclarationBuilder.new(sym_tbl) type_spec.accept(builder) unless builder.type_declarations.empty? return builder.type_declarations.first end end nil end end class AbstractDeclarator < Declarator def identifier nil end def abstract? true end end class PointerAbstractDeclarator < AbstractDeclarator def initialize(abstract_dcr, ptr) super() @base = abstract_dcr @pointer = ptr end attr_reader :base def location @base ? @base.location || head_location : head_location end def function?(stack = []) stack.push(:pointer) @base.function?(stack) if @base stack.last == :function end def parameter_type_list @base.parameter_type_list end def innermost_parameter_type_list @base.innermost_parameter_type_list end def identifier_list @base.identifier_list end def inspect(indent = 0) " " * indent + short_class_name end end class GroupedAbstractDeclarator < AbstractDeclarator def initialize(abstract_dcr) super() @base = abstract_dcr end attr_reader :base def location @base ? @base.location || head_location : head_location end def function? @base.function? end def parameter_type_list @base.parameter_type_list end def innermost_parameter_type_list @base.innermost_parameter_type_list end def identifier_list @base.identifier_list end def inspect(indent = 0) " " * indent + short_class_name end end class ArrayAbstractDeclarator < AbstractDeclarator def initialize(abstract_dcr, size_expr) super() @base = abstract_dcr @size_expression = size_expr end attr_reader :base attr_reader :size_expression def location @base ? @base.location || head_location : head_location end def function?(stack = []) stack.push(:array) @base.function?(stack) if @base stack.last == :function end def parameter_type_list @base.parameter_type_list end def innermost_parameter_type_list @base.innermost_parameter_type_list end def identifier_list @base.identifier_list end def inspect(indent = 0) " " * indent + short_class_name end end class FunctionAbstractDeclarator < AbstractDeclarator def initialize(abstract_dcr, param_type_list) super() @base = abstract_dcr @parameter_type_list = param_type_list end attr_reader :base attr_reader :parameter_type_list def location @base ? @base.location || head_location : head_location end def function?(stack = []) stack.push(:function) @base.function?(stack) if @base stack.last == :function end def innermost_parameter_type_list @base.innermost_parameter_type_list || @parameter_type_list end def inspect(indent = 0) " " * indent + short_class_name end end class Initializer < SyntaxNode def initialize(expr, inits) super() @expression = expr @initializers = inits end attr_reader :expression attr_reader :initializers def location head_location end def to_s case when @expression @expression.to_s when @initializers "{#{@initializers.map { |ini| ini.to_s }.join(",")}}" else "{}" end end def inspect(indent = 0) " " * indent + short_class_name end end class FunctionSignature def initialize(name, type) @name = name @type = type end attr_reader :name def ==(rhs) if @type.parameter_types.empty? || rhs.type.parameter_types.empty? @name == rhs.name else @name == rhs.name && @type == rhs.type end end def to_s "#{@type.return_type.brief_image} #{@name}(" + @type.parameter_types.map { |t| t.brief_image }.join(",") + (@type.have_va_list? ? ",...)" : ")") end protected attr_reader :type end class TypeDeclarationBuilder def initialize(sym_tbl) @symbol_table = sym_tbl @type_declarations = [] end attr_reader :type_declarations def visit_standard_type_specifier(node) end def visit_typedef_type_specifier(node) end def visit_struct_specifier(node) if node.struct_declarations node.struct_declarations.each { |child| child.accept(self) } sym = @symbol_table.create_new_symbol(StructTag, node.identifier) @type_declarations.push(StructTypeDeclaration.new(node, sym)) end end def visit_union_specifier(node) if node.struct_declarations node.struct_declarations.each { |child| child.accept(self) } sym = @symbol_table.create_new_symbol(UnionTag, node.identifier) @type_declarations.push(UnionTypeDeclaration.new(node, sym)) end end def visit_enum_specifier(node) if node.enumerators sym = @symbol_table.create_new_symbol(EnumTag, node.identifier) @type_declarations.push(EnumTypeDeclaration.new(node, sym)) end end def visit_typeof_type_specifier(node) end def visit_struct_declaration(node) node.specifier_qualifier_list.accept(self) end def visit_specifier_qualifier_list(node) node.type_specifiers.each { |child| child.accept(self) } end end class SyntaxTreeVisitor def visit_error_expression(node) end def visit_object_specifier(node) end def visit_constant_specifier(node) end def visit_string_literal_specifier(node) end def visit_null_constant_specifier(node) end def visit_grouped_expression(node) node.expression.accept(self) end def visit_array_subscript_expression(node) node.expression.accept(self) node.array_subscript.accept(self) end def visit_function_call_expression(node) node.expression.accept(self) node.argument_expressions.each { |expr| expr.accept(self) } end def visit_member_access_by_value_expression(node) node.expression.accept(self) end def visit_member_access_by_pointer_expression(node) node.expression.accept(self) end def visit_bit_access_by_value_expression(node) node.expression.accept(self) end def visit_bit_access_by_pointer_expression(node) node.expression.accept(self) end def visit_postfix_increment_expression(node) node.operand.accept(self) end def visit_postfix_decrement_expression(node) node.operand.accept(self) end def visit_compound_literal_expression(node) node.type_name.accept(self) if node.type_name node.initializers.each { |init| init.accept(self) } end def visit_prefix_increment_expression(node) node.operand.accept(self) end def visit_prefix_decrement_expression(node) node.operand.accept(self) end def visit_address_expression(node) node.operand.accept(self) end def visit_indirection_expression(node) node.operand.accept(self) end def visit_unary_arithmetic_expression(node) node.operand.accept(self) end def visit_sizeof_expression(node) node.operand.accept(self) end def visit_sizeof_type_expression(node) node.operand.accept(self) end def visit_alignof_expression(node) node.operand.accept(self) end def visit_alignof_type_expression(node) node.operand.accept(self) end def visit_cast_expression(node) node.type_name.accept(self) node.operand.accept(self) end def visit_multiplicative_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_additive_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_shift_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_relational_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_equality_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_and_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_exclusive_or_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_inclusive_or_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_logical_and_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_logical_or_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_conditional_expression(node) node.condition.accept(self) node.then_expression.accept(self) node.else_expression.accept(self) end def visit_simple_assignment_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_compound_assignment_expression(node) node.lhs_operand.accept(self) node.rhs_operand.accept(self) end def visit_comma_separated_expression(node) node.expressions.each { |expr| expr.accept(self) } end def visit_declaration(node) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.init_declarators.each { |dcr| dcr.accept(self) } node.items.each { |item| item.accept(self) } end def visit_function_declaration(node) end def visit_variable_declaration(node) end def visit_variable_definition(node) end def visit_typedef_declaration(node) end def visit_struct_type_declaration(node) end def visit_union_type_declaration(node) end def visit_enum_type_declaration(node) end def visit_declaration_specifiers(node) node.type_specifiers.each { |type_spec| type_spec.accept(self) } end def visit_init_declarator(node) node.declarator.accept(self) node.initializer.accept(self) if node.initializer end def visit_standard_type_specifier(node) end def visit_typedef_type_specifier(node) end def visit_struct_specifier(node) if node.struct_declarations node.struct_declarations.each { |dcl| dcl.accept(self) } end end def visit_union_specifier(node) if node.struct_declarations node.struct_declarations.each { |dcl| dcl.accept(self) } end end def visit_struct_declaration(node) node.specifier_qualifier_list.accept(self) node.struct_declarators.each { |dcr| dcr.accept(self) } node.items.each { |item| item.accept(self) } end def visit_member_declaration(node) end def visit_specifier_qualifier_list(node) node.type_specifiers.each { |type_spec| type_spec.accept(self) } end def visit_struct_declarator(node) node.declarator.accept(self) if node.declarator node.expression.accept(self) if node.expression end def visit_enum_specifier(node) if node.enumerators node.enumerators.each { |enum| enum.accept(self) } end end def visit_enumerator(node) node.expression.accept(self) if node.expression end def visit_typeof_type_specifier(node) node.expression.accept(self) if node.expression node.type_name.accept(self) if node.type_name end def visit_identifier_declarator(node) end def visit_grouped_declarator(node) node.base.accept(self) end def visit_array_declarator(node) node.base.accept(self) node.size_expression.accept(self) if node.size_expression end def visit_ansi_function_declarator(node) node.base.accept(self) node.parameter_type_list.accept(self) end def visit_kandr_function_declarator(node) node.base.accept(self) end def visit_abbreviated_function_declarator(node) node.base.accept(self) end def visit_parameter_type_list(node) node.parameters.each { |param| param.accept(self) } end def visit_parameter_declaration(node) node.declaration_specifiers.accept(self) node.declarator.accept(self) if node.declarator end def visit_error_statement(node) end def visit_generic_labeled_statement(node) node.statement.accept(self) end def visit_case_labeled_statement(node) node.expression.accept(self) node.statement.accept(self) end def visit_default_labeled_statement(node) node.statement.accept(self) end def visit_compound_statement(node) node.block_items.each { |item| item.accept(self) } end def visit_expression_statement(node) node.expression.accept(self) if node.expression end def visit_if_statement(node) node.expression.accept(self) node.statement.accept(self) end def visit_if_else_statement(node) node.expression.accept(self) node.then_statement.accept(self) node.else_statement.accept(self) end def visit_switch_statement(node) node.expression.accept(self) node.statement.accept(self) end def visit_while_statement(node) node.expression.accept(self) node.statement.accept(self) end def visit_do_statement(node) node.statement.accept(self) node.expression.accept(self) end def visit_for_statement(node) node.initial_statement.accept(self) node.condition_statement.accept(self) node.expression.accept(self) if node.expression node.body_statement.accept(self) end def visit_c99_for_statement(node) node.declaration.accept(self) node.condition_statement.accept(self) node.expression.accept(self) if node.expression node.body_statement.accept(self) end def visit_goto_statement(node) end def visit_continue_statement(node) end def visit_break_statement(node) end def visit_return_statement(node) node.expression.accept(self) if node.expression end def visit_translation_unit(node) node.external_declarations.each { |dcl| dcl.accept(self) } end def visit_kandr_function_definition(node) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.declarator.accept(self) node.parameter_definitions.each { |param_def| param_def.accept(self) } node.function_body.accept(self) node.type_declaration.accept(self) if node.type_declaration end def visit_ansi_function_definition(node) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.declarator.accept(self) node.parameter_definitions.each { |param_def| param_def.accept(self) } node.function_body.accept(self) node.type_declaration.accept(self) if node.type_declaration end def visit_parameter_definition(node) end def visit_type_name(node) node.specifier_qualifier_list.accept(self) node.abstract_declarator.accept(self) if node.abstract_declarator node.type_declaration.accept(self) if node.type_declaration end def visit_pointer_abstract_declarator(node) node.base.accept(self) if node.base end def visit_grouped_abstract_declarator(node) node.base.accept(self) end def visit_array_abstract_declarator(node) node.base.accept(self) if node.base node.size_expression.accept(self) if node.size_expression end def visit_function_abstract_declarator(node) node.base.accept(self) if node.base node.parameter_type_list.accept(self) if node.parameter_type_list end def visit_initializer(node) case when node.expression node.expression.accept(self) when node.initializers node.initializers.each { |init| init.accept(self) } end end end class SyntaxTreeMulticastVisitor < SyntaxTreeVisitor extend Pluggable def_plugin :enter_error_expression def_plugin :leave_error_expression def_plugin :enter_object_specifier def_plugin :leave_object_specifier def_plugin :enter_constant_specifier def_plugin :leave_constant_specifier def_plugin :enter_string_literal_specifier def_plugin :leave_string_literal_specifier def_plugin :enter_null_constant_specifier def_plugin :leave_null_constant_specifier def_plugin :enter_grouped_expression def_plugin :leave_grouped_expression def_plugin :enter_array_subscript_expression def_plugin :leave_array_subscript_expression def_plugin :enter_function_call_expression def_plugin :leave_function_call_expression def_plugin :enter_member_access_by_value_expression def_plugin :leave_member_access_by_value_expression def_plugin :enter_member_access_by_pointer_expression def_plugin :leave_member_access_by_pointer_expression def_plugin :enter_bit_access_by_value_expression def_plugin :leave_bit_access_by_value_expression def_plugin :enter_bit_access_by_pointer_expression def_plugin :leave_bit_access_by_pointer_expression def_plugin :enter_postfix_increment_expression def_plugin :leave_postfix_increment_expression def_plugin :enter_postfix_decrement_expression def_plugin :leave_postfix_decrement_expression def_plugin :enter_compound_literal_expression def_plugin :leave_compound_literal_expression def_plugin :enter_prefix_increment_expression def_plugin :leave_prefix_increment_expression def_plugin :enter_prefix_decrement_expression def_plugin :leave_prefix_decrement_expression def_plugin :enter_address_expression def_plugin :leave_address_expression def_plugin :enter_indirection_expression def_plugin :leave_indirection_expression def_plugin :enter_unary_arithmetic_expression def_plugin :leave_unary_arithmetic_expression def_plugin :enter_sizeof_expression def_plugin :leave_sizeof_expression def_plugin :enter_sizeof_type_expression def_plugin :leave_sizeof_type_expression def_plugin :enter_alignof_expression def_plugin :leave_alignof_expression def_plugin :enter_alignof_type_expression def_plugin :leave_alignof_type_expression def_plugin :enter_cast_expression def_plugin :leave_cast_expression def_plugin :enter_multiplicative_expression def_plugin :leave_multiplicative_expression def_plugin :enter_additive_expression def_plugin :leave_additive_expression def_plugin :enter_shift_expression def_plugin :leave_shift_expression def_plugin :enter_relational_expression def_plugin :leave_relational_expression def_plugin :enter_equality_expression def_plugin :leave_equality_expression def_plugin :enter_and_expression def_plugin :leave_and_expression def_plugin :enter_exclusive_or_expression def_plugin :leave_exclusive_or_expression def_plugin :enter_inclusive_or_expression def_plugin :leave_inclusive_or_expression def_plugin :enter_logical_and_expression def_plugin :leave_logical_and_expression def_plugin :enter_logical_or_expression def_plugin :leave_logical_or_expression def_plugin :enter_conditional_expression def_plugin :leave_conditional_expression def_plugin :enter_simple_assignment_expression def_plugin :leave_simple_assignment_expression def_plugin :enter_compound_assignment_expression def_plugin :leave_compound_assignment_expression def_plugin :enter_comma_separated_expression def_plugin :leave_comma_separated_expression def_plugin :enter_declaration def_plugin :leave_declaration def_plugin :enter_function_declaration def_plugin :leave_function_declaration def_plugin :enter_variable_declaration def_plugin :leave_variable_declaration def_plugin :enter_variable_definition def_plugin :leave_variable_definition def_plugin :enter_typedef_declaration def_plugin :leave_typedef_declaration def_plugin :enter_struct_type_declaration def_plugin :leave_struct_type_declaration def_plugin :enter_union_type_declaration def_plugin :leave_union_type_declaration def_plugin :enter_enum_type_declaration def_plugin :leave_enum_type_declaration def_plugin :enter_declaration_specifiers def_plugin :leave_declaration_specifiers def_plugin :enter_init_declarator def_plugin :leave_init_declarator def_plugin :enter_standard_type_specifier def_plugin :leave_standard_type_specifier def_plugin :enter_typedef_type_specifier def_plugin :leave_typedef_type_specifier def_plugin :enter_struct_specifier def_plugin :leave_struct_specifier def_plugin :enter_union_specifier def_plugin :leave_union_specifier def_plugin :enter_struct_declaration def_plugin :leave_struct_declaration def_plugin :enter_member_declaration def_plugin :leave_member_declaration def_plugin :enter_specifier_qualifier_list def_plugin :leave_specifier_qualifier_list def_plugin :enter_struct_declarator def_plugin :leave_struct_declarator def_plugin :enter_enum_specifier def_plugin :leave_enum_specifier def_plugin :enter_enumerator def_plugin :leave_enumerator def_plugin :enter_typeof_type_specifier def_plugin :leave_typeof_type_specifier def_plugin :enter_identifier_declarator def_plugin :leave_identifier_declarator def_plugin :enter_grouped_declarator def_plugin :leave_grouped_declarator def_plugin :enter_array_declarator def_plugin :leave_array_declarator def_plugin :enter_ansi_function_declarator def_plugin :leave_ansi_function_declarator def_plugin :enter_kandr_function_declarator def_plugin :leave_kandr_function_declarator def_plugin :enter_abbreviated_function_declarator def_plugin :leave_abbreviated_function_declarator def_plugin :enter_parameter_type_list def_plugin :leave_parameter_type_list def_plugin :enter_parameter_declaration def_plugin :leave_parameter_declaration def_plugin :enter_error_statement def_plugin :leave_error_statement def_plugin :enter_generic_labeled_statement def_plugin :leave_generic_labeled_statement def_plugin :enter_case_labeled_statement def_plugin :leave_case_labeled_statement def_plugin :enter_default_labeled_statement def_plugin :leave_default_labeled_statement def_plugin :enter_compound_statement def_plugin :leave_compound_statement def_plugin :enter_expression_statement def_plugin :leave_expression_statement def_plugin :enter_if_statement def_plugin :leave_if_statement def_plugin :enter_if_else_statement def_plugin :leave_if_else_statement def_plugin :enter_switch_statement def_plugin :leave_switch_statement def_plugin :enter_while_statement def_plugin :leave_while_statement def_plugin :enter_do_statement def_plugin :leave_do_statement def_plugin :enter_for_statement def_plugin :leave_for_statement def_plugin :enter_c99_for_statement def_plugin :leave_c99_for_statement def_plugin :enter_goto_statement def_plugin :leave_goto_statement def_plugin :enter_continue_statement def_plugin :leave_continue_statement def_plugin :enter_break_statement def_plugin :leave_break_statement def_plugin :enter_return_statement def_plugin :leave_return_statement def_plugin :enter_translation_unit def_plugin :leave_translation_unit def_plugin :enter_kandr_function_definition def_plugin :leave_kandr_function_definition def_plugin :enter_ansi_function_definition def_plugin :leave_ansi_function_definition def_plugin :enter_parameter_definition def_plugin :leave_parameter_definition def_plugin :enter_type_name def_plugin :leave_type_name def_plugin :enter_pointer_abstract_declarator def_plugin :leave_pointer_abstract_declarator def_plugin :enter_grouped_abstract_declarator def_plugin :leave_grouped_abstract_declarator def_plugin :enter_array_abstract_declarator def_plugin :leave_array_abstract_declarator def_plugin :enter_function_abstract_declarator def_plugin :leave_function_abstract_declarator def_plugin :enter_initializer def_plugin :leave_initializer def self.def_visitor_method(node_name) class_eval <<-EOS define_method("visit_#{node_name}") do |*args| visit_with_notifying(__method__, args.first) { super(args.first) } end EOS end private_class_method :def_visitor_method def_visitor_method :error_expression def_visitor_method :object_specifier def_visitor_method :constant_specifier def_visitor_method :string_literal_specifier def_visitor_method :null_constant_specifier def_visitor_method :grouped_expression def_visitor_method :array_subscript_expression def_visitor_method :function_call_expression def_visitor_method :member_access_by_value_expression def_visitor_method :member_access_by_pointer_expression def_visitor_method :bit_access_by_value_expression def_visitor_method :bit_access_by_pointer_expression def_visitor_method :postfix_increment_expression def_visitor_method :postfix_decrement_expression def_visitor_method :compound_literal_expression def_visitor_method :prefix_increment_expression def_visitor_method :prefix_decrement_expression def_visitor_method :address_expression def_visitor_method :indirection_expression def_visitor_method :unary_arithmetic_expression def_visitor_method :sizeof_expression def_visitor_method :sizeof_type_expression def_visitor_method :alignof_expression def_visitor_method :alignof_type_expression def_visitor_method :cast_expression def_visitor_method :multiplicative_expression def_visitor_method :additive_expression def_visitor_method :shift_expression def_visitor_method :relational_expression def_visitor_method :equality_expression def_visitor_method :and_expression def_visitor_method :exclusive_or_expression def_visitor_method :inclusive_or_expression def_visitor_method :logical_and_expression def_visitor_method :logical_or_expression def_visitor_method :conditional_expression def_visitor_method :simple_assignment_expression def_visitor_method :compound_assignment_expression def_visitor_method :comma_separated_expression def_visitor_method :declaration def_visitor_method :function_declaration def_visitor_method :variable_declaration def_visitor_method :variable_definition def_visitor_method :typedef_declaration def_visitor_method :struct_type_declaration def_visitor_method :union_type_declaration def_visitor_method :enum_type_declaration def_visitor_method :declaration_specifiers def_visitor_method :init_declarator def_visitor_method :standard_type_specifier def_visitor_method :typedef_type_specifier def_visitor_method :struct_specifier def_visitor_method :union_specifier def_visitor_method :struct_declaration def_visitor_method :member_declaration def_visitor_method :specifier_qualifier_list def_visitor_method :struct_declarator def_visitor_method :enum_specifier def_visitor_method :enumerator def_visitor_method :typeof_type_specifier def_visitor_method :identifier_declarator def_visitor_method :grouped_declarator def_visitor_method :array_declarator def_visitor_method :ansi_function_declarator def_visitor_method :kandr_function_declarator def_visitor_method :abbreviated_function_declarator def_visitor_method :parameter_type_list def_visitor_method :parameter_declaration def_visitor_method :error_statement def_visitor_method :generic_labeled_statement def_visitor_method :case_labeled_statement def_visitor_method :default_labeled_statement def_visitor_method :compound_statement def_visitor_method :expression_statement def_visitor_method :if_statement def_visitor_method :if_else_statement def_visitor_method :switch_statement def_visitor_method :while_statement def_visitor_method :do_statement def_visitor_method :for_statement def_visitor_method :c99_for_statement def_visitor_method :goto_statement def_visitor_method :continue_statement def_visitor_method :break_statement def_visitor_method :return_statement def_visitor_method :translation_unit def_visitor_method :kandr_function_definition def_visitor_method :ansi_function_definition def_visitor_method :parameter_definition def_visitor_method :type_name def_visitor_method :pointer_abstract_declarator def_visitor_method :grouped_abstract_declarator def_visitor_method :array_abstract_declarator def_visitor_method :function_abstract_declarator def_visitor_method :initializer private def visit_with_notifying(caller_method, node, &block) suffix = caller_method.to_s.sub(/\Avisit_/, "") __send__("enter_#{suffix}").invoke(node) yield __send__("leave_#{suffix}").invoke(node) end end class ObjectSpecifierCollector < SyntaxTreeVisitor def initialize @object_specifiers = [] end attr_reader :object_specifiers def visit_object_specifier(node) super @object_specifiers.push(node) end end class IdentifierDeclaratorCollector < SyntaxTreeVisitor def initialize @identifier_declarators = [] end attr_reader :identifier_declarators def visit_identifier_declarator(node) super @identifier_declarators.push(node) end end class TypedefTypeSpecifierCollector < SyntaxTreeVisitor def initialize @typedef_type_specifiers = [] end attr_reader :typedef_type_specifiers def visit_variable_definition(node) end def visit_typedef_type_specifier(node) super @typedef_type_specifiers.push(node) end end class FunctionDeclaratorCollector < SyntaxTreeVisitor def initialize @function_declarators = [] end attr_reader :function_declarators def visit_ansi_function_declarator(node) @function_declarators.push(node) super end def visit_kandr_function_declarator(node) @function_declarators.push(node) super end end class SimpleAssignmentExpressionCollector < SyntaxTreeVisitor def initialize @simple_assignment_expressions = [] end attr_reader :simple_assignment_expressions def visit_simple_assignment_expression(node) super @simple_assignment_expressions.push(node) end end class CompoundAssignmentExpressionCollector < SyntaxTreeVisitor def initialize @compound_assignment_expressions = [] end attr_reader :compound_assignment_expressions def visit_compound_assignment_expression(node) super @compound_assignment_expressions.push(node) end end class PrefixIncrementExpressionCollector < SyntaxTreeVisitor def initialize @prefix_increment_expressions = [] end attr_reader :prefix_increment_expressions def visit_prefix_increment_expression(node) super @prefix_increment_expressions.push(node) end end class PrefixDecrementExpressionCollector < SyntaxTreeVisitor def initialize @prefix_decrement_expressions = [] end attr_reader :prefix_decrement_expressions def visit_prefix_decrement_expression(node) super @prefix_decrement_expressions.push(node) end end class PostfixIncrementExpressionCollector < SyntaxTreeVisitor def initialize @postfix_increment_expressions = [] end attr_reader :postfix_increment_expressions def visit_postfix_increment_expression(node) super @postfix_increment_expressions.push(node) end end class PostfixDecrementExpressionCollector < SyntaxTreeVisitor def initialize @postfix_decrement_expressions = [] end attr_reader :postfix_decrement_expressions def visit_postfix_decrement_expression(node) super @postfix_decrement_expressions.push(node) end end class AdditiveExpressionCollector < SyntaxTreeVisitor def initialize @additive_expressions = [] end attr_reader :additive_expressions def visit_additive_expression(node) super @additive_expressions.push(node) end end class RelationalExpressionCollector < SyntaxTreeVisitor def initialize @relational_expressions = [] end attr_reader :relational_expressions def visit_relational_expression(node) super @relational_expressions.push(node) end end class EqualityExpressionCollector < SyntaxTreeVisitor def initialize @equality_expressions = [] end attr_reader :equality_expressions def visit_equality_expression(node) super @equality_expressions.push(node) end end class LogicalAndExpressionCollector < SyntaxTreeVisitor def initialize @logical_and_expressions = [] end attr_reader :logical_and_expressions def visit_logical_and_expression(node) super @logical_and_expressions.push(node) end end class LogicalOrExpressionCollector < SyntaxTreeVisitor def initialize @logical_or_expressions = [] end attr_reader :logical_or_expressions def visit_logical_or_expression(node) super @logical_or_expressions.push(node) end end class GenericLabeledStatementCollector < SyntaxTreeVisitor def initialize @generic_labeled_statements = [] end attr_reader :generic_labeled_statements def visit_generic_labeled_statement(node) super @generic_labeled_statements.push(node) end end class IfStatementCollector < SyntaxTreeVisitor def initialize @if_statements = [] end attr_reader :if_statements def visit_if_statement(node) super @if_statements.push(node) end end class IfElseStatementCollector < SyntaxTreeVisitor def initialize @if_else_statements = [] end attr_reader :if_else_statements def visit_if_else_statement(node) super @if_else_statements.push(node) end end class GotoStatementCollector < SyntaxTreeVisitor def initialize @goto_statements = [] end attr_reader :goto_statements def visit_goto_statement(node) @goto_statements.push(node) end end class ArrayDeclaratorCollector < SyntaxTreeVisitor def initialize @array_declarators = [] end attr_reader :array_declarators def visit_array_declarator(node) @array_declarators.push(node) super end end class ConstantSpecifierCollector < SyntaxTreeVisitor def initialize @constant_specifiers = [] end attr_reader :constant_specifiers def visit_constant_specifier(node) @constant_specifiers.push(node) end end class ExpressionExtractor < SyntaxTreeVisitor def initialize @expressions = [] end attr_reader :expressions def push_expression(expr) @expressions.push(expr) end private :push_expression alias :visit_error_expression :push_expression alias :visit_object_specifier :push_expression alias :visit_constant_specifier :push_expression alias :visit_string_literal_specifier :push_expression alias :visit_null_constant_specifier :push_expression alias :visit_grouped_expression :push_expression alias :visit_array_subscript_expression :push_expression alias :visit_function_call_expression :push_expression alias :visit_member_access_by_value_expression :push_expression alias :visit_member_access_by_pointer_expression :push_expression alias :visit_bit_access_by_value_expression :push_expression alias :visit_bit_access_by_pointer_expression :push_expression alias :visit_postfix_increment_expression :push_expression alias :visit_postfix_decrement_expression :push_expression alias :visit_compound_literal_expression :push_expression alias :visit_prefix_increment_expression :push_expression alias :visit_prefix_decrement_expression :push_expression alias :visit_address_expression :push_expression alias :visit_indirection_expression :push_expression alias :visit_unary_arithmetic_expression :push_expression alias :visit_sizeof_expression :push_expression alias :visit_sizeof_type_expression :push_expression alias :visit_alignof_expression :push_expression alias :visit_alignof_type_expression :push_expression alias :visit_cast_expression :push_expression alias :visit_multiplicative_expression :push_expression alias :visit_additive_expression :push_expression alias :visit_shift_expression :push_expression alias :visit_relational_expression :push_expression alias :visit_equality_expression :push_expression alias :visit_and_expression :push_expression alias :visit_exclusive_or_expression :push_expression alias :visit_inclusive_or_expression :push_expression alias :visit_logical_and_expression :push_expression alias :visit_logical_or_expression :push_expression alias :visit_conditional_expression :push_expression alias :visit_simple_assignment_expression :push_expression alias :visit_compound_assignment_expression :push_expression end class ConditionalExpressionExtractor < SyntaxTreeVisitor def initialize @expressions = [] end attr_reader :expressions def visit_conditional_expression(node) @expressions.push(node) end end class ExpressionConstancy < SyntaxTreeVisitor def initialize(interp_bridge) @interp_bridge = interp_bridge end def check(expr) catch(:constancy) { expr.accept(self); true } end def visit_object_specifier(node) var_designators = @interp_bridge[:variable_designators][] if var_designators.include?(node.identifier.value) break_as_inconstant end end def visit_address_expression(node) # NOTE: To treat address of variables as an address-constant. end def break_as_inconstant(*) throw(:constancy, false) end private :break_as_inconstant alias :visit_function_call_expression :break_as_inconstant alias :visit_postfix_increment_expression :break_as_inconstant alias :visit_postfix_decrement_expression :break_as_inconstant alias :visit_prefix_increment_expression :break_as_inconstant alias :visit_prefix_decrement_expression :break_as_inconstant alias :visit_simple_assignment_expression :break_as_inconstant alias :visit_compound_assignment_expression :break_as_inconstant end end end adlint-3.2.0/lib/adlint/cc1/lexer.rb0000644000004100000410000002016212224440633017153 0ustar www-datawww-data# Lexical analyzer which retokenizes pp-tokens into c-tokens. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/lexer" require "adlint/util" require "adlint/cc1/scanner" require "adlint/cc1/scope" module AdLint #:nodoc: module Cc1 #:nodoc: class Lexer < TokensRelexer def initialize(pp_src) super(pp_src.pp_tokens) @lst_tok = nil @nxt_tok = nil @ordinary_identifiers = OrdinaryIdentifiers.new @identifier_translation = true end extend Pluggable def_plugin :on_string_literals_concatenated extend Forwardable def_delegator :@ordinary_identifiers, :add_typedef_name def_delegator :@ordinary_identifiers, :add_object_name def_delegator :@ordinary_identifiers, :add_enumerator_name def_delegator :@ordinary_identifiers, :enter_scope def_delegator :@ordinary_identifiers, :leave_scope def enable_identifier_translation @identifier_translation = true end def disable_identifier_translation @identifier_translation = false end private def create_lexer_context(tok_ary) LexerContext.new(TokensContent.new(tok_ary)) end def tokenize(lexer_ctxt) if @nxt_tok tok = @nxt_tok @nxt_tok = nil else until lexer_ctxt.content.empty? pp_tok = lexer_ctxt.content.next_token if type_hint = pp_tok.type_hint tok = pp_tok.class.new(type_hint, pp_tok.value, pp_tok.location) else tok = retokenize_keyword(pp_tok, lexer_ctxt) || retokenize_constant(pp_tok, lexer_ctxt) || retokenize_string_literal(pp_tok, lexer_ctxt) || retokenize_null_constant(pp_tok, lexer_ctxt) || retokenize_identifier(pp_tok, lexer_ctxt) || retokenize_punctuator(pp_tok, lexer_ctxt) end break if tok end end if tok case tok.type when :IDENTIFIER tok = translate_identifier(tok, lexer_ctxt) when :STRING_LITERAL tok = concat_contiguous_string_literals(tok, lexer_ctxt) end @lst_tok = tok else nil end end def translate_identifier(tok, lexer_ctxt) # NOTE: To translate given IDENTIFIER into TYPEDEF_NAME if needed. # NOTE: The ISO C99 standard says; # # 6.2.3 Name spaces of identifiers # # 1 If more than one declaration of a particular identifier is visible at # any point in a translation unit, the syntactic context disambiguates # uses that refer to different entities. Thus, there are separate name # spaces for various categories of identifiers, as follows: # -- label names (disambiguated by the syntax of the label declaration # and use); # -- the tags of structures, unions, and enumerations (disambiguated by # following any of the keywords struct, union, or enum); # -- the members of structures or unions; each structure or union has a # separate name space for its members (disambiguated by the type of # the expression used to access the member via the . or -> # operator); # -- all other identifiers, called ordinary identifiers (declared in # ordinary declarators or as enumeration constants). if @identifier_translation if tok.type == :IDENTIFIER id_type = @ordinary_identifiers.find(tok.value) if id_type == :typedef unless @lst_tok and @lst_tok.type == :STRUCT || @lst_tok.type == :UNION || @lst_tok.type == :ENUM || @lst_tok.type == "->" || @lst_tok.type == "." tok = tok.class.new(:TYPEDEF_NAME, tok.value, tok.location) end end end end tok end def concat_contiguous_string_literals(tok, lexer_ctxt) until lexer_ctxt.content.empty? nxt_tok = tokenize(lexer_ctxt) if nxt_tok.type == :STRING_LITERAL rslt_tok = tok.class.new(tok.type, tok.value.sub(/"\z/, "") + nxt_tok.value.sub(/\AL?"/, ""), tok.location) notify_string_literals_concatenated(tok, nxt_tok, rslt_tok) return rslt_tok else @nxt_tok = nxt_tok break end end tok end def retokenize_keyword(pp_tok, lexer_ctxt) if keyword = Scanner::KEYWORDS[pp_tok.value] pp_tok.class.new(keyword, pp_tok.value, pp_tok.location) else nil end end def retokenize_constant(pp_tok, lexer_ctxt) # NOTE: For extended bit-access operators. return nil if @lst_tok && @lst_tok.type == :IDENTIFIER case pp_tok.value when /\AL?'.*'\z/, /\A(?:[0-9]*\.[0-9]+|[0-9]+\.)[FL]*\z/i, /\A(?:[0-9]*\.[0-9]*E[+-]?[0-9]+|[0-9]+\.?E[+-]?[0-9]+)[FL]*\z/i, /\A(?:0x[0-9a-f]+|0b[01]+|[0-9]+)[UL]*\z/i pp_tok.class.new(:CONSTANT, pp_tok.value, pp_tok.location) else nil end end def retokenize_string_literal(pp_tok, lexer_ctxt) if pp_tok.value =~ /\AL?".*"\z/ pp_tok.class.new(:STRING_LITERAL, pp_tok.value, pp_tok.location) else nil end end def retokenize_null_constant(pp_tok, lexer_ctxt) if pp_tok.value == "NULL" pp_tok.class.new(:NULL, pp_tok.value, pp_tok.location) else nil end end def retokenize_identifier(pp_tok, lexer_ctxt) if pp_tok.value =~ /\A[a-z_][a-z_0-9]*\z/i pp_tok.class.new(:IDENTIFIER, pp_tok.value, pp_tok.location) else nil end end def retokenize_punctuator(pp_tok, lexer_ctxt) case pp_tok.value when "{", "}", "(", ")", "[", "]", ";", ",", "::", ":", "?", "||", "|=", "|", "&&", "&=", "&", "^=", "^", "==", "=", "!=", "!", "<<=", "<=", "<<", "<", ">>=", ">=", ">>", ">", "+=", "++", "+", "->*", "->", "-=", "--", "-", "*=", "*", "/=", "/", "%=", "%", "...", ".*", ".", "~" pp_tok.class.new(pp_tok.value, pp_tok.value, pp_tok.location) else nil end end def notify_string_literals_concatenated(former, latter, rslt_tok) on_string_literals_concatenated.invoke(former, latter, rslt_tok) end end class OrdinaryIdentifiers def initialize @id_stack = [[]] end def enter_scope @id_stack.unshift([]) end def leave_scope @id_stack.shift end def add_typedef_name(tok) add(tok.value, :typedef) end def add_object_name(tok) add(tok.value, :object) end def add_enumerator_name(tok) add(tok.value, :enumerator) end def find(id_str) @id_stack.each do |id_ary| if pair = id_ary.assoc(id_str) return pair.last end end nil end private def add(id_str, tag) @id_stack.first.unshift([id_str, tag]) end end end end adlint-3.2.0/lib/adlint/cc1/operator.rb0000644000004100000410000000512412224440633017670 0ustar www-datawww-data# Comparison operator of controlling expressions. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cc1 #:nodoc: class Operator def initialize(tok_or_sym) case tok_or_sym when Token @sym = tok_or_sym.type.to_sym when ::Symbol @sym = tok_or_sym end end def to_sym @sym end def to_s @sym.to_s end def eql?(rhs) case rhs when Operator @sym == rhs.to_sym else super end end alias :== :eql? def hash @sym.hash end end class ComparisonOperator < Operator def for_complement case self when Operator::EQ then Operator::NE when Operator::NE then Operator::EQ when Operator::LT then Operator::GE when Operator::GT then Operator::LE when Operator::LE then Operator::GT when Operator::GE then Operator::LT else self end end def for_commutation case self when Operator::LT then Operator::GT when Operator::GT then Operator::LT when Operator::LE then Operator::GE when Operator::GE then Operator::LE else self end end end class Operator EQ = ComparisonOperator.new(:==) NE = ComparisonOperator.new(:!=) LT = ComparisonOperator.new(:<) GT = ComparisonOperator.new(:>) LE = ComparisonOperator.new(:<=) GE = ComparisonOperator.new(:>=) end end end adlint-3.2.0/lib/adlint/cc1/trace.rb0000644000004100000410000002156312224440633017140 0ustar www-datawww-data# Context tracer. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/branch" require "adlint/cc1/value" module AdLint #:nodoc: module Cc1 #:nodoc: module ContextTracing # NOTE: Host class of this module must respond to #positive_contribs and # #negative_contribs. def traceable_positive_contribs positive_contribs.select { |mval| mval.transition.last.tag.traceable? } end def traceable_negative_contribs negative_contribs.select { |mval| mval.transition.last.tag.traceable? } end def sample_positive_transition if contrib = traceable_positive_contribs.first contrib.transition else nil end end end module NegativePathsTracing include ContextTracing def trace_negative_paths(report, loc, traced) trans = traceable_negative_contribs.map { |mval| mval.transition } branches = trans.map { |tr| tr.last.tag.at }.flatten sorted_branches = sort_branches_by_groups(branches) branches = branches.to_set rch_groups = [] unr_groups = [] sorted_branches.each_key.with_object([]) { |gr, msgs| case when gr.branches_to_trunk.any? { |upper| branches.include?(upper) } next when gr.complete? && gr.branches.size == sorted_branches[gr].size unr_groups.push(gr) else rch_groups.push(gr) sorted_branches[gr].each do |br| emit_negative_ctrlexpr(msgs, report, loc, traced, br.ctrlexpr) end end } + emit_remaining_paths(report, loc, traced, rch_groups, unr_groups) end private def emit_remaining_paths(report, loc, traced, rch_groups, unr_groups) traced_groups = Set.new rch_groups.each_with_object([]) { |gr, msgs| cur_br = gr.trunk while cur_br emit_positive_ctrlexpr(msgs, report, loc, traced, cur_br.ctrlexpr) traced_groups.add(cur_br.group) cur_br = cur_br.trunk end } + unr_groups.each_with_object([]) { |gr, msgs| cur_br = gr.trunk while cur_br unless traced_groups.include?(cur_br.group) emit_negative_ctrlexpr(msgs, report, loc, traced, cur_br.ctrlexpr) break end cur_br = cur_br.trunk end } end def sort_branches_by_groups(branches) branches.each_with_object(Hash.new { |h, k| h[k] = [] }) do |br, groups| groups[br.group].push(br) end end def emit_positive_ctrlexpr(msgs, report, loc, traced, ctrlexpr) if ctrlexpr and expr = ctrlexpr.to_expr if expr.location && expr.location < loc && !traced.include?(expr) msgs.push(report.C(:C1001, expr.location)) traced.add(expr) end end end def emit_negative_ctrlexpr(msgs, report, loc, traced, ctrlexpr) if ctrlexpr and expr = ctrlexpr.to_expr if expr.location && expr.location < loc && !traced.include?(expr) msgs.push(report.C(:C1002, expr.location)) traced.add(expr) end end end end module UndefinableContextTracing include ContextTracing include NegativePathsTracing def emit_context_messages(report, loc) traced = Set.new msgs = trace_positive_paths(report, loc, traced) + trace_negative_paths(report, loc, traced) unless msgs.empty? [report.C(:C1000, Location.new)] + msgs.sort { |a, b| a.location <=> b.location } else [] end end private def trace_positive_paths(report, loc, traced) # TODO: Evidence of the test result might have two or more contributors. # All the evidences should be complemented by context messages? unless pos_trans = sample_positive_transition return [] end pos_trans.each_with_object([]) do |ss, msgs| if src = ss.tag.by.find { |node| node.kind_of?(VariableDefinition) } if src.location && src.location < loc && !traced.include?(src) if ss.value.test_may_be_undefined.true? msgs.push(report.C(:C1003, src.location)) traced.add(src) end end end end end # NOTE: Mix-in this module to AdLint::Cc1::UndefinableTestEvidence. UndefinableTestEvidence.class_eval { include UndefinableContextTracing } end module NullabilityContextTracing include ContextTracing include NegativePathsTracing def emit_context_messages(report, loc) traced = Set.new msgs = trace_positive_paths(report, loc, traced) + trace_negative_paths(report, loc, traced) unless msgs.empty? [report.C(:C1000, Location.new)] + msgs.sort { |a, b| a.location <=> b.location } else [] end end private def trace_positive_paths(report, loc, traced) # TODO: Evidence of the test result might have two or more contributors. # All the evidences should be complemented by context messages? unless pos_trans = sample_positive_transition return [] end pos_trans.each_with_object([]) do |ss, msgs| branch = ss.tag.at.find { |br| br.ctrlexpr.to_expr } while branch if expr = branch.ctrlexpr.to_expr and expr.location && expr.location < loc unless traced.include?(expr) msgs.push(report.C(:C1001, expr.location)) traced.add(expr) end end branch = branch.trunk end src = ss.tag.by.find { |node| node.location && node.location < loc && !traced.include?(node) } if src case when ss.value.test_must_be_null.true? msgs.push(report.C(:C1004, src.location)) traced.add(src) when ss.value.test_may_be_null.true? msgs.push(report.C(:C1005, src.location)) traced.add(src) end end end end # NOTE: Mix-in this module to AdLint::Cc1::NullabilityTestEvidence. NullabilityTestEvidence.class_eval { include NullabilityContextTracing } end module DefinableContextTracing # NOTE: Host class must have instance variable named @predicate. attr_reader :predicate include ContextTracing include NegativePathsTracing def emit_context_messages(report, loc) traced = Set.new msgs = trace_positive_paths(report, loc, traced) + trace_negative_paths(report, loc, traced) unless msgs.empty? [report.C(:C1000, Location.new)] + msgs.sort { |a, b| a.location <=> b.location } else [] end end private def trace_positive_paths(report, loc, traced) # TODO: Evidence of the test result might have two or more contributors. # All the evidences should be complemented by context messages? unless pos_trans = sample_positive_transition return [] end pos_trans.each_with_object([]) do |ss, msgs| branch = ss.tag.at.find { |br| br.ctrlexpr.to_expr } while branch if expr = branch.ctrlexpr.to_expr and expr.location && expr.location < loc unless traced.include?(expr) msgs.push(report.C(:C1001, expr.location)) traced.add(expr) end end branch = branch.trunk end src = ss.tag.by.find { |node| node.location && node.location < loc && !traced.include?(node) } if src && predicate.call(ss.value) msgs.push(report.C(:C1006, src.location)) traced.add(src) end end end # NOTE: Mix-in this module to AdLint::Cc1::DefinableTestEvidence. DefinableTestEvidence.class_eval { include DefinableContextTracing } end end end adlint-3.2.0/lib/adlint/cc1/conv.rb0000644000004100000410000002217712224440633017011 0ustar www-datawww-data# C conversion semantics. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cc1 #:nodoc: module Conversion # NOTE: Host class of this module must include InterpreterMediator. def do_conversion(orig_var, to_type) if orig_var.type.coercible?(to_type) # NOTE: Value will be coerced into the destination type in # VariableTableMediator#create_tmpvar. create_tmpvar(to_type, wrap_around_value(orig_var, to_type)) else nil end end def do_integer_promotion(orig_var) return orig_var unless orig_var.type.integer? promoted_type = orig_var.type.integer_promoted_type if orig_var.type.same_as?(promoted_type) orig_var else do_conversion(orig_var, promoted_type) || orig_var end end def do_usual_arithmetic_conversion(lhs_orig, rhs_orig) if lhs_orig.type.pointer? && rhs_orig.type.pointer? return lhs_orig, rhs_orig end arith_type = lhs_orig.type.arithmetic_type_with(rhs_orig.type) if lhs_orig.type.same_as?(arith_type) lhs_conved = lhs_orig else lhs_conved = do_conversion(lhs_orig, arith_type) || lhs_orig end if rhs_orig.type.same_as?(arith_type) rhs_conved = rhs_orig else rhs_conved = do_conversion(rhs_orig, arith_type) || rhs_orig end return lhs_conved, rhs_conved end def do_default_argument_promotion(orig_var) promoted_type = orig_var.type.argument_promoted_type if orig_var.type.same_as?(promoted_type) orig_var else do_conversion(orig_var, promoted_type) || orig_var end end def untyped_pointer_conversion?(from_type, to_type, from_val) return false unless to_type.pointer? # NOTE: Untyped pointer conversion is defined as below; # # from_type | to_type | result # ------------------+------------------+----------------- # void pointer | void pointer | true # void pointer | non-void pointer | true # non-void pointer | void pointer | true # non-void pointer | non-void pointer | false # non-enum integer | void pointer | from_val == 0 # non-enum integer | non-void pointer | from_val == 0 # enum | void pointer | false # enum | non-void pointer | false # other | void pointer | true # other | non-void pointer | false case when from_type.pointer? void_pointer?(from_type) || void_pointer?(to_type) when from_type.integer? !from_type.enum? && from_val.test_must_be_null.true? else void_pointer?(to_type) end end private def wrap_around_value(orig_var, to_type) return orig_var.value unless orig_var.type.scalar? && to_type.scalar? case when orig_var.type.signed? && to_type.unsigned? min_val = scalar_value_of(to_type.min) if (orig_var.value < min_val).test_may_be_true.true? return min_val - orig_var.value + scalar_value_of(1) end when orig_var.type.unsigned? && to_type.signed? max_val = scalar_value_of(to_type.max) if (orig_var.value > max_val).test_may_be_true.true? return max_val - orig_var.value + scalar_value_of(1) end end orig_var.value end def void_pointer?(type) unqual_type = type.unqualify unqual_type.pointer? && unqual_type.base_type.void? end end # Host class of this module must include StandardTypeCatalogAccessor. module UsualArithmeticTypeConversion def do_usual_arithmetic_type_conversion(lhs, rhs) # NOTE: The ISO C99 standard says; # # 6.3.1.8 Usual arithmetic conversions # # 1 Many operators that except operands of arithmetic type cause # conversions and yield result types in a similar way. The purpose is # to determine a common real type for the operands and result. For the # specified operands, each operand is converted, without change of type # domain, to a type whose corresponding real type is the common real # type. Unless explicitly stated otherwise, the common real type is # also the corresponding real type of the result, whose type domain is # the type domain of the operands if they are the same, and complex # otherwise. This pattern is called the usual arithmetic conversions: # # First, if the corresponding real type of either operand is long # double, the other operand is converted, without change of type # domain, to a type whose corresponding real type is long double. # # Otherwise, if the corresponding real type of either operand is # double, the other operand is converted, without change of type # domain, to a type whose corresponding real type is double. # # Otherwise, if the corresponding real type of either operand is # float, the other operand is converted, without change of type # domain, to a type whose corresponding real type is float. # # Otherwise, the integer promotions are performed on both operands. # Then the following rules are applied to the promoted operands: # # If both operands have the same type, then no further conversion # is needed. # # Otherwise, if both operands have signed integer types or both # have unsigned integer types, the operand with the type of lesser # integer conversion rank is converted to the type of the operand # with greater rank. # # Otherwise, if the operand that has unsigned integer type has rank # greater or equal to the rank of the type of the other operand, # then the operand with signed integer type is converted to the # type of the operand with unsigned integer type. # # Otherwise, if the type of the operand with signed integer type # can represent all of the values of the type of the operand with # unsigned integer type, then the operand with unsigned integer # type is converted to the type of the operand with signed integer # type. # # Otherwise, both operands are converted to the unsigned integer # type corresponding to the type of the operand with signed integer # type. if lhs.same_as?(long_double_t) || rhs.same_as?(long_double_t) return long_double_t end if lhs.same_as?(double_t) || rhs.same_as?(double_t) return double_t end if lhs.same_as?(float_t) || rhs.same_as?(float_t) return float_t end lhs_promoted = lhs.integer_promoted_type rhs_promoted = rhs.integer_promoted_type return lhs_promoted if lhs_promoted.same_as?(rhs_promoted) lhs_rank = lhs_promoted.integer_conversion_rank rhs_rank = rhs_promoted.integer_conversion_rank case when lhs_promoted.signed? && rhs_promoted.signed? return lhs_rank < rhs_rank ? rhs_promoted : lhs_promoted when lhs_promoted.unsigned? && rhs_promoted.unsigned? return lhs_rank < rhs_rank ? rhs_promoted : lhs_promoted when lhs_promoted.unsigned? && lhs_rank >= rhs_rank return lhs_promoted when rhs_promoted.unsigned? && lhs_rank <= rhs_rank return rhs_promoted when lhs_promoted.signed? && rhs_promoted.compatible?(lhs_promoted) return lhs_promoted when rhs_promoted.signed? && lhs_promoted.compatible?(rhs_promoted) return rhs_promoted when lhs_promoted.signed? return lhs_promoted.corresponding_unsigned_type when rhs_promoted.signed? return rhs_promoted.corresponding_unsigned_type end raise TypeError, "cannot do usual arithmetic conversion." end end end end adlint-3.2.0/lib/adlint/cc1/resolver.rb0000644000004100000410000001752112224440633017702 0ustar www-datawww-data# C type resolver. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/monitor" require "adlint/cc1/type" require "adlint/cc1/syntax" module AdLint #:nodoc: module Cc1 #:nodoc: class TypeResolver < SyntaxTreeVisitor include MonitorUtil def initialize(type_tbl) @type_table = type_tbl end attr_reader :type_table def resolve(ast) ast.accept(self) @type_table end def visit_struct_type_declaration(node) checkpoint(node.location) node.struct_declarations.each { |dcl| dcl.accept(self) } node.type = @type_table.install_struct_type(node) end def visit_union_type_declaration(node) checkpoint(node.location) node.struct_declarations.each { |dcl| dcl.accept(self) } node.type = @type_table.install_union_type(node) end def visit_struct_declaration(node) node.items.each { |item| item.accept(self) } end def visit_member_declaration(node) checkpoint(node.location) node.specifier_qualifier_list.accept(self) node.struct_declarator.accept(self) type_quals = node.specifier_qualifier_list.type_qualifiers type_specs = node.specifier_qualifier_list.type_specifiers type = lookup_variable_type(type_quals, type_specs, node.struct_declarator.declarator) type = @type_table.pointer_type(type) if type.function? if node.struct_declarator.bitfield? if bit_width = compute_bitfield_width(node.struct_declarator) type = @type_table.bitfield_type(type, bit_width) else type = fallback_type end end node.type = type end def visit_enum_type_declaration(node) checkpoint(node.location) node.type = @type_table.install_enum_type(node) node.enumerators.each { |enum| enum.type = node.type } end def visit_typedef_declaration(node) checkpoint(node.location) node.declaration_specifiers.accept(self) node.init_declarator.accept(self) node.type = @type_table.install_user_type(node) end def visit_function_declaration(node) checkpoint(node.location) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.init_declarator.accept(self) if dcl_specs = node.declaration_specifiers type_quals = dcl_specs.type_qualifiers type_specs = dcl_specs.type_specifiers else type_quals = [] type_specs = [] end node.type = lookup_variable_type(type_quals, type_specs, node.init_declarator.declarator) end def visit_parameter_declaration(node) checkpoint(node.location) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.declarator.accept(self) if node.declarator if dcl_specs = node.declaration_specifiers type_quals = dcl_specs.type_qualifiers type_specs = dcl_specs.type_specifiers else type_quals = [] type_specs = [] end type = lookup_variable_type(type_quals, type_specs, node.declarator) if type.function? node.type = @type_table.pointer_type(type) else node.type = type end end def visit_variable_declaration(node) checkpoint(node.location) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.declarator.accept(self) if dcl_specs = node.declaration_specifiers type_quals = dcl_specs.type_qualifiers type_specs = dcl_specs.type_specifiers else type_quals = [] type_specs = [] end type = lookup_variable_type(type_quals, type_specs, node.declarator) if type.function? node.type = @type_table.pointer_type(type) else node.type = type end end def visit_variable_definition(node) checkpoint(node.location) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.init_declarator.accept(self) if dcl_specs = node.declaration_specifiers type_quals = dcl_specs.type_qualifiers type_specs = dcl_specs.type_specifiers else type_quals = [] type_specs = [] end type = lookup_variable_type(type_quals, type_specs, node.init_declarator.declarator) if type.function? node.type = @type_table.pointer_type(type) else node.type = type end end def visit_ansi_function_definition(node) checkpoint(node.location) super node.type = lookup_function_type(node) end def visit_kandr_function_definition(node) checkpoint(node.location) super node.type = lookup_function_type(node) end def visit_parameter_definition(node) checkpoint(node.location) node.declaration_specifiers.accept(self) if node.declaration_specifiers node.declarator.accept(self) if node.declarator type = @type_table.lookup_parameter_type(node, interpreter) type = @type_table.pointer_type(type) if type.function? node.type = type end def visit_type_name(node) checkpoint(node.location) super type_quals = node.specifier_qualifier_list.type_qualifiers type_specs = node.specifier_qualifier_list.type_specifiers node.type = lookup_variable_type(type_quals, type_specs, node.abstract_declarator) end def visit_compound_statement(node) @type_table.enter_scope super @type_table.leave_scope end private def lookup_variable_type(type_quals, type_specs, dcl) @type_table.lookup_or_install_type( type_quals, type_specs, dcl, interpreter) || fallback_type end def lookup_function_type(fun_def) @type_table.lookup_function_type(fun_def) || fallback_type end def compute_bitfield_width(struct_dcl) if expr = struct_dcl.expression if interpreter obj = interpreter.execute(expr) else obj = Interpreter.new(@type_table).execute(expr) end if obj.variable? && obj.value.scalar? return obj.value.unique_sample end end nil end extend Forwardable def_delegator :@type_table, :monitor private :monitor end class StaticTypeResolver < TypeResolver private def interpreter nil end def fallback_type type_table.unresolved_type end end class DynamicTypeResolver < TypeResolver def initialize(type_tbl, interp) super(type_tbl) @interpreter = interp end attr_reader :interpreter private def fallback_type type_table.undeclared_type end end end end adlint-3.2.0/lib/adlint/cc1/util.rb0000644000004100000410000000553112224440633017014 0ustar www-datawww-data# Miscellaneous utilities for C language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cc1 #:nodoc: class EscapeSequence def initialize(str) @str = str end def value case @str when "\\'" then "'".ord when "\\\"" then "\"".ord when "\\?" then "?".ord when "\\\\" then "\\".ord when "\\a" then "\a".ord when "\\b" then "\b".ord when "\\f" then "\f".ord when "\\n" then "\n".ord when "\\r" then "\r".ord when "\\t" then "\t".ord when "\\v" then "\v".ord else case @str when /\A\\([0-9]{1,3})\z/ $1.to_i(8) when /\A\\x([0-9A-F]+)\z/i $1.to_i(16) when /\A\\u([0-9A-F]{4,8})\z/i $1.to_i(16) else 0 end end end end module DebugUtil def dump_syntax_tree(phase_ctxt) if $DEBUG ast_fname = phase_ctxt[:sources].first.fpath.basename.add_ext(".ast") ast_fpath = ast_fname.expand_path(phase_ctxt.msg_fpath.dirname) File.open(ast_fpath, "w") do |io| if phase_ctxt[:cc1_ast] PP.pp(phase_ctxt[:cc1_ast], io) end end end end module_function :dump_syntax_tree def dump_token_array(phase_ctxt) if $DEBUG tok_fname = phase_ctxt[:sources].first.fpath.basename.add_ext(".tok") tok_fpath = tok_fname.expand_path(phase_ctxt.msg_fpath.dirname) File.open(tok_fpath, "w") do |io| if phase_ctxt[:cc1_tokens] phase_ctxt[:cc1_tokens].each { |tok| io.puts(tok.inspect) } end end end end module_function :dump_token_array end end end adlint-3.2.0/lib/adlint/cc1/ctrlexpr.rb0000644000004100000410000006604712224440633017713 0ustar www-datawww-data# Controlling expression of selection-statements and iteration-statements. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/syntax" require "adlint/cc1/object" require "adlint/cc1/mediator" require "adlint/cc1/expr" require "adlint/cc1/conv" require "adlint/cc1/operator" require "adlint/cc1/seqp" module AdLint #:nodoc: module Cc1 #:nodoc: # == DESCRIPTION # === Class structure # ControllingExpression # | # +-> ValueDomainManipulator # | <-- ValueDomainNarrower # | <-- ValueDomainWidener # | <-- NilValueDomainNarrower # | <-- NilValueDomainWidener # | # +-> ValueDomainNarrowing # <-- ValueComparison # <-- LogicalAnd # <-- LogicalOr # <-- StrictObjectDerivation # <-- DelayedObjectDerivation class ControllingExpression include SyntaxNodeCollector def initialize(interp, branch, target_expr = nil) @interpreter = interp @branch = branch @target_expr = target_expr @manipulators = [] end def ensure_true_by_narrowing(alt_expr = nil) expr = alt_expr || @target_expr if expr new_manip = ValueDomainNarrower.new(@interpreter, expr) if @branch.implicit_condition? eval_quietly { new_manip.prepare! } else new_manip.prepare! end else new_manip = NilValueDomainNarrower.new(@interpreter, @branch.group) end @manipulators.push(new_manip) new_manip end def ensure_true_by_widening(alt_expr = nil) expr = alt_expr || @target_expr if expr new_manip = ValueDomainWidener.new(@interpreter, expr) if @branch.implicit_condition? eval_quietly { new_manip.prepare! } else new_manip.prepare! end else new_manip = NilValueDomainWidener.new(@interpreter, @branch.group) end @manipulators.push(new_manip) new_manip end def undo(path_terminated) @manipulators.each { |manip| manip.rollback! } if path_terminated end def affected_variables @manipulators.map { |manip| manip.affected_variables }.flatten.uniq end def save_affected_variables @manipulators.each { |manip| manip.save! } end def restore_affected_variables @manipulators.each { |manip| manip.restore! } end def complexly_compounded? # NOTE: This method determines whether the controlling expression is too # complex to thin value domains of controlling variables. @target_expr && !collect_logical_and_expressions(@target_expr).empty? end def to_expr @target_expr end private def eval_quietly(&block) originally_quiet = @interpreter.quiet? if @branch.implicit_condition? && !originally_quiet @interpreter._quiet = true end yield ensure if @branch.implicit_condition? && !originally_quiet @interpreter._quiet = false end end end class ValueDomainManipulator < SyntaxTreeVisitor include InterpreterMediator include NotifierMediator include Conversion include ExpressionEvaluator::Impl include MonitorUtil def initialize(interp, target_expr) @interpreter = interp @target_expr = target_expr @affected_variables = [] @narrowing = nil @value_memory = nil end attr_reader :interpreter attr_reader :affected_variables def prepare! if @target_expr @narrowing = @target_expr.accept(self) @narrowing.execute! end end def commit! if @narrowing @narrowing.ensure_result_equal_to(scalar_value_of_true) end commit_changes(@narrowing) if @narrowing @affected_variables = @narrowing.narrowed_values.keys @narrowing = nil end end def rollback! # NOTE: Rollback narrowed version to cut out the value-domain to enter # the current branch. @affected_variables.each { |var| var.value.rollback! } end def save! @value_memory = {} @affected_variables.each do |var| @value_memory[var] = var.value.to_single_value.dup end end def restore! if @value_memory @value_memory.each { |var, saved_val| var.assign!(saved_val) } @value_memory = nil end end def self.def_strict_object_derivation(method_name) class_eval <<-EOS define_method("#{method_name}") do |*args| StrictObjectDerivation.new(self, args.first) end EOS end private_class_method :def_strict_object_derivation def_strict_object_derivation :visit_error_expression def_strict_object_derivation :visit_object_specifier def_strict_object_derivation :visit_constant_specifier def_strict_object_derivation :visit_string_literal_specifier def_strict_object_derivation :visit_null_constant_specifier def visit_array_subscript_expression(node) checkpoint(node.location) obj_manip = node.expression.accept(self) subs_manip = node.array_subscript.accept(self) DelayedObjectDerivation.new(self, node, obj_manip, subs_manip) do checkpoint(node.location) obj_manip.execute! subs_manip.execute! eval_array_subscript_expr(node, obj_manip.result, subs_manip.result) end end def visit_function_call_expression(node) checkpoint(node.location) obj_manip = node.expression.accept(self) arg_manips = node.argument_expressions.map { |expr| expr.accept(self) } DelayedObjectDerivation.new(self, node, obj_manip, *arg_manips) do checkpoint(node.location) obj_manip.execute! args = arg_manips.map { |m| m.execute!; [m.result, m.node] } eval_function_call_expr(node, obj_manip.result, args) end end def visit_member_access_by_value_expression(node) checkpoint(node.location) obj_manip = node.expression.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_member_access_by_value_expr(node, obj_manip.result) end end def visit_member_access_by_pointer_expression(node) checkpoint(node.location) obj_manip = node.expression.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_member_access_by_pointer_expr(node, obj_manip.result) end end def_strict_object_derivation :visit_bit_access_by_value_expression def_strict_object_derivation :visit_bit_access_by_pointer_expression def visit_postfix_increment_expression(node) checkpoint(node.location) obj_manip = node.operand.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_postfix_increment_expr(node, obj_manip.result) end end def visit_postfix_decrement_expression(node) checkpoint(node.location) obj_manip = node.operand.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_postfix_decrement_expr(node, obj_manip.result) end end def_strict_object_derivation :visit_compound_literal_expression def visit_prefix_increment_expression(node) checkpoint(node.location) obj_manip = node.operand.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_prefix_increment_expr(node, obj_manip.result) end end def visit_prefix_decrement_expression(node) checkpoint(node.location) obj_manip = node.operand.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_prefix_decrement_expr(node, obj_manip.result) end end def_strict_object_derivation :visit_address_expression def visit_indirection_expression(node) checkpoint(node.location) obj_manip = node.operand.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_indirection_expr(node, obj_manip.result) end end def visit_unary_arithmetic_expression(node) checkpoint(node.location) obj_manip = node.operand.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_unary_arithmetic_expr(node, obj_manip.result) end end def_strict_object_derivation :visit_sizeof_expression def_strict_object_derivation :visit_sizeof_type_expression def_strict_object_derivation :visit_alignof_expression def_strict_object_derivation :visit_alignof_type_expression def visit_cast_expression(node) checkpoint(node.location) obj_manip = node.operand.accept(self) DelayedObjectDerivation.new(self, node, obj_manip) do checkpoint(node.location) obj_manip.execute! eval_cast_expr(node, obj_manip.result) end end def visit_multiplicative_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_multiplicative_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_additive_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_additive_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_shift_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_shift_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_relational_expression(node) checkpoint(node.location) ValueComparison.new(self, node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_equality_expression(node) checkpoint(node.location) ValueComparison.new(self, node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_and_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_and_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_exclusive_or_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_exclusive_or_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_inclusive_or_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_inclusive_or_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_logical_and_expression(node) checkpoint(node.location) LogicalAnd.new(self, node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_or_expression(node) checkpoint(node.location) LogicalOr.new(self, node, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def_strict_object_derivation :visit_conditional_expression def visit_simple_assignment_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_simple_assignment_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_compound_assignment_expression(node) checkpoint(node.location) lhs_manip = node.lhs_operand.accept(self) rhs_manip = node.rhs_operand.accept(self) DelayedObjectDerivation.new(self, node, lhs_manip, rhs_manip) do checkpoint(node.location) lhs_manip.execute! rhs_manip.execute! eval_compound_assignment_expr(node, lhs_manip.result, rhs_manip.result) end end def visit_comma_separated_expression(node) checkpoint(node.location) obj_manips = node.expressions.map { |expr| expr.accept(self) } DelayedObjectDerivation.new(self, node, *obj_manips) do checkpoint(node.location) obj_manips.map { |manip| manip.execute!; manip.result }.last end end private def commit_changes(manip) subclass_responsibility end extend Forwardable def_delegator :@interpreter, :monitor private :monitor end class ValueDomainNarrower < ValueDomainManipulator private def commit_changes(manip) manip.narrowed_values.each do |var, val| var.narrow_value_domain!(Operator::EQ, val) end end end class ValueDomainWidener < ValueDomainManipulator private def commit_changes(manip) manip.narrowed_values.each do |var, val| var.widen_value_domain!(Operator::EQ, val) end end end class NilValueDomainNarrower < ValueDomainManipulator def initialize(interp, branch_group) super(interp, nil) @branch_group = branch_group end def prepare! raise TypeError, "no preparation without expression." end private def commit_changes(*) @branch_group.all_controlling_variables.each do |var| var.narrow_value_domain!(Operator::EQ, var.type.arbitrary_value) end true end end class NilValueDomainWidener < ValueDomainManipulator def initialize(interp, branch_group) super(interp, nil) @branch_group = branch_group end def prepare! raise TypeError, "no preparation without expression." end private def commit_changes(*) @branch_group.all_controlling_variables.each do |var| var.widen_value_domain!(Operator::EQ, var.type.arbitrary_value) end true end end class ValueDomainNarrowing include InterpreterMediator include NotifierMediator include Conversion def initialize(manip, node, *children) @manipulator = manip @node = node @children = children @original_values = {} @narrowed_values = {} @result = nil end attr_reader :node attr_reader :narrowed_values attr_reader :result def load_original_values!(manip) @original_values = manip.narrowed_values @children.each { |child| child.load_original_values!(manip) } end def execute! @result = do_narrowing @children.each do |manip| @narrowed_values = manip.narrowed_values.merge(@narrowed_values) end ensure if @result && @result.variable? notify_variable_value_referred(node, @result) end if seqp = node.subsequent_sequence_point notify_sequence_point_reached(seqp) end end def ensure_result_equal_to(val) if @result.variable? && @result.designated_by_lvalue? if @result.value.scalar? && val.scalar? ensure_relation(@result, Operator::EQ, val) end end end protected attr_reader :original_values private def do_narrowing subclass_responsibility end def do_logical_arithmetic_conversion(node, lhs_var, rhs_var) lhs_conved, rhs_conved = do_usual_arithmetic_conversion(lhs_var, rhs_var) unless lhs_conved == lhs_var notify_implicit_conv_performed(node.lhs_operand, lhs_var, lhs_conved) end unless rhs_conved == rhs_var notify_implicit_conv_performed(node.rhs_operand, rhs_var, rhs_conved) end return lhs_conved, rhs_conved end def ensure_relation(var, op, val) # NOTE: To avoid over-narrowing. if val.definite? or var.value.contain?(val) && !val.contain?(var.value) target_val = save_original_value(var).dup target_val.narrow_domain!(op, val) update_narrowed_value(var, target_val) end end def save_original_value(var) @original_values[var.to_named_variable] ||= var.value.dup end def original_value_of(var) @original_values[var.to_named_variable] end def update_narrowed_value(var, new_val) @narrowed_values[var.to_named_variable] = new_val end def narrowing_merge!(lhs_manip, rhs_manip) lhs_vals = lhs_manip.narrowed_values rhs_vals = rhs_manip.narrowed_values @narrowed_values = lhs_vals.merge(rhs_vals) { |key, lhs_val, rhs_val| rslt_val = lhs_val.dup rslt_val.narrow_domain!(Operator::EQ, rhs_val) rslt_val } end def widening_merge!(lhs_manip, rhs_manip) lhs_vals = lhs_manip.narrowed_values rhs_vals = rhs_manip.narrowed_values @narrowed_values = lhs_vals.merge(rhs_vals) { |key, lhs_val, rhs_val| rslt_val = lhs_val.dup rslt_val.widen_domain!(Operator::EQ, rhs_val) rslt_val } end extend Forwardable def_delegator :@manipulator, :interpreter private :interpreter alias :_orig_interpret :interpret def interpret(node) case node when ObjectSpecifier if safely_evaluable_object_specifier?(node) _orig_interpret(node) else # NOTE: Nothing to do with an undeclared object. create_tmpvar end else _orig_interpret(node) end end def safely_evaluable_object_specifier?(obj_spec) variable_named(obj_spec.identifier.value) || function_named(obj_spec.identifier.value) || enumerator_named(obj_spec.identifier.value) end end class ValueComparison < ValueDomainNarrowing def initialize(manip, node, lhs_manip, rhs_manip) super @operator = ComparisonOperator.new(node.operator) @lhs_manip = lhs_manip @rhs_manip = rhs_manip end private def do_narrowing @lhs_manip.execute! lhs_var = object_to_variable(@lhs_manip.result, @node.lhs_operand) @rhs_manip.execute! rhs_var = object_to_variable(@rhs_manip.result, @node.rhs_operand) unless lhs_var.type.scalar? && rhs_var.type.scalar? return create_tmpvar(int_t) end unless lhs_var.value.scalar? && rhs_var.value.scalar? return create_tmpvar(int_t) end lhs_conved, rhs_conved = do_logical_arithmetic_conversion(@node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value case @operator when Operator::EQ rslt_var = create_tmpvar(int_t, lhs_val == rhs_val) when Operator::NE rslt_var = create_tmpvar(int_t, lhs_val != rhs_val) when Operator::LT rslt_var = create_tmpvar(int_t, lhs_val < rhs_val) when Operator::GT rslt_var = create_tmpvar(int_t, lhs_val > rhs_val) when Operator::LE rslt_var = create_tmpvar(int_t, lhs_val <= rhs_val) when Operator::GE rslt_var = create_tmpvar(int_t, lhs_val >= rhs_val) else __NOTREACHED__ end notify_variable_value_referred(@node, lhs_var) notify_variable_value_referred(@node, rhs_var) case @operator when Operator::EQ, Operator::NE notify_equality_expr_evaled(@node, lhs_conved, rhs_conved, rslt_var) when Operator::LT, Operator::GT, Operator::LE, Operator::GE notify_relational_expr_evaled(@node, lhs_conved, rhs_conved, rslt_var) else __NOTREACHED__ end case when lhs_conved.designated_by_lvalue? ensure_relation(lhs_conved, @operator, rhs_val) when rhs_conved.designated_by_lvalue? ensure_relation(rhs_conved, @operator.for_commutation, lhs_val) else # NOTE: Domain of the rvalue should not be narrowed. end rslt_var end end class LogicalAnd < ValueDomainNarrowing def initialize(manip, node, lhs_manip, rhs_manip) super @lhs_manip = lhs_manip @rhs_manip = rhs_manip end private def do_narrowing @lhs_manip.execute! @lhs_manip.ensure_result_equal_to(scalar_value_of_true) lhs_var = object_to_variable(@lhs_manip.result, @node.lhs_operand) # NOTE: The ISO C99 standard says; # # 6.5.13 Logical AND operator # # Semantics # # 4 Unlike the bitwise binary & operator, the && operator guarantees # left-to-right evaluation; there is a sequence point after the # evaluation of the first operand. If the first operand compares equal # to 0, the second operand is not evaluated. notify_sequence_point_reached(SequencePoint.new(@node.lhs_operand)) # TODO: Must look about the short-circuit evaluation. @rhs_manip.load_original_values!(@lhs_manip) @rhs_manip.execute! @rhs_manip.ensure_result_equal_to(scalar_value_of_true) rhs_var = object_to_variable(@rhs_manip.result, @node.rhs_operand) notify_sequence_point_reached(SequencePoint.new(@node.rhs_operand)) narrowing_merge!(@lhs_manip, @rhs_manip) notify_variable_value_referred(@node, lhs_var) notify_variable_value_referred(@node, rhs_var) unless lhs_var.type.scalar? && rhs_var.type.scalar? return create_tmpvar(int_t) end unless lhs_var.value.scalar? && rhs_var.value.scalar? return create_tmpvar(int_t) end lhs_conved, rhs_conved = do_logical_arithmetic_conversion(@node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(int_t, lhs_val.logical_and(rhs_val)) notify_logical_and_expr_evaled(@node, lhs_conved, rhs_conved, rslt_var) rslt_var end end class LogicalOr < ValueDomainNarrowing def initialize(manip, node, lhs_manip, rhs_manip) super @lhs_manip = lhs_manip @rhs_manip = rhs_manip end private def do_narrowing @lhs_manip.execute! @lhs_manip.ensure_result_equal_to(scalar_value_of_true) lhs_var = object_to_variable(@lhs_manip.result, @node.lhs_operand) # NOTE: The ISO C99 standard says; # # 6.5.14 Logical OR operator # # Semantics # # 4 Unlike the bitwise | operator, the || operator guarantees # left-to-right evaluation; there is a sequence point after the # evaluation of the first operand. If the first operand compares # unequal to 0, the second operand is not evaluated. notify_sequence_point_reached(SequencePoint.new(@node.lhs_operand)) # TODO: Must look about the short-circuit evaluation. # FIXME: Base value of the RHS narrowing should be updated to ensure that # the LHS condition is false. @rhs_manip.execute! @rhs_manip.ensure_result_equal_to(scalar_value_of_true) rhs_var = object_to_variable(@rhs_manip.result, @node.rhs_operand) notify_sequence_point_reached(SequencePoint.new(@node.rhs_operand)) widening_merge!(@lhs_manip, @rhs_manip) notify_variable_value_referred(@node, lhs_var) notify_variable_value_referred(@node, rhs_var) unless lhs_var.type.scalar? && rhs_var.type.scalar? return create_tmpvar(int_t) end unless lhs_var.value.scalar? && rhs_var.value.scalar? return create_tmpvar(int_t) end lhs_conved, rhs_conved = do_logical_arithmetic_conversion(@node, lhs_var, rhs_var) lhs_val = lhs_conved.value rhs_val = rhs_conved.value rslt_var = create_tmpvar(int_t, lhs_val.logical_or(rhs_val)) notify_logical_or_expr_evaled(@node, lhs_conved, rhs_conved, rslt_var) rslt_var end end class StrictObjectDerivation < ValueDomainNarrowing def initialize(manip, node) super(manip, node) @object = interpret(node) end private def do_narrowing if @object.variable? && @object.named? if orig_val = original_value_of(@object) @object = PhantomVariable.new(@object, orig_val) end end @object end end class DelayedObjectDerivation < ValueDomainNarrowing def initialize(manip, node, *children, &block) super(manip, node, *children) @block = block end private def do_narrowing @block.call end end class PhantomVariable < AliasVariable def initialize(named_var, phantom_val = nil) super(named_var) @base_var = named_var @phantom_val = phantom_val ? phantom_val : named_var.memory.read.dup end def value @phantom_val end def assign!(val, *) @phantom_val = val end def to_named_variable @base_var.to_named_variable end def pretty_print(pp) Summary.new(object_id, name, type, @phantom_val).pretty_print(pp) end Summary = Struct.new(:object_id, :name, :type, :value) private_constant :Summary end end end adlint-3.2.0/lib/adlint/cc1/interp.rb0000644000004100000410000016262112224440633017344 0ustar www-datawww-data# Kernel of the abstract interpreter of C language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/monitor" require "adlint/util" require "adlint/cc1/environ" require "adlint/cc1/resolver" require "adlint/cc1/mediator" require "adlint/cc1/syntax" require "adlint/cc1/expr" require "adlint/cc1/conv" require "adlint/cc1/option" require "adlint/cc1/operator" require "adlint/cc1/util" module AdLint #:nodoc: module Cc1 #:nodoc: class Program def initialize(interp, tunit) @interpreter = interp @translation_unit = tunit end def execute @interpreter.notify_translation_unit_started(@translation_unit) @translation_unit.accept(ExecutionDriver.new(@interpreter)) @interpreter.notify_translation_unit_ended(@translation_unit) end class ExecutionDriver < SyntaxTreeVisitor def initialize(interp) @interpreter = interp end def visit_declaration(node) @interpreter.execute(node) end def visit_ansi_function_definition(node) @interpreter.execute(node) end def visit_kandr_function_definition(node) @interpreter.execute(node) end end private_constant :ExecutionDriver end class Interpreter include InterpreterMediator include Conversion include InterpreterOptions include BranchOptions def initialize(type_tbl) @type_table = type_tbl @environment = Environment.new(type_tbl) @type_resolver = DynamicTypeResolver.new(type_tbl, self) @sub_interpreters = [ DeclarationInterpreter.new(self), ParameterDefinitionInterpreter.new(self), FunctionInterpreter.new(self), SwitchStatementInterpreter.new(self), StatementInterpreter.new(self), ExpressionInterpreter.new(self) ] @options_stack = [] # NOTE: Active (executing) function may be nested if the nested # function-definition of the GCC extension is used. @active_function_stack = [] end attr_reader :environment attr_reader :type_resolver extend Forwardable def_delegator :@type_table, :traits def_delegator :@type_table, :monitor def_delegator :@type_table, :logger extend Pluggable def self.def_plugin_and_notifier(event_name, *arg_names) class_eval <<-EOS def_plugin :on_#{event_name} def notify_#{event_name}(#{arg_names.join(",")}) unless quiet? on_#{event_name}.invoke(#{arg_names.join(",")}) end end EOS end private_class_method :def_plugin_and_notifier # NOTE: Notified when the interpreter evaluates a variable-declaration. def_plugin_and_notifier :variable_declared, :var_dcl, :var # NOTE: Notified when the interpreter evaluates a variable-definition. def_plugin_and_notifier :variable_defined, :var_def, :var # NOTE: Notified when the interpreter evaluates an initializer of # variable-definition. def_plugin_and_notifier :variable_initialized, :var_def, :var, :init_var # NOTE: Notified when the interpreter evaluates a function-declaration. def_plugin_and_notifier :explicit_function_declared, :fun_dcl, :fun # NOTE: Notified when the interpreter evaluates a function-definition. def_plugin_and_notifier :explicit_function_defined, :fun_def, :fun # NOTE: Notified when the interpreter evaluates a struct-type-declaration. def_plugin_and_notifier :struct_declared, :struct_type_dcl # NOTE: Notified when the interpreter evaluates a union-type-declaration. def_plugin_and_notifier :union_declared, :union_type_dcl # NOTE: Notified when the interpreter evaluates a enum-type-declaration. def_plugin_and_notifier :enum_declared, :enum_type_dcl # NOTE: Notified when the interpreter evaluates a typedef-declaration. def_plugin_and_notifier :typedef_declared, :typedef_dcl # NOTE: Notified when the interpreter starts execution of a # function-definition. def_plugin_and_notifier :function_started, :fun_def, :fun # NOTE: Notified when the interpreter ends execution of a # function-definition. def_plugin_and_notifier :function_ended, :fun_def, :fun # NOTE: Notified when the interpreter evaluates a parameter-definition at # beginning of execution of a function-definition. def_plugin_and_notifier :parameter_defined, :param_def, :var # NOTE: Notified when the interpreter evaluates an expression which results # a named variable. def_plugin_and_notifier :variable_referred, :expr, :var # NOTE: Notified when the interpreter evaluates an expression which results # a constant temporary variable. def_plugin_and_notifier :constant_referred, :const_spec, :var # NOTE: Notified when the interpreter refers to a value of a variable while # evaluating an expression. def_plugin_and_notifier :variable_value_referred, :expr, :var # NOTE: Notified when the interpreter overwrites a value of a variable # while evaluating an expression. def_plugin_and_notifier :variable_value_updated, :expr, :var # NOTE: Notified when the interpreter refers to a function object while # evaluating an expression. def_plugin_and_notifier :function_referred, :expr, :fun # NOTE: Notified when the interpreter creates function-declaration of an # implicit function. def_plugin_and_notifier :implicit_function_declared, :obj_spec, :fun # NOTE: Notified when the interpreter evaluates a sizeof-expression. def_plugin_and_notifier :sizeof_expr_evaled, :expr, :ope_var, :rslt_var # NOTE: Notified when the interpreter evaluates a sizeof-type-expression. def_plugin_and_notifier :sizeof_type_expr_evaled, :expr, :type, :rslt_var # NOTE: Notified when the interpreter evaluates a cast-expression. def_plugin_and_notifier :explicit_conv_performed, :expr, :orig_var, :rslt_var # NOTE: Notified when the interpreter performs an implicit conversion while # evaluating an expression. def_plugin_and_notifier :implicit_conv_performed, :init_or_expr, :orig_var, :rslt_var # NOTE: Notified when the interpreter performs an address derivation while # address-expression evaluation and array or function address # derivation. def_plugin_and_notifier :address_derivation_performed, :init_or_expr, :obj, :ptr # NOTE: Notified when the interpreter evaluates an # array-subscript-expression. def_plugin_and_notifier :array_subscript_expr_evaled, :expr, :ary_or_ptr, :subs, :ary_var, :rslt_var # NOTE: Notified when the interpreter evaluates a function-call-expression. def_plugin_and_notifier :function_call_expr_evaled, :expr, :fun, :arg_vars, :rslt_var # NOTE: Notified when the interpreter evaluates an # unary-arithmetic-expression. def_plugin_and_notifier :unary_arithmetic_expr_evaled, :expr, :ope_var, :rslt_var # NOTE: Notified when the interpreter evaluates a # multiplicative-expression. def_plugin_and_notifier :multiplicative_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates an additive-expression. def_plugin_and_notifier :additive_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates a shift-expression. def_plugin_and_notifier :shift_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates a relational-expression. def_plugin_and_notifier :relational_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates an equality-expression. def_plugin_and_notifier :equality_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates a bitwise and-expression. def_plugin_and_notifier :and_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates an exclusive-or-expression. def_plugin_and_notifier :exclusive_or_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates a bitwise # inclusive-or-expression. def_plugin_and_notifier :inclusive_or_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates a logical-and-expression. def_plugin_and_notifier :logical_and_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates a logical-or-expression. def_plugin_and_notifier :logical_or_expr_evaled, :expr, :lhs_var, :rhs_var, :rslt_var # NOTE: Notified when the interpreter evaluates a conditional-expression. def_plugin_and_notifier :conditional_expr_evaled, :expr, :ctrlexpr_var, :rslt_var # NOTE: Notified when the interpreter evaluates an address-expression. def_plugin_and_notifier :address_expr_evaled, :expr, :obj, :ptr_var # NOTE: Notified when the interpreter evaluates an indirection-expression. def_plugin_and_notifier :indirection_expr_evaled, :expr, :ptr_var, :derefed_var # NOTE: Notified when the interpreter evaluates a # member-access-by-value-expression or a # member-access-by-pointer-expression. def_plugin_and_notifier :member_access_expr_evaled, :expr, :outer_var, :inner_var # NOTE: Notified when the interpreter evaluates a # prefix-increment-expression. def_plugin_and_notifier :prefix_increment_expr_evaled, :expr, :ope_var, :orig_val # NOTE: Notified when the interpreter evaluates a # postfix-increment-expression. def_plugin_and_notifier :postfix_increment_expr_evaled, :expr, :ope_var, :rslt_var # NOTE: Notified when the interpreter evaluates a # prefix-decrement-expression. def_plugin_and_notifier :prefix_decrement_expr_evaled, :expr, :ope_var, :orig_val # NOTE: Notified when the interpreter evaluates a # postfix-decrement-expression. def_plugin_and_notifier :postfix_decrement_expr_evaled, :expr, :ope_var, :rslt_var # NOTE: Notified when the interpreter evaluates a # simple-assignment-expression or a compound-assignment-expression. def_plugin_and_notifier :assignment_expr_evaled, :expr, :lhs_var, :rhs_var # NOTE: Notified when the interpreter starts execution of a # expression-statement. def_plugin_and_notifier :expression_stmt_started, :stmt # NOTE: Notified when the interpreter ends execution of a # expression-statement. def_plugin_and_notifier :expression_stmt_ended, :stmt # NOTE: Notified when the interpreter starts execution of a # switch-statement. def_plugin_and_notifier :switch_stmt_started, :stmt # NOTE: Notified when the interpreter ends execution of a switch-statement. def_plugin_and_notifier :switch_stmt_ended, :stmt # NOTE: Notified when the interpreter starts execution of a # while-statement. def_plugin_and_notifier :while_stmt_started, :stmt # NOTE: Notified when the interpreter ends execution of a while-statement. def_plugin_and_notifier :while_stmt_ended, :stmt # NOTE: Notified when the interpreter starts execution of a do-statement. def_plugin_and_notifier :do_stmt_started, :stmt # NOTE: Notified when the interpreter ends execution of a do-statement. def_plugin_and_notifier :do_stmt_ended, :stmt # NOTE: Notified when the interpreter starts execution of a for-statement. def_plugin_and_notifier :for_stmt_started, :stmt # NOTE: Notified when the interpreter ends execution of a for-statement. def_plugin_and_notifier :for_stmt_ended, :stmt # NOTE: Notified when the interpreter starts execution of a # c99-for-statement. def_plugin_and_notifier :c99_for_stmt_started, :stmt # NOTE: Notified when the interpreter ends execution of a # c99-for-statement. def_plugin_and_notifier :c99_for_stmt_ended, :stmt # NOTE: Notified when the interpreter evaluates a goto-statement. def_plugin_and_notifier :goto_stmt_evaled, :stmt, :label_name # NOTE: Notified when the interpreter evaluates a return-statement. def_plugin_and_notifier :return_stmt_evaled, :stmt, :ret_var # NOTE: Notified when the interpreter evaluates an implicit return. def_plugin_and_notifier :implicit_return_evaled, :loc # NOTE: Notified when the interpreter evaluates a controlling expression of # the if-statement. def_plugin_and_notifier :if_ctrlexpr_evaled, :if_stmt, :ctrlexpr_val # NOTE: Notified when the interpreter evaluates a controlling expression of # the if-else-statement. def_plugin_and_notifier :if_else_ctrlexpr_evaled, :if_else_stmt, :ctrlexpr_val # NOTE: Notified when the interpreter evaluates a controlling expression of # the switch-statement. def_plugin_and_notifier :switch_ctrlexpr_evaled, :switch_stmt, :ctrlexpr_var # NOTE: Notified when the interpreter evaluates a controlling expression of # the case-labeled-statement. def_plugin_and_notifier :case_ctrlexpr_evaled, :case_labeled_stmt, :ctrlexpr_var # NOTE: Notified when the interpreter evaluates a controlling expression of # the while-statement. def_plugin_and_notifier :while_ctrlexpr_evaled, :while_statement, :ctrlexpr_val # NOTE: Notified when the interpreter evaluates a controlling expression of # the do-statement. def_plugin_and_notifier :do_ctrlexpr_evaled, :do_stmt, :ctrlexpr_val # NOTE: Notified when the interpreter evaluates a controlling expression of # the for-statement. def_plugin_and_notifier :for_ctrlexpr_evaled, :for_stmt, :ctrlexpr_val # NOTE: Notified when the interpreter evaluates a controlling expression of # the c99-for-statement. def_plugin_and_notifier :c99_for_ctrlexpr_evaled, :c99_for_stmt, :ctrlexpr_val # NOTE: Notified when the interpreter defines a generic-label. def_plugin_and_notifier :label_defined, :generic_labeled_stmt # NOTE: Notified when the interpreter starts execution of a # compound-statement. def_plugin_and_notifier :block_started, :compound_stmt # NOTE: Notified when the interpreter ends execution of a # compound-statement. def_plugin_and_notifier :block_ended, :compound_stmt # NOTE: Notified when the interpreter forks execution paths of a # function-definition. def_plugin_and_notifier :branch_started, :branch # NOTE: Notified when the interpreter joins execution paths of a # function-definition. def_plugin_and_notifier :branch_ended, :branch # NOTE: Notified when the interpreter starts execution of a # translation-unit. def_plugin_and_notifier :translation_unit_started, :tunit # NOTE: Notified when the interpreter ends execution of a translation-unit. def_plugin_and_notifier :translation_unit_ended, :tunit # NOTE: Notified when the control reaches to a sequence-point. def_plugin_and_notifier :sequence_point_reached, :seqp def execute(node, *opts) @options_stack.push(cur_opts + opts) if quiet_without_side_effect? rslt = nil branched_eval(nil, FINAL) do rslt = node.accept(interpreter_for(node)) # NOTE: To rollback latest variable value versions. BreakEvent.of_return.throw end else rslt = node.accept(interpreter_for(node)) end rslt ensure @options_stack.pop end def quiet? cur_opts.include?(QUIET) || cur_opts.include?(QUIET_WITHOUT_SIDE_EFFECT) end def _quiet=(quiet) # NOTE: This method is called only from ControllingExpression. if quiet cur_opts.add(QUIET) else cur_opts.delete(QUIET) end end def quiet_without_side_effect? cur_opts.include?(QUIET_WITHOUT_SIDE_EFFECT) end def _quiet_without_side_effect=(quiet_without_side_effect) # NOTE: This method is called only from ExpressionEvaluator. if quiet_without_side_effect cur_opts.add(QUIET_WITHOUT_SIDE_EFFECT) else cur_opts.delete(QUIET_WITHOUT_SIDE_EFFECT) end end def _active_function # NOTE: This method is called only from # StatementInterpreter#visit_return_statement. # NOTE: To convert returning object, StatementInterpreter must have # knowledge about conversion destination type. @active_function_stack.last end def _enter_function(fun_def) # NOTE: This method is called only from FunctionInterpreter. @active_function_stack.push(fun_def) end def _leave_function(*) # NOTE: This method is called only from FunctionInterpreter. @active_function_stack.pop end private def interpreter_for(node) @sub_interpreters.find do |interp| node.kind_of?(interp.target_node_class) end end def cur_opts @options_stack.last || Set.new end def interpreter # NOTE: This method is of the requirement for including # InterpreterMediator. self end end class SubInterpreter < SyntaxTreeVisitor include InterpreterOptions include InterpreterMediator include NotifierMediator include Conversion include MonitorUtil include LogUtil def initialize(owner, target_node_class) @owner = owner @target_node_class = target_node_class end attr_reader :target_node_class private def interpreter # NOTE: This is private attr_reader for InterpreterMediator. # This attribute is read via a normal method to suppress # `private attribute?' warning. @owner end extend Forwardable def_delegator :interpreter, :monitor private :monitor def_delegator :interpreter, :logger private :logger end class DeclarationInterpreter < SubInterpreter def initialize(owner) super(owner, Declaration) end def visit_function_declaration(node) checkpoint(node.location) resolve_unresolved_type(node) node.type.declarations.each do |dcl| dcl.mark_as_referred_by(node.identifier) end fun = declare_explicit_function(node) notify_explicit_function_declared(node, fun) evaluate_sequence_point(node.init_declarator.declarator) end def visit_variable_declaration(node) checkpoint(node.location) resolve_unresolved_type(node) node.type.declarations.each do |dcl| dcl.mark_as_referred_by(node.identifier) end var = declare_variable(node, current_branch) notify_variable_declared(node, var) evaluate_sequence_point(node.declarator) end def visit_variable_definition(node) checkpoint(node.location) resolve_unresolved_type(node) node.type.declarations.each do |dcl| dcl.mark_as_referred_by(node.identifier) end if node.initializer if node.type.incomplete? # NOTE: Unable to define variable of incomplete type such as an array # without length. init_var, init_conved = evaluate_initializer(node) var = define_variable(node, current_branch, init_conved.value.to_defined_value) else # NOTE: Declare variable first in order to correctly evaluate # sizeof-expression that refers to the defining variable in the # initializer. declare_variable(node, current_branch) init_var, init_conved = evaluate_initializer(node) var = define_variable(node, current_branch, init_conved.value.to_defined_value) end notify_variable_value_referred(node, init_var) notify_variable_defined(node, var) notify_variable_initialized(node, var, init_var) else notify_variable_defined(node, define_variable(node, current_branch)) end evaluate_sequence_point(node.init_declarator.declarator) end def visit_struct_type_declaration(node) checkpoint(node.location) resolve_unresolved_type(node) notify_struct_declared(node) end def visit_union_type_declaration(node) checkpoint(node.location) resolve_unresolved_type(node) notify_union_declared(node) end def visit_enum_type_declaration(node) checkpoint(node) if enums = node.enum_specifier.enumerators seq = 0 enums.each do |enum| if expr = enum.expression obj = interpret(expr) if obj.variable? && obj.value.scalar? enum.value = obj.value.unique_sample end end enum.value ||= seq define_enumerator(enum) seq = enum.value + 1 end end notify_enum_declared(node) end def visit_typedef_declaration(node) checkpoint(node.location) resolve_unresolved_type(node) node.type.real_type.declarations.each do |dcl| dcl.mark_as_referred_by(node.identifier) end notify_typedef_declared(node) evaluate_sequence_point(node.init_declarator.declarator) LOG_I("user-type `#{node.identifier.value}' " + "defined at #{node.location.to_s}.") end private def evaluate_initializer(var_def) init_interp = InitializerInterpreter.new(interpreter) var, conved = init_interp.execute(var_def) # NOTE: An implicit conversion and size deduction of an incomplete array # have been done by InitializerInterpreter. # NOTE: For the case of array variable definition with a # string-literal-specifier as the initializer. if var_def.type.array? && var.type.pointer? unless ary = pointee_of(var) and ary.type.array? ary = create_tmpvar(var_def.type) end deduct_array_length_from_array_variable(var_def, ary) var = conved = ary end return var, conved end def deduct_array_length_from_array_variable(var_def, ary) unless var_def.type.length if var_def.type.user? var_def.type = var_def.type.dup end var_def.type.length = ary.type.length end end def evaluate_sequence_point(full_dcr) if seqp = full_dcr.subsequent_sequence_point notify_sequence_point_reached(seqp) end end end class InitializerInterpreter include InterpreterMediator include NotifierMediator include Conversion include MonitorUtil def initialize(interp) @interpreter = interp end def execute(var_def) checkpoint(var_def.initializer.location) case when expr = var_def.initializer.expression # NOTE: An implicit conversion is already notified in # #evaluate_expression. return evaluate_expression(expr, var_def.type) when inits = var_def.initializer.initializers var = evaluate_initializers(inits, var_def.type) # NOTE: Size deduction of an incomplete array type have been done by # #evaluate_initializers. if var_def.type.array? && var.type.array? var_def.type = var.type unless var_def.type.length end if var.type.same_as?(var_def.type) conved = var else conved = do_conversion(var, var_def.type) || create_tmpvar(var_def.type) notify_implicit_conv_performed(inits, var, conved) end else var = conved = create_tmpvar(var_def.type) end return var, conved end private def evaluate_expression(expr, type) checkpoint(expr.location) var = object_to_variable(interpret(expr), expr) if var.type.same_as?(type) conved = var else conved = do_conversion(var, type) || create_tmpvar(type) notify_implicit_conv_performed(expr, var, conved) end return var, conved end def evaluate_initializers(inits, type) case when type.union? # NOTE: The ISO C99 standard says; # # 6.7.8 Initialization # # Semantics # # 10 If an object that has automatic storage duration is not # initialized explicitly, its value is indeterminate. If an object # that has static storage duration is not initialized explicitly, # then: # -- if it has pointer type, it is initialized to a null pointer; # -- if it has arithmetic type, it is initialized to (positive or # unsigned) zero; # -- if it is an aggregate, every member is initialized # (recursively) according to these rules; # -- if it is a union, the first named member is initialized # (recursively) according to these rules. if fst_memb = type.members.first fst_obj = evaluate_initializers(inits, fst_memb.type) return create_tmpvar(type, value_of(fst_obj)) else return create_tmpvar(type) end when type.array? # NOTE: The ISO C99 standard says; # # 6.7.2.1 Structure and union specifiers # # Constraints # # 2 A structure or union shall not contain a member with incomplete # or function type (hence, a structure shall not contain an # instance of itself, but may contain a pointer to an instance of # itself), except that the last member of a structure with more # than one named member may have incomplete array type; such a # structure (and any union containing, possibly recursively, a # member that is such a structure) shall not be a member of a # structure or an element of an array. # # NOTE: Size of the last incomplete array member should not be # deducted in initialization. It is treated as a pointer. # # NOTE: ISO C90 does not support flexible array members. type = deduct_array_length_from_initializers(type, inits) memb_types = [type.unqualify.base_type] * type.impl_length when type.struct? memb_types = type.members.map { |memb| memb.type } else memb_types = [type] end vals = memb_types.zip(inits).map { |memb_type, init| if init checkpoint(init.location) case when expr = init.expression value_of(evaluate_expression(expr, memb_type).last) when inits = init.initializers value_of(evaluate_initializers(inits, memb_type)) else memb_type.undefined_value end else memb_type.undefined_value end } case when type.array? create_tmpvar(type, ArrayValue.new(vals)) when type.composite? create_tmpvar(type, CompositeValue.new(vals)) else create_tmpvar(type, vals.first) end end def deduct_array_length_from_initializers(orig_ary_type, inits) unless orig_ary_type.length if orig_ary_type.user? orig_ary_type = orig_ary_type.dup end orig_ary_type.length = inits.size end orig_ary_type end def interpreter # NOTE: This is private attr_reader for InterpreterMediator. # This attribute is read via a normal method to suppress # `private attribute?' warning. @interpreter end extend Forwardable def_delegator :interpreter, :monitor private :monitor end class ParameterDefinitionInterpreter < SubInterpreter def initialize(owner) super(owner, ParameterDefinition) end def visit_parameter_definition(node) checkpoint(node.location) resolve_unresolved_type(node) id = node.identifier node.type.declarations.each do |dcl| if id dcl.mark_as_referred_by(id) else dcl.mark_as_referred_by(node.head_token) end end if id var = define_variable(node.to_variable_definition, nil, node.type.parameter_value) notify_parameter_defined(node, var) end end end class FunctionInterpreter < SubInterpreter def initialize(owner) super(owner, FunctionDefinition) end def visit_ansi_function_definition(node) interpret_function(node) end def visit_kandr_function_definition(node) interpret_function(node) end private def interpret_function(fun_def) checkpoint(fun_def.location) reset_environment resolve_unresolved_type(fun_def) fun = lookup_or_define_function(fun_def) notify_explicit_function_defined(fun_def, fun) interpret_function_body(fun_def, fun) if fun_def.analysis_target?(traits) end def interpret_function_body(fun_def, fun) interpreter._enter_function(fun_def) scoped_eval do notify_function_started(fun_def, fun) notify_block_started(fun_def.function_body) fun_def.parameter_definitions.each { |param_def| interpret(param_def) } BreakEvent.catch do fun_def.function_body.block_items.each { |item| interpret(item) } notify_implicit_return_evaled(fun_def.function_body.tail_location) end notify_block_ended(fun_def.function_body) notify_function_ended(fun_def, fun) end ensure interpreter._leave_function(fun_def) end def lookup_or_define_function(fun_def) fun_def.type.declarations.each do |dcl| dcl.mark_as_referred_by(fun_def.identifier) end if fun = function_named(fun_def.identifier.value) and fun.explicit? fun.declarations_and_definitions.each do |dcl_or_def| dcl_or_def.mark_as_referred_by(fun_def.identifier) end fun.declarations_and_definitions.push(fun_def) fun else define_explicit_function(fun_def) end end end class StatementInterpreter < SubInterpreter include BranchOptions include BranchGroupOptions include SyntaxNodeCollector def initialize(owner) super(owner, Statement) # NOTE: All effective controlling expressions in the executing # iteration-statements. @effective_ctrlexpr_stack = [] end def visit_generic_labeled_statement(node) checkpoint(node.location) node.executed = true notify_label_defined(node) uninitialize_block_local_variables(node) interpret(node.statement) end def visit_case_labeled_statement(node) checkpoint(node.location) node.executed = true ctrlexpr = node.expression ctrlexpr_var = object_to_variable(interpret(ctrlexpr, QUIET), ctrlexpr) notify_case_ctrlexpr_evaled(node, ctrlexpr_var) interpret(node.statement) end def visit_default_labeled_statement(node) checkpoint(node.location) node.executed = true interpret(node.statement) end def visit_compound_statement(node) checkpoint(node.location) node.executed = true scoped_eval do begin notify_block_started(node) node.block_items.each { |item| interpret(item) } ensure notify_block_ended(node) end end end def visit_expression_statement(node) checkpoint(node.location) node.executed = true notify_expression_stmt_started(node) interpret(node.expression) if node.expression ensure notify_expression_stmt_ended(node) end def visit_if_statement(node) checkpoint(node.location) node.executed = true orig_ctrlexpr = node.expression if orig_ctrlexpr == effective_ctrlexpr ctrlexpr_val = scalar_value_of_arbitrary ctrlexpr = nil else ctrlexpr_obj = interpret(orig_ctrlexpr) ctrlexpr_var = object_to_variable(ctrlexpr_obj, orig_ctrlexpr) ctrlexpr_val = value_of(ctrlexpr_var) notify_variable_value_referred(orig_ctrlexpr, ctrlexpr_var) notify_sequence_point_reached(SequencePoint.new(orig_ctrlexpr)) ctrlexpr = orig_ctrlexpr.to_normalized_logical end notify_if_ctrlexpr_evaled(node, ctrlexpr_val) case when ctrlexpr_val.test_must_be_true.true? branched_eval(ctrlexpr, NARROWING, FINAL, IMPLICIT_COND, COMPLETE) do interpret(node.statement) end when ctrlexpr_val.test_may_be_true.true? branched_eval(ctrlexpr, NARROWING, FINAL, IMPLICIT_COND) do interpret(node.statement) end else # NOTE: To end the current branch group of else-if sequence. branched_eval(nil, NARROWING, FINAL) {} end end def visit_if_else_statement(node) checkpoint(node.location) node.executed = true orig_ctrlexpr = node.expression if orig_ctrlexpr == effective_ctrlexpr ctrlexpr_val = scalar_value_of_arbitrary ctrlexpr = nil else ctrlexpr_obj = interpret(orig_ctrlexpr) ctrlexpr_var = object_to_variable(ctrlexpr_obj, orig_ctrlexpr) ctrlexpr_val = value_of(ctrlexpr_var) notify_variable_value_referred(orig_ctrlexpr, ctrlexpr_var) notify_sequence_point_reached(SequencePoint.new(orig_ctrlexpr)) ctrlexpr = orig_ctrlexpr.to_normalized_logical end notify_if_else_ctrlexpr_evaled(node, ctrlexpr_val) case when ctrlexpr_val.test_must_be_true.true? branched_eval(ctrlexpr, NARROWING, FINAL, IMPLICIT_COND, COMPLETE) do interpret(node.then_statement) end return when ctrlexpr_val.test_may_be_true.true? branched_eval(ctrlexpr, NARROWING, IMPLICIT_COND) do interpret(node.then_statement) end end case node.else_statement when IfStatement, IfElseStatement interpret(node.else_statement) else branched_eval(nil, NARROWING, COMPLEMENTAL, FINAL, COMPLETE) do interpret(node.else_statement) end end end def visit_while_statement(node) checkpoint(node.location) node.executed = true notify_while_stmt_started(node) ctrlexpr_obj = interpret_iteration_ctrlexpr(node, node.expression) ctrlexpr_var = object_to_variable(ctrlexpr_obj, node.expression) ctrlexpr_val = value_of(ctrlexpr_var) notify_variable_value_referred(node.expression, ctrlexpr_var) notify_sequence_point_reached(SequencePoint.new(node.expression)) notify_while_ctrlexpr_evaled(node, ctrlexpr_val) orig_ctrlexpr, ctrlexpr = node.deduct_controlling_expression case when ctrlexpr_val.test_must_be_true.true? begin enter_iteration_statement(orig_ctrlexpr) branch_opts = [ITERATION, NARROWING, FINAL, IMPLICIT_COND, COMPLETE] branched_eval(ctrlexpr, *branch_opts) { interpret(node.statement) } ensure leave_iteration_statement(orig_ctrlexpr) end when ctrlexpr_val.test_may_be_true.true? begin enter_iteration_statement(orig_ctrlexpr) branch_opts = [ITERATION, NARROWING, FINAL, IMPLICIT_COND] branched_eval(ctrlexpr, *branch_opts) { interpret(node.statement) } ensure leave_iteration_statement(orig_ctrlexpr) end end ensure notify_while_stmt_ended(node) end def visit_do_statement(node) checkpoint(node.location) node.executed = true notify_do_stmt_started(node) widen_varying_variable_value_domain(node) orig_ctrlexpr, * = node.deduct_controlling_expression begin enter_iteration_statement(orig_ctrlexpr) branch_opts = [ITERATION, NARROWING, FINAL, IMPLICIT_COND, COMPLETE] branched_eval(nil, *branch_opts) { interpret(node.statement) } ensure leave_iteration_statement(orig_ctrlexpr) end ctrlexpr_obj = interpret(node.expression) ctrlexpr_var = object_to_variable(ctrlexpr_obj, node.expression) ctrlexpr_val = value_of(ctrlexpr_var) notify_variable_value_referred(node.expression, ctrlexpr_var) notify_sequence_point_reached(SequencePoint.new(node.expression)) notify_do_ctrlexpr_evaled(node, ctrlexpr_val) ensure notify_do_stmt_ended(node) end def visit_for_statement(node) checkpoint(node.location) node.executed = true notify_for_stmt_started(node) node.initial_statement.accept(self) if ctrlexpr_val = interpret_for_ctrlexpr(node) notify_for_ctrlexpr_evaled(node, ctrlexpr_val) else ctrlexpr_val = scalar_value_of_true end case when ctrlexpr_val.test_must_be_true.true? interpret_for_body_statement(node, true) when ctrlexpr_val.test_may_be_true.true? interpret_for_body_statement(node, false) end ensure notify_for_stmt_ended(node) end def visit_c99_for_statement(node) checkpoint(node.location) scoped_eval do interpret(node.declaration) node.executed = true notify_c99_for_stmt_started(node) if ctrlexpr_val = interpret_for_ctrlexpr(node) notify_c99_for_ctrlexpr_evaled(node, ctrlexpr_val) else ctrlexpr_val = scalar_value_of_true end case when ctrlexpr_val.test_must_be_true.true? interpret_for_body_statement(node, true) when ctrlexpr_val.test_may_be_true.true? interpret_for_body_statement(node, false) end end ensure notify_c99_for_stmt_ended(node) end def visit_goto_statement(node) checkpoint(node.location) # TODO: Must implement goto semantics. node.executed = true notify_goto_stmt_evaled(node, node.identifier.value) end def visit_continue_statement(node) checkpoint(node.location) node.executed = true BreakEvent.of_continue.throw end def visit_break_statement(node) checkpoint(node.location) node.executed = true BreakEvent.of_break.throw end def visit_return_statement(node) checkpoint(node.location) node.executed = true unless node.expression notify_return_stmt_evaled(node, nil) BreakEvent.of_return.throw end var = object_to_variable(interpret(node.expression), node.expression) notify_variable_value_referred(node.expression, var) if active_fun = interpreter._active_function and ret_type = active_fun.type.return_type if var.type.same_as?(ret_type) conved = var else conved = do_conversion(var, ret_type) || create_tmpvar(ret_type) notify_implicit_conv_performed(node.expression, var, conved) end else conved = var end notify_sequence_point_reached(SequencePoint.new(node)) notify_return_stmt_evaled(node, var) BreakEvent.of_return.throw end private def interpret_for_ctrlexpr(node) node.condition_statement.executed = true if ctrlexpr = node.condition_statement.expression ctrlexpr_obj = interpret(ctrlexpr, QUIET) ctrlexpr_var = object_to_variable(ctrlexpr_obj, ctrlexpr) ctrlexpr_val = value_of(ctrlexpr_var) ctrlexpr_obj = interpret_iteration_ctrlexpr(node, ctrlexpr) ctrlexpr_var = object_to_variable(ctrlexpr_obj, ctrlexpr) notify_variable_value_referred(ctrlexpr, ctrlexpr_var) notify_sequence_point_reached(SequencePoint.new(ctrlexpr)) else widen_varying_variable_value_domain(node) end ctrlexpr_val end def interpret_for_body_statement(node, complete) if complete branch_opts = [ITERATION, NARROWING, FINAL, IMPLICIT_COND, COMPLETE] else branch_opts = [ITERATION, NARROWING, FINAL, IMPLICIT_COND] end orig_ctrlexpr, ctrlexpr = node.deduct_controlling_expression enter_iteration_statement(orig_ctrlexpr) branched_eval(ctrlexpr, *branch_opts) do interpret(node.body_statement) interpret(node.expression) if node.expression if explicit_ctrlexpr = node.condition_statement.expression # NOTE: To avoid that value of the controlling variable is marked # as updated at end of the for-statement. Value of the # controlling variable is referred by the controlling # expression at the last iteration. # FIXME: This re-interpretation of the controlling expression may # cause duplicative warning messages. # FIXME: This re-interpretation of the controlling expression always # causes "logical-expression must be false" warnings about a # one-time-for-loop. To avoid this, now, workarounds are in # builtin code checks W0609 and W0610. var = object_to_variable(interpret(explicit_ctrlexpr), explicit_ctrlexpr) notify_variable_value_referred(explicit_ctrlexpr, var) notify_sequence_point_reached(SequencePoint.new(explicit_ctrlexpr)) end end ensure leave_iteration_statement(orig_ctrlexpr) end def uninitialize_block_local_variables(generic_labeled_stmt) related_goto_stmts = generic_labeled_stmt.referrers return if related_goto_stmts.empty? local_variables.each do |var| var_def = var.declarations_and_definitions.first anterior_goto_stmts = related_goto_stmts.select { |goto_stmt| goto_stmt.location.line_no < var_def.location.line_no } unless anterior_goto_stmts.empty? var.value.enter_versioning_group var.value.begin_versioning var.uninitialize! var.value.end_versioning var.value.leave_versioning_group(true) end end end def interpret_iteration_ctrlexpr(iter_stmt, ctrlexpr) environment.enter_branch(FINAL).execute(interpreter, nil) do widen_varying_variable_value_domain(iter_stmt) end interpret(ctrlexpr) ensure environment.leave_branch_group environment.leave_branch end def widen_varying_variable_value_domain(iter_stmt) iter_stmt.varying_variable_names.each do |name| if var = variable_named(name) widened_sval = var.type.arbitrary_value case deduct_variable_varying_path(var, iter_stmt) when :increase widened_sval.narrow_domain!(Operator::GE, var.value) when :decrease widened_sval.narrow_domain!(Operator::LE, var.value) end var.widen_value_domain!(Operator::EQ, widened_sval) end end end def deduct_variable_varying_path(var, iter_stmt) histogram = iter_stmt.varying_expressions.map { |expr| case expr when SimpleAssignmentExpression deduct_ctrl_var_path_by_simple_assignment_expr(var, expr) when CompoundAssignmentExpression deduct_ctrl_var_path_by_compound_assignment_expr(var, expr) when PrefixIncrementExpression, PostfixIncrementExpression expr.operand.identifier.value == var.name ? :increase : nil when PrefixDecrementExpression, PostfixDecrementExpression expr.operand.identifier.value == var.name ? :decrease : nil else nil end }.compact.each_with_object(Hash.new(0)) { |dir, hash| hash[dir] += 1 } if histogram.empty? nil else histogram[:decrease] <= histogram[:increase] ? :increase : :decrease end end def deduct_ctrl_var_path_by_simple_assignment_expr(var, expr) return nil unless expr.lhs_operand.identifier.value == var.name additive_exprs = collect_additive_expressions(expr.rhs_operand) histogram = additive_exprs.map { |additive_expr| if additive_expr.lhs_operand.kind_of?(ObjectSpecifier) lhs_name = additive_expr.lhs_operand.identifier.value end if additive_expr.rhs_operand.kind_of?(ObjectSpecifier) rhs_name = additive_expr.rhs_operand.identifier.value end next nil unless lhs_name == var.name || rhs_name == var.name case additive_expr.operator.type when "+" :increase when "-" :decrease else nil end }.compact.each_with_object(Hash.new(0)) { |dir, hash| hash[dir] += 1 } if histogram.empty? nil else histogram[:decrease] <= histogram[:increase] ? :increase : :decrease end end def deduct_ctrl_var_path_by_compound_assignment_expr(var, expr) return nil unless expr.lhs_operand.identifier.value == var.name case expr.operator.type when "+=" :increase when "-=" :decrease else nil end end def effective_ctrlexpr @effective_ctrlexpr_stack.last end def enter_iteration_statement(effective_ctrlexpr) @effective_ctrlexpr_stack.push(effective_ctrlexpr) end def leave_iteration_statement(effective_ctrlexpr) @effective_ctrlexpr_stack.pop end end class SwitchStatementInterpreter < SubInterpreter include BranchOptions include BranchGroupOptions def initialize(owner) super(owner, SwitchStatement) end def visit_switch_statement(node) checkpoint(node.location) node.executed = true notify_switch_stmt_started(node) ctrlexpr = node.expression ctrlexpr_var = object_to_variable(interpret(ctrlexpr), ctrlexpr) notify_switch_ctrlexpr_evaled(node, ctrlexpr_var) notify_variable_value_referred(ctrlexpr, ctrlexpr_var) execute_switch_body(ctrlexpr_var, node.statement) notify_switch_stmt_ended(node) end private def execute_switch_body(var, node) checkpoint(node.location) node.executed = true scoped_eval do begin notify_block_started(node) execute_switch_branches(var, node.block_items) ensure notify_block_ended(node) end end end def execute_switch_branches(var, block_items) if complete?(block_items) base_opts = [SMOTHER_BREAK, IMPLICIT_COND, NARROWING, COMPLETE] else base_opts = [SMOTHER_BREAK, IMPLICIT_COND, NARROWING] end idx = 0 while block_item = block_items[idx] case block_item when GenericLabeledStatement block_item.executed = true notify_label_defined(block_item) block_item = block_item.statement redo when CaseLabeledStatement, DefaultLabeledStatement if final_branch?(block_items, idx) opts = base_opts + [FINAL] else opts = base_opts.dup end idx = execute_branch(block_item, block_items, idx, opts) break unless idx else interpret(block_item) idx += 1 end end end def execute_branch(labeled_stmt, block_items, idx, branch_opts) ctrlexpr = labeled_stmt.normalized_expression ctrlexpr_val = value_of(interpret(ctrlexpr, QUIET)) case labeled_stmt when DefaultLabeledStatement branch_opts.push(COMPLEMENTAL) end case when ctrlexpr_val.test_must_be_true.true? branch_opts.push(FINAL, COMPLETE) when ctrlexpr_val.test_must_be_false.true? # NOTE: To end the current branch group of switch-statement if this # case-clause is the final one. branched_eval(ctrlexpr, *branch_opts) {} return seek_next_branch(block_items, idx) end branched_eval(ctrlexpr, *branch_opts) do |branch| case stmt = labeled_stmt.statement when CaseLabeledStatement, DefaultLabeledStatement # NOTE: Consecutive label appears! enter_next_clause(stmt, block_items, idx, branch, branch_opts) end interpret(labeled_stmt) idx += 1 while item = block_items[idx] case item when GenericLabeledStatement item.executed = true notify_label_defined(item) item = item.statement redo when CaseLabeledStatement, DefaultLabeledStatement # NOTE: Fall through! enter_next_clause(item, block_items, idx, branch, branch_opts) end interpret(item) idx += 1 end # NOTE: To simulate implicit breaking of the last case-clause. BreakEvent.of_break.throw end branch_opts.include?(FINAL) ? nil : seek_next_branch(block_items, idx) end def enter_next_clause(labeled_stmt, block_items, idx, branch, branch_opts) prepare_fall_through(branch, branch_opts, labeled_stmt) case labeled_stmt when DefaultLabeledStatement branch_opts.push(COMPLEMENTAL) end branch_opts.push(FINAL) if final_branch?(block_items, idx) branch.add_options(*branch_opts) case stmt = labeled_stmt.statement when CaseLabeledStatement, DefaultLabeledStatement enter_next_clause(stmt, block_items, idx, branch, branch_opts) end end def prepare_fall_through(branch, branch_opts, labeled_stmt) value_domain_manip = nil branch.restart_versioning do ctrlexpr = labeled_stmt.normalized_expression ctrlexpr_val = value_of(interpret(ctrlexpr, QUIET)) case when ctrlexpr_val.test_must_be_true.true? branch_opts.push(FINAL, COMPLETE) when ctrlexpr_val.test_must_be_false.true? return end value_domain_manip = branch.ctrlexpr.ensure_true_by_widening(ctrlexpr) end value_domain_manip.commit! end def final_branch?(block_items, idx) idx += 1 while block_item = block_items[idx] case block_item when GenericLabeledStatement block_item = block_item.statement redo when CaseLabeledStatement, DefaultLabeledStatement return false else idx += 1 end end true end def complete?(block_items) block_items.any? do |block_item| case block_item when GenericLabeledStatement, CaseLabeledStatement block_item = block_item.statement redo when DefaultLabeledStatement true else false end end end def seek_next_branch(block_items, idx) idx += 1 while block_item = block_items[idx] case block_item when GenericLabeledStatement notify_label_defined(block_item) block_item = block_item.statement redo when CaseLabeledStatement, DefaultLabeledStatement return idx else idx += 1 end end nil end end class ExpressionInterpreter < SubInterpreter include ExpressionEvaluator include BranchOptions include BranchGroupOptions def initialize(owner) super(owner, Expression) end def self.def_eval_with_sequence_point(method_name) class_eval <<-EOS def #{method_name}(node) super ensure if seqp = node.subsequent_sequence_point notify_sequence_point_reached(seqp) end end EOS end private_class_method :def_eval_with_sequence_point def_eval_with_sequence_point :visit_error_expression def_eval_with_sequence_point :visit_object_specifier def_eval_with_sequence_point :visit_constant_specifier def_eval_with_sequence_point :visit_string_literal_specifier def_eval_with_sequence_point :visit_null_constant_specifier def_eval_with_sequence_point :visit_grouped_expression def_eval_with_sequence_point :visit_array_subscript_expression def_eval_with_sequence_point :visit_function_call_expression def_eval_with_sequence_point :visit_member_access_by_value_expression def_eval_with_sequence_point :visit_member_access_by_pointer_expression def_eval_with_sequence_point :visit_bit_access_by_value_expression def_eval_with_sequence_point :visit_bit_access_by_pointer_expression def_eval_with_sequence_point :visit_postfix_increment_expression def_eval_with_sequence_point :visit_postfix_decrement_expression def_eval_with_sequence_point :visit_compound_literal_expression def_eval_with_sequence_point :visit_prefix_increment_expression def_eval_with_sequence_point :visit_prefix_decrement_expression def_eval_with_sequence_point :visit_address_expression def_eval_with_sequence_point :visit_indirection_expression def_eval_with_sequence_point :visit_unary_arithmetic_expression def_eval_with_sequence_point :visit_sizeof_expression def_eval_with_sequence_point :visit_sizeof_type_expression def_eval_with_sequence_point :visit_alignof_expression def_eval_with_sequence_point :visit_alignof_type_expression def_eval_with_sequence_point :visit_cast_expression def_eval_with_sequence_point :visit_multiplicative_expression def_eval_with_sequence_point :visit_additive_expression def_eval_with_sequence_point :visit_shift_expression def_eval_with_sequence_point :visit_relational_expression def_eval_with_sequence_point :visit_equality_expression def_eval_with_sequence_point :visit_and_expression def_eval_with_sequence_point :visit_exclusive_or_expression def_eval_with_sequence_point :visit_inclusive_or_expression def_eval_with_sequence_point :visit_logical_and_expression def_eval_with_sequence_point :visit_logical_or_expression def_eval_with_sequence_point :visit_simple_assignment_expression def_eval_with_sequence_point :visit_compound_assignment_expression def_eval_with_sequence_point :visit_comma_separated_expression def visit_conditional_expression(node) checkpoint(node.location) ctrlexpr = node.condition ctrlexpr_obj = interpret(ctrlexpr) ctrlexpr_var = object_to_variable(ctrlexpr_obj, ctrlexpr) ctrlexpr_val = value_of(ctrlexpr_var) notify_variable_value_referred(ctrlexpr, ctrlexpr_var) notify_sequence_point_reached(ctrlexpr.subsequent_sequence_point) ctrlexpr = ctrlexpr.to_normalized_logical then_var = nil if ctrlexpr_val.test_may_be_true.true? branched_eval(ctrlexpr, NARROWING, IMPLICIT_COND) do then_var = object_to_variable(interpret(node.then_expression), node.then_expression) end end else_var = nil if ctrlexpr_val.test_may_be_false.true? branched_eval(nil, NARROWING, FINAL, COMPLETE) do else_var = object_to_variable(interpret(node.else_expression), node.else_expression) end else branched_eval(nil, NARROWING, FINAL, COMPLETE) {} end case when then_var && else_var rslt_var = unify_then_and_else_var(then_var, else_var) # FIXME: Not to over-warn about discarding a function return value. # Because the unified result is a new temporary variable, it is # impossible to relate a reference of the unified result and a # reference of the 2nd or 3rd expression's value. notify_variable_value_referred(node, then_var) notify_variable_value_referred(node, else_var) when then_var rslt_var = then_var when else_var rslt_var = else_var else # FIXME: Nevertheless, the then-expression is not reachable, the branch # execution check may fail in evaluation of the else branch. rslt_var = create_tmpvar end notify_conditional_expr_evaled(node, ctrlexpr_var, rslt_var) rslt_var ensure if seqp = node.subsequent_sequence_point notify_sequence_point_reached(seqp) end end def unify_then_and_else_var(then_var, else_var) if then_var.type.pointer? || else_var.type.pointer? case when pointee_of(then_var) return then_var when pointee_of(else_var) return else_var end end create_tmpvar(then_var.type, then_var.value.single_value_unified_with(else_var.value)) end end end end adlint-3.2.0/lib/adlint/cc1/format.rb0000644000004100000410000033016312224440633017331 0ustar www-datawww-data# Format of the formatted input/output functions. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/mediator" module AdLint #:nodoc: module Cc1 #:nodoc: class PrintfFormat def initialize(fmt_str, loc, trailing_args, env) @location = loc @directives = create_directives(fmt_str, trailing_args, env) @extra_arguments = trailing_args end attr_reader :location attr_reader :directives attr_reader :extra_arguments def conversion_specifiers @directives.select { |dire| dire.conversion_specifier? } end def min_length @directives.reduce(0) { |len, dire| len + dire.min_length } end def max_length @directives.reduce(0) { |len, dire| len + dire.max_length } end private def create_directives(fmt_str, trailing_args, env) dires = [] str = fmt_str.dup until str.empty? dires.push(Directive.guess(str, trailing_args, env)) end dires end # == DESCRIPTION # === Directive class hierarchy # Directive # <-- Ordinary # <-- ConversionSpecifier # <-- CompleteConversionSpecifier # <-- NumberConversionSpecifier # <-- Conversion_d # <-- Conversion_i # <-- Conversion_o # <-- Conversion_u # <-- Conversion_x # <-- Conversion_X # <-- Conversion_f # <-- Conversion_F # <-- Conversion_e # <-- Conversion_E # <-- Conversion_g # <-- Conversion_G # <-- Conversion_a # <-- Conversion_A # <-- Conversion_p # <-- CharacterConversionSpecifier # <-- Conversion_c # <-- StringConversionSpecifier # <-- Conversion_s # <-- Conversion_n # <-- Conversion_percent # <-- UndefinedConversionSpecifier # <-- IncompleteConversionSpecifier class Directive def self.guess(fmt_str, trailing_args, env) try_to_create_ordinary(fmt_str) or try_to_create_conversion_specifier(fmt_str, trailing_args, env) end def initialize(fmt, consume_args) @format = fmt @consume_arguments = consume_args end attr_reader :format def ordinary? !conversion_specifier? end def conversion_specifier? subclass_responsibility end def consume_arguments? @consume_arguments end # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? subclass_responsibility end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? subclass_responsibility end def illformed? !wellformed? end def complete? subclass_responsibility end def incomplete? !complete? end def undefined? subclass_responsibility end def valid_flags? subclass_responsibility end def valid_field_width? subclass_responsibility end def valid_precision? subclass_responsibility end def valid_length_modifier? subclass_responsibility end def valid_conversion_specifier_character? subclass_responsibility end def min_length subclass_responsibility end def max_length subclass_responsibility end def flags subclass_responsibility end def field_width subclass_responsibility end def precision subclass_responsibility end def length_modifier subclass_responsibility end def conversion_specifier_character subclass_responsibility end def self.try_to_create_ordinary(fmt_str) (fmt = Ordinary.scan(fmt_str)) ? Ordinary.new(fmt) : nil end private_class_method :try_to_create_ordinary def self.try_to_create_conversion_specifier(fmt_str, trailing_args, env) fmt, flags, field_width, prec, len_mod, cs_char = ConversionSpecifier.scan(fmt_str) case when cs_char.nil? IncompleteConversionSpecifier.new(fmt, flags, field_width, prec, len_mod) when cs_class = CONVERSION_SPECIFIER_TBL[cs_char] cs_class.new(fmt, trailing_args, env, flags, field_width, prec, len_mod, cs_char) else UndefinedConversionSpecifier.new(fmt, flags, field_width, prec, len_mod, cs_char) end end private_class_method :try_to_create_conversion_specifier end private_constant :Directive class Ordinary < Directive def self.scan(fmt_str) # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 3 The format shall be a multibyte character sequence, beginning and # ending in its initial shift state. The format is composed of zero # or more directives: ordinary multibyte characters (not %), which # are copied unchanged to the output stream; and conversion # specifiers, each of which results in fetching zero or more # subsequent arguments, converting them, if applicable, according to # the corresponding conversion specifier, and then writing the result # to the output stream. fmt_str.slice!(/\A[^%]+/) end def initialize(fmt) super(fmt, false) end def conversion_specifier? false end # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? true end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? true end def complete? true end def undefined? false end def valid_flags? false end def valid_field_width? false end def valid_precision? false end def valid_length_modifier? false end def valid_conversion_specifier_character? false end def min_length format.bytes.count end def max_length min_length end def flags nil end def field_width nil end def precision nil end def length_modifier nil end def conversion_specifier_character nil end end private_constant :Ordinary class ConversionSpecifier < Directive include TypeTableMediator include MemoryPoolMediator def self.scan(fmt_str) # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 4 Each conversion specification is introduced by the character %. # After the %, the following appear in sequence: # # -- Zero or more flags (in any order) that modify the meaning of the # conversion specification. # -- An optional minimum field width. If the converted value has # fewer characters than the field width, it is padded with spaces # (by default) on the left (or right, if the left adjustment flag, # described later, has been given) to the field width. The field # width takes the form of an asterisk * (described later) or a # nonnegative decimal integer. # -- An optional precision that gives the minimum number of digits to # appear for the d, i, o, u, x, and X conversions, the number of # digits to appear after the decimal-point character for a, A, e, # E, f, and F conversions, the maximum number of significant # digits for the g and G conversions, or the maximum number of # bytes to be written for s conversions. The precision takes the # form of a period (.) followed either by an asterisk * (described # later) or by an optional decimal interger; if only the period is # specified, the precision is taken as zero. If a precision # appears with any other conversion specifier, the behavior is # undefined. # -- An optional length modifier that specifies the size of the # argument. # -- A conversion specifier character that specifies the type of # conversion to be applied. if header = fmt_str.slice!(/\A%/) scanned = header else return nil, nil, nil, nil, nil, nil end if flags = fmt_str.slice!(/\A#{flags_re}/) scanned += flags end if field_width = fmt_str.slice!(/\A#{field_width_re}/) scanned += field_width end if prec = fmt_str.slice!(/\A#{precision_re}/) scanned += prec end if len_mod = fmt_str.slice!(/\A#{length_modifier_re}/) scanned += len_mod end if cs_char = fmt_str.slice!(/\A#{cs_char_re}/) scanned += cs_char else # NOTE: If no valid conversion specifier character, force to scan # the heading 1 character as a conversion specifier character. if cs_char = fmt_str.slice!(/\A[a-z]/i) scanned += cs_char end end return scanned, flags, field_width, prec, len_mod, cs_char end def initialize(fmt, trailing_args, env, consume_args, flags, field_width, prec, len_mod, cs_char) super(fmt, consume_args) @flags = flags @field_width = field_width @precision = prec @length_modifier = len_mod @conversion_specifier_character = cs_char if consume_arguments? && @field_width == "*" @field_width_argument = trailing_args.shift else @field_width_argument = nil end if consume_arguments? && @precision == ".*" @precision_argument = trailing_args.shift else @precision_argument = nil end if consume_arguments? @conversion_argument = trailing_args.shift else @conversion_argument = nil end @environment = env end def conversion_specifier? true end def undefined? false end attr_reader :flags attr_reader :field_width attr_reader :precision attr_reader :length_modifier attr_reader :conversion_specifier_character attr_reader :field_width_argument attr_reader :precision_argument attr_reader :conversion_argument def field_width_value case @field_width when "*" # TODO: Should support the parameterized field width. 1 when /\A[1-9][0-9]*\z/ @field_width.to_i else 1 end end def precision_value # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 4 Each conversion specification is introduced by the character %. # After the %, the following appear in sequence: # # -- An optional precision that gives the minimum number of digits to # appear for the d, i, o, u, x, and X conversions, the number of # digits to appear after the decimal-point character for a, A, e, # E, f, and F conversions, the maximum number of significant # digits for the g and G conversions, or the maximum number of # bytes to be written for s conversions. The precision takes the # form of a period (.) followed either by an asterisk * (described # later) or by an optional decimal interger; if only the period is # specified, the precision is taken as zero. If a precision # appears with any other conversion specifier, the behavior is # undefined. case @precision when "." 0 when ".*" # TODO: Should support the parameterized precision. default_precision_value when /\A\.([1-9][0-9]*)\z/ $1.to_i else default_precision_value end end def self.flags_re # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 6 The flag characters and their meaning are: # # - The result of the conversion is left-justified within the # field. (It is right-justified if this flag is not specified.) # + The result of a signed conversion always begins with a plus # or minus sign. (It begins with a sign only when a negative # value is converted if this flag is not specified.) # space If the first character of a signed conversion is not a sign, # or if a signed conversion results in no characters, a space # is prefixed to the result. If the space and + flags both # appear, the space flag is ignored. # # The result is converted to an "alternative form". For o # conversion, it increases the precision, if an only if # necessary, to force the first digit of the result to be a # zero (if the value and precision are both 0, a single 0 is # printed). For x (or X) conversion, a nonzero result has 0x # (or 0X) prefixed to it. For a, A, e, E, f, F, g, and G # conversions, the result of converting a floating-point number # always contains a decimal-point character, even if no digits # follow it. (Normally, a decimal-point character appears in # the result of these conversions only if a digit follows it.) # For g and G conversions, trailing zeros are not removed from # the result. For other conversions, the behavior is # undefined. # 0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, # leading zeros (following any indication of sign or base) are # used to pad to the field width rather than performing space # padding, except when converting an infinity or NaN. If the 0 # and - flags both appear, the 0 flag is ignored. For d, i, o, # u, x, and X conversions, if a precision is specified, the 0 # flag is ignored. For other conversions, the behavior is # undefined. /[-+ #0]*/ end private_class_method :flags_re def self.field_width_re /(?:\*|[1-9][0-9]*)?/ end private_class_method :field_width_re def self.precision_re /(?:\.\*|\.[1-9][0-9]*)?/ end private_class_method :precision_re def self.length_modifier_re # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 7 The length modifiers and their meanings are: # # hh Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a signed char or unsigned char argument # (the argument will have been promoted according to the integer # promotions, but its value shall be converted to signed char or # unsigned char before printing); or that a following n # conversion specifier applies to a pointer to a signed char # argument. # h Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a short int or unsigned short int # argument (the argument will have been promoted according to # the integer promotions, but its value shall be converted to # short int or unsigned short int before printing); or that a # following n conversion specifier applies to a pointer to a # short int argument. # l Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long int or unsigned long int argument; # that a following n conversion specifier applies to a pointer # to a long int argument; that a following c conversion # specifier applies to a wint_t argument; that a following s # conversion specifier applies to a pointer to a wchar_t # argument; or has no effect on a following a, A, e, E, f, F, g, # or G conversion specifier. # ll Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long long int or unsigned long long int # argument; or that a following n conversion specifier applies # to a pointer to a long long int argument. # j Specifies that a following d, i, o, u, x, or X conversion # specifier applies to an intmax_t or uintmax_t argument; or # that a following n conversion specifier applies to a pointer # to an intmax_t argument. # z Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a size_t or the corresponding signed # integer type argument; or that a following n conversion # specifier applies to a pointer to a signed integer type # corresponding to size_t argument. # t Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a ptrdiff_t or the corresponding unsigned # integer type argument; or that a following n conversion # specifier applies to a pointer to a ptrdiff_t argument. # L Specifies that a following a, A, e, E, f, F, g, or G # conversion specifier applies to a long double argument. /(?:h+|l+|j|z|t|L)?/ end private_class_method :length_modifier_re def self.cs_char_re # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 8 The conversion specifiers and their meanings are: # # d,i The int argument is converted to signed decimal in the # style [-]dddd. The precision specifies the minimum number # of digits to appear; if the value being converted can be # represented in fewer digits, it is expanded with leading # zeros. The default precision is 1. The result of # converting a zero value with a precision of zero is no # characters. # o,u,x,X The unsigned int argument is converted to unsigned octal # (o), unsigned decimal (u), or unsigned hexadecimal notation # (x or X) in the style dddd; the letters abcdef are used for # x conversion and the letters ABCDEF for X conversion. The # precision specifies the minimum number of digits to appear; # if the value being converted can be represented in fewer # digits, it is expanded with leading zeros. The default # precision in 1. The result of converting a zero value with # a precision of zero is no characters. # f,F A double argument representing a floating-point number is # converted to decimal notation in the style [-]ddd.ddd, # where the number of digits after the decimal-point # character is equal to the precision specification. If the # precision is missing, it is taken as 6; if the precision is # zero and the # flag is not specified, no decimal-point # character appears. If a decimal-point character appears, # at least one digit appears before it. The value is rounded # to the appropriate number of digits. # A double argument representing an infinity is converted in # one of the styles [-]inf or [-]infinity -- which style is # implementation-defined. A double argument representing a # NaN is converted in one of the styles [-]nan or # [-]nan(n-char-sequence) -- which style, and the meaning of # any n-char-sequence, is implementation-defined. The F # conversion specifier produces INF, INFINITY, or NAN instead # of inf, infinity, or nan, respectively. # e,E A double argument representing a floating-point number is # converted in the style [-]d.ddde[+-]dd, where there is one # digit (which is nonzero if the argument is nonzero) before # the decimal-point character and the number of digits after # it is equal to the precision; if the precision is missing, # it is taken as 6; if the precision is zero and the # flag # is not specified, no decimal-point character appears. The # value is rounded to the appropriate number of digits. The # E conversion specifier produces a number with E instead of # e introducing the exponent. The exponent always contains # at least two digits, and only as many more digits as # necessary to represent the exponent. If the value is zero, # the exponent is zero. # g,G A double argument representing a floating-point number is # converted in style f or e (or in style F or E in the case # of a G conversion specifier), depending on the value # converted and the precision. Let P equal the precision if # nonzero, 6 if the precision is omitted, or 1 if the # precision is zero. Then, if a conversion with style E # would have an exponent of X: # -- if P > X >= -4, the conversion is which style f (or F) # and precision P - (X + 1). # -- otherwise, the conversion is with style e (or E) and # precision P - 1. # Finally, unless the # flag is used, any trailing zeros are # removed from the fractional portion of the result and the # decimal-point character is removed if there is no # fractional portion remaining. # A double argument representing an infinity or NaN is # converted in the style of an f or F conversion specifier. # a,A A double argument representing a floating-point number is # converted in the style [-]0xh.hhhhp[+-]d, where there is # one hexadecimal digit (which is nonzero if the argument is # a normalized floating-point number and is otherwise # unspecified) before the decimal-point character and the # number of hexadecimal digits after it is equal to the # precision; if the precision is missing and FLT_RADIX is a # power of 2, then the precision is sufficient for an exact # representation of the value; if the precision is missing # and FLT_RADIX is not a power of 2, then the precision is # sufficient to distinguish values of type double, except # that trailing zeros may be omitted; if the precision is # zero and the # flag is not specified, no decimal-point # character appears. The letters abcdef are used for a # conversion and the letters ABCDEF for A conversion. The A # conversion specifier produces a number with X and P instead # of x and p. The exponent always contains at least one # digit, and only as many more digits as necessary to # represent the decimal exponent of 2. If the value is zero, # the exponent is zero. # c If no l length modifier is present, the int argument is # converted to an unsigned char, and the resulting character # is written. # s If no l length modifier is present, the argument shall be a # pointer to the initial element of an array of character # type. Characters from the array are written up to (but not # including) the terminating null character. If the # precision is specified, no more than that many bytes are # written. If the precision is not specified or is greater # than the size of the array, the array shall contain a null # character. # If an l length modifier is present, the argument shall be a # pointer to the initial element of an array of wchar_t type. # Wide characters from the array are converted to multibyte # characters (each as if by a call to the wcrtomb function, # with the conversion state described by an mbstate_t object # initialized to zero before the first wide character is # converted) up to and including a terminating null wide # character. The resulting multibyte characters are written # up to (but not including) the terminating null character # (byte). If no precision is specified, the array shall # contain a null wide character. If a precision is # specified, no more than that many bytes are written # (including shift sequence, if any), and the array shall # contain a null wide character if, to equal the multibyte # character sequence length given by the precision, the # function would need to access a wide character one past the # end of the array. In no case is a partial multibyte # character written. # p The argument shall be a pointer to void. The value of the # pointer is converted to a sequence of printing characters, # in an implementation-defined manner. # n The argument shall be a pointer to signed integer into # which is written the number of characters written to the # output stream so far by this call to fprintf. No argument # is converted, but one is consumed. If the conversion # specification includes any flags, a field width, or a # precision, the behavior is undefined. # % A % character is written. No argument is converted. The # complete conversion specification shall be %%. /[diouxXfFeEgGaAcspn%]/ end private_class_method :cs_char_re private def default_precision_value subclass_responsibility end def ruby_sprintf_format # TODO: Should support the parameterized field width and the # parameterized precision. fw = @field_width == "*" ? "1" : @field_width pr = @precision == ".*" ? ".1" : @precision "%#{flags}#{fw}#{pr}#{conversion_specifier_character}" end extend Forwardable def_delegator :@environment, :type_table private :type_table def_delegator :@environment, :memory_pool private :memory_pool end private_constant :ConversionSpecifier class CompleteConversionSpecifier < ConversionSpecifier # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? if @field_width_argument unless @field_width_argument.type.convertible?(signed_int_t) || @field_width_argument.type.convertible?(unsigned_int_t) return false end end if @precision_argument unless @precision_argument.type.convertible?(signed_int_t) || @precision_argument.type.convertible?(unsigned_int_t) return false end end if @conversion_argument if argument_types argument_types.any? do |arg_type| @conversion_argument.type.convertible?(arg_type) end else true end else false end end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? valid_flags? && valid_field_width? && valid_precision? && valid_length_modifier? && valid_conversion_specifier_character? end def complete? true end def valid_flags? true end def valid_field_width? true end def valid_precision? true end def valid_length_modifier? if length_modifier.empty? true else suitable_length_modifiers.include?(length_modifier) end end private def argument_types subclass_responsibility end def suitable_length_modifiers subclass_responsibility end end private_constant :CompleteConversionSpecifier class NumberConversionSpecifier < CompleteConversionSpecifier def initialize(fmt, trailing_args, env, flags, field_width, prec, len_mod, cs_char) super(fmt, trailing_args, env, true, flags, field_width, prec, len_mod, cs_char) end def valid_conversion_specifier_character? true end def min_length # NOTE: Ruby has the buitin mostly C compliant sprintf. (ruby_sprintf_format % 0).length end def max_length # NOTE: Ruby has the buitin mostly C compliant sprintf. if conversion_type.signed? (ruby_sprintf_format % conversion_type.min).length else (ruby_sprintf_format % conversion_type.max).length end end private def conversion_type subclass_responsibility end end private_constant :NumberConversionSpecifier class Conversion_d < NumberConversionSpecifier def self.suitable_conversion_specifier_character "d" end private def default_precision_value # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 8 The conversion specifiers and their meanings are: # # d,i The int argument is converted to signed decimal in the # style [-]dddd. The precision specifies the minimum number # of digits to appear; if the value being converted can be # represented in fewer digits, it is expanded with leading # zeros. The default precision is 1. The result of # converting a zero value with a precision of zero is no # characters. # o,u,x,X The unsigned int argument is converted to unsigned octal # (o), unsigned decimal (u), or unsigned hexadecimal notation # (x or X) in the style dddd; the letters abcdef are used for # x conversion and the letters ABCDEF for X conversion. The # precision specifies the minimum number of digits to appear; # if the value being converted can be represented in fewer # digits, it is expanded with leading zeros. The default # precision in 1. The result of converting a zero value with # a precision of zero is no characters. 1 end def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 7 The length modifiers and their meanings are: # # hh Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a signed char or unsigned char argument # (the argument will have been promoted according to the integer # promotions, but its value shall be converted to signed char or # unsigned char before printing); or that a following n # conversion specifier applies to a pointer to a signed char # argument. # h Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a short int or unsigned short int # argument (the argument will have been promoted according to # the integer promotions, but its value shall be converted to # short int or unsigned short int before printing); or that a # following n conversion specifier applies to a pointer to a # short int argument. # l Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long int or unsigned long int argument; # that a following n conversion specifier applies to a pointer # to a long int argument; that a following c conversion # specifier applies to a wint_t argument; that a following s # conversion specifier applies to a pointer to a wchar_t # argument; or has no effect on a following a, A, e, E, f, F, g, # or G conversion specifier. # ll Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long long int or unsigned long long int # argument; or that a following n conversion specifier applies # to a pointer to a long long int argument. # j Specifies that a following d, i, o, u, x, or X conversion # specifier applies to an intmax_t or uintmax_t argument; or # that a following n conversion specifier applies to a pointer # to an intmax_t argument. # z Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a size_t or the corresponding signed # integer type argument; or that a following n conversion # specifier applies to a pointer to a signed integer type # corresponding to size_t argument. # t Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a ptrdiff_t or the corresponding unsigned # integer type argument; or that a following n conversion # specifier applies to a pointer to a ptrdiff_t argument. case length_modifier when "hh" [signed_char_t, unsigned_char_t] when "h" [signed_short_t, unsigned_short_t] when "l" [signed_long_t, unsigned_long_t] when "ll" [signed_long_long_t, unsigned_long_long_t] when "j" # FIXME: `intmax_t' and `uintmax_t' are not supported yet. [signed_long_long_t, unsigned_long_long_t] when "z" # FIXME: `size_t' is not supported yet. [unsigned_long_t] when "t" # FIXME: `ptrdiff_t' is not supported yet. [signed_int_t] else [signed_int_t, unsigned_int_t] end end def suitable_length_modifiers ["hh", "h", "l", "ll", "j", "z", "t"] end def conversion_type case length_modifier when "hh" if conversion_argument && conversion_argument.type.signed? signed_char_t else unsigned_char_t end when "h" if conversion_argument && conversion_argument.type.signed? signed_short_t else unsigned_short_t end when "l" if conversion_argument && conversion_argument.type.signed? signed_long_t else unsigned_long_t end when "ll" if conversion_argument && conversion_argument.type.signed? signed_long_long_t else unsigned_long_long_t end when "j" # FIXME: `intmax_t' and `uintmax_t' are not supported yet. if conversion_argument && conversion_argument.type.signed? signed_long_long_t else unsigned_long_long_t end when "z" # FIXME: `size_t' is not supported yet. unsigned_long_t when "t" # FIXME: `ptrdiff_t' is not supported yet. signed_int_t else default_conversion_type end end def default_conversion_type signed_int_t end end private_constant :Conversion_d class Conversion_i < Conversion_d def self.suitable_conversion_specifier_character "i" end end private_constant :Conversion_i class Conversion_o < Conversion_d def self.suitable_conversion_specifier_character "o" end private def default_conversion_type unsigned_int_t end end private_constant :Conversion_o class Conversion_u < Conversion_o def self.suitable_conversion_specifier_character "u" end end private_constant :Conversion_u class Conversion_x < Conversion_o def self.suitable_conversion_specifier_character "x" end end private_constant :Conversion_x class Conversion_X < Conversion_o def self.suitable_conversion_specifier_character "X" end end private_constant :Conversion_X class Conversion_f < NumberConversionSpecifier def self.suitable_conversion_specifier_character "f" end private def default_precision_value # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 8 The conversion specifiers and their meanings are: # # f,F A double argument representing a floating-point number is # converted to decimal notation in the style [-]ddd.ddd, # where the number of digits after the decimal-point # character is equal to the precision specification. If the # precision is missing, it is taken as 6; if the precision is # zero and the # flag is not specified, no decimal-point # character appears. If a decimal-point character appears, # at least one digit appears before it. The value is rounded # to the appropriate number of digits. # A double argument representing an infinity is converted in # one of the styles [-]inf or [-]infinity -- which style is # implementation-defined. A double argument representing a # NaN is converted in one of the styles [-]nan or # [-]nan(n-char-sequence) -- which style, and the meaning of # any n-char-sequence, is implementation-defined. The F # conversion specifier produces INF, INFINITY, or NAN instead # of inf, infinity, or nan, respectively. # e,E A double argument representing a floating-point number is # converted in the style [-]d.ddde[+-]dd, where there is one # digit (which is nonzero if the argument is nonzero) before # the decimal-point character and the number of digits after # it is equal to the precision; if the precision is missing, # it is taken as 6; if the precision is zero and the # flag # is not specified, no decimal-point character appears. The # value is rounded to the appropriate number of digits. The # E conversion specifier produces a number with E instead of # e introducing the exponent. The exponent always contains # at least two digits, and only as many more digits as # necessary to represent the exponent. If the value is zero, # the exponent is zero. # g,G A double argument representing a floating-point number is # converted in style f or e (or in style F or E in the case # of a G conversion specifier), depending on the value # converted and the precision. Let P equal the precision if # nonzero, 6 if the precision is omitted, or 1 if the # precision is zero. Then, if a conversion with style E # would have an exponent of X: # -- if P > X >= -4, the conversion is which style f (or F) # and precision P - (X + 1). # -- otherwise, the conversion is with style e (or E) and # precision P - 1. # Finally, unless the # flag is used, any trailing zeros are # removed from the fractional portion of the result and the # decimal-point character is removed if there is no # fractional portion remaining. # A double argument representing an infinity or NaN is # converted in the style of an f or F conversion specifier. 6 end def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 7 The length modifiers and their meanings are: # # L Specifies that a following a, A, e, E, f, F, g, or G # conversion specifier applies to a long double argument. case length_modifier when "L" [long_double_t] else # NOTE: The argument will be argument promoted, so float type should # be acceptable, too. [float_t, double_t] end end def suitable_length_modifiers ["L"] end def conversion_type case length_modifier when "L" long_double_t else double_t end end end private_constant :Conversion_f class Conversion_F < Conversion_f def self.suitable_conversion_specifier_character "F" end end private_constant :Conversion_F class Conversion_e < Conversion_f def self.suitable_conversion_specifier_character "e" end end private_constant :Conversion_e class Conversion_E < Conversion_f def self.suitable_conversion_specifier_character "E" end end private_constant :Conversion_E class Conversion_g < Conversion_f def self.suitable_conversion_specifier_character "g" end end private_constant :Conversion_g class Conversion_G < Conversion_f def self.suitable_conversion_specifier_character "G" end end private_constant :Conversion_G class Conversion_a < Conversion_f def self.suitable_conversion_specifier_character "a" end private def default_precision_value # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 8 The conversion specifiers and their meanings are: # # a,A A double argument representing a floating-point number is # converted in the style [-]0xh.hhhhp[+-]d, where there is # one hexadecimal digit (which is nonzero if the argument is # a normalized floating-point number and is otherwise # unspecified) before the decimal-point character and the # number of hexadecimal digits after it is equal to the # precision; if the precision is missing and FLT_RADIX is a # power of 2, then the precision is sufficient for an exact # representation of the value; if the precision is missing # and FLT_RADIX is not a power of 2, then the precision is # sufficient to distinguish values of type double, except # that trailing zeros may be omitted; if the precision is # zero and the # flag is not specified, no decimal-point # character appears. The letters abcdef are used for a # conversion and the letters ABCDEF for A conversion. The A # conversion specifier produces a number with X and P instead # of x and p. The exponent always contains at least one # digit, and only as many more digits as necessary to # represent the decimal exponent of 2. If the value is zero, # the exponent is zero. # FIXME: This is not the ISO C99 compliant. 6 end end private_constant :Conversion_a class Conversion_A < Conversion_f def self.suitable_conversion_specifier_character "A" end end private_constant :Conversion_A class CharacterConversionSpecifier < CompleteConversionSpecifier def initialize(fmt, trailing_args, env, flags, field_width, prec, len_mod, cs_char) super(fmt, trailing_args, env, true, flags, field_width, prec, len_mod, cs_char) end def valid_conversion_specifier_character? true end def min_length # NOTE: Ruby has the buitin mostly C compliant sprintf. (ruby_sprintf_format % " ").length end def max_length min_length end end private_constant :CharacterConversionSpecifier class Conversion_c < CharacterConversionSpecifier def self.suitable_conversion_specifier_character "c" end private def default_precision_value 0 end def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 7 The length modifiers and their meanings are: # # l Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long int or unsigned long int argument; # that a following n conversion specifier applies to a pointer # to a long int argument; that a following c conversion # specifier applies to a wint_t argument; that a following s # conversion specifier applies to a pointer to a wchar_t # argument; or has no effect on a following a, A, e, E, f, F, g, # or G conversion specifier. case length_modifier when "l" # FIXME: `wint_t' is not supported yet. [wchar_t] else # NOTE: The argument will be integer promoted, so the argument type # whose conversion-rank is less than one of the int should be # acceptable, too. [signed_char_t, unsigned_char_t, signed_short_t, unsigned_short_t, signed_int_t, unsigned_int_t] end end def suitable_length_modifiers ["l"] end end private_constant :Conversion_c class StringConversionSpecifier < CompleteConversionSpecifier def initialize(fmt, trailing_args, env, flags, field_width, prec, len_mod, cs_char) super(fmt, trailing_args, env, true, flags, field_width, prec, len_mod, cs_char) end def valid_conversion_specifier_character? true end def min_length # NOTE: Ruby has the buitin mostly C compliant sprintf. (ruby_sprintf_format % "").length end def max_length # NOTE: Ruby has the buitin mostly C compliant sprintf. if conversion_argument && conversion_argument.type.pointer? and pointee = pointee_of(conversion_argument) and pointee.type.array? len = pointee.type.length ? pointee.type.length - 1 : 0 (ruby_sprintf_format % (" " * len)).length else min_length end end end private_constant :StringConversionSpecifier class Conversion_s < StringConversionSpecifier def self.suitable_conversion_specifier_character "s" end private def default_precision_value 0 end def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 7 The length modifiers and their meanings are: # # l Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long int or unsigned long int argument; # that a following n conversion specifier applies to a pointer # to a long int argument; that a following c conversion # specifier applies to a wint_t argument; that a following s # conversion specifier applies to a pointer to a wchar_t # argument; or has no effect on a following a, A, e, E, f, F, g, # or G conversion specifier. case length_modifier when "l" [pointer_type(qualified_type(wchar_t, :const))] else [pointer_type(qualified_type(signed_char_t, :const)), pointer_type(qualified_type(unsigned_char_t, :const))] end end def suitable_length_modifiers ["l"] end end private_constant :Conversion_s class Conversion_p < NumberConversionSpecifier def self.suitable_conversion_specifier_character "p" end def min_length # NOTE: `%p' conversion specifier of the Ruby's builtin sprintf does # not convert the argument. ("%##{flags}#{field_width}#{precision}x" % 0).length end def max_length # NOTE: `%p' conversion specifier of the Ruby's builtin sprintf does # not convert the argument. ("%##{flags}#{field_width}#{precision}x" % conversion_type.max).length end private def default_precision_value 0 end def argument_types if conversion_argument && conversion_argument.type.pointer? [conversion_argument.type.unqualify] else [pointer_type(qualified_type(void_t, :const))] end end def suitable_length_modifiers [] end def conversion_type pointer_type(void_t) end end private_constant :Conversion_p class Conversion_n < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "n" end def initialize(fmt, trailing_args, env, flags, field_width, prec, len_mod, cs_char) super(fmt, trailing_args, env, true, flags, field_width, prec, len_mod, cs_char) end def valid_conversion_specifier_character? true end def min_length 0 end def max_length 0 end private def default_precision_value 0 end def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.1 The fprintf function # # 7 The length modifiers and their meanings are: # # hh Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a signed char or unsigned char argument # (the argument will have been promoted according to the integer # promotions, but its value shall be converted to signed char or # unsigned char before printing); or that a following n # conversion specifier applies to a pointer to a signed char # argument. # h Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a short int or unsigned short int # argument (the argument will have been promoted according to # the integer promotions, but its value shall be converted to # short int or unsigned short int before printing); or that a # following n conversion specifier applies to a pointer to a # short int argument. # l Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long int or unsigned long int argument; # that a following n conversion specifier applies to a pointer # to a long int argument; that a following c conversion # specifier applies to a wint_t argument; that a following s # conversion specifier applies to a pointer to a wchar_t # argument; or has no effect on a following a, A, e, E, f, F, g, # or G conversion specifier. # ll Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a long long int or unsigned long long int # argument; or that a following n conversion specifier applies # to a pointer to a long long int argument. # j Specifies that a following d, i, o, u, x, or X conversion # specifier applies to an intmax_t or uintmax_t argument; or # that a following n conversion specifier applies to a pointer # to an intmax_t argument. # z Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a size_t or the corresponding signed # integer type argument; or that a following n conversion # specifier applies to a pointer to a signed integer type # corresponding to size_t argument. # t Specifies that a following d, i, o, u, x, or X conversion # specifier applies to a ptrdiff_t or the corresponding unsigned # integer type argument; or that a following n conversion # specifier applies to a pointer to a ptrdiff_t argument. case length_modifier when "hh" [pointer_type(qualified_type(signed_char_t, :const))] when "h" [pointer_type(qualified_type(signed_short_t, :const))] when "l" [pointer_type(qualified_type(signed_long_t, :const))] when "ll" [pointer_type(qualified_type(signed_long_long_t, :const))] when "j" # FIXME: `intmax_t' is not supported yet. [pointer_type(qualified_type(signed_long_long_t, :const))] when "z" # FIXME: `size_t' is not supported yet. [pointer_type(qualified_type(signed_long_t, :const))] when "t" # FIXME: `ptrdiff_t' is not supported yet. [pointer_type(qualified_type(signed_int_t, :const))] else [pointer_type(qualified_type(signed_int_t, :const))] end end def suitable_length_modifiers ["hh", "h", "l", "ll", "j", "z", "t"] end end private_constant :Conversion_n class Conversion_percent < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "%" end def initialize(fmt, trailing_args, env, flags, field_width, prec, len_mod, cs_char) super(fmt, trailing_args, env, false, flags, field_width, prec, len_mod, cs_char) end def valid_flags? flags.empty? end def valid_field_width? field_width.empty? end def valid_precision? precision.empty? end def valid_length_modifier? length_modifier.empty? end def valid_conversion_specifier_character? true end def min_length 1 end def max_length 1 end private def default_precision_value 0 end def argument_types nil end def suitable_length_modifiers [] end end private_constant :Conversion_percent class UndefinedConversionSpecifier < CompleteConversionSpecifier def initialize(fmt, flags, field_width, prec, len_mod, cs_char) super(fmt, [], nil, false, flags, field_width, prec, len_mod, cs_char) end def undefined? true end def valid_conversion_specifier_character? false end def min_length 0 end def max_length 0 end private def default_precision_value 0 end def argument_types nil end def suitable_length_modifiers [] end end private_constant :UndefinedConversionSpecifier class IncompleteConversionSpecifier < ConversionSpecifier def initialize(fmt, flags, field_width, prec, len_mod) super(fmt, [], nil, false, flags, field_width, prec, len_mod, nil) end # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? false end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? false end def complete? false end def undefined? true end def valid_flags? false end def valid_field_width? false end def valid_precision? false end def valid_length_modifier? false end def valid_conversion_specifier_character? false end def min_length 0 end def max_length 0 end private def default_precision_value 0 end end private_constant :IncompleteConversionSpecifier CONVERSION_SPECIFIERS = [ Conversion_d, Conversion_i, Conversion_o, Conversion_u, Conversion_x, Conversion_X, Conversion_f, Conversion_F, Conversion_e, Conversion_E, Conversion_g, Conversion_G, Conversion_a, Conversion_A, Conversion_p, Conversion_c, Conversion_s, Conversion_n, Conversion_percent ] private_constant :CONVERSION_SPECIFIERS CONVERSION_SPECIFIER_TBL = CONVERSION_SPECIFIERS.each_with_object({}) { |cs_class, hash| hash[cs_class.suitable_conversion_specifier_character] = cs_class }.freeze private_constant :CONVERSION_SPECIFIER_TBL end class ScanfFormat def initialize(fmt_str, loc, trailing_args, env) @location = loc @directives = create_directives(fmt_str, trailing_args, env) @extra_arguments = trailing_args end attr_reader :location attr_reader :directives attr_reader :extra_arguments def conversion_specifiers @directives.select { |dire| dire.conversion_specifier? } end private def create_directives(fmt_str, trailing_args, env) dires = [] str = fmt_str.dup until str.empty? dires.push(Directive.guess(str, trailing_args, env)) end dires end # == DESCRIPTION # === Directive class hierarchy # Directive # <-- Whitespace # <-- Ordinary # <-- ConversionSpecifier # <-- CompleteConversionSpecifier # <-- Conversion_d # <-- Conversion_i # <-- Conversion_o # <-- Conversion_u # <-- Conversion_x # <-- Conversion_X # <-- Conversion_a # <-- Conversion_A # <-- Conversion_e # <-- Conversion_E # <-- Conversion_f # <-- Conversion_F # <-- Conversion_g # <-- Conversion_G # <-- Conversion_c # <-- Conversion_s # <-- Conversion_bracket # <-- Conversion_p # <-- Conversion_n # <-- Conversion_percent # <-- UndefinedConversionSpecifier # <-- IncompleteConversionSpecifier class Directive def self.guess(fmt_str, trailing_args, env) try_to_create_whitespace(fmt_str) or try_to_create_ordinary(fmt_str) or try_to_create_conversion_specifier(fmt_str, trailing_args, env) end def initialize(fmt) @format = fmt end attr_reader :format def whitespace? subclass_responsibility end def ordinary? subclass_responsibility end def conversion_specifier? subclass_responsibility end def consume_arguments? subclass_responsibility end # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? subclass_responsibility end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? subclass_responsibility end def illformed? !wellformed? end def complete? subclass_responsibility end def incomplete? !complete? end def undefined? subclass_responsibility end def valid_assignment_suppressing_character? subclass_responsibility end def valid_field_width? subclass_responsibility end def valid_length_modifier? subclass_responsibility end def valid_conversion_specifier_character? subclass_responsibility end def valid_scanset? subclass_responsibility end def assignment_suppressing_character subclass_responsibility end def field_width subclass_responsibility end def length_modifier subclass_responsibility end def conversion_specifier_character subclass_responsibility end def scanset subclass_responsibility end def self.try_to_create_whitespace(fmt_str) (fmt = Whitespace.scan(fmt_str)) ? Whitespace.new(fmt) : nil end private_class_method :try_to_create_whitespace def self.try_to_create_ordinary(fmt_str) (fmt = Ordinary.scan(fmt_str)) ? Ordinary.new(fmt) : nil end private_class_method :try_to_create_ordinary def self.try_to_create_conversion_specifier(fmt_str, trailing_args, env) fmt, as_char, field_width, len_mod, cs_char, scanset = ConversionSpecifier.scan(fmt_str) case when cs_char.nil? IncompleteConversionSpecifier.new(fmt, as_char, field_width, len_mod, nil) when cs_char == "[" && scanset.nil? IncompleteConversionSpecifier.new(fmt, as_char, field_width, len_mod, cs_char) when cs_class = CONVERSION_SPECIFIER_TBL[cs_char] cs_class.new(fmt, trailing_args, env, as_char, field_width, len_mod, cs_char, scanset) else UndefinedConversionSpecifier.new(fmt, as_char, field_width, len_mod, cs_char) end end private_class_method :try_to_create_conversion_specifier end private_constant :Directive class Whitespace < Directive def self.scan(fmt_str) # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 3 The format shall be a multibyte character sequence, beginning and # ending in its initial shift state. The format is composed of zero # or more directives: one or more white-space characters, an ordinary # multibyte character (neither % nor a white-space character), or a # conversion specification. Each conversion specification is # introduced by the character %. After the %, the following appear # in sequence: # # -- An optional assignment-suppressing character *. # -- An optional decimal integer greater than zero that specifies the # maximum field width (in characters). # -- An optional length modifier that specifies the size of the # receiving object. # -- A conversion specifier character that specifies the type of # conversion to be applied. fmt_str.slice!(/\A\s+/) end def whitespace? true end def ordinary? false end def conversion_specifier? false end def consume_arguments? false end # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? true end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? true end def complete? true end def undefined? false end def valid_assignment_suppressing_character? false end def valid_field_width? false end def valid_length_modifier? false end def valid_conversion_specifier_character? false end def valid_scanset? false end def assignment_suppressing_character nil end def field_width nil end def length_modifier nil end def conversion_specifier_character nil end def scanset nil end end private_constant :Whitespace class Ordinary < Directive def self.scan(fmt_str) # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 3 The format shall be a multibyte character sequence, beginning and # ending in its initial shift state. The format is composed of zero # or more directives: one or more white-space characters, an ordinary # multibyte character (neither % nor a white-space character), or a # conversion specification. Each conversion specification is # introduced by the character %. After the %, the following appear # in sequence: # # -- An optional assignment-suppressing character *. # -- An optional decimal integer greater than zero that specifies the # maximum field width (in characters). # -- An optional length modifier that specifies the size of the # receiving object. # -- A conversion specifier character that specifies the type of # conversion to be applied. fmt_str.slice!(/\A[^%\s]+/) end def whitespace? false end def ordinary? true end def conversion_specifier? false end def consume_arguments? false end # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? true end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? true end def complete? true end def undefined? false end def valid_assignment_suppressing_character? false end def valid_field_width? false end def valid_length_modifier? false end def valid_conversion_specifier_character? false end def valid_scanset? false end def assignment_suppressing_character nil end def field_width nil end def length_modifier nil end def conversion_specifier_character nil end def scanset nil end end private_constant :Ordinary class ConversionSpecifier < Directive include TypeTableMediator def self.scan(fmt_str) # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 3 The format shall be a multibyte character sequence, beginning and # ending in its initial shift state. The format is composed of zero # or more directives: one or more white-space characters, an ordinary # multibyte character (neither % nor a white-space character), or a # conversion specification. Each conversion specification is # introduced by the character %. After the %, the following appear # in sequence: # # -- An optional assignment-suppressing character *. # -- An optional decimal integer greater than zero that specifies the # maximum field width (in characters). # -- An optional length modifier that specifies the size of the # receiving object. # -- A conversion specifier character that specifies the type of # conversion to be applied. if header = fmt_str.slice!(/\A%/) scanned = header else return nil, nil, nil, nil, nil, nil end if as_char = fmt_str.slice!(/\A#{as_char_re}/) scanned += as_char end if field_width = fmt_str.slice!(/\A#{field_width_re}/) scanned += field_width end if len_mod = fmt_str.slice!(/\A#{length_modifier_re}/) scanned += len_mod end if cs_char = fmt_str.slice!(/\A#{cs_char_re}/) scanned += cs_char else # NOTE: If no valid conversion specifier character, force to scan # the heading 1 character as a conversion specifier character. if cs_char = fmt_str.slice!(/\A[a-z]/i) scanned += cs_char end end if cs_char == "[" if scanset = fmt_str.slice!(/\A#{scanset_re}/) scanned += scanset end else scanset = nil end return scanned, as_char, field_width, len_mod, cs_char, scanset end def initialize(fmt, trailing_args, env, consume_args, as_char, field_width, len_mod, cs_char, scanset) super(fmt) if as_char == "*" @consume_arguments = false else @consume_arguments = consume_args end @assignment_suppressing_character = as_char @field_width = field_width @length_modifier = len_mod @conversion_specifier_character = cs_char @scanset = scanset if consume_arguments? @conversion_argument = trailing_args.shift else @conversion_argument = nil end @environment = env end def whitespace? false end def ordinary? false end def conversion_specifier? true end def consume_arguments? @consume_arguments end def undefined? false end attr_reader :assignment_suppressing_character attr_reader :field_width attr_reader :length_modifier attr_reader :conversion_specifier_character attr_reader :scanset attr_reader :conversion_argument def field_width_value case @field_width when /\A[1-9][0-9]*\z/ @field_width.to_i else 1 end end def self.as_char_re /\*?/ end private_class_method :as_char_re def self.field_width_re /(?:[1-9][0-9]*)?/ end private_class_method :field_width_re def self.length_modifier_re # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 11 The length modifiers and their meanings are: # # hh Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to signed # char or unsigned char. # h Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to short int # or unsigned short int. # l Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long int # or unsigned long int; that a following a, A, e, E, f, F, g, or # G conversion specifier applies to an argument with type pointer # to double; or that a following c, s, or [ conversion specifier # applies to an argument with type pointer to wchar_t. # ll Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long long # int or unsigned long long int. # j Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to intmax_t # or uintmax_t. # z Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to size_t or # the corresponding signed integer type. # t Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to ptrdiff_t # or the corresponding unsigned integer type. # L Specifies that a following a, A, e, E, f, F, g, or G conversion # specifier applies to an argument with type pointer to long # double. /(?:h+|l+|j|z|t|L)?/ end private_class_method :length_modifier_re def self.cs_char_re # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 12 The conversion specifiers and their meanings are: # # d Matches an optionally signed decimal integer, whose format # is the same as expected for the subject sequence of the # strtol function with the value 10 for the base argument. # The corresponding argument shall be a pointer to signed # integer. # i Matches an optionally signed integer, whose format is the # same as expected for the subject sequence of the strtol # function with the value 0 for the base argument. The # corresponding argument shall be a pointer to signed # integer. # o Matches an optionally signed octal integer, whose format # is the same as expected for the subject sequence of the # strtoul function with the value 8 for the base argument. # The corresponding argument shall be a pointer to unsigned # integer. # u Matches an optionally signed decimal integer, whose format # is the same as expected for the subject sequence of the # strtoul function with the value 10 for the base argument. # The corresponding argument shall be a pointer to unsigned # integer. # x Matches an optionally signed hexadecimal integer, whose # format is the same as expected for the subject sequence of # the strtoul function with the value 16 for the base # argument. The corresponding argument shall be a pointer # to unsigned integer. # a,e,f,g Matches an optionally signed floating-point number, # infinity, or NaN, whose format is the same as expected for # the subject sequence of the strtod function. The # corresponding argument shall be a pointer to floating. # c Matches a sequence of characters of exactly the number # specified by the field width (1 if no field width is # present in the directive). # If no l length modifier is present, the corresponding # argument shall be a pointer to the initial element of # character array large enough to accept the sequence. No # null character is added. # If an l length modifier is present, the input shall be a # sequence of multibyte characters that begins in the # initial shift state. Each multibyte character in the # sequence is converted to a wide character as if by a call # to the mbrtowc function, with the conversion state # described by an mbstate_t object initialized to zero # before the first multibyte character is converted. The # corresponding argument shall be a pointer to the initial # element of an array of wchar_t large enough to accept the # resulting sequence of wide characters. No null wide # character is added. # s Matches a sequence of non-white-space characters. # If no l length modifier is present, the corresponding # argument shall be a pointer to the initial element of a # character array large enough to accept the sequence and a # terminating null character, which will be added # automatically. # If an l length modifier is present, the input shall be a # sequence of multibyte characters that begins in the # initial shift state. Each multibyte character is # converted to a wide character as if by a call to the # mbrtowc function, with the conversion state described by # an mbstate_t object initialized to zero before the first # multibyte character is converted. The corresponding # argument shall be a pointer to the initial element of an # array of wchar_t large enough to accept the sequence and # the terminating null wide character, which will be added # automatically. # [ Matches a nonempty sequence of characters from a set of # expected characters (the scanset). # If no l length modifier is present, the corresponding # argument shall be a pointer to the initial element of a # character array large enough to accept the sequence and a # terminating null character, which will be added # automatically. # If an l length modifier is present, the input shall be a # sequence of multibyte characters that begins in the # initial shift state. Each multibyte character is # converted to a wide character as if by a call to the # mbrtowc function, with the conversion state described by # an mbstate_t object initialized to zero before the first # multibyte character is converted. The corresponding # argument shall be a pointer to the initial element of an # array of wchar_t large enough to accept the sequence and # the terminating null wide character, which will be added # automatically. # The conversion specifier includes all subsequent # characters in the format string, up to and including the # matching right bracket (]). The characters between the # brackets (the scanlist) compose the scanset, unless the # character after the left bracket is a circumflex (^), in # which case the scanset contains all characters that do not # appear in the scanlist between the circumflex and the # right bracket. If the conversion specifier begins with [] # or [^], the right bracket character is in the scanlist and # the next following right bracket character is the matching # right bracket that ends the specification; otherwise the # first following right bracket character is the one that # ends the specification. If a - character is in the # scanlist and is not the first, nor the second where the # first character is a ^, nor the last character, the # behavior is implementation-defined. # p Matches an implementation-defined set of sequences, which # should be the same as the set of sequence that may be # produced by the %p conversion of the fprintf function. # The corresponding argument shall be a pointer to a pointer # to void. The input item is converted to a pointer value # in an implementation-defined manner. If the input item is # a value converted earlier during the same program # execution, the pointer that results shall compare equal to # the value; otherwise the behavior of the %p conversion is # undefined. # n No input is consumed. The corresponding argument shall be # a pointer to signed integer into which is to be written # the number of characters read from the input stream so far # by this call to the fscanf function. Execution of a %n # directive does not increment the assignment count returned # at the completion of execution of the fscanf function. No # argument is converted, but one is consumed. If the # conversion specification includes an # assignment-suppressing character or a field width, the # behavior is undefined. # % Matches a single % character; no conversion or assignment # occurs. The complete conversion specification shall be # %%. # # 14 The conversion specifiers A, E, F, G, and X are also valid and # behave the same as, respectively, a, e, f, g, and x. /[diouxXaAeEfFgGcs\[pn%]/ end private_class_method :cs_char_re def self.scanset_re # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 12 The conversion specifiers and their meanings are: # # [ Matches a nonempty sequence of characters from a set of # expected characters (the scanset). # If no l length modifier is present, the corresponding # argument shall be a pointer to the initial element of a # character array large enough to accept the sequence and a # terminating null character, which will be added # automatically. # If an l length modifier is present, the input shall be a # sequence of multibyte characters that begins in the # initial shift state. Each multibyte character is # converted to a wide character as if by a call to the # mbrtowc function, with the conversion state described by # an mbstate_t object initialized to zero before the first # multibyte character is converted. The corresponding # argument shall be a pointer to the initial element of an # array of wchar_t large enough to accept the sequence and # the terminating null wide character, which will be added # automatically. # The conversion specifier includes all subsequent # characters in the format string, up to and including the # matching right bracket (]). The characters between the # brackets (the scanlist) compose the scanset, unless the # character after the left bracket is a circumflex (^), in # which case the scanset contains all characters that do not # appear in the scanlist between the circumflex and the # right bracket. If the conversion specifier begins with [] # or [^], the right bracket character is in the scanlist and # the next following right bracket character is the matching # right bracket that ends the specification; otherwise the # first following right bracket character is the one that # ends the specification. If a - character is in the # scanlist and is not the first, nor the second where the # first character is a ^, nor the last character, the # behavior is implementation-defined. /\].*?\]|\^\].*?\]|.*?\]/ end private_class_method :scanset_re extend Forwardable def_delegator :@environment, :type_table private :type_table end private_constant :ConversionSpecifier class CompleteConversionSpecifier < ConversionSpecifier # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? if @conversion_argument if argument_types argument_types.any? do |arg_type| @conversion_argument.type.convertible?(arg_type) end else true end else false end end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? valid_assignment_suppressing_character? && valid_field_width? && valid_length_modifier? && valid_conversion_specifier_character? end def complete? true end def valid_length_modifier? if length_modifier.empty? true else suitable_length_modifiers.include?(length_modifier) end end private def argument_types if consume_arguments? subclass_responsibility else nil end end def suitable_length_modifiers subclass_responsibility end end private_constant :CompleteConversionSpecifier class Conversion_d < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "d" end def initialize(fmt, trailing_args, env, as_char, field_width, len_mod, cs_char, scanset) super(fmt, trailing_args, env, true, as_char, field_width, len_mod, cs_char, scanset) end def valid_assignment_suppressing_character? true end def valid_field_width? true end def valid_conversion_specifier_character? true end def valid_scanset? true end private def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 11 The length modifiers and their meanings are: # # hh Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to signed # char or unsigned char. # h Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to short int # or unsigned short int. # l Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long int # or unsigned long int; that a following a, A, e, E, f, F, g, or # G conversion specifier applies to an argument with type pointer # to double; or that a following c, s, or [ conversion specifier # applies to an argument with type pointer to wchar_t. # ll Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long long # int or unsigned long long int. # j Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to intmax_t # or uintmax_t. # z Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to size_t or # the corresponding signed integer type. # t Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to ptrdiff_t # or the corresponding unsigned integer type. case length_modifier when "hh" [pointer_type(signed_char_t), pointer_type(unsigned_char_t)] when "h" [pointer_type(signed_short_t), pointer_type(unsigned_short_t)] when "l" [pointer_type(signed_long_t), pointer_type(unsigned_long_t)] when "ll" [pointer_type(signed_long_long_t), pointer_type(unsigned_long_long_t)] when "j" # FIXME: `intmax_t' and `uintmax_t' are not supported yet. [pointer_type(signed_long_long_t), pointer_type(unsigned_long_long_t)] when "z" # FIXME: `size_t' is not supported yet. [pointer_type(signed_long_t), pointer_type(unsigned_long_t)] when "t" # FIXME: `ptrdiff_t' is not supported yet. [pointer_type(signed_int_t), pointer_type(unsigned_int_t)] else default_argument_types end end def suitable_length_modifiers ["hh", "h", "l", "ll", "j", "z", "t"] end def default_argument_types [pointer_type(signed_int_t)] end end private_constant :Conversion_d class Conversion_i < Conversion_d def self.suitable_conversion_specifier_character "i" end end private_constant :Conversion_i class Conversion_o < Conversion_d def self.suitable_conversion_specifier_character "o" end private def default_argument_types [pointer_type(unsigned_int_t)] end end private_constant :Conversion_o class Conversion_u < Conversion_o def self.suitable_conversion_specifier_character "u" end end private_constant :Conversion_u class Conversion_x < Conversion_o def self.suitable_conversion_specifier_character "x" end end private_constant :Conversion_x class Conversion_X < Conversion_o def self.suitable_conversion_specifier_character "X" end end private_constant :Conversion_X class Conversion_a < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "a" end def initialize(fmt, trailing_args, env, as_char, field_width, len_mod, cs_char, scanset) super(fmt, trailing_args, env, true, as_char, field_width, len_mod, cs_char, scanset) end def valid_assignment_suppressing_character? true end def valid_field_width? true end def valid_conversion_specifier_character? true end def valid_scanset? true end private def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 11 The length modifiers and their meanings are: # # l Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long int # or unsigned long int; that a following a, A, e, E, f, F, g, or # G conversion specifier applies to an argument with type pointer # to double; or that a following c, s, or [ conversion specifier # applies to an argument with type pointer to wchar_t. # L Specifies that a following a, A, e, E, f, F, g, or G conversion # specifier applies to an argument with type pointer to long # double. case length_modifier when "l" [pointer_type(double_t)] when "L" [pointer_type(long_double_t)] else [pointer_type(float_t)] end end def suitable_length_modifiers ["l", "L"] end end private_constant :Conversion_a class Conversion_A < Conversion_a def self.suitable_conversion_specifier_character "A" end end private_constant :Conversion_A class Conversion_e < Conversion_a def self.suitable_conversion_specifier_character "e" end end private_constant :Conversion_e class Conversion_E < Conversion_a def self.suitable_conversion_specifier_character "E" end end private_constant :Conversion_E class Conversion_f < Conversion_a def self.suitable_conversion_specifier_character "f" end end private_constant :Conversion_f class Conversion_F < Conversion_a def self.suitable_conversion_specifier_character "F" end end private_constant :Conversion_F class Conversion_g < Conversion_a def self.suitable_conversion_specifier_character "g" end end private_constant :Conversion_g class Conversion_G < Conversion_a def self.suitable_conversion_specifier_character "G" end end private_constant :Conversion_G class Conversion_c < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "c" end def initialize(fmt, trailing_args, env, as_char, field_width, len_mod, cs_char, scanset) super(fmt, trailing_args, env, true, as_char, field_width, len_mod, cs_char, scanset) end def valid_assignment_suppressing_character? true end def valid_field_width? true end def valid_conversion_specifier_character? true end def valid_scanset? true end private def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 11 The length modifiers and their meanings are: # # l Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long int # or unsigned long int; that a following a, A, e, E, f, F, g, or # G conversion specifier applies to an argument with type pointer # to double; or that a following c, s, or [ conversion specifier # applies to an argument with type pointer to wchar_t. case length_modifier when "l" [pointer_type(wchar_t)] else [pointer_type(signed_char_t), pointer_type(unsigned_char_t)] end end def suitable_length_modifiers ["l"] end end private_constant :Conversion_c class Conversion_s < Conversion_c def self.suitable_conversion_specifier_character "s" end end private_constant :Conversion_s class Conversion_bracket < Conversion_c def self.suitable_conversion_specifier_character "[" end def valid_scanset? # NOTE: The `-' character in the scanset causes implementation-defined # behavior. So, AdLint treats the `-' character as an ordinary # character in the scanset. orig_set = scanset.chop.chars.to_a uniq_set = orig_set.uniq orig_set.size == uniq_set.size end end private_constant :Conversion_bracket class Conversion_p < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "p" end def initialize(fmt, trailing_args, env, as_char, field_width, len_mod, cs_char, scanset) super(fmt, trailing_args, env, true, as_char, field_width, len_mod, cs_char, scanset) end def valid_assignment_suppressing_character? true end def valid_field_width? true end def valid_conversion_specifier_character? true end def valid_scanset? true end private def argument_types if conversion_argument && conversion_argument.type.pointer? [conversion_argument.type.unqualify] else [pointer_type(void_t)] end end def suitable_length_modifiers [] end end private_constant :Conversion_p class Conversion_n < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "n" end def initialize(fmt, trailing_args, env, as_char, field_width, len_mod, cs_char, scanset) super(fmt, trailing_args, env, true, as_char, field_width, len_mod, cs_char, scanset) end def valid_assignment_suppressing_character? # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 12 The conversion specifiers and their meanings are: # # n No input is consumed. The corresponding argument shall be # a pointer to signed integer into which is to be written # the number of characters read from the input stream so far # by this call to the fscanf function. Execution of a %n # directive does not increment the assignment count returned # at the completion of execution of the fscanf function. No # argument is converted, but one is consumed. If the # conversion specification includes an # assignment-suppressing character or a field width, the # behavior is undefined. assignment_suppressing_character.empty? end def valid_field_width? field_width.empty? end def valid_conversion_specifier_character? true end def valid_scanset? true end private def argument_types # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 11 The length modifiers and their meanings are: # # hh Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to signed # char or unsigned char. # h Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to short int # or unsigned short int. # l Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long int # or unsigned long int; that a following a, A, e, E, f, F, g, or # G conversion specifier applies to an argument with type pointer # to double; or that a following c, s, or [ conversion specifier # applies to an argument with type pointer to wchar_t. # ll Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to long long # int or unsigned long long int. # j Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to intmax_t # or uintmax_t. # z Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to size_t or # the corresponding signed integer type. # t Specifies that a following d, i, o, u, x, X, or n conversion # specifier applies to an argument with type pointer to ptrdiff_t # or the corresponding unsigned integer type. case length_modifier when "hh" [pointer_type(signed_char_t), pointer_type(unsigned_char_t)] when "h" [pointer_type(signed_short_t), pointer_type(unsigned_short_t)] when "l" [pointer_type(signed_long_t), pointer_type(unsigned_long_t)] when "ll" [pointer_type(signed_long_long_t), pointer_type(unsigned_long_long_t)] when "j" # FIXME: `intmax_t' and `uintmax_t' are not supported yet. [pointer_type(signed_long_long_t), pointer_type(unsigned_long_long_t)] when "z" # FIXME: `size_t' is not supported yet. [pointer_type(signed_long_t), pointer_type(unsigned_long_t)] when "t" # FIXME: `ptrdiff_t' is not supported yet. [pointer_type(signed_int_t), pointer_type(unsigned_int_t)] else [pointer_type(signed_int_t)] end end def suitable_length_modifiers ["hh", "h", "l", "ll", "j", "z", "t"] end end private_constant :Conversion_n class Conversion_percent < CompleteConversionSpecifier def self.suitable_conversion_specifier_character "%" end def initialize(fmt, trailing_args, env, as_char, field_width, len_mod, cs_char, scanset) super(fmt, trailing_args, env, false, as_char, field_width, len_mod, cs_char, scanset) end def valid_assignment_suppressing_character? # NOTE: The ISO C99 standard says; # # 7.19.6.2 The fscanf function # # 12 The conversion specifiers and their meanings are: # # % Matches a single % character; no conversion or assignment # occurs. The complete conversion specification shall be # %%. assignment_suppressing_character.empty? end def valid_field_width? field_width.empty? end def valid_conversion_specifier_character? true end def valid_scanset? true end private def argument_types nil end def suitable_length_modifiers [] end end private_constant :Conversion_percent class UndefinedConversionSpecifier < CompleteConversionSpecifier def initialize(fmt, as_char, field_width, len_mod, cs_char) super(fmt, [], nil, false, as_char, field_width, len_mod, cs_char, nil) end def undefined? true end def valid_assignment_suppressing_character? false end def valid_field_width? false end def valid_conversion_specifier_character? false end def valid_scanset? true end private def argument_types nil end def suitable_length_modifiers [] end end private_constant :UndefinedConversionSpecifier class IncompleteConversionSpecifier < ConversionSpecifier def initialize(fmt, as_char, field_width, len_mod, cs_char) super(fmt, [], nil, false, as_char, field_width, len_mod, cs_char, nil) end # === DESCRIPTION # Checks whether types of arguments match this directive. # # === RETURN VALUE # Boolean -- True if types of arguments match this directive. def acceptable? false end # === DESCRIPTION # Checks whether the format string of this directive is the ISO C99 # compliant. # # === RETURN VALUE # Boolean -- True if the format string is wellformed. def wellformed? false end def complete? false end def undefined? true end def valid_assignment_suppressing_character? false end def valid_field_width? false end def valid_length_modifier? false end def valid_conversion_specifier_character? conversion_specifier_character == "[" end def valid_scanset? conversion_specifier_character == "[" ? !scanset.nil? : false end end private_constant :IncompleteConversionSpecifier CONVERSION_SPECIFIERS = [ Conversion_d, Conversion_i, Conversion_o, Conversion_u, Conversion_x, Conversion_X, Conversion_a, Conversion_A, Conversion_e, Conversion_E, Conversion_f, Conversion_F, Conversion_g, Conversion_G, Conversion_c, Conversion_s, Conversion_bracket, Conversion_p, Conversion_n, Conversion_percent ] private_constant :CONVERSION_SPECIFIERS CONVERSION_SPECIFIER_TBL = CONVERSION_SPECIFIERS.each_with_object({}) { |cs_class, hash| hash[cs_class.suitable_conversion_specifier_character] = cs_class }.freeze private_constant :CONVERSION_SPECIFIER_TBL end end end adlint-3.2.0/lib/adlint/cc1/domain.rb0000644000004100000410000072441212224440633017314 0ustar www-datawww-data# Domain of values bound to variables. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/operator" module AdLint #:nodoc: module Cc1 #:nodoc: module ValueDomainFactory # NOTE: To avoid huge composite value-domain creation in the interp phase. COMPOSITE_MAX_COMPLEXITY = 16 private_constant :COMPOSITE_MAX_COMPLEXITY def equal_to(numeric, logical_shr) EqualToValueDomain.new(numeric, logical_shr) end # NOTE: Value of #equal_to depends on the `logical_shr' parameter derived # from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as unary method for improving # the performance. memoize :equal_to, key_indices: [0] def not_equal_to(numeric, logical_shr) equal_to(numeric, logical_shr).inversion end # NOTE: Value of #not_equal_to depends on the `logical_shr' parameter # derived from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as unary method for improving # the performance. memoize :not_equal_to, key_indices: [0] def less_than(numeric, logical_shr) LessThanValueDomain.new(numeric, logical_shr) end # NOTE: Value of #less_than depends on the `logical_shr' parameter derived # from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as unary method for improving # the performance. memoize :less_than, key_indices: [0] def greater_than(numeric, logical_shr) GreaterThanValueDomain.new(numeric, logical_shr) end # NOTE: Value of #greater_than depends on the `logical_shr' parameter # derived from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as unary method for improving # the performance. memoize :greater_than, key_indices: [0] def less_than_or_equal_to(numeric, logical_shr) less_than(numeric, logical_shr).union(equal_to(numeric, logical_shr)) end # NOTE: Value of #less_than_or_equal_to depends on the `logical_shr' # parameter derived from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as unary method for improving # the performance. memoize :less_than_or_equal_to, key_indices: [0] def greater_than_or_equal_to(numeric, logical_shr) greater_than(numeric, logical_shr).union(equal_to(numeric, logical_shr)) end # NOTE: Value of #greater_than_or_equal_to depends on the `logical_shr' # parameter derived from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as unary method for improving # the performance. memoize :greater_than_or_equal_to, key_indices: [0] def of_true(logical_shr) not_equal_to(0, logical_shr) end # NOTE: Value of #of_true depends on the `logical_shr' parameter derived # from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as nullary method for improving # the performance. memoize :of_true, force_nullary: true def of_false(logical_shr) equal_to(0, logical_shr) end # NOTE: Value of #of_false depends on the `logical_shr' parameter derived # from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as nullary method for improving # the performance. memoize :of_false, force_nullary: true def of_unlimited(logical_shr) UnlimitedValueDomain.new(logical_shr) end # NOTE: Value of #of_unlimited depends on the `logical_shr' parameter # derived from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as nullary method for improving # the performance. memoize :of_unlimited, force_nullary: true def of_nil(logical_shr) NilValueDomain.new(logical_shr) end # NOTE: Value of #of_nil depends on the `logical_shr' parameter derived # from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as nullary method for improving # the performance. memoize :of_nil, force_nullary: true def of_nan(logical_shr) NaN.new(logical_shr) end # NOTE: Value of #of_nan depends on the `logical_shr' parameter derived # from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as nullary method for improving # the performance. memoize :of_nan, force_nullary: true def of_intersection(lhs_dom, rhs_dom) case lhs_dom when UndefinedValueDomain lhs_dom = lhs_dom.domain undefined = true end case rhs_dom when UndefinedValueDomain rhs_dom = rhs_dom.domain undefined = true end case when lhs_dom.empty? intersection = lhs_dom when rhs_dom.empty? intersection = rhs_dom when lhs_dom.contain?(rhs_dom) intersection = rhs_dom when rhs_dom.contain?(lhs_dom) intersection = lhs_dom when lhs_dom.intersect?(rhs_dom) intersection = _create_intersection(lhs_dom, rhs_dom) else intersection = of_nil(lhs_dom.logical_shr? && rhs_dom.logical_shr?) end undefined ? of_undefined(intersection) : intersection end memoize :of_intersection def of_union(lhs_dom, rhs_dom) case lhs_dom when UndefinedValueDomain lhs_dom = lhs_dom.domain undefined = true end case rhs_dom when UndefinedValueDomain rhs_dom = rhs_dom.domain undefined = true end case when lhs_dom.empty? union = rhs_dom when rhs_dom.empty? union = lhs_dom when lhs_dom.contain?(rhs_dom) union = lhs_dom when rhs_dom.contain?(lhs_dom) union = rhs_dom else union = _create_union(lhs_dom, rhs_dom) end undefined ? of_undefined(union) : union end memoize :of_union def of_undefined(dom) if dom.undefined? dom else UndefinedValueDomain.new(dom) end end memoize :of_undefined def of_ambiguous(undefined, logical_shr) AmbiguousValueDomain.new(undefined, logical_shr) end # NOTE: Value of #of_ambiguous depends on the `logical_shr' parameter # derived from the traits object. # But the traits object is unique in an AdLint instance. # So, it is safe to treat this method as unary method for improving # the performance. memoize :of_ambiguous, key_indices: [0] def _create_intersection(lhs_dom, rhs_dom) expected = lhs_dom.complexity + rhs_dom.complexity if expected < COMPOSITE_MAX_COMPLEXITY IntersectionValueDomain.new(lhs_dom, rhs_dom) else of_ambiguous(lhs_dom.undefined? || rhs_dom.undefined?, lhs_dom.logical_shr? && rhs_dom.logical_shr?) end end memoize :_create_intersection def _create_union(lhs_dom, rhs_dom) expected = lhs_dom.complexity + rhs_dom.complexity if expected < COMPOSITE_MAX_COMPLEXITY UnionValueDomain.new(lhs_dom, rhs_dom) else of_ambiguous(lhs_dom.undefined? || rhs_dom.undefined?, lhs_dom.logical_shr? && rhs_dom.logical_shr?) end end memoize :_create_union def clear_memos clear_memo_of__equal_to clear_memo_of__not_equal_to clear_memo_of__less_than clear_memo_of__greater_than clear_memo_of__less_than_or_equal_to clear_memo_of__greater_than_or_equal_to clear_memo_of__of_true clear_memo_of__of_false clear_memo_of__of_unlimited clear_memo_of__of_nil clear_memo_of__of_nan clear_memo_of__of_intersection clear_memo_of__of_union clear_memo_of__of_undefined clear_memo_of__of_ambiguous clear_memo_of___create_intersection clear_memo_of___create_union end end # == DESCRIPTION # === ValueDomain class hierarchy # ValueDomain <------------------------------+ # <-- NilValueDomain | # <-- UnlimitedValueDomain | # <-- NaN | # <-- EqualToValueDomain | # <-- LessThanValueDomain | # <-- GreaterThanValueDomain | # <-- CompositeValueDomain <>--------------+ # <-- IntersectionValueDomain <------+ # <-- UnionValueDomain | # <-- UndefinedValueDomain <>--------------+ # <-- AmbiguousValueDomain class ValueDomain # NOTE: Instances of ValueDomain class are immutable. It is safe to share # the instance of the ValueDomain class of the same value. extend ValueDomainFactory def initialize(logical_shr) @logical_shr = logical_shr end def empty? subclass_responsibility end def nan? subclass_responsibility end def undefined? subclass_responsibility end def ambiguous? subclass_responsibility end def logical_shr? @logical_shr end def contain?(domain_or_numeric) case domain_or_numeric when ValueDomain contain_value_domain?(domain_or_numeric) when Numeric dom = ValueDomain.equal_to(domain_or_numeric, logical_shr?) contain_value_domain?(dom) else raise TypeError, "`#{domain_or_numeric.inspect}' " + "must be kind of ValueDomain or Numeric." end end def contain_value_domain?(rhs_dom) subclass_responsibility end def _contain_nil?(lhs_dom, rhs_dom = self) subclass_responsibility end def _contain_unlimited?(lhs_dom, rhs_dom = self) subclass_responsibility end def _contain_equal_to?(lhs_dom, rhs_dom = self) subclass_responsibility end def _contain_less_than?(lhs_dom, rhs_dom = self) subclass_responsibility end def _contain_greater_than?(lhs_dom, rhs_dom = self) subclass_responsibility end def _contain_intersection?(lhs_dom, rhs_dom = self) subclass_responsibility end def _contain_union?(lhs_dom, rhs_dom = self) subclass_responsibility end def intersect?(rhs_dom) subclass_responsibility end def _intersect_nil?(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersect_unlimited?(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersect_equal_to?(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersect_less_than?(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersect_greater_than?(lhs_dom, rhs_dom = self) subclass_responsibility end def narrow(op, ope_dom) case op when Operator::EQ _narrow_by_eq(ope_dom) when Operator::NE _narrow_by_ne(ope_dom) when Operator::LT _narrow_by_lt(ope_dom) when Operator::GT _narrow_by_gt(ope_dom) when Operator::LE _narrow_by_le(ope_dom) when Operator::GE _narrow_by_ge(ope_dom) else __NOTREACHED__ end end def _narrow_by_eq(rhs_dom, lhs_dom = self) subclass_responsibility end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_by_ne(rhs_dom, lhs_dom = self) subclass_responsibility end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_by_lt(rhs_dom, lhs_dom = self) subclass_responsibility end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_by_gt(rhs_dom, lhs_dom = self) subclass_responsibility end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) subclass_responsibility end def _narrow_by_le(rhs_dom, lhs_dom = self) _narrow_by_lt(rhs_dom).union(_narrow_by_eq(rhs_dom)) end def _narrow_by_ge(rhs_dom, lhs_dom = self) _narrow_by_gt(rhs_dom).union(_narrow_by_eq(rhs_dom)) end def widen(op, ope_dom) case op when Operator::EQ _widen_by_eq(ope_dom) when Operator::NE _widen_by_ne(ope_dom) when Operator::LT _widen_by_lt(ope_dom) when Operator::GT _widen_by_gt(ope_dom) when Operator::LE _widen_by_le(ope_dom) when Operator::GE _widen_by_ge(ope_dom) else __NOTREACHED__ end end def _widen_by_eq(rhs_dom, lhs_dom = self) lhs_dom.union(rhs_dom) end def _widen_by_ne(rhs_dom, lhs_dom = self) lhs_dom.union(rhs_dom.inversion) end def _widen_by_lt(rhs_dom, lhs_dom = self) lhs_dom.union(ValueDomain.of_unlimited(logical_shr?).narrow( Operator::LT, rhs_dom)) end def _widen_by_gt(rhs_dom, lhs_dom = self) lhs_dom.union(ValueDomain.of_unlimited(logical_shr?).narrow( Operator::GT, rhs_dom)) end def _widen_by_le(rhs_dom, lhs_dom = self) _widen_by_lt(rhs_dom).union(_widen_by_eq(rhs_dom)) end def _widen_by_ge(rhs_dom, lhs_dom = self) _widen_by_gt(rhs_dom).union(_widen_by_eq(rhs_dom)) end def inversion subclass_responsibility end def ~ subclass_responsibility end def +@ subclass_responsibility end def -@ subclass_responsibility end def +(rhs_dom) subclass_responsibility end def _add_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _add_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _add_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _add_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _add_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def -(rhs_dom) self + -rhs_dom end def *(rhs_dom) # NOTE: Operator * cannot be defined by `LHS / (1.0 / RHS)'. # Because `1.0 / RHS' will make NaN, when the value domain of the # right hand side contains 0. subclass_responsibility end def _mul_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _mul_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _mul_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _mul_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _mul_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def /(rhs_dom) subclass_responsibility end def _div_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _div_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _div_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _div_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _div_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def %(rhs_dom) self - rhs_dom * (self / rhs_dom).coerce_to_integer end def &(rhs_dom) subclass_responsibility end def _and_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _and_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _and_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _and_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _and_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def |(rhs_dom) subclass_responsibility end def _or_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _or_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _or_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _or_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _or_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def ^(rhs_dom) subclass_responsibility end def _xor_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _xor_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _xor_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _xor_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _xor_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def <<(rhs_dom) subclass_responsibility end def _shl_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _shl_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _shl_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _shl_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _shl_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def >>(rhs_dom) subclass_responsibility end def _shr_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _shr_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _shr_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _shr_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _shr_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def ! subclass_responsibility end def <(rhs_dom) subclass_responsibility end def _less_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _less_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _less_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _less_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _less_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def >(rhs_dom) rhs_dom < self end def ==(rhs_dom) # NOTE: Operator == cannot be defined by `!(LHS < RHS || LHS > RHS)'. # When the value domain of the left hand side is (--<===>-<===>--), # and the value domain of the right hand side is (-------|-------). # `LHS < RHS' should make `true or false' because values in the # left hand side may be less than or greater than the value in # the right hand side. # `LHS > RHS' should make `true or false', too. # So, `!(LHS < RHS) && !(LHS > RHS)' will make `true or false'. subclass_responsibility end def _equal_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _equal_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _equal_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _equal_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _equal_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def !=(rhs_dom) # NOTE: Operator != cannot be defined by `!(LHS == RHS)'. # When the value domain of the left hand side or the right hand # side is NilValueDomain, `LHS == RHS' should make `false'. # But `LHS != RHS' should make `false', too. subclass_responsibility end def _not_equal_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _not_equal_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _not_equal_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _not_equal_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _not_equal_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def <=(rhs_dom) (self < rhs_dom).logical_or(self == rhs_dom) end def >=(rhs_dom) (self > rhs_dom).logical_or(self == rhs_dom) end def logical_and(rhs_dom) # NOTE: Operator && cannot be defined as a method in Ruby. subclass_responsibility end def _logical_and_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_and_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_and_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_and_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_and_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def logical_or(rhs_dom) # NOTE: Operator || cannot be defined as a method in Ruby. subclass_responsibility end def _logical_or_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_or_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_or_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_or_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _logical_or_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def intersection(rhs_dom) subclass_responsibility end def _intersection_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersection_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersection_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersection_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _intersection_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def union(rhs_dom) subclass_responsibility end def _union_nil(lhs_dom, rhs_dom = self) subclass_responsibility end def _union_unlimited(lhs_dom, rhs_dom = self) subclass_responsibility end def _union_equal_to(lhs_dom, rhs_dom = self) subclass_responsibility end def _union_less_than(lhs_dom, rhs_dom = self) subclass_responsibility end def _union_greater_than(lhs_dom, rhs_dom = self) subclass_responsibility end def coerce_to_integer subclass_responsibility end def coerce_to_real subclass_responsibility end def min_value subclass_responsibility end def max_value subclass_responsibility end def each_sample subclass_responsibility end def to_defined_domain subclass_responsibility end def <=>(rhs_dom) to_s <=> rhs_dom.to_s end def eql?(rhs_dom) to_s.eql?(rhs_dom.to_s) end def hash to_s.hash end memoize :hash def to_s subclass_responsibility end def complexity subclass_responsibility end private def right_shift(lhs_numeric, rhs_numeric) if logical_shr? lhs_numeric.to_i.logical_right_shift(rhs_numeric.to_i) else lhs_numeric.to_i.arithmetic_right_shift(rhs_numeric.to_i) end end def left_shift(lhs_numeric, rhs_numeric) lhs_numeric.to_i.left_shift(rhs_numeric.to_i) end end class NilValueDomain < ValueDomain def empty? true end def nan? false end def undefined? false end def ambiguous? false end def contain_value_domain?(rhs_dom) rhs_dom._contain_nil?(self) end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) true end def _contain_less_than?(lhs_dom, rhs_dom = self) true end def _contain_greater_than?(lhs_dom, rhs_dom = self) true end def _contain_intersection?(lhs_dom, rhs_dom = self) true end def _contain_union?(lhs_dom, rhs_dom = self) true end def intersect?(rhs_dom) rhs_dom._intersect_nil?(self) end def _intersect_nil?(lhs_dom, rhs_dom = self) false end def _intersect_unlimited?(lhs_dom, rhs_dom = self) false end def _intersect_equal_to?(lhs_dom, rhs_dom = self) false end def _intersect_less_than?(lhs_dom, rhs_dom = self) false end def _intersect_greater_than?(lhs_dom, rhs_dom = self) false end def _narrow_by_eq(rhs_dom, lhs_dom = self) rhs_dom._narrow_nil_by_eq(lhs_dom) end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `== NilValueDomain' makes # NilValueDomain. lhs_dom end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `== NilValueDomain' makes # NilValueDomain. rhs_dom end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `== NilValueDomain' makes # NilValueDomain. rhs_dom end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `== NilValueDomain' makes # NilValueDomain. rhs_dom end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `== NilValueDomain' makes # NilValueDomain. rhs_dom end def _narrow_by_ne(rhs_dom, lhs_dom = self) rhs_dom._narrow_nil_by_ne(lhs_dom) end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `!= NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `!= NilValueDomain' makes # no effect to the target value-domain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # UnlimitedValueDomain should be narrowed to be # UnlimitedValueDomain, and NaN should be narrowed to be NaN. lhs_dom end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `!= NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `!= NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `!= NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_by_lt(rhs_dom, lhs_dom = self) rhs_dom._narrow_nil_by_lt(lhs_dom) end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `< NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `< NilValueDomain' makes # no effect to the target value-domain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # UnlimitedValueDomain should be narrowed to be # UnlimitedValueDomain, and NaN should be narrowed to be NaN. lhs_dom end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `< NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `< NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `< NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_by_gt(rhs_dom, lhs_dom = self) rhs_dom._narrow_nil_by_gt(lhs_dom) end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `> NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `> NilValueDomain' makes # no effect to the target value-domain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # UnlimitedValueDomain should be narrowed to be # UnlimitedValueDomain, and NaN should be narrowed to be NaN. lhs_dom end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `> NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `> NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing any value-domain by `> NilValueDomain' makes # no effect to the target value-domain. lhs_dom end def inversion ValueDomain.of_unlimited(logical_shr?) end def ~ # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. self end def +@ # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. self end def -@ # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. self end def +(rhs_dom) rhs_dom._add_nil(self) end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. rhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _add_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _add_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def *(rhs_dom) rhs_dom._mul_nil(self) end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. rhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _mul_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _mul_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def /(rhs_dom) rhs_dom._div_nil(self) end def _div_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _div_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _div_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _div_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _div_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def &(rhs_dom) rhs_dom.coerce_to_integer._add_nil(coerce_to_integer) end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _and_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _and_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def |(rhs_dom) rhs_dom.coerce_to_integer._or_nil(coerce_to_integer) end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _or_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _or_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def ^(rhs_dom) rhs_dom.coerce_to_integer._xor_nil(coerce_to_integer) end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _xor_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _xor_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def <<(rhs_dom) rhs_dom.coerce_to_integer._shl_nil(coerce_to_integer) end def _shl_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shl_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _shl_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _shl_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _shl_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def >>(rhs_dom) rhs_dom.coerce_to_integer._shr_nil(coerce_to_integer) end def _shr_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shr_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _shr_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shr_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def _shr_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. rhs_dom end def ! # NOTE: NilValueDomain contains no values. # So, logical negation of NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def <(rhs_dom) rhs_dom._less_nil(self) end def _less_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def ==(rhs_dom) rhs_dom._equal_nil(self) end def _equal_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _equal_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _equal_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def !=(rhs_dom) rhs_dom._not_equal_nil(self) end def _not_equal_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _not_equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _not_equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _not_equal_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _not_equal_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def logical_and(rhs_dom) rhs_dom._logical_and_nil(self) end def _logical_and_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only zero value, the logical AND makes false. ValueDomain.of_unlimited(logical_shr?) end def _logical_and_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only zero value, the logical AND makes false. ValueDomain.of_unlimited(logical_shr?) end def _logical_and_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only zero value, the logical AND makes false. if lhs_dom.value == 0 ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _logical_and_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only zero value, the logical AND makes false. ValueDomain.of_unlimited(logical_shr?) end def _logical_and_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only zero value, the logical AND makes false. ValueDomain.of_unlimited(logical_shr?) end def logical_or(rhs_dom) rhs_dom._logical_or_nil(self) end def _logical_or_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only non-zero values, the logical OR makes true. ValueDomain.of_unlimited(logical_shr?) end def _logical_or_unlimited(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only non-zero values, the logical OR makes true. ValueDomain.of_unlimited(logical_shr?) end def _logical_or_equal_to(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only non-zero values, the logical OR makes true. if lhs_dom.value == 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def _logical_or_less_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only non-zero values, the logical OR makes true. if lhs_dom.max_value >= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def _logical_or_greater_than(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # If the value-domain of the other side of NilValueDomain contains # only non-zero values, the logical OR makes true. if lhs_dom.min_value <= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def intersection(rhs_dom) rhs_dom._intersection_nil(self) end def _intersection_nil(lhs_dom, rhs_dom = self) rhs_dom end def _intersection_unlimited(lhs_dom, rhs_dom = self) rhs_dom end def _intersection_equal_to(lhs_dom, rhs_dom = self) rhs_dom end def _intersection_less_than(lhs_dom, rhs_dom = self) rhs_dom end def _intersection_greater_than(lhs_dom, rhs_dom = self) rhs_dom end def union(rhs_dom) rhs_dom._union_nil(self) end def _union_nil(lhs_dom, rhs_dom = self) lhs_dom end def _union_unlimited(lhs_dom, rhs_dom = self) lhs_dom end def _union_equal_to(lhs_dom, rhs_dom = self) lhs_dom end def _union_less_than(lhs_dom, rhs_dom = self) lhs_dom end def _union_greater_than(lhs_dom, rhs_dom = self) lhs_dom end def coerce_to_integer self end def coerce_to_real self end def min_value nil end def max_value nil end def each_sample if block_given? self else to_enum(:each_sample) end end def to_defined_domain self end def to_s "(== Nil)" end memoize :to_s def complexity 1 end end class UnlimitedValueDomain < ValueDomain def empty? false end def nan? false end def undefined? false end def ambiguous? false end def contain_value_domain?(rhs_dom) rhs_dom._contain_unlimited?(self) end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) false end def _contain_less_than?(lhs_dom, rhs_dom = self) false end def _contain_greater_than?(lhs_dom, rhs_dom = self) false end def _contain_intersection?(lhs_dom, rhs_dom = self) false end def _contain_union?(lhs_dom, rhs_dom = self) false end def intersect?(rhs_dom) rhs_dom._intersect_unlimited?(self) end def _intersect_nil?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes NilValueDomain#_intersect_unlimited?. rhs_dom.intersect?(lhs_dom) end def _intersect_unlimited?(lhs_dom, rhs_dom = self) true end def _intersect_equal_to?(lhs_dom, rhs_dom = self) true end def _intersect_less_than?(lhs_dom, rhs_dom = self) true end def _intersect_greater_than?(lhs_dom, rhs_dom = self) true end def _narrow_by_eq(rhs_dom, lhs_dom = self) rhs_dom._narrow_unlimited_by_eq(lhs_dom) end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `== UnlimitedValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `== UnlimitedValueDomain' makes # no effect to the target value-domain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # UnlimitedValueDomain should be narrowed to be # UnlimitedValueDomain, and NaN should be narrowed to be NaN. lhs_dom end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `== UnlimitedValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `== UnlimitedValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `== UnlimitedValueDomain' makes # no effect to the target value-domain. lhs_dom end def _narrow_by_ne(rhs_dom, lhs_dom = self) rhs_dom._narrow_unlimited_by_ne(lhs_dom) end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `!= UnlimitedValueDomain' makes # NilValueDomain. lhs_dom end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `!= UnlimitedValueDomain' makes # NilValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # UnlimitedValueDomain should be narrowed to be # UnlimitedValueDomain, and NaN should be narrowed to be NaN. ValueDomain.of_nil(logical_shr?) end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `!= UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `!= UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `!= UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_by_lt(rhs_dom, lhs_dom = self) rhs_dom._narrow_unlimited_by_lt(lhs_dom) end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `< UnlimitedValueDomain' makes # NilValueDomain. lhs_dom end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `< UnlimitedValueDomain' makes # NilValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # UnlimitedValueDomain should be narrowed to be # UnlimitedValueDomain, and NaN should be narrowed to be NaN. ValueDomain.of_nil(logical_shr?) end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `< UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `< UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `< UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_by_gt(rhs_dom, lhs_dom = self) rhs_dom._narrow_unlimited_by_gt(lhs_dom) end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `> UnlimitedValueDomain' makes # NilValueDomain. lhs_dom end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `> UnlimitedValueDomain' makes # NilValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # UnlimitedValueDomain should be narrowed to be # UnlimitedValueDomain, and NaN should be narrowed to be NaN. ValueDomain.of_nil(logical_shr?) end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `> UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `> UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, narrowing any value-domain by `> UnlimitedValueDomain' makes # NilValueDomain. ValueDomain.of_nil(logical_shr?) end def inversion ValueDomain.of_nil(logical_shr?) end def ~ # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. self end def +@ # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. self end def -@ # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. self end def +(rhs_dom) rhs_dom._add_unlimited(self) end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes NilValueDomain#_add_unlimited. rhs_dom + lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _add_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _add_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def *(rhs_dom) rhs_dom._mul_unlimited(self) end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes NilValueDomain#_mul_unlimited. rhs_dom * lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _mul_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _mul_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def /(rhs_dom) rhs_dom._div_unlimited(self) end def _div_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _div_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _div_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _div_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _div_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def &(rhs_dom) rhs_dom.coerce_to_integer._and_unlimited(coerce_to_integer) end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes NilValueDomain#_and_unlimited. rhs_dom & lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _and_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _and_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def |(rhs_dom) rhs_dom.coerce_to_integer._or_unlimited(coerce_to_integer) end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes NilValueDomain#_or_unlimited. rhs_dom | lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _or_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _or_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def ^(rhs_dom) rhs_dom.coerce_to_integer._xor_unlimited(coerce_to_integer) end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes NilValueDomain#_or_unlimited. rhs_dom ^ lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _xor_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def _xor_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. rhs_dom end def <<(rhs_dom) rhs_dom.coerce_to_integer._shl_unlimited(coerce_to_integer) end def _shl_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shl_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _shl_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. rhs_dom end def _shl_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. rhs_dom end def _shl_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. rhs_dom end def >>(rhs_dom) rhs_dom.coerce_to_integer._shr_unlimited(coerce_to_integer) end def _shr_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shr_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-underflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom.nan? ? lhs_dom : rhs_dom end def _shr_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-underflow. rhs_dom end def _shr_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-underflow. rhs_dom end def _shr_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-underflow. rhs_dom end def ! # NOTE: UnlimitedValueDomain contains everything. # So, logical negation of UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def <(rhs_dom) rhs_dom._less_unlimited(self) end def _less_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _less_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _less_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _less_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def ==(rhs_dom) rhs_dom._equal_unlimited(self) end def _equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes NilValueDomain#_equal_unlimited. rhs_dom == lhs_dom end def _equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _equal_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _equal_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def !=(rhs_dom) rhs_dom._not_equal_unlimited(self) end def _not_equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes NilValueDomain#_not_equal_nil. rhs_dom != lhs_dom end def _not_equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _not_equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _not_equal_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _not_equal_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def logical_and(rhs_dom) rhs_dom._logical_and_unlimited(self) end def _logical_and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes NilValueDomain#_logical_and_unlimited. rhs_dom.logical_and(lhs_dom) end def _logical_and_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only zero value, the logical AND makes false. ValueDomain.of_unlimited(logical_shr?) end def _logical_and_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only zero value, the logical AND makes false. if lhs_dom.value == 0 ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _logical_and_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only zero value, the logical AND makes false. ValueDomain.of_unlimited(logical_shr?) end def _logical_and_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only zero value, the logical AND makes false. ValueDomain.of_unlimited(logical_shr?) end def logical_or(rhs_dom) rhs_dom._logical_or_unlimited(self) end def _logical_or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes NilValueDomain#_logical_or_unlimited. rhs_dom.logical_or(lhs_dom) end def _logical_or_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only non-zero values, the logical OR makes true. ValueDomain.of_unlimited(logical_shr?) end def _logical_or_equal_to(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only non-zero values, the logical OR makes true. if lhs_dom.value == 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def _logical_or_less_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only non-zero values, the logical OR makes true. if lhs_dom.max_value >= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def _logical_or_greater_than(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # If the value-domain of the other side of UnlimitedValueDomain # contains only non-zero values, the logical OR makes true. if lhs_dom.min_value <= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def intersection(rhs_dom) rhs_dom._intersection_unlimited(self) end def _intersection_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes NilValueDomain#_intersection_unlimited. rhs_dom.intersection(lhs_dom) end def _intersection_unlimited(lhs_dom, rhs_dom = self) lhs_dom end def _intersection_equal_to(lhs_dom, rhs_dom = self) lhs_dom end def _intersection_less_than(lhs_dom, rhs_dom = self) lhs_dom end def _intersection_greater_than(lhs_dom, rhs_dom = self) lhs_dom end def union(rhs_dom) rhs_dom._union_unlimited(self) end def _union_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes NilValueDomain#_union_unlimited. rhs_dom.union(lhs_dom) end def _union_unlimited(lhs_dom, rhs_dom = self) rhs_dom end def _union_equal_to(lhs_dom, rhs_dom = self) rhs_dom end def _union_less_than(lhs_dom, rhs_dom = self) rhs_dom end def _union_greater_than(lhs_dom, rhs_dom = self) rhs_dom end def coerce_to_integer self end def coerce_to_real self end def min_value nil end def max_value nil end def each_sample if block_given? yield(0) self else to_enum(:each_sample) end end def to_defined_domain self end def to_s "(== Unlimited)" end memoize :to_s def complexity 1 end end # NOTE: To increase the coverage of the analysis, NaN should not be derived # from NilValueDomain but UnlimitedValueDomain. class NaN < UnlimitedValueDomain def nan? true end def to_s "(== NaN)" end memoize :to_s end class EqualToValueDomain < ValueDomain def initialize(val, logical_shr) super(logical_shr) if val @value = val else raise ArgumentError, "equal to nil?" end end attr_reader :value def empty? false end def nan? false end def undefined? false end def ambiguous? false end def contain_value_domain?(rhs_dom) rhs_dom._contain_equal_to?(self) end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) lhs_dom.value == rhs_dom.value end def _contain_less_than?(lhs_dom, rhs_dom = self) lhs_dom.max_value >= rhs_dom.value end def _contain_greater_than?(lhs_dom, rhs_dom = self) lhs_dom.min_value <= rhs_dom.value end def _contain_intersection?(lhs_dom, rhs_dom = self) lhs_dom.domain_pair.all? { |lhs| lhs.contain_value_domain?(rhs_dom) } end def _contain_union?(lhs_dom, rhs_dom = self) lhs_dom.domain_pair.any? { |lhs| lhs.contain_value_domain?(rhs_dom) } end def intersect?(rhs_dom) rhs_dom._intersect_equal_to?(self) end def _intersect_nil?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes NilValueDomain#_intersect_equal_to?. rhs_dom.intersect?(lhs_dom) end def _intersect_unlimited?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes # UnlimitedValueDomain#_intersect_equal_to?. rhs_dom.intersect?(lhs_dom) end def _intersect_equal_to?(lhs_dom, rhs_dom = self) lhs_dom.value == rhs_dom.value end def _intersect_less_than?(lhs_dom, rhs_dom = self) lhs_dom.max_value >= rhs_dom.value end def _intersect_greater_than?(lhs_dom, rhs_dom = self) lhs_dom.min_value <= rhs_dom.value end def _narrow_by_eq(rhs_dom, lhs_dom = self) rhs_dom._narrow_equal_to_by_eq(lhs_dom) end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) rhs_dom end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.value == rhs_dom.value # NOTE: Narrowing `------|------' by `== ------|-----' makes # `------|------'. lhs_dom else # NOTE: Narrowing `---|---------' by `== --------|---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.value # NOTE: Narrowing `=========>---' by `== ---|--------' makes # `---|---------'. rhs_dom else # NOTE: Narrowing `===>---------' by `== --------|---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.value # NOTE: Narrowing `---<=========' by `== --------|---' makes # `---------|---'. rhs_dom else # NOTE: Narrowing `---------<===' by `== ---|--------' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_by_ne(rhs_dom, lhs_dom = self) rhs_dom._narrow_equal_to_by_ne(lhs_dom) end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) rhs_dom.inversion end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.value == rhs_dom.value # NOTE: Narrowing `------|------' by `!= ------|-----' makes # `-------------'. ValueDomain.of_nil(logical_shr?) else # NOTE: Narrowing `---|---------' by `!= --------|---' makes # `---|---------'. lhs_dom end end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.value # NOTE: Narrowing `=========>---' by `!= ------|------' makes # `=====>-<=>---'. lhs_dom.intersection(rhs_dom.inversion) else # NOTE: Narrowing `===>---------' by `!= ------|------' makes # `===>---------'. lhs_dom end end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.value # NOTE: Narrowing `---<=========' by `!= ------|------' makes # `---<=>-<====='. lhs_dom.intersection(rhs_dom.inversion) else lhs_dom end end def _narrow_by_lt(rhs_dom, lhs_dom = self) rhs_dom._narrow_equal_to_by_lt(lhs_dom) end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) ValueDomain.less_than(rhs_dom.value, logical_shr?) end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) if lhs_dom.value < rhs_dom.value lhs_dom else ValueDomain.of_nil(logical_shr?) end end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.value # NOTE: Narrowing `=========>---' by `< ------|------' makes # `=====>-------'. ValueDomain.less_than(rhs_dom.value, logical_shr?) else lhs_dom end end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.value # NOTE: Narrowing `---<=========' by `< ------|------' makes # `---<=>-------'. lhs_dom.intersection( ValueDomain.less_than(rhs_dom.value, logical_shr?)) else ValueDomain.of_nil(logical_shr?) end end def _narrow_by_gt(rhs_dom, lhs_dom = self) rhs_dom._narrow_equal_to_by_gt(lhs_dom) end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) ValueDomain.greater_than(rhs_dom.value, logical_shr?) end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) if lhs_dom.value > rhs_dom.value # NOTE: Narrowing `---------|---' by `> ---|---------' makes # `---------|---'. lhs_dom else # NOTE: Narrowing `---|---------' by `> ---------|---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.value # NOTE: Narrowing `=========>---' by `> ---|---------' makes # `---<=====>---'. ValueDomain.greater_than(rhs_dom.value, logical_shr?).intersection(lhs_dom) else # NOTE: Narrowing `===>---------' by `> ------|------' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.value # NOTE: Narrowing `---<=========' by `> ------|------' makes # `------<======'. ValueDomain.greater_than(rhs_dom.value, logical_shr?) else # NOTE: Narrowing `---------<===' by `> ---|---------' makes # `---------<==='. lhs_dom end end def inversion ValueDomain.less_than(@value, logical_shr?).union( ValueDomain.greater_than(@value, logical_shr?)) end def ~ ValueDomain.equal_to(~coerce_to_integer.value, logical_shr?) end def +@ self end def -@ ValueDomain.equal_to(-@value, logical_shr?) end def +(rhs_dom) rhs_dom._add_equal_to(self) end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes NilValueDomain#_add_equal_to. rhs_dom + lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UnlimitedValueDomain#_add_equal_to. rhs_dom + lhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) ValueDomain.equal_to(lhs_dom.value + rhs_dom.value, logical_shr?) end def _add_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(lhs_dom.value + rhs_dom.value, logical_shr?) end def _add_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(lhs_dom.value + rhs_dom.value, logical_shr?) end def *(rhs_dom) rhs_dom._mul_equal_to(self) end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes NilValueDomain#_mul_equal_to. rhs_dom * lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UnlimitedValueDomain#_mul_equal_to. rhs_dom * lhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) ValueDomain.equal_to(lhs_dom.value * rhs_dom.value, logical_shr?) end def _mul_less_than(lhs_dom, rhs_dom = self) return ValueDomain.equal_to(0, logical_shr?) if rhs_dom.value == 0 if lhs_dom.value <= 0 if rhs_dom.value < 0 ValueDomain.greater_than(lhs_dom.value * rhs_dom.value, logical_shr?) else ValueDomain.less_than(lhs_dom.value * rhs_dom.value, logical_shr?) end else if rhs_dom.value < 0 ValueDomain.greater_than(lhs_dom.value * rhs_dom.value, logical_shr?) else ValueDomain.less_than(lhs_dom.value * rhs_dom.value, logical_shr?) end end end def _mul_greater_than(lhs_dom, rhs_dom = self) return ValueDomain.equal_to(0, logical_shr?) if rhs_dom.value == 0 if lhs_dom.value >= 0 if rhs_dom.value < 0 ValueDomain.less_than(lhs_dom.value * rhs_dom.value, logical_shr?) else ValueDomain.greater_than(lhs_dom.value * rhs_dom.value, logical_shr?) end else if rhs_dom.value < 0 ValueDomain.less_than(lhs_dom.value * rhs_dom.value, logical_shr?) else ValueDomain.greater_than(lhs_dom.value * rhs_dom.value, logical_shr?) end end end def /(rhs_dom) rhs_dom._div_equal_to(self) end def _div_nil(lhs_dom, rhs_dom = self) if rhs_dom.value == 0 ValueDomain.of_nan(logical_shr?) else lhs_dom end end def _div_unlimited(lhs_dom, rhs_dom = self) if rhs_dom.value == 0 ValueDomain.of_nan(logical_shr?) else lhs_dom end end def _div_equal_to(lhs_dom, rhs_dom = self) if rhs_dom.value == 0 ValueDomain.of_nan(logical_shr?) else ValueDomain.equal_to(lhs_dom.value / rhs_dom.value, logical_shr?) end end def _div_less_than(lhs_dom, rhs_dom = self) case when rhs_dom.value < 0 ValueDomain.greater_than(lhs_dom.value / rhs_dom.value, logical_shr?) when rhs_dom.value == 0 ValueDomain.of_nan(logical_shr?) when rhs_dom.value > 0 ValueDomain.less_than(lhs_dom.value / rhs_dom.value, logical_shr?) end end def _div_greater_than(lhs_dom, rhs_dom = self) case when rhs_dom.value < 0 ValueDomain.less_than(lhs_dom.value / rhs_dom.value, logical_shr?) when rhs_dom.value == 0 ValueDomain.of_nan(logical_shr?) when rhs_dom.value > 0 ValueDomain.greater_than(lhs_dom.value / rhs_dom.value, logical_shr?) end end def &(rhs_dom) rhs_dom.coerce_to_integer._and_equal_to(coerce_to_integer) end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes NilValueDomain#_and_equal_to. rhs_dom & lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UnlimitedValueDomain#_and_equal_to. rhs_dom & lhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) ValueDomain.equal_to(lhs_dom.value & rhs_dom.value, logical_shr?) end def _and_less_than(lhs_dom, rhs_dom = self) case when rhs_dom.value < 0 ValueDomain.less_than(0, logical_shr?) when rhs_dom.value == 0 ValueDomain.equal_to(0, logical_shr?) when rhs_dom.value > 0 ValueDomain.greater_than(0, logical_shr?) end end def _and_greater_than(lhs_dom, rhs_dom = self) case when rhs_dom.value < 0 ValueDomain.less_than(0, logical_shr?) when rhs_dom.value == 0 ValueDomain.equal_to(0, logical_shr?) when rhs_dom.value > 0 ValueDomain.greater_than(0, logical_shr?) end end def |(rhs_dom) rhs_dom.coerce_to_integer._or_equal_to(coerce_to_integer) end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes NilValueDomain#_or_equal_to. rhs_dom | lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UnlimitedValueDomain#_or_equal_to. rhs_dom | lhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) ValueDomain.equal_to(lhs_dom.value | rhs_dom.value, logical_shr?) end def _or_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(lhs_dom.value | rhs_dom.value, logical_shr?) end def _or_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(lhs_dom.value | rhs_dom.value, logical_shr?) end def ^(rhs_dom) rhs_dom.coerce_to_integer._xor_equal_to(coerce_to_integer) end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes NilValueDomain#_xor_equal_to. rhs_dom ^ lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UnlimitedValueDomain#_xor_equal_to. rhs_dom ^ lhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) ValueDomain.equal_to(lhs_dom.value ^ rhs_dom.value, logical_shr?) end def _xor_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(lhs_dom.value ^ rhs_dom.value, logical_shr?) end def _xor_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(lhs_dom.value ^ rhs_dom.value, logical_shr?) end def <<(rhs_dom) rhs_dom.coerce_to_integer._shl_equal_to(coerce_to_integer) end def _shl_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shl_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom end def _shl_equal_to(lhs_dom, rhs_dom = self) ValueDomain.equal_to(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shl_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shl_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def >>(rhs_dom) rhs_dom.coerce_to_integer._shr_equal_to(coerce_to_integer) end def _shr_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shr_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom end def _shr_equal_to(lhs_dom, rhs_dom = self) ValueDomain.equal_to(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shr_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shr_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def ! if @value == 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_false(logical_shr?) end end def <(rhs_dom) rhs_dom._less_equal_to(self) end def _less_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _less_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value < rhs_dom.value ValueDomain.of_true(logical_shr?) else ValueDomain.of_false(logical_shr?) end end def _less_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value < rhs_dom.value ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _less_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value > rhs_dom.value ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def ==(rhs_dom) rhs_dom._equal_equal_to(self) end def _equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes NilValueDomain#_equal_equal_to. rhs_dom == lhs_dom end def _equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes UnlimitedValueDomain#_equal_equal_to. rhs_dom == lhs_dom end def _equal_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value == rhs_dom.value ValueDomain.of_true(logical_shr?) else ValueDomain.of_false(logical_shr?) end end def _equal_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.value ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_false(logical_shr?) end end def _equal_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.value ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_false(logical_shr?) end end def !=(rhs_dom) rhs_dom._not_equal_equal_to(self) end def _not_equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes NilValueDomain#_not_equal_equal_to. rhs_dom != lhs_dom end def _not_equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes UnlimitedValueDomain#_not_equal_equal_to. rhs_dom != lhs_dom end def _not_equal_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value != rhs_dom.value ValueDomain.of_true(logical_shr?) else ValueDomain.of_false(logical_shr?) end end def _not_equal_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value < rhs_dom.value ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _not_equal_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value > rhs_dom.value ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def logical_and(rhs_dom) rhs_dom._logical_and_equal_to(self) end def _logical_and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes NilValueDomain#_logical_and_equal_to. rhs_dom.logical_and(lhs_dom) end def _logical_and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes UnlimitedValueDomain#_logical_and_equal_to. rhs_dom.logical_and(lhs_dom) end def _logical_and_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value == 0 || rhs_dom.value == 0 ValueDomain.of_false(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def _logical_and_less_than(lhs_dom, rhs_dom = self) if rhs_dom.value == 0 ValueDomain.of_false(logical_shr?) else if lhs_dom.value < 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end end def _logical_and_greater_than(lhs_dom, rhs_dom = self) if rhs_dom.value == 0 ValueDomain.of_false(logical_shr?) else if lhs_dom.value > 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end end def logical_or(rhs_dom) rhs_dom._logical_or_equal_to(self) end def _logical_or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes NilValueDomain#_logical_or_equal_to. rhs_dom.logical_or(lhs_dom) end def _logical_or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes UnlimitedValueDomain#_logical_or_equal_to. rhs_dom.logical_or(lhs_dom) end def _logical_or_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value == 0 && rhs_dom.value == 0 ValueDomain.of_false(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def _logical_or_less_than(lhs_dom, rhs_dom = self) if rhs_dom.value == 0 if lhs_dom.value < 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end else ValueDomain.of_true(logical_shr?) end end def _logical_or_greater_than(lhs_dom, rhs_dom = self) if rhs_dom.value == 0 if lhs_dom.value > 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end else ValueDomain.of_true(logical_shr?) end end def intersection(rhs_dom) rhs_dom._intersection_equal_to(self) end def _intersection_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes NilValueDomain#_intersection_equal_to. rhs_dom.intersection(lhs_dom) end def _intersection_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes UnlimitedValueDomain#_intersection_equal_to. rhs_dom.intersection(lhs_dom) end def _intersection_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value == rhs_dom.value lhs_dom else ValueDomain.of_nil(logical_shr?) end end def _intersection_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.value rhs_dom else ValueDomain.of_nil(logical_shr?) end end def _intersection_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.value rhs_dom else ValueDomain.of_nil(logical_shr?) end end def union(rhs_dom) rhs_dom._union_equal_to(self) end def _union_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes NilValueDomain#_union_equal_to. rhs_dom.union(lhs_dom) end def _union_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UnlimitedValueDomain#_union_equal_to. rhs_dom.union(lhs_dom) end def _union_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value == rhs_dom.value lhs_dom else ValueDomain._create_union(lhs_dom, rhs_dom) end end def _union_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.value lhs_dom else ValueDomain._create_union(lhs_dom, rhs_dom) end end def _union_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.value lhs_dom else ValueDomain._create_union(lhs_dom, rhs_dom) end end def coerce_to_integer if @value.integer? self else ValueDomain.equal_to(@value.to_i, logical_shr?) end end def coerce_to_real if @value.real? self else ValueDomain.equal_to(@value.to_f, logical_shr?) end end def min_value @value end def max_value @value end def each_sample if block_given? yield(@value) self else to_enum(:each_sample) end end def to_defined_domain self end def to_s "(== #{@value})" end memoize :to_s def complexity 1 end end class LessThanValueDomain < ValueDomain def initialize(val, logical_shr) super(logical_shr) if val @value = val else raise ArgumentError, "less than nil?" end end attr_reader :value def empty? false end def nan? false end def undefined? false end def ambiguous? false end def contain_value_domain?(rhs_dom) rhs_dom._contain_less_than?(self) end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) false end def _contain_less_than?(lhs_dom, rhs_dom = self) lhs_dom.value >= rhs_dom.value end def _contain_greater_than?(lhs_dom, rhs_dom = self) false end def _contain_intersection?(lhs_dom, rhs_dom = self) lhs_dom.domain_pair.all? { |lhs| lhs.contain_value_domain?(rhs_dom) } end def _contain_union?(lhs_dom, rhs_dom = self) lhs_dom.domain_pair.any? { |lhs| lhs.contain_value_domain?(rhs_dom) } end def intersect?(rhs_dom) rhs_dom._intersect_less_than?(self) end def _intersect_nil?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes NilValueDomain#_intersect_less_than?. rhs_dom.intersect?(lhs_dom) end def _intersect_unlimited?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes # UnlimitedValueDomain#_intersect_less_than?. rhs_dom.intersect?(lhs_dom) end def _intersect_equal_to?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes EqualToValueDomain#_intersect_less_than?. rhs_dom.intersect?(lhs_dom) end def _intersect_less_than?(lhs_dom, rhs_dom = self) true end def _intersect_greater_than?(lhs_dom, rhs_dom = self) lhs_dom.min_value <= rhs_dom.max_value end def _narrow_by_eq(rhs_dom, lhs_dom = self) rhs_dom._narrow_less_than_by_eq(lhs_dom) end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) rhs_dom end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.value < rhs_dom.value # NOTE: Narrowing `------|------' by `== =========>---' makes # `------|------'. lhs_dom else # NOTE: Narrowing `---------|---' by `== ===>---------' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.value < rhs_dom.value # NOTE: Narrowing `===>---------' by `== =========>---' makes # `===>---------'. lhs_dom else # NOTE: Narrowing `=========>---' by `== ===>---------' makes # `===>---------'. rhs_dom end end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.min_value > rhs_dom.max_value ValueDomain.of_nil(logical_shr?) else # NOTE: Narrowing `---<=========' by `== =========>---' makes # `---<=====>---'. lhs_dom.intersection(rhs_dom) end end def _narrow_by_ne(rhs_dom, lhs_dom = self) rhs_dom._narrow_less_than_by_ne(lhs_dom) end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) rhs_dom.inversion end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.value <= rhs_dom.max_value # NOTE: Narrowing `---|---------' by `!= =========>---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) else # NOTE: Narrowing `---------|---' by `!= ===>---------' makes # `---------|---'. lhs_dom end end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.max_value <= rhs_dom.max_value # NOTE: Narrowing `===>---------' by `!= =========>---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) else # NOTE: Narrowing `=========>---' by `!= ===>---------' makes # `---<=====>---'. lhs_dom.intersection(rhs_dom.inversion) end end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.max_value # NOTE: Narrowing `---<=========' by `!= =========>---' makes # `---------<==='. rhs_dom.inversion else # NOTE: Narrowing `---------<===' by `!= ===>---------' makes # `---------<==='. lhs_dom end end def _narrow_by_lt(rhs_dom, lhs_dom = self) rhs_dom._narrow_less_than_by_lt(lhs_dom) end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `=============' by `< ======>------' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `------|------' by `< ======>------' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `=========>---' by `< =======>-----' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `---<=========' by `< =========>---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def _narrow_by_gt(rhs_dom, lhs_dom = self) rhs_dom._narrow_less_than_by_gt(lhs_dom) end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `=============' by `> ======>------' makes # `------<======'. rhs_dom.inversion end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) if lhs_dom.value > rhs_dom.max_value # NOTE: Narrowing `---------|---' by `> ===>---------' makes # `---------|---'. lhs_dom else # NOTE: Narrowing `---|---------' by `> =========>---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) if lhs_dom.max_value > rhs_dom.max_value # NOTE: Narrowing `=========>---' by `> ===>---------' makes # `---<=====>---'. rhs_dom.inversion.intersection(lhs_dom) else # NOTE: Narrowing `===>---------' by `> =========>---' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) if lhs_dom.min_value < rhs_dom.max_value # NOTE: Narrowing `---<=========' by `> =========>---' makes # `---------<==='. rhs_dom.inversion else # NOTE: Narrowing `---------<===' by `> ===>---------' makes # `---------<==='. lhs_dom end end def inversion ValueDomain.greater_than_or_equal_to(@value, logical_shr?) end def ~ ValueDomain.less_than(~coerce_to_integer.value, logical_shr?) end def +@ self end def -@ ValueDomain.greater_than(-@value, logical_shr?) end def +(rhs_dom) rhs_dom._add_less_than(self) end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes NilValueDomain#_add_less_than. rhs_dom + lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UnlimitedValueDomain#_add_less_than. rhs_dom + lhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes EqualToValueDomain#_add_less_than. rhs_dom + lhs_dom end def _add_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(lhs_dom.value + rhs_dom.value, logical_shr?) end def _add_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def *(rhs_dom) rhs_dom._mul_less_than(self) end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes NilValueDomain#_mul_less_than. rhs_dom * lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UnlimitedValueDomain#_mul_less_than. rhs_dom * lhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes EqualToValueDomain#_mul_less_than. rhs_dom * lhs_dom end def _mul_less_than(lhs_dom, rhs_dom = self) if lhs_dom.value <= 0 if rhs_dom.value <= 0 ValueDomain.greater_than(lhs_dom.value * rhs_dom.value, logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end else if rhs_dom.value <= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end end def _mul_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.value >= 0 if rhs_dom.value <= 0 ValueDomain.less_than(lhs_dom.value * rhs_dom.value, logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end else if rhs_dom.value <= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end end def /(rhs_dom) rhs_dom._div_less_than(self) end def _div_nil(lhs_dom, rhs_dom = self) if rhs_dom.max_value >= 0 ValueDomain.of_nan(logical_shr?) else lhs_dom end end def _div_unlimited(lhs_dom, rhs_dom = self) if rhs_dom.max_value >= 0 ValueDomain.of_nan(logical_shr?) else lhs_dom end end def _div_equal_to(lhs_dom, rhs_dom = self) if rhs_dom.value >= 0 ValueDomain.of_nan(logical_shr?) else case when lhs_dom.value < 0 ValueDomain.greater_than(0, logical_shr?).intersection( ValueDomain.less_than(lhs_dom.value / rhs_dom.value, logical_shr?)) when lhs_dom.value == 0 ValueDomain.equal_to(0, logical_shr?) when lhs_dom.value > 0 ValueDomain.greater_than( lhs_dom.value / rhs_dom.value, logical_shr? ).intersection(ValueDomain.less_than(0, logical_shr?)) end end end def _div_less_than(lhs_dom, rhs_dom = self) if rhs_dom.value > 0 ValueDomain.of_nan(logical_shr?) else case when lhs_dom.value <= 0 ValueDomain.greater_than(0, logical_shr?) when lhs_dom.value > 0 ValueDomain.less_than(0, logical_shr?) end end end def _div_greater_than(lhs_dom, rhs_dom = self) if rhs_dom.value > 0 ValueDomain.of_nan(logical_shr?) else case when lhs_dom.value >= 0 ValueDomain.less_than(0, logical_shr?) when lhs_dom.value < 0 ValueDomain.greater_than(0, logical_shr?) end end end def &(rhs_dom) rhs_dom.coerce_to_integer._and_less_than(coerce_to_integer) end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes NilValueDomain#_and_less_than. rhs_dom & lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UnlimitedValueDomain#_and_less_than. rhs_dom & lhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes EqualToValueDomain#_and_less_than. rhs_dom & lhs_dom end def _and_less_than(lhs_dom, rhs_dom = self) if lhs_dom.value < 0 && rhs_dom.value < 0 ValueDomain.less_than(lhs_dom.value & rhs_dom.value, logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _and_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.value > 0 && rhs_dom.value < 0 ValueDomain.less_than(lhs_dom.value & rhs_dom.value, logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def |(rhs_dom) rhs_dom.coerce_to_integer._or_less_than(coerce_to_integer) end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes NilValueDomain#_or_less_than. rhs_dom | lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UnlimitedValueDomain#_or_less_than. rhs_dom | lhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes EqualToValueDomain#_or_less_than. rhs_dom | lhs_dom end def _or_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(lhs_dom.value | rhs_dom.value, logical_shr?) end def _or_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def ^(rhs_dom) rhs_dom.coerce_to_integer._xor_less_than(coerce_to_integer) end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes NilValueDomain#_xor_less_than. rhs_dom ^ lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UnlimitedValueDomain#_xor_less_than. rhs_dom ^ lhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes EqualToValueDomain#_xor_less_than. rhs_dom ^ lhs_dom end def _xor_less_than(lhs_dom, rhs_dom = self) case when lhs_dom.value < 0 && rhs_dom.value < 0 ValueDomain.greater_than(0, logical_shr?) when lhs_dom.value < 0 || rhs_dom.value < 0 ValueDomain.less_than(0, logical_shr?) else ValueDomain.greater_than(0, logical_shr?) end end def _xor_greater_than(lhs_dom, rhs_dom = self) case when lhs_dom.value < 0 && rhs_dom.value < 0 ValueDomain.greater_than(0, logical_shr?) when lhs_dom.value < 0 || rhs_dom.value < 0 ValueDomain.less_than(0, logical_shr?) else ValueDomain.greater_than(0, logical_shr?) end end def <<(rhs_dom) rhs_dom.coerce_to_integer._shl_less_than(coerce_to_integer) end def _shl_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shl_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom end def _shl_equal_to(lhs_dom, rhs_dom = self) ValueDomain.less_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shl_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shl_greater_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def >>(rhs_dom) rhs_dom.coerce_to_integer._shr_less_than(coerce_to_integer) end def _shr_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shr_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom end def _shr_equal_to(lhs_dom, rhs_dom = self) ValueDomain.greater_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shr_less_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shr_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def ! if @value < 0 ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def <(rhs_dom) rhs_dom._less_less_than(self) end def _less_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _less_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value >= rhs_dom.max_value ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _less_less_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def _less_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value >= rhs_dom.max_value ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def ==(rhs_dom) rhs_dom._equal_less_than(self) end def _equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes NilValueDomain#_equal_less_than. rhs_dom == lhs_dom end def _equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes UnlimitedValueDomain#_equal_less_than. rhs_dom == lhs_dom end def _equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes EqualToValueDomain#_equal_less_than. rhs_dom == lhs_dom end def _equal_less_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def _equal_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.max_value ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_false(logical_shr?) end end def !=(rhs_dom) rhs_dom._not_equal_less_than(self) end def _not_equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes NilValueDomain#_not_equal_less_than. rhs_dom != lhs_dom end def _not_equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes UnlimitedValueDomain#_not_equal_less_than. rhs_dom != lhs_dom end def _not_equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes EqualToValueDomain#_not_equal_less_than. rhs_dom != lhs_dom end def _not_equal_less_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def _not_equal_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.max_value ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def logical_and(rhs_dom) rhs_dom._logical_and_less_than(self) end def _logical_and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes NilValueDomain#_logical_and_less_than. rhs_dom.logical_and(lhs_dom) end def _logical_and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes UnlimitedValueDomain#_logical_and_less_than. rhs_dom.logical_and(lhs_dom) end def _logical_and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes EqualToValueDomain#_logical_and_less_than. rhs_dom.logical_and(lhs_dom) end def _logical_and_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= 0 || rhs_dom.max_value >= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def _logical_and_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= 0 || rhs_dom.max_value >= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def logical_or(rhs_dom) rhs_dom._logical_or_less_than(self) end def _logical_or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes NilValueDomain#_logical_or_less_than. rhs_dom.logical_or(lhs_dom) end def _logical_or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes UnlimitedValueDomain#_logical_or_less_than. rhs_dom.logical_or(lhs_dom) end def _logical_or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes EqualToValueDomain#_logical_or_less_than. rhs_dom.logical_or(lhs_dom) end def _logical_or_less_than(lhs_dom, rhs_dom = self) if lhs_dom.value < 0 || rhs_dom.value < 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _logical_or_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.value > 0 || rhs_dom.value < 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def intersection(rhs_dom) rhs_dom._intersection_less_than(self) end def _intersection_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes NilValueDomain#_intersection_less_than. rhs_dom.intersection(lhs_dom) end def _intersection_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes UnlimitedValueDomain#_intersection_less_than. rhs_dom.intersection(lhs_dom) end def _intersection_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes EqualToValueDomain#_intersection_less_than. rhs_dom.intersection(lhs_dom) end def _intersection_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value <= rhs_dom.max_value lhs_dom else rhs_dom end end def _intersection_greater_than(lhs_dom, rhs_dom = self) case when lhs_dom.min_value < rhs_dom.max_value ValueDomain._create_intersection(lhs_dom, rhs_dom) when lhs_dom.min_value == rhs_dom.max_value ValueDomain.equal_to(lhs_dom.min_value, logical_shr?) when lhs_dom.min_value > rhs_dom.max_value ValueDomain.of_nil(logical_shr?) end end def union(rhs_dom) rhs_dom._union_less_than(self) end def _union_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes NilValueDomain#_union_less_than. rhs_dom.union(lhs_dom) end def _union_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UnlimitedValueDomain#_union_less_than. rhs_dom.union(lhs_dom) end def _union_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes EqualToValueDomain#_union_less_than. rhs_dom.union(lhs_dom) end def _union_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value <= rhs_dom.max_value rhs_dom else lhs_dom end end def _union_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.max_value ValueDomain.of_unlimited(logical_shr?) else ValueDomain._create_union(lhs_dom, rhs_dom) end end def coerce_to_integer if @value.integer? self else ValueDomain.less_than(@value.to_i, logical_shr?) end end def coerce_to_real if @value.real? self else ValueDomain.less_than(@value.to_f, logical_shr?) end end def min_value nil end def max_value if @value.integer? @value - 1 else @value - Float::EPSILON end end def each_sample if block_given? yield(max_value) self else to_enum(:each_sample) end end def to_defined_domain self end def to_s "(< #{@value})" end memoize :to_s def complexity 1 end end class GreaterThanValueDomain < ValueDomain def initialize(val, logical_shr) super(logical_shr) if val @value = val else raise ArgumentError, "greater than nil?" end end attr_reader :value def empty? false end def nan? false end def undefined? false end def ambiguous? false end def contain_value_domain?(rhs_dom) rhs_dom._contain_greater_than?(self) end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) false end def _contain_less_than?(lhs_dom, rhs_dom = self) false end def _contain_greater_than?(lhs_dom, rhs_dom = self) lhs_dom.value <= rhs_dom.value end def _contain_intersection?(lhs_dom, rhs_dom = self) lhs_dom.domain_pair.all? { |lhs| lhs.contain_value_domain?(rhs_dom) } end def _contain_union?(lhs_dom, rhs_dom = self) lhs_dom.domain_pair.any? { |lhs| lhs.contain_value_domain?(rhs_dom) } end def intersect?(rhs_dom) rhs_dom._intersect_greater_than?(self) end def _intersect_nil?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes NilValueDomain#_intersect_greater_than?. rhs_dom.intersect?(lhs_dom) end def _intersect_unlimited?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes # UnlimitedValueDomain#_intersect_greater_than?. rhs_dom.intersect?(lhs_dom) end def _intersect_equal_to?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes # EqualToValueDomain#_intersect_greater_than?. rhs_dom.intersect?(lhs_dom) end def _intersect_less_than?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes # LessThanValueDomain#_intersect_greater_than?. rhs_dom.intersect?(lhs_dom) end def _intersect_greater_than?(lhs_dom, rhs_dom = self) true end def _narrow_by_eq(rhs_dom, lhs_dom = self) rhs_dom._narrow_greater_than_by_eq(lhs_dom) end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) rhs_dom end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.value > rhs_dom.value # NOTE: Narrowing `---------|---' by `== ---<=========' makes # `---------|---'. lhs_dom else # NOTE: Narrowing `---|---------' by `== ---------<===' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.value > rhs_dom.value # NOTE: Narrowing `=========>---' by `== ---<=========' makes # `---<=====>---'. lhs_dom.intersection(rhs_dom) else # NOTE: Narrowing `===>---------' by `== ---------<===' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) if lhs_dom.min_value >= rhs_dom.min_value # NOTE: Narrowing `---------<===' by `== ---<=========' makes # `---------<==='. lhs_dom else # NOTE: Narrowing `---<=========' by `== ---------<===' makes # `---------<==='. rhs_dom end end def _narrow_by_ne(rhs_dom, lhs_dom = self) rhs_dom._narrow_greater_than_by_ne(lhs_dom) end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) rhs_dom.inversion end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.value >= rhs_dom.min_value # NOTE: Narrowing `---|---------' by `!= ---<=========' makes # `-------------'. ValueDomain.of_nil(logical_shr?) else # NOTE: Narrowing `---|---------' by `!= ---------<===' makes # `---|---------'. lhs_dom end end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.max_value >= rhs_dom.min_value # NOTE: Narrowing `=========>---' by `!= ---<=========' makes # `===>---------'. rhs_dom.inversion else # NOTE: Narrowing `===>---------' by `!= ---------<===' makes # `===>---------'. lhs_dom end end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) if lhs_dom.min_value >= rhs_dom.min_value # NOTE: Narrowing `---------<===' by `!= ---<=========' makes # `-------------'. ValueDomain.of_nil(logical_shr?) else # NOTE: Narrowing `---<=========' by `!= ---------<===' makes # `---<=====>---'. lhs_dom.intersection(rhs_dom.inversion) end end def _narrow_by_lt(rhs_dom, lhs_dom = self) rhs_dom._narrow_greater_than_by_lt(lhs_dom) end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `=============' by `< ------<======' makes # `======>------'. rhs_dom.inversion end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) if lhs_dom.value >= rhs_dom.min_value # NOTE: Narrowing `---------|---' by `< ---<=========' makes # `-------------'. ValueDomain.of_nil(logical_shr?) else # NOTE: Narrowing `---|---------' by `< ---------<===' makes # `---|---------'. lhs_dom end end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) if lhs_dom.value > rhs_dom.value # NOTE: Narrowing `=========>---' by `< ---<=========' makes # `===>---------'. rhs_dom.inversion else # NOTE: Narrowing `===>---------' by `< ---------<===' makes # `===>---------'. lhs_dom end end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) if lhs_dom.value < rhs_dom.value # NOTE: Narrowing `---<=========' by `< ---------<===' makes # `---<=====>---'. lhs_dom.intersect(rhs_dom.inversion) else # NOTE: Narrowing `---------<===' by `< ---<=========' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end end def _narrow_by_gt(rhs_dom, lhs_dom = self) rhs_dom._narrow_greater_than_by_gt(lhs_dom) end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `=============' by `> ------<======' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `------|------' by `> ------<======' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `======>------' by `> ------<======' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) # NOTE: Narrowing `------<======' by `> ------<======' makes # `-------------'. ValueDomain.of_nil(logical_shr?) end def inversion ValueDomain.less_than_or_equal_to(@value, logical_shr?) end def ~ ValueDomain.greater_than(~coerce_to_integer.value, logical_shr?) end def +@ self end def -@ ValueDomain.less_than(-@value, logical_shr?) end def +(rhs_dom) rhs_dom._add_greater_than(self) end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes NilValueDomain#_add_greater_than. rhs_dom + lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UnlimitedValueDomain#_add_greater_than. rhs_dom + lhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes EqualToValueDomain#_add_greater_than. rhs_dom + lhs_dom end def _add_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes LessThanValueDomain#_add_greater_than. rhs_dom + lhs_dom end def _add_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(lhs_dom.value + rhs_dom.value, logical_shr?) end def *(rhs_dom) rhs_dom._mul_greater_than(self) end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes NilValueDomain#_mul_greater_than. rhs_dom * lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UnlimitedValueDomain#_mul_greater_than. rhs_dom * lhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes EqualToValueDomain#_mul_greater_than. rhs_dom * lhs_dom end def _mul_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes LessThanValueDomain#_mul_greater_than. rhs_dom * lhs_dom end def _mul_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.value >= 0 if rhs_dom.value >= 0 ValueDomain.greater_than(lhs_dom.value * rhs_dom.value, logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end else if rhs_dom.value >= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end end def /(rhs_dom) rhs_dom._div_greater_than(self) end def _div_nil(lhs_dom, rhs_dom = self) if rhs_dom.min_value <= 0 ValueDomain.of_nan(logical_shr?) else lhs_dom end end def _div_unlimited(lhs_dom, rhs_dom = self) if rhs_dom.min_value <= 0 ValueDomain.of_nan(logical_shr?) else lhs_dom end end def _div_equal_to(lhs_dom, rhs_dom = self) if rhs_dom.value <= 0 ValueDomain.of_nan(logical_shr?) else case when lhs_dom.value < 0 ValueDomain.greater_than( lhs_dom.value / rhs_dom.value, logical_shr? ).intersection(ValueDomain.less_than( 0, logical_shr? )) when lhs_dom.value == 0 ValueDomain.equal_to(0, logical_shr?) when lhs_dom.value > 0 ValueDomain.greater_than( 0, logical_shr? ).intersection(ValueDomain.less_than( lhs_dom.value / rhs_dom.value, logical_shr? )) end end end def _div_less_than(lhs_dom, rhs_dom = self) if rhs_dom.value < 0 ValueDomain.of_nan(logical_shr?) else case when lhs_dom.value >= 0 ValueDomain.greater_than(0, logical_shr?) when lhs_dom.value < 0 ValueDomain.less_than(0, logical_shr?) end end end def _div_greater_than(lhs_dom, rhs_dom = self) if rhs_dom.value < 0 ValueDomain.of_nan(logical_shr?) else case when lhs_dom.value <= 0 ValueDomain.less_than(0, logical_shr?) when lhs_dom.value > 0 ValueDomain.greater_than(0, logical_shr?) end end end def &(rhs_dom) rhs_dom.coerce_to_integer._and_greater_than(coerce_to_integer) end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes NilValueDomain#_and_greater_than. rhs_dom & lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UnlimitedValueDomain#_and_greater_than. rhs_dom & lhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes EqualToValueDomain#_and_greater_than. rhs_dom & lhs_dom end def _and_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes LessThanValueDomain#_and_greater_than. rhs_dom & lhs_dom end def _and_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.value > 0 && rhs_dom.value > 0 ValueDomain.greater_than(lhs_dom.value & rhs_dom.value, logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def |(rhs_dom) rhs_dom.coerce_to_integer._or_greater_than(coerce_to_integer) end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes NilValueDomain#_or_greater_than. rhs_dom | lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UnlimitedValueDomain#_or_greater_than. rhs_dom | lhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes EqualToValueDomain#_or_greater_than. rhs_dom | lhs_dom end def _or_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes LessThanValueDomain#_or_greater_than. rhs_dom | lhs_dom end def _or_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def ^(rhs_dom) rhs_dom.coerce_to_integer._xor_greater_than(coerce_to_integer) end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes NilValueDomain#_xor_greater_than. rhs_dom ^ lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UnlimitedValueDomain#_xor_greater_than. rhs_dom ^ lhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes EqualToValueDomain#_xor_greater_than. rhs_dom ^ lhs_dom end def _xor_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes LessThanValueDomain#_xor_greater_than. rhs_dom ^ lhs_dom end def _xor_greater_than(lhs_dom, rhs_dom = self) case when lhs_dom.value > 0 && rhs_dom.value > 0 ValueDomain.greater_than(0, logical_shr?) when lhs_dom.value > 0 || rhs_dom.value > 0 ValueDomain.less_than(0, logical_shr?) else ValueDomain.greater_than(0, logical_shr?) end end def <<(rhs_dom) rhs_dom.coerce_to_integer._shl_greater_than(coerce_to_integer) end def _shl_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shl_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom end def _shl_equal_to(lhs_dom, rhs_dom = self) ValueDomain.greater_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shl_less_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shl_greater_than(lhs_dom, rhs_dom = self) ValueDomain.greater_than(left_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def >>(rhs_dom) rhs_dom.coerce_to_integer._shr_greater_than(coerce_to_integer) end def _shr_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _shr_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain because of the bit-overflow. # NOTE: NaN is a subclass of UnlimitedValueDomain. # Arithmetic operation with UnlimitedValueDomain should make # UnlimitedValueDomain, and with NaN should make NaN. lhs_dom end def _shr_equal_to(lhs_dom, rhs_dom = self) ValueDomain.less_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shr_less_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def _shr_greater_than(lhs_dom, rhs_dom = self) ValueDomain.less_than(right_shift(lhs_dom.value, rhs_dom.value), logical_shr?) end def ! if @value > 0 ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def <(rhs_dom) rhs_dom._less_greater_than(self) end def _less_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any comparison with NilValueDomain makes no sense. ValueDomain.of_nil(logical_shr?) end def _less_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, any comparison with UnlimitedValueDomain makes # UnlimitedValueDomain. ValueDomain.of_unlimited(logical_shr?) end def _less_equal_to(lhs_dom, rhs_dom = self) if lhs_dom.value < rhs_dom.min_value ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _less_less_than(lhs_dom, rhs_dom = self) if lhs_dom.max_value < rhs_dom.min_value ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def _less_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def ==(rhs_dom) rhs_dom._equal_greater_than(self) end def _equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes NilValueDomain#_equal_greater_than. rhs_dom == lhs_dom end def _equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes UnlimitedValueDomain#_equal_greater_than. rhs_dom == lhs_dom end def _equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes EqualToValueDomain#_equal_greater_than. rhs_dom == lhs_dom end def _equal_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes LessThanValueDomain#_equal_greater_than. rhs_dom == lhs_dom end def _equal_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def !=(rhs_dom) rhs_dom._not_equal_greater_than(self) end def _not_equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes NilValueDomain#_not_equal_greater_than. rhs_dom != lhs_dom end def _not_equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes UnlimitedValueDomain#_not_equal_greater_than. rhs_dom != lhs_dom end def _not_equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes EqualToValueDomain#_not_equal_greater_than. rhs_dom != lhs_dom end def _not_equal_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes LessThanValueDomain#_not_equal_greater_than. rhs_dom != lhs_dom end def _not_equal_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def logical_and(rhs_dom) rhs_dom._logical_and_greater_than(self) end def _logical_and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes NilValueDomain#_logical_and_greater_than. rhs_dom.logical_and(lhs_dom) end def _logical_and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes # UnlimitedValueDomain#_logical_and_greater_than. rhs_dom.logical_and(lhs_dom) end def _logical_and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes EqualToValueDomain#_logical_and_greater_than. rhs_dom.logical_and(lhs_dom) end def _logical_and_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes # LessThanValueDomain#_logical_and_greater_than. rhs_dom.logical_and(lhs_dom) end def _logical_and_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= 0 || rhs_dom.min_value <= 0 ValueDomain.of_unlimited(logical_shr?) else ValueDomain.of_true(logical_shr?) end end def logical_or(rhs_dom) rhs_dom._logical_or_greater_than(self) end def _logical_or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes NilValueDomain#_logical_or_greater_than. rhs_dom.logical_or(lhs_dom) end def _logical_or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes # UnlimitedValueDomain#_logical_or_greater_than. rhs_dom.logical_or(lhs_dom) end def _logical_or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes EqualToValueDomain#_logical_or_greater_than. rhs_dom.logical_or(lhs_dom) end def _logical_or_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes LessThanValueDomain#_logical_or_greater_than. rhs_dom.logical_or(lhs_dom) end def _logical_or_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.value > 0 || rhs_dom.value > 0 ValueDomain.of_true(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end end def intersection(rhs_dom) rhs_dom._intersection_greater_than(self) end def _intersection_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes NilValueDomain#_intersection_greater_than. rhs_dom.intersection(lhs_dom) end def _intersection_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes # UnlimitedValueDomain#_intersection_greater_than. rhs_dom.intersection(lhs_dom) end def _intersection_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes # EqualToValueDomain#_intersection_greater_than. rhs_dom.intersection(lhs_dom) end def _intersection_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes # LessThanValueDomain#_intersection_greater_than. rhs_dom.intersection(lhs_dom) end def _intersection_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.min_value rhs_dom else lhs_dom end end def union(rhs_dom) rhs_dom._union_greater_than(self) end def _union_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes NilValueDomain#_union_greater_than. rhs_dom.union(lhs_dom) end def _union_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UnlimitedValueDomain#_union_greater_than. rhs_dom.union(lhs_dom) end def _union_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes EqualToValueDomain#_union_greater_than. rhs_dom.union(lhs_dom) end def _union_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes LessThanValueDomain#_union_greater_than. rhs_dom.union(lhs_dom) end def _union_greater_than(lhs_dom, rhs_dom = self) if lhs_dom.min_value <= rhs_dom.min_value lhs_dom else rhs_dom end end def coerce_to_integer if @value.integer? self else ValueDomain.greater_than(@value.to_i, logical_shr?) end end def coerce_to_real if @value.real? self else ValueDomain.greater_than(@value.to_f, logical_shr?) end end def min_value if @value.integer? @value + 1 else @value + Float::EPSILON end end def max_value nil end def each_sample if block_given? yield(min_value) self else to_enum(:each_sample) end end def to_defined_domain self end def to_s "(> #{@value})" end memoize :to_s def complexity 1 end end class CompositeValueDomain < ValueDomain def initialize(lhs_dom, rhs_dom) super(lhs_dom.logical_shr? && rhs_dom.logical_shr?) @domain_pair = [lhs_dom, rhs_dom].sort end attr_reader :domain_pair def empty? false end def nan? false end def undefined? false end def ambiguous? false end def _intersect_nil?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes CompositeValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _intersect_unlimited?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes CompositeValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _intersect_equal_to?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes CompositeValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _intersect_less_than?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes CompositeValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _intersect_greater_than?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes CompositeValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _narrow_by_eq(rhs_dom, lhs_dom = self) lhs_dom.intersection(rhs_dom) end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) rhs_dom end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) lhs_dom.intersection(rhs_dom) end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) lhs_dom.intersection(rhs_dom) end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) lhs_dom.intersection(rhs_dom) end def _narrow_by_ne(rhs_dom, lhs_dom = self) lhs_dom.intersection(rhs_dom.inversion) end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) rhs_dom.inversion end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) lhs_dom.intersection(rhs_dom.inversion) end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) lhs_dom.intersection(rhs_dom.inversion) end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) lhs_dom.intersection(rhs_dom.inversion) end def _narrow_by_lt(rhs_dom, lhs_dom = self) lhs_dom.intersection( ValueDomain.of_unlimited(logical_shr?).narrow(Operator::LT, rhs_dom)) end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) if rhs_max = rhs_dom.max_value ValueDomain.less_than(rhs_max, logical_shr?) else lhs_dom end end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) if rhs_max = rhs_dom.max_value and lhs_dom.value > rhs_max ValueDomain.of_nil(logical_shr?) else lhs_dom end end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) if rhs_max = rhs_dom.max_value and lhs_dom.max_value > rhs_max ValueDomain.less_than(rhs_max, logical_shr?) else lhs_dom end end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) if rhs_max = rhs_dom.max_value and lhs_dom.min_value > rhs_max ValueDomain.of_nil(logical_shr?) else lhs_dom end end def _narrow_by_gt(rhs_dom, lhs_dom = self) lhs_dom.intersection( ValueDomain.of_unlimited(logical_shr?).narrow(Operator::GT, rhs_dom)) end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, narrowing NilValueDomain by anything makes no effect to the # target value-domain. lhs_dom end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) if rhs_min = rhs_dom.min_value ValueDomain.greater_than(rhs_min, logical_shr?) else lhs_dom end end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) if rhs_min = rhs_dom.min_value and lhs_dom.value < rhs_min ValueDomain.of_nil(logical_shr?) else lhs_dom end end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) if rhs_min = rhs_dom.min_value and lhs_dom.max_value < rhs_min ValueDomain.of_nil(logical_shr?) else lhs_dom end end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) if rhs_min = rhs_dom.min_value and lhs_dom.min_value < rhs_min ValueDomain.greater_than(rhs_min, logical_shr?) else lhs_dom end end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes CompositeValueDomain#+. rhs_dom + lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes CompositeValueDomain#+. rhs_dom + lhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes CompositeValueDomain#+. rhs_dom + lhs_dom end def _add_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes CompositeValueDomain#+. rhs_dom + lhs_dom end def _add_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes CompositeValueDomain#+. rhs_dom + lhs_dom end def _div_nil(lhs_dom, rhs_dom = self) _div(lhs_dom, rhs_dom) end def _div_unlimited(lhs_dom, rhs_dom = self) _div(lhs_dom, rhs_dom) end def _div_equal_to(lhs_dom, rhs_dom = self) _div(lhs_dom, rhs_dom) end def _div_less_than(lhs_dom, rhs_dom = self) _div(lhs_dom, rhs_dom) end def _div_greater_than(lhs_dom, rhs_dom = self) _div(lhs_dom, rhs_dom) end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes CompositeValueDomain#&. rhs_dom & lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes CompositeValueDomain#&. rhs_dom & lhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes CompositeValueDomain#&. rhs_dom & lhs_dom end def _and_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes CompositeValueDomain#&. rhs_dom & lhs_dom end def _and_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes CompositeValueDomain#&. rhs_dom & lhs_dom end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes CompositeValueDomain#|. rhs_dom | lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes CompositeValueDomain#|. rhs_dom | lhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes CompositeValueDomain#|. rhs_dom | lhs_dom end def _or_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes CompositeValueDomain#|. rhs_dom | lhs_dom end def _or_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes CompositeValueDomain#|. rhs_dom | lhs_dom end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes CompositeValueDomain#^. rhs_dom ^ lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes CompositeValueDomain#^. rhs_dom ^ lhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes CompositeValueDomain#^. rhs_dom ^ lhs_dom end def _xor_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes CompositeValueDomain#^. rhs_dom ^ lhs_dom end def _xor_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes CompositeValueDomain#^. rhs_dom ^ lhs_dom end def _shl_nil(lhs_dom, rhs_dom = self) _shl(lhs_dom, rhs_dom) end def _shl_unlimited(lhs_dom, rhs_dom = self) _shl(lhs_dom, rhs_dom) end def _shl_equal_to(lhs_dom, rhs_dom = self) _shl(lhs_dom, rhs_dom) end def _shl_less_than(lhs_dom, rhs_dom = self) _shl(lhs_dom, rhs_dom) end def _shl_greater_than(lhs_dom, rhs_dom = self) _shl(lhs_dom, rhs_dom) end def _shr_nil(lhs_dom, rhs_dom = self) _shr(lhs_dom, rhs_dom) end def _shr_unlimited(lhs_dom, rhs_dom = self) _shr(lhs_dom, rhs_dom) end def _shr_equal_to(lhs_dom, rhs_dom = self) _shr(lhs_dom, rhs_dom) end def _shr_less_than(lhs_dom, rhs_dom = self) _shr(lhs_dom, rhs_dom) end def _shr_greater_than(lhs_dom, rhs_dom = self) _shr(lhs_dom, rhs_dom) end def _less_nil(lhs_dom, rhs_dom = self) _less(lhs_dom, rhs_dom) end def _less_unlimited(lhs_dom, rhs_dom = self) _less(lhs_dom, rhs_dom) end def _less_equal_to(lhs_dom, rhs_dom = self) _less(lhs_dom, rhs_dom) end def _less_less_than(lhs_dom, rhs_dom = self) _less(lhs_dom, rhs_dom) end def _less_greater_than(lhs_dom, rhs_dom = self) _less(lhs_dom, rhs_dom) end def ==(rhs_dom) _equal(rhs_dom, self) end def _equal_nil(lhs_dom, rhs_dom = self) _equal(lhs_dom, rhs_dom) end def _equal_unlimited(lhs_dom, rhs_dom = self) _equal(lhs_dom, rhs_dom) end def _equal_equal_to(lhs_dom, rhs_dom = self) _equal(lhs_dom, rhs_dom) end def _equal_less_than(lhs_dom, rhs_dom = self) _equal(lhs_dom, rhs_dom) end def _equal_greater_than(lhs_dom, rhs_dom = self) _equal(lhs_dom, rhs_dom) end def !=(rhs_dom) _not_equal(rhs_dom, self) end def _not_equal_nil(lhs_dom, rhs_dom = self) _not_equal(lhs_dom, rhs_dom) end def _not_equal_unlimited(lhs_dom, rhs_dom = self) _not_equal(lhs_dom, rhs_dom) end def _not_equal_equal_to(lhs_dom, rhs_dom = self) _not_equal(lhs_dom, rhs_dom) end def _not_equal_less_than(lhs_dom, rhs_dom = self) _not_equal(lhs_dom, rhs_dom) end def _not_equal_greater_than(lhs_dom, rhs_dom = self) _not_equal(lhs_dom, rhs_dom) end def _logical_and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes CompositeValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes CompositeValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes CompositeValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes CompositeValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes CompositeValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes CompositeValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes CompositeValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes CompositeValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes CompositeValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes CompositeValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _intersection_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes CompositeValueDomain#intersection which # should be overriden by IntersectionValueDomain and # UnionValueDomain. rhs_dom.intersection(lhs_dom) end def _intersection_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes CompositeValueDomain#intersection which # should be overriden by IntersectionValueDomain and # UnionValueDomain. rhs_dom.intersection(lhs_dom) end def _intersection_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes CompositeValueDomain#intersection which # should be overriden by IntersectionValueDomain and # UnionValueDomain. rhs_dom.intersection(lhs_dom) end def _intersection_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes CompositeValueDomain#intersection which # should be overriden by IntersectionValueDomain and # UnionValueDomain. rhs_dom.intersection(lhs_dom) end def _intersection_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes CompositeValueDomain#intersection which # should be overriden by IntersectionValueDomain and # UnionValueDomain. rhs_dom.intersection(lhs_dom) end def _union_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes CompositeValueDomain#union which should be # overriden by IntersectionValueDomain and UnionValueDomain. rhs_dom.union(lhs_dom) end def _union_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes CompositeValueDomain#union which should be # overriden by IntersectionValueDomain and UnionValueDomain. rhs_dom.union(lhs_dom) end def _union_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes CompositeValueDomain#union which should be # overriden by IntersectionValueDomain and UnionValueDomain. rhs_dom.union(lhs_dom) end def _union_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes CompositeValueDomain#union which should be # overriden by IntersectionValueDomain and UnionValueDomain. rhs_dom.union(lhs_dom) end def _union_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes CompositeValueDomain#union which should be # overriden by IntersectionValueDomain and UnionValueDomain. rhs_dom.union(lhs_dom) end def to_defined_domain self end def complexity domain_pair.map { |dom| dom.complexity + 1 }.max end private def _div(lhs_dom, rhs_dom = self) subclass_responsibility end def _shl(lhs_dom, rhs_dom = self) subclass_responsibility end def _shr(lhs_dom, rhs_dom = self) subclass_responsibility end def _less(lhs_dom, rhs_dom = self) subclass_responsibility end def _equal(lhs_dom, rhs_dom = self) subclass_responsibility end def _not_equal(lhs_dom, rhs_dom = self) subclass_responsibility end end class IntersectionValueDomain < CompositeValueDomain def contain_value_domain?(rhs_dom) rhs_dom._contain_intersection?(self) end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) rhs_dom.domain_pair.any? { |rhs| lhs_dom.contain_value_domain?(rhs) } end def _contain_less_than?(lhs_dom, rhs_dom = self) rhs_dom.domain_pair.any? { |rhs| lhs_dom.contain_value_domain?(rhs) } end def _contain_greater_than?(lhs_dom, rhs_dom = self) rhs_dom.domain_pair.any? { |rhs| lhs_dom.contain_value_domain?(rhs) } end def _contain_intersection?(lhs_dom, rhs_dom = self) lhs_fst, lhs_snd = lhs_dom.domain_pair rhs_fst, rhs_snd = rhs_dom.domain_pair case when lhs_fst.contain_value_domain?(rhs_fst) && lhs_snd.contain_value_domain?(rhs_snd) true when lhs_fst.contain_value_domain?(rhs_snd) && lhs_snd.contain_value_domain?(rhs_fst) true else false end end def _contain_union?(lhs_dom, rhs_dom = self) lhs_dom.domain_pair.any? { |lhs| lhs.contain_value_domain?(rhs_dom) } end def intersect?(rhs_dom) domain_pair.all? { |lhs| lhs.intersect?(rhs_dom) } end def inversion new_sub_doms = domain_pair.map { |dom| dom.inversion } new_sub_doms.first.union(new_sub_doms.last) end def ~ new_sub_doms = domain_pair.map { |dom| ~dom } new_sub_doms.first.intersection(new_sub_doms.last) end def +@ new_sub_doms = domain_pair.map { |dom| +dom } new_sub_doms.first.intersection(new_sub_doms.last) end def -@ new_sub_doms = domain_pair.map { |dom| -dom } new_sub_doms.first.intersection(new_sub_doms.last) end def +(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs + rhs_dom } new_sub_doms.first.intersection(new_sub_doms.last) end def *(rhs_dom) # NOTE: Multiplication of LessThanValueDomain or GreaterThanValueDomain # always makes UnlimitedValueDomain when the domain contains both # positive and negative values. # So, multiplication of IntersectionValueDomain cannot be defined # in the same manner as other arithmetics. if rhs_dom.kind_of?(IntersectionValueDomain) lhs_dom = self lval = [ (n = lhs_dom.min_value).integer? ? n - 1 : n - Float::EPSILON, (n = lhs_dom.max_value).integer? ? n + 1 : n + Float::EPSILON ] labs = lval.map { |val| val.abs }.sort rval = [ (n = rhs_dom.min_value).integer? ? n - 1 : n - Float::EPSILON, (n = rhs_dom.max_value).integer? ? n + 1 : n + Float::EPSILON ] rabs = rval.map { |val| val.abs }.sort comp = lambda { |op, nums| nums.all? { |num| num.__send__(op, 0) } } only_negative, only_positive = comp.curry[:<], comp.curry[:>=] case lval when only_positive case rval when only_positive _mul_only_positive_and_only_positive(lval, labs, rval, rabs) when only_negative _mul_only_positive_and_only_negative(lval, labs, rval, rabs) else _mul_only_positive_and_positive_negative(lval, labs, rval, rabs) end when only_negative case rval when only_positive _mul_only_positive_and_only_negative(rval, rabs, lval, labs) when only_negative _mul_only_negative_and_only_negative(lval, labs, rval, rabs) else _mul_only_negative_and_positive_negative(lval, labs, rval, rabs) end else _mul_positive_negative_and_positive_negative(lval, labs, rval, rabs) end else rhs_dom * self end end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: NilValueDomain contains no values. # So, any arithmetic operation with NilValueDomain makes # NilValueDomain. lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: UnlimitedValueDomain contains everything. # So, this arithmetic operation with UnlimitedValueDomain makes # UnlimitedValueDomain. lhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom * rhs } new_sub_doms.first.intersection(new_sub_doms.last) end def _mul_less_than(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom * rhs } new_sub_doms.first.intersection(new_sub_doms.last) end def _mul_greater_than(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom * rhs } new_sub_doms.first.intersection(new_sub_doms.last) end def /(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs / rhs_dom } new_sub_doms.first.intersection(new_sub_doms.last) end def &(rhs_dom) if rhs_max = rhs_dom.max_value ValueDomain.greater_than_or_equal_to(0, logical_shr?).intersection( ValueDomain.less_than_or_equal_to(rhs_max, logical_shr?)) else ValueDomain.greater_than_or_equal_to(0, logical_shr?) end end def |(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs | rhs_dom } new_sub_doms.first.intersection(new_sub_doms.last) end def ^(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs ^ rhs_dom } new_sub_doms.first.intersection(new_sub_doms.last) end def <<(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs << rhs_dom } new_sub_doms.first.intersection(new_sub_doms.last) end def >>(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs >> rhs_dom } new_sub_doms.first.intersection(new_sub_doms.last) end def ! new_sub_doms = domain_pair.map { |dom| !dom } new_sub_doms.first.intersection(new_sub_doms.last) end def <(rhs_dom) # NOTE: The intersection value domain must be a close-domain (--<===>--). if intersect?(rhs_dom) if rhs_dom.max_value && rhs_dom.max_value == min_value ValueDomain.of_false(logical_shr?) else ValueDomain.of_unlimited(logical_shr?) end else # NOTE: When value domains are not intersected, the RHS value domain is # in the left or right of the LHS intersection value domain. if rhs_dom.min_value && max_value < rhs_dom.min_value # NOTE: The RHS value domain is in the right of the LHS intersection # value domain. ValueDomain.of_true(logical_shr?) else # NOTE: The RHS value domain is in the left of the LHS intersection # value domain. ValueDomain.of_false(logical_shr?) end end end def logical_and(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs.logical_and(rhs_dom) } new_sub_doms.first.intersection(new_sub_doms.last) end def logical_or(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs.logical_or(rhs_dom) } new_sub_doms.first.intersection(new_sub_doms.last) end def intersection(rhs_dom) if rhs_dom.kind_of?(UnionValueDomain) return rhs_dom.intersection(self) end case when contain_value_domain?(rhs_dom) rhs_dom when rhs_dom.contain_value_domain?(self) self else new_sub_doms = domain_pair.map { |lhs| lhs.intersection(rhs_dom) } ValueDomain.of_intersection(*new_sub_doms) end end def union(rhs_dom) case when contain_value_domain?(rhs_dom) self when rhs_dom.contain_value_domain?(self) rhs_dom else ValueDomain.of_union(self, rhs_dom) end end def coerce_to_integer new_sub_doms = domain_pair.map { |dom| dom.coerce_to_integer } new_sub_doms.first.intersection(new_sub_doms.last) end def coerce_to_real new_sub_doms = domain_pair.map { |dom| dom.coerce_to_real } new_sub_doms.first.intersection(new_sub_doms.last) end def min_value # NOTE: Intersection-value-domain must be a close-domain (---<=====>---). # So, min-value is defined by the lower greater-than value domain. domain_pair.map { |dom| dom.min_value }.compact.min end memoize :min_value def max_value # NOTE: Intersection-value-domain must be a close-domain (---<=====>---). # So, max-value is defined by the higher lower-than value domain. domain_pair.map { |dom| dom.max_value }.compact.max end memoize :max_value def each_sample return to_enum(:each_sample) unless block_given? domain_pair.map { |d| d.each_sample.to_a }.flatten.uniq.each do |sample| yield(sample) if contain?(sample) end end def to_s "(#{domain_pair.first.to_s} && #{domain_pair.last.to_s})" end memoize :to_s private def _mul_only_positive_and_only_positive(lval, labs, rval, rabs) # NOTE: (++) * (++) makes a new IntersectionValueDomain; # lower bound: (labs.min * rabs.min) # upper bound: (labs.max * rabs.max) ValueDomain.greater_than( labs.first * rabs.first, logical_shr? ).intersection(ValueDomain.less_than( labs.last * rabs.last, logical_shr? )) end def _mul_only_positive_and_only_negative(lval, labs, rval, rabs) # NOTE: (++) * (--) makes a new IntersectionValueDomain; # lower bound: -(labs.max * rabs.max) # upper bound: -(labs.min * rabs.min) ValueDomain.greater_than( -(labs.last * rabs.last), logical_shr? ).intersection(ValueDomain.less_than( -(labs.first * rabs.first), logical_shr? )) end def _mul_only_positive_and_positive_negative(lval, labs, rval, rabs) # NOTE: (++) * (-+) makes a new IntersectionValueDomain; # lower bound: (labs.max * rval.min) # upper bound: (labs.max * rval.max) ValueDomain.greater_than( labs.last * rval.first, logical_shr? ).intersection(ValueDomain.less_than( labs.last * rval.last, logical_shr? )) end def _mul_only_negative_and_only_negative(lval, labs, rval, rabs) # NOTE: (--) * (--) makes a new IntersectionValueDomain; # upper bound: (labs.min * rabs.min) # lower bound: (labs.max * rabs.max) ValueDomain.greater_than( labs.first * rabs.first, logical_shr? ).intersection(ValueDomain.less_than( labs.last * rabs.last, logical_shr? )) end def _mul_only_negative_and_positive_negative(lval, labs, rval, rabs) # NOTE: (--) * (-+) makes a new IntersectionValueDomain; # lower bound: -(labs.max * rval.max) # upper_bound: -(labs.max * rval.min) ValueDomain.greater_than( -(labs.last * rval.last), logical_shr? ).intersection(ValueDomain.less_than( -(labs.last * rval.first), logical_shr? )) end def _mul_positive_negative_and_positive_negative(lval, labs, rval, rabs) # NOTE: (-+) * (-+) makes a new IntersectionValueDomain; # lower bound: ([lval.min * rval.max, lval.max * rval.min].min) # upper bound: ([lval.min * rval.min, lval.max * rval.max].max) ValueDomain.greater_than( [lval.first * rval.last, lval.last * rval.first].min, logical_shr? ).intersection(ValueDomain.less_than( [lval.first * rval.first, lval.last, rval.last].max, logical_shr? )) end def _div(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom / rhs } new_sub_doms.first.intersection(new_sub_doms.last) end def _shl(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom << rhs } new_sub_doms.first.intersection(new_sub_doms.last) end def _shr(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom >> rhs } new_sub_doms.first.intersection(new_sub_doms.last) end def _less(lhs_dom, rhs_dom = self) comp_dom = rhs_dom.domain_pair.map { |rhs| lhs_dom < rhs } if comp_dom.any? { |dom| dom.eql?(ValueDomain.of_false(logical_shr?)) } ValueDomain.of_false(logical_shr?) else comp_dom.first.intersection(comp_dom.last) end end def _equal(lhs_dom, rhs_dom = self) # NOTE: The intersection value domain must be a close-domain (--<===>--). # If one of the sub domains is not equal to LHS, result should be # false. comp_dom = rhs_dom.domain_pair.map { |rhs| lhs_dom == rhs } if comp_dom.any? { |dom| dom.eql?(ValueDomain.of_false(logical_shr?)) } ValueDomain.of_false(logical_shr?) else comp_dom.first.intersection(comp_dom.last) end end def _not_equal(lhs_dom, rhs_dom = self) # NOTE: The intersection value domain must be a close-domain (--<===>--). # If one of the sub domains is not equal to LHS, result should be # true. comp_dom = rhs_dom.domain_pair.map { |rhs| lhs_dom != rhs } if comp_dom.any? { |dom| dom.eql?(ValueDomain.of_false(logical_shr?)) } ValueDomain.of_false(logical_shr?) else comp_dom.first.intersection(comp_dom.last) end end end class UnionValueDomain < CompositeValueDomain def contain_value_domain?(rhs_dom) rhs_dom._contain_union?(self) end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) rhs_dom.domain_pair.all? { |rhs| lhs_dom.contain_value_domain?(rhs) } end def _contain_less_than?(lhs_dom, rhs_dom = self) rhs_dom.domain_pair.all? { |rhs| lhs_dom.contain_value_domain?(rhs) } end def _contain_greater_than?(lhs_dom, rhs_dom = self) rhs_dom.domain_pair.all? { |rhs| lhs_dom.contain_value_domain?(rhs) } end def _contain_intersection?(lhs_dom, rhs_dom = self) rhs_dom.domain_pair.all? { |rhs| lhs_dom.contain_value_domain?(rhs) } end def _contain_union?(lhs_dom, rhs_dom = self) lhs_fst, lhs_snd = lhs_dom.domain_pair rhs_dom_pair = rhs_dom.domain_pair case when rhs_dom_pair.all? { |rhs| lhs_fst.contain_value_domain?(rhs) } true when rhs_dom_pair.all? { |rhs| lhs_snd.contain_value_domain?(rhs) } true else rhs_fst, rhs_snd = rhs_dom.domain_pair case when lhs_fst.contain_value_domain?(rhs_fst) && lhs_snd.contain_value_domain?(rhs_snd) true when lhs_fst.contain_value_domain?(rhs_snd) && lhs_snd.contain_value_domain?(rhs_fst) true else false end end end def intersect?(rhs_dom) domain_pair.any? { |lhs| lhs.intersect?(rhs_dom) } end def inversion new_sub_doms = domain_pair.map { |dom| dom.inversion } new_sub_doms.first.intersection(new_sub_doms.last) end def ~ new_sub_doms = domain_pair.map { |dom| ~dom } new_sub_doms.first.union(new_sub_doms.last) end def +@ new_sub_doms = domain_pair.map { |dom| +dom } new_sub_doms.first.union(new_sub_doms.last) end def -@ new_sub_doms = domain_pair.map { |dom| -dom } new_sub_doms.first.union(new_sub_doms.last) end def +(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs + rhs_dom } new_sub_doms.first.union(new_sub_doms.last) end def *(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs * rhs_dom } new_sub_doms.first.union(new_sub_doms.last) end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes CompositeValueDomain#*. rhs_dom * lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes CompositeValueDomain#*. rhs_dom * lhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes CompositeValueDomain#*. rhs_dom * lhs_dom end def _mul_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes CompositeValueDomain#*. rhs_dom * lhs_dom end def _mul_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes CompositeValueDomain#*. rhs_dom * lhs_dom end def /(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs / rhs_dom } new_sub_doms.first.union(new_sub_doms.last) end def &(rhs_dom) if rhs_max = rhs_dom.max_value ValueDomain.greater_than_or_equal_to(0, logical_shr?).intersection( ValueDomain.less_than_or_equal_to(rhs_max, logical_shr?)) else ValueDomain.greater_than_or_equal_to(0, logical_shr?) end end def |(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs | rhs_dom } new_sub_doms.first.union(new_sub_doms.last) end def ^(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs ^ rhs_dom } new_sub_doms.first.union(new_sub_doms.last) end def <<(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs << rhs_dom } new_sub_doms.first.union(new_sub_doms.last) end def >>(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs >> rhs_dom } new_sub_doms.first.union(new_sub_doms.last) end def ! new_sub_doms = domain_pair.map { |dom| !dom } new_sub_doms.first.union(new_sub_doms.last) end def <(rhs_dom) comp_dom = domain_pair.map { |lhs| lhs < rhs_dom } comp_dom.first.union(comp_dom.last) end def logical_and(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs.logical_and(rhs_dom) } new_sub_doms.first.union(new_sub_doms.last) end def logical_or(rhs_dom) new_sub_doms = domain_pair.map { |lhs| lhs.logical_or(rhs_dom) } new_sub_doms.first.union(new_sub_doms.last) end def intersection(rhs_dom) case when contain_value_domain?(rhs_dom) rhs_dom when rhs_dom.contain_value_domain?(self) self else new_sub_doms = domain_pair.map { |lhs| lhs.intersection(rhs_dom) } ValueDomain.of_union(*new_sub_doms) end end def union(rhs_dom) case when contain_value_domain?(rhs_dom) self when rhs_dom.contain_value_domain?(self) rhs_dom else new_sub_doms = domain_pair.map { |lhs| lhs.union(rhs_dom) } ValueDomain.of_union(*new_sub_doms) end end def coerce_to_integer new_sub_doms = domain_pair.map { |dom| dom.coerce_to_integer } new_sub_doms.first.union(new_sub_doms.last) end def coerce_to_real new_sub_doms = domain_pair.map { |dom| dom.coerce_to_real } new_sub_doms.first.union(new_sub_doms.last) end def min_value # NOTE: The union value domain may be a open-domain (==>---<==), # a half-open-domain (==>--<==>-) or (-<==>--<==), or # a close-domain (-<==>-<==>-). # When the union value domain is a open-domain, the min-value is # -infinite. # When the union value domain is a half-open-domain and lower sub # domain is less-than value domain, the min-value is -infinite. # When the union value domain is a half-open-domain and higher sub # domain is greater-than value domain, the min-value is defined by # the lower value domain. # When the union value domain is a close-domain, the min-value is # defined by the lower value domain. min_vals = domain_pair.map { |dom| dom.min_value } min_vals.include?(nil) ? nil : min_vals.min end memoize :min_value def max_value # NOTE: If this is an "open-domain" (===>---<===), max-value is # undefined. # But, when the domain is (===>--<===>--), max-value is defined. max_vals = domain_pair.map { |dom| dom.max_value } max_vals.include?(nil) ? nil : max_vals.max end memoize :max_value def each_sample return to_enum(:each_sample) unless block_given? domain_pair.map { |d| d.each_sample.to_a }.flatten.uniq.each do |sample| yield(sample) end end def to_s "(#{domain_pair.first.to_s} || #{domain_pair.last.to_s})" end memoize :to_s private def _div(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom / rhs } new_sub_doms.first.union(new_sub_doms.last) end def _shl(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom << rhs } new_sub_doms.first.union(new_sub_doms.last) end def _shr(lhs_dom, rhs_dom = self) new_sub_doms = rhs_dom.domain_pair.map { |rhs| lhs_dom >> rhs } new_sub_doms.first.union(new_sub_doms.last) end def _less(lhs_dom, rhs_dom = self) comp_dom = rhs_dom.domain_pair.map { |rhs| lhs_dom < rhs } comp_dom.first.union(comp_dom.last) end def _equal(lhs_dom, rhs_dom = self) # NOTE: The union value domain may be a open-domain (==>---<==), # a half-open-domain (==>--<==>-) or (-<==>--<==), or # a close-domain (-<==>-<==>-). # If one of the sub domains is equal to LHS, result should be true. comp_dom = rhs_dom.domain_pair.map { |rhs| lhs_dom == rhs } comp_dom.first.union(comp_dom.last) end def _not_equal(lhs_dom, rhs_dom = self) # NOTE: The union value domain may be a open-domain (==>---<==), # a half-open-domain (==>--<==>-) or (-<==>--<==), or # a close-domain (-<==>-<==>-). # If one of the sub domains is equal to LHS, result should be # false. comp_dom = rhs_dom.domain_pair.map { |rhs| lhs_dom != rhs } comp_dom.first.union(comp_dom.last) end end class UndefinedValueDomain < ValueDomain extend Forwardable def initialize(dom) super(dom.logical_shr?) @domain = dom end attr_reader :domain def_delegator :@domain, :empty? def nan? false end def undefined? true end def ambiguous? false end def_delegator :@domain, :contain? def_delegator :@domain, :contain_value_domain? def_delegator :@domain, :_contain_nil? def_delegator :@domain, :_contain_unlimited? def_delegator :@domain, :_contain_equal_to? def_delegator :@domain, :_contain_less_than? def_delegator :@domain, :_contain_greater_than? def_delegator :@domain, :_contain_intersection? def_delegator :@domain, :_contain_union? def_delegator :@domain, :intersect? def_delegator :@domain, :_intersect_nil? def_delegator :@domain, :_intersect_unlimited? def_delegator :@domain, :_intersect_equal_to? def_delegator :@domain, :_intersect_less_than? def_delegator :@domain, :_intersect_greater_than? def _narrow_by_eq(rhs_dom, lhs_dom = self) ValueDomain.of_undefined(lhs_dom.domain._narrow_by_eq(rhs_dom)) end def_delegator :@domain, :_narrow_nil_by_eq def_delegator :@domain, :_narrow_unlimited_by_eq def_delegator :@domain, :_narrow_equal_to_by_eq def_delegator :@domain, :_narrow_less_than_by_eq def_delegator :@domain, :_narrow_greater_than_by_eq def _narrow_by_ne(rhs_dom, lhs_dom = self) ValueDomain.of_undefined(lhs_dom.domain._narrow_by_ne(rhs_dom)) end def_delegator :@domain, :_narrow_nil_by_ne def_delegator :@domain, :_narrow_unlimited_by_ne def_delegator :@domain, :_narrow_equal_to_by_ne def_delegator :@domain, :_narrow_less_than_by_ne def_delegator :@domain, :_narrow_greater_than_by_ne def _narrow_by_lt(rhs_dom, lhs_dom = self) ValueDomain.of_undefined(lhs_dom.domain._narrow_by_lt(rhs_dom)) end def_delegator :@domain, :_narrow_nil_by_lt def_delegator :@domain, :_narrow_unlimited_by_lt def_delegator :@domain, :_narrow_equal_to_by_lt def_delegator :@domain, :_narrow_less_than_by_lt def_delegator :@domain, :_narrow_greater_than_by_lt def _narrow_by_gt(rhs_dom, lhs_dom = self) ValueDomain.of_undefined(lhs_dom.domain._narrow_by_gt(rhs_dom)) end def_delegator :@domain, :_narrow_nil_by_gt def_delegator :@domain, :_narrow_unlimited_by_gt def_delegator :@domain, :_narrow_equal_to_by_gt def_delegator :@domain, :_narrow_less_than_by_gt def_delegator :@domain, :_narrow_greater_than_by_gt def_delegator :@domain, :_widen_by_eq def_delegator :@domain, :_widen_by_ne def_delegator :@domain, :_widen_by_lt def_delegator :@domain, :_widen_by_gt def_delegator :@domain, :_widen_by_le def_delegator :@domain, :_widen_by_ge def inversion ValueDomain.of_undefined(@domain.inversion) end def ~ ValueDomain.of_undefined(~@domain) end def +@ ValueDomain.of_undefined(+@domain) end def -@ ValueDomain.of_undefined(-@domain) end def +(rhs_dom) ValueDomain.of_undefined(@domain + rhs_dom) end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UndefinedValueDomain#+. rhs_dom + lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UndefinedValueDomain#+. rhs_dom + lhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UndefinedValueDomain#+. rhs_dom + lhs_dom end def _add_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UndefinedValueDomain#+. rhs_dom + lhs_dom end def _add_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes UndefinedValueDomain#+. rhs_dom + lhs_dom end def *(rhs_dom) ValueDomain.of_undefined(@domain * rhs_dom) end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UndefinedValueDomain#*. rhs_dom * lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UndefinedValueDomain#*. rhs_dom * lhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UndefinedValueDomain#*. rhs_dom * lhs_dom end def _mul_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UndefinedValueDomain#*. rhs_dom * lhs_dom end def _mul_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes UndefinedValueDomain#*. rhs_dom * lhs_dom end def /(rhs_dom) ValueDomain.of_undefined(@domain / rhs_dom) end def _div_nil(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._div_nil(lhs_dom)) end def _div_unlimited(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._div_unlimited(lhs_dom)) end def _div_equal_to(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._div_equal_to(lhs_dom)) end def _div_less_than(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._div_less_than(lhs_dom)) end def _div_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._div_greater_than(lhs_dom)) end def &(rhs_dom) ValueDomain.of_undefined(@domain & rhs_dom) end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UndefinedValueDomain#&. rhs_dom & lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UndefinedValueDomain#&. rhs_dom & lhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UndefinedValueDomain#&. rhs_dom & lhs_dom end def _and_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UndefinedValueDomain#&. rhs_dom & lhs_dom end def _and_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes UndefinedValueDomain#&. rhs_dom & lhs_dom end def |(rhs_dom) ValueDomain.of_undefined(@domain | rhs_dom) end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UndefinedValueDomain#|. rhs_dom | lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UndefinedValueDomain#|. rhs_dom | lhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UndefinedValueDomain#|. rhs_dom | lhs_dom end def _or_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UndefinedValueDomain#|. rhs_dom | lhs_dom end def _or_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes UndefinedValueDomain#|. rhs_dom | lhs_dom end def ^(rhs_dom) ValueDomain.of_undefined(@domain ^ rhs_dom) end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UndefinedValueDomain#^. rhs_dom ^ lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UndefinedValueDomain#^. rhs_dom ^ lhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UndefinedValueDomain#^. rhs_dom ^ lhs_dom end def _xor_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UndefinedValueDomain#^. rhs_dom ^ lhs_dom end def _xor_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes UndefinedValueDomain#^. rhs_dom ^ lhs_dom end def <<(rhs_dom) ValueDomain.of_undefined(@domain << rhs_dom) end def _shl_nil(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shl_nil(lhs_dom)) end def _shl_unlimited(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shl_unlimited(lhs_dom)) end def _shl_equal_to(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shl_equal_to(lhs_dom)) end def _shl_less_than(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shl_less_than(lhs_dom)) end def _shl_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shl_greater_than(lhs_dom)) end def >>(rhs_dom) ValueDomain.of_undefined(@domain >> rhs_dom) end def _shr_nil(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shr_nil(lhs_dom)) end def _shr_unlimited(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shr_unlimited(lhs_dom)) end def _shr_equal_to(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shr_equal_to(lhs_dom)) end def _shr_less_than(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shr_less_than(lhs_dom)) end def _shr_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_undefined(rhs_dom.domain._shr_greater_than(lhs_dom)) end def_delegator :@domain, :! def_delegator :@domain, :< def_delegator :@domain, :_less_nil def_delegator :@domain, :_less_unlimited def_delegator :@domain, :_less_equal_to def_delegator :@domain, :_less_less_than def_delegator :@domain, :_less_greater_than def_delegator :@domain, :== def_delegator :@domain, :_equal_nil def_delegator :@domain, :_equal_unlimited def_delegator :@domain, :_equal_equal_to def_delegator :@domain, :_equal_less_than def_delegator :@domain, :_equal_greater_than def_delegator :@domain, :!= def_delegator :@domain, :_not_equal_nil def_delegator :@domain, :_not_equal_unlimited def_delegator :@domain, :_not_equal_equal_to def_delegator :@domain, :_not_equal_less_than def_delegator :@domain, :_not_equal_greater_than def_delegator :@domain, :logical_and def_delegator :@domain, :_logical_and_nil def_delegator :@domain, :_logical_and_unlimited def_delegator :@domain, :_logical_and_equal_to def_delegator :@domain, :_logical_and_less_than def_delegator :@domain, :_logical_and_greater_than def_delegator :@domain, :logical_or def_delegator :@domain, :_logical_or_nil def_delegator :@domain, :_logical_or_unlimited def_delegator :@domain, :_logical_or_equal_to def_delegator :@domain, :_logical_or_less_than def_delegator :@domain, :_logical_or_greater_than def intersection(rhs_dom) ValueDomain.of_undefined(@domain.intersection(rhs_dom)) end def _intersection_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes UndefinedValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes UndefinedValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes UndefinedValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes UndefinedValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes UndefinedValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def union(rhs_dom) ValueDomain.of_undefined(@domain.union(rhs_dom)) end def _union_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UndefinedValueDomain#union. rhs_dom.union(lhs_dom) end def _union_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UndefinedValueDomain#union. rhs_dom.union(lhs_dom) end def _union_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UndefinedValueDomain#union. rhs_dom.union(lhs_dom) end def _union_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UndefinedValueDomain#union. rhs_dom.union(lhs_dom) end def _union_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes UndefinedValueDomain#union. rhs_dom.union(lhs_dom) end def coerce_to_integer ValueDomain.of_undefined(@domain.coerce_to_integer) end def coerce_to_real ValueDomain.of_undefined(@domain.coerce_to_real) end def_delegator :@domain, :min_value def_delegator :@domain, :max_value def_delegator :@domain, :each_sample def to_defined_domain @domain end def to_s "(== Undefined[#{@domain.to_s}])" end memoize :to_s def_delegator :@domain, :complexity end class AmbiguousValueDomain < ValueDomain def initialize(undefined, logical_shr) super(logical_shr) @undefined = undefined end def empty? false end def nan? false end def undefined? @undefined end def ambiguous? true end def contain_value_domain?(rhs_dom) true end def _contain_nil?(lhs_dom, rhs_dom = self) false end def _contain_unlimited?(lhs_dom, rhs_dom = self) true end def _contain_equal_to?(lhs_dom, rhs_dom = self) false end def _contain_less_than?(lhs_dom, rhs_dom = self) false end def _contain_greater_than?(lhs_dom, rhs_dom = self) false end def _contain_intersection?(lhs_dom, rhs_dom = self) false end def _contain_union?(lhs_dom, rhs_dom = self) false end def intersect?(rhs_dom) true end def _intersect_nil?(lhs_dom, rhs_dom = self) false end def _intersect_unlimited?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes AmbiguousValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _intersect_equal_to?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes AmbiguousValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _intersect_less_than?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes AmbiguousValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def _intersect_greater_than?(lhs_dom, rhs_dom = self) # NOTE: `LHS intersect? RHS' equals to `RHS intersect? LHS'. # This method invokes AmbiguousValueDomain#intersect?. rhs_dom.intersect?(lhs_dom) end def narrow(op, ope_dom) self end def _narrow_by_eq(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_nil_by_eq(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_unlimited_by_eq(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_equal_to_by_eq(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_less_than_by_eq(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_greater_than_by_eq(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_by_ne(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_nil_by_ne(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_unlimited_by_ne(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_equal_to_by_ne(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_less_than_by_ne(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_greater_than_by_ne(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_by_lt(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_nil_by_lt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_unlimited_by_lt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_equal_to_by_lt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_less_than_by_lt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_greater_than_by_lt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_by_gt(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_nil_by_gt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_unlimited_by_gt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_equal_to_by_gt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_less_than_by_gt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _narrow_greater_than_by_gt(lhs_dom, rhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def widen(op, ope_dom) self end def _widen_by_eq(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _widen_by_ne(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _widen_by_lt(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _widen_by_gt(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _widen_by_le(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def _widen_by_ge(rhs_dom, lhs_dom = self) ValueDomain.of_ambiguous(@undefined, logical_shr?) end def inversion self end def ~ self end def +@ self end def -@ self end def +(rhs_dom) self end def _add_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes AmbiguousValueDomain#+. rhs_dom + lhs_dom end def _add_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes AmbiguousValueDomain#+. rhs_dom + lhs_dom end def _add_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes AmbiguousValueDomain#+. rhs_dom + lhs_dom end def _add_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes AmbiguousValueDomain#+. rhs_dom + lhs_dom end def _add_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS + RHS' equals to `RHS + LHS'. # This method invokes AmbiguousValueDomain#+. rhs_dom + lhs_dom end def *(rhs_dom) self end def _mul_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes AmbiguousValueDomain#*. rhs_dom * lhs_dom end def _mul_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes AmbiguousValueDomain#*. rhs_dom * lhs_dom end def _mul_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes AmbiguousValueDomain#*. rhs_dom * lhs_dom end def _mul_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes AmbiguousValueDomain#*. rhs_dom * lhs_dom end def _mul_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS * RHS' equals to `RHS * LHS'. # This method invokes AmbiguousValueDomain#*. rhs_dom * lhs_dom end def /(rhs_dom) self end def _div_nil(lhs_dom, rhs_dom = self) rhs_dom end def _div_unlimited(lhs_dom, rhs_dom = self) rhs_dom end def _div_equal_to(lhs_dom, rhs_dom = self) rhs_dom end def _div_less_than(lhs_dom, rhs_dom = self) rhs_dom end def _div_greater_than(lhs_dom, rhs_dom = self) rhs_dom end def &(rhs_dom) self end def _and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes AmbiguousValueDomain#&. rhs_dom & lhs_dom end def _and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes AmbiguousValueDomain#&. rhs_dom & lhs_dom end def _and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes AmbiguousValueDomain#&. rhs_dom & lhs_dom end def _and_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes AmbiguousValueDomain#&. rhs_dom & lhs_dom end def _and_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS & RHS' equals to `RHS & LHS'. # This method invokes AmbiguousValueDomain#&. rhs_dom & lhs_dom end def |(rhs_dom) self end def _or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes AmbiguousValueDomain#|. rhs_dom | lhs_dom end def _or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes AmbiguousValueDomain#|. rhs_dom | lhs_dom end def _or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes AmbiguousValueDomain#|. rhs_dom | lhs_dom end def _or_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes AmbiguousValueDomain#|. rhs_dom | lhs_dom end def _or_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS | RHS' equals to `RHS | LHS'. # This method invokes AmbiguousValueDomain#|. rhs_dom | lhs_dom end def ^(rhs_dom) self end def _xor_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes AmbiguousValueDomain#^. rhs_dom ^ lhs_dom end def _xor_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes AmbiguousValueDomain#^. rhs_dom ^ lhs_dom end def _xor_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes AmbiguousValueDomain#^. rhs_dom ^ lhs_dom end def _xor_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes AmbiguousValueDomain#^. rhs_dom ^ lhs_dom end def _xor_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS ^ RHS' equals to `RHS ^ LHS'. # This method invokes AmbiguousValueDomain#^. rhs_dom ^ lhs_dom end def <<(rhs_dom) self end def _shl_nil(lhs_dom, rhs_dom = self) rhs_dom end def _shl_unlimited(lhs_dom, rhs_dom = self) rhs_dom end def _shl_equal_to(lhs_dom, rhs_dom = self) rhs_dom end def _shl_less_than(lhs_dom, rhs_dom = self) rhs_dom end def _shl_greater_than(lhs_dom, rhs_dom = self) rhs_dom end def >>(rhs_dom) self end def _shr_nil(lhs_dom, rhs_dom = self) rhs_dom end def _shr_unlimited(lhs_dom, rhs_dom = self) rhs_dom end def _shr_equal_to(lhs_dom, rhs_dom = self) rhs_dom end def _shr_less_than(lhs_dom, rhs_dom = self) rhs_dom end def _shr_greater_than(lhs_dom, rhs_dom = self) rhs_dom end def ! ValueDomain.of_unlimited(logical_shr?) end def <(rhs_dom) ValueDomain.of_unlimited(logical_shr?) end def _less_nil(lhs_dom, rhs_dom = self) ValueDomain.of_nil(logical_shr?) end def _less_unlimited(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def _less_equal_to(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def _less_less_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def _less_greater_than(lhs_dom, rhs_dom = self) ValueDomain.of_unlimited(logical_shr?) end def ==(rhs_dom) ValueDomain.of_unlimited(logical_shr?) end def _equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes AmbiguousValueDomain#==. rhs_dom == lhs_dom end def _equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes AmbiguousValueDomain#==. rhs_dom == lhs_dom end def _equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes AmbiguousValueDomain#==. rhs_dom == lhs_dom end def _equal_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes AmbiguousValueDomain#==. rhs_dom == lhs_dom end def _equal_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS == RHS' equals to `RHS == LHS'. # This method invokes AmbiguousValueDomain#==. rhs_dom == lhs_dom end def !=(rhs_dom) ValueDomain.of_unlimited(logical_shr?) end def _not_equal_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes AmbiguousValueDomain#!=. rhs_dom != lhs_dom end def _not_equal_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes AmbiguousValueDomain#!=. rhs_dom != lhs_dom end def _not_equal_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes AmbiguousValueDomain#!=. rhs_dom != lhs_dom end def _not_equal_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes AmbiguousValueDomain#!=. rhs_dom != lhs_dom end def _not_equal_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS != RHS' equals to `RHS != LHS'. # This method invokes AmbiguousValueDomain#!=. rhs_dom != lhs_dom end def logical_and(rhs_dom) ValueDomain.of_unlimited(logical_shr?) end def _logical_and_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes AmbiguousValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes AmbiguousValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes AmbiguousValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes AmbiguousValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def _logical_and_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS && RHS' equals to `RHS && LHS'. # This method invokes AmbiguousValueDomain#logical_and. rhs_dom.logical_and(lhs_dom) end def logical_or(rhs_dom) ValueDomain.of_unlimited(logical_shr?) end def _logical_or_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes AmbiguousValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes AmbiguousValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes AmbiguousValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes AmbiguousValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def _logical_or_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS || RHS' equals to `RHS || LHS'. # This method invokes AmbiguousValueDomain#logical_or. rhs_dom.logical_or(lhs_dom) end def intersection(rhs_dom) self end def _intersection_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes AmbiguousValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes AmbiguousValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes AmbiguousValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes AmbiguousValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def _intersection_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS intersection RHS' equals to `RHS intersection LHS'. # This method invokes AmbiguousValueDomain#intersection. rhs_dom.intersection(lhs_dom) end def union(rhs_dom) self end def _union_nil(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes AmbiguousValueDomain#union. rhs_dom.union(lhs_dom) end def _union_unlimited(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes AmbiguousValueDomain#union. rhs_dom.union(lhs_dom) end def _union_equal_to(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes AmbiguousValueDomain#union. rhs_dom.union(lhs_dom) end def _union_less_than(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes AmbiguousValueDomain#union. rhs_dom.union(lhs_dom) end def _union_greater_than(lhs_dom, rhs_dom = self) # NOTE: `LHS union RHS' equals to `RHS union LHS'. # This method invokes AmbiguousValueDomain#union. rhs_dom.union(lhs_dom) end def coerce_to_integer self end def coerce_to_real self end def min_value nil end def max_value nil end def each_sample if block_given? yield(0) self else to_enum(:each_sample) end end def to_defined_domain ValueDomain.of_ambiguous(false, logical_shr?) end def to_s "(== Ambiguous)" end memoize :to_s def complexity 1 end end end end adlint-3.2.0/lib/adlint/cc1/object.rb0000644000004100000410000010275112224440633017307 0ustar www-datawww-data# C runtime object model. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/util" require "adlint/cc1/syntax" require "adlint/cc1/value" require "adlint/cc1/scope" require "adlint/cc1/seqp" require "adlint/cc1/operator" module AdLint #:nodoc: module Cc1 #:nodoc: module Bindable attr_accessor :binding def bind_to(target) case target when Memory Binding.bind(self, target) when Object Binding.bind(target, self) end end def be_alias_to(mem) case mem when Memory Binding.create_alias(self, mem) else raise TypeError, "an object cannot be an alias to other objects." end end end class Binding def self.bind(obj, mem) binding = new(obj, mem) obj.binding = binding mem.binding = binding binding end def self.create_alias(obj, mem) binding = new(obj, mem) obj.binding = binding binding end def initialize(obj, mem) @object = obj @memory = mem end private_class_method :new attr_reader :object attr_reader :memory end class Object include Bindable def initialize(dcl_or_def = nil) @declarations_and_definitions = [dcl_or_def].compact end attr_reader :declarations_and_definitions def storage_class_specifiers @declarations_and_definitions.map { |dcl_or_def| dcl_or_def.storage_class_specifier }.compact end def declared_as_extern? sc_spec = first_storage_class_specifier sc_spec.nil? || sc_spec.type == :EXTERN end def declared_as_static? sc_spec = first_storage_class_specifier and sc_spec.type == :STATIC end def declared_as_auto? sc_spec = first_storage_class_specifier and sc_spec.type == :AUTO end def declared_as_register? sc_spec = first_storage_class_specifier and sc_spec.type == :REGISTER end def designated_by_lvalue? subclass_responsibility end def named? subclass_responsibility end def temporary? subclass_responsibility end def function? subclass_responsibility end def variable? subclass_responsibility end private def first_storage_class_specifier if @declarations_and_definitions.empty? nil else @declarations_and_definitions.first.storage_class_specifier end end end module InterpObjectBridge # NOTE: InterpreterMediator includes this module to bridge runtime object # creator to this layer. def _interp_object_bridge_ { create_tmpvar: method(:create_tmpvar), scalar_value_of: method(:scalar_value_of) } end end class TypedObject < Object def initialize(type, dcl_or_def = nil) super(dcl_or_def) @type = type end attr_reader :type def to_variable(interp_bridge) if function? or variable? && @type.array? to_pointer(interp_bridge) else self end end def to_pointer(interp_bridge) if @type.array? ptr_type = @type.type_table.pointer_type(@type.base_type) else ptr_type = @type.type_table.pointer_type(@type) end interp_bridge[:create_tmpvar][ptr_type, to_pointer_value(interp_bridge)] end def to_value(interp_bridge) if @type.array? || @type.function? to_pointer_value(interp_bridge) else value.to_single_value end end def to_pointer_value(interp_bridge) interp_bridge[:scalar_value_of][binding.memory.address] end end # == DESCRIPTION # === Variable class hierarchy # Variable # <-- ScopedVariable # <-- OuterVariable # <-- NamedVariable --------> Nameable <> # <-- AliasVariable ^ # <-- TemporaryVariable | # <-- InnerVariable -------------+ # <-- ArrayElementVariable # <-- CompositeMemberVariable class Variable < TypedObject def initialize(mem, dcl_or_def, type) super(type, dcl_or_def) relate_to_memory(mem) end def function? false end def variable? true end def name subclass_responsibility end def named? false end def inner? subclass_responsibility end def outer? !inner? end def value binding.memory.read end def assign!(val, src = nil, br = nil) # NOTE: Length of the incomplete array type should be deducted while # initializer evaluation. So, adjustment of the assigning value # can be done at this point by Value#coerce_to(type). # NOTE: Domain of the assigning value must be narrowed before writing to # the memory by Value#coerce_to(type). binding.memory.write(val.coerce_to(type), src, br) end def uninitialize! assign!(self.type.undefined_value) end def narrow_value_domain!(op, val) assign!(type.arbitrary_value) unless self.value self.value.narrow_domain!(op, val.coerce_to(type)) # NOTE: Write via memory to correctly propagate inner variable's # mutation to its outer variable. binding.memory._cascade_update(nil, nil) self.value.exist? end def widen_value_domain!(op, val) assign!(type.nil_value) unless self.value self.value.widen_domain!(op, val.coerce_to(type)) # NOTE: Write via memory to correctly propagate inner variable's # mutation to its outer variable. binding.memory._cascade_update(nil, nil) self.value.exist? end def enter_value_versioning_group value.enter_versioning_group end def leave_value_versioning_group(raise_complement) value.leave_versioning_group(raise_complement) end def begin_value_versioning value.begin_versioning end def end_value_versioning value.end_versioning end def thin_latest_value_version!(with_rollback) value.thin_latest_version!(with_rollback) end def rollback_all_value_versions! value.rollback_all_versions! end private def relate_to_memory(mem) bind_to(mem) end end class ScopedVariable < Variable def initialize(mem, dcl_or_def, type, scope) super(mem, dcl_or_def, type) @scope = scope end attr_accessor :scope def declared_as_extern? if @scope.global? super else sc_spec = first_storage_class_specifier and sc_spec.type == :EXTERN end end def declared_as_auto? if @scope.global? super else sc_spec = first_storage_class_specifier sc_spec.nil? || sc_spec.type == :AUTO end end end class OuterVariable < ScopedVariable def initialize(mem, dcl_or_def, type, scope) super(mem, dcl_or_def, type, scope) # TODO: If too slow, make an index of inner variables. @inner_variables = create_inner_variables(type.unqualify, scope) @representative_element = create_representative_element(type.unqualify) end attr_reader :representative_element def assign!(val, src = nil, br = nil) super if @representative_element if val.undefined? repr_val = @representative_element.type.undefined_value else repr_val = @representative_element.type.arbitrary_value end @representative_element.assign!(repr_val, src, br) end end def enter_value_versioning_group if @inner_variables @inner_variables.each do |inner| inner.enter_value_versioning_group end end super if @representative_element @representative_element.enter_value_versioning_group end end def leave_value_versioning_group(raise_complement) if @inner_variables @inner_variables.each do |inner| inner.leave_value_versioning_group(raise_complement) end end super if @representative_element @representative_element.leave_value_versioning_group(raise_complement) end end def begin_value_versioning if @inner_variables @inner_variables.each do |inner| inner.begin_value_versioning end end super if @representative_element @representative_element.begin_value_versioning end end def end_value_versioning if @inner_variables @inner_variables.each do |inner| inner.end_value_versioning end end super if @representative_element @representative_element.end_value_versioning end end def thin_latest_value_version!(with_rollback) if @inner_variables @inner_variables.each do |inner| inner.thin_latest_value_version!(with_rollback) end end super if @representative_element @representative_element.thin_latest_value_version!(with_rollback) end end def rollback_all_value_versions! if @inner_variables @inner_variables.each do |inner| inner.rollback_all_value_versions! end end super if @representative_element @representative_element.rollback_all_value_versions! end end def inner? false end def inner_variable_at(idx) if @type.array? # TODO: If linear searching is too slow, use an index of inner # variables. target_name = ArrayElementVariable.component_name_of(idx) @inner_variables.find { |inner| inner.component_name == target_name } else nil end end def inner_variable_named(name) if @type.composite? # TODO: If linear searching is too slow, use an index of inner # variables. target_name = CompositeMemberVariable.component_name_of(name) @inner_variables.find { |inner| inner.component_name == target_name } else nil end end private def create_inner_variables(type, scope) case when type.array? create_array_elements(type, scope, binding.memory) when type.composite? create_composite_members(type, scope, binding.memory) else nil end end def create_array_elements(type, scope, mem) offset = 0 type.impl_length.times.map do |idx| win = mem.create_window(offset, type.base_type.aligned_byte_size) offset += win.byte_size ArrayElementVariable.new(win, self, type.base_type, idx) end end def create_composite_members(type, scope, mem) offset = 0 type.members.map do |memb| win = mem.create_window(offset, memb.type.aligned_byte_size) offset += win.byte_size CompositeMemberVariable.new(win, self, memb.type, memb.name) end end def create_representative_element(type) if type.array? mem = binding.memory.create_unmapped_window ArrayElementVariable.new(mem, self, type.base_type, 0).tap do |var| var.assign!(type.base_type.undefined_value) end else nil end end end module Nameable attr_reader :name def named? true end private def name=(name) # NOTE: Private attr_writer to suppress `private attribute?' warning. @name = name end end class NamedVariable < OuterVariable include Nameable def initialize(mem, dcl_or_def, scope) self.name = dcl_or_def.identifier.value super(mem, dcl_or_def, dcl_or_def.type, scope) end def temporary? false end def designated_by_lvalue? true end # NOTE: This method should be overridden by PhantomVariable. def to_named_variable self end def pretty_print(pp) Summary.new(object_id, name, type, binding.memory).pretty_print(pp) end Summary = Struct.new(:object_id, :name, :type, :memory) private_constant :Summary end class TemporaryVariable < OuterVariable def initialize(mem, type, scope) super(mem, nil, type, scope) end def temporary? true end def designated_by_lvalue? false end def named? false end def pretty_print(pp) Summary.new(object_id, type, binding.memory).pretty_print(pp) end Summary = Struct.new(:object_id, :type, :memory) private_constant :Summary end class InnerVariable < OuterVariable include Nameable def initialize(mem, outer_var, type, component_name) @owner = outer_var @component_name = component_name self.name = create_qualified_name(outer_var, component_name) super(mem, nil, type, outer_var.scope) end attr_reader :owner attr_reader :component_name def storage_class_specifiers @owner.storage_class_specifiers end def declared_as_extern? @owner.declared_as_extern? end def declared_as_static? @owner.declared_as_static? end def declared_as_auto? @owner.declared_as_auto? end def declared_as_register? @owner.declared_as_register? end def named? @owner.named? end def temporary? @owner.temporary? end def inner? true end def designated_by_lvalue? true end def to_named_variable self end private def create_qualified_name(outer_var, component_name) if outer_var.named? "#{outer_var.name}#{component_name}" else "__adlint__tempvar#{component_name}" end end end class ArrayElementVariable < InnerVariable def self.component_name_of(idx) "[#{idx}]" end def initialize(mem, outer_var, type, idx) super(mem, outer_var, type, self.class.component_name_of(idx)) end end class CompositeMemberVariable < InnerVariable def self.component_name_of(name) ".#{name}" end def initialize(mem, outer_var, type, name) super(mem, outer_var, type, self.class.component_name_of(name)) end end class AliasVariable < NamedVariable def initialize(var) super(var.binding.memory, var.declarations_and_definitions.first, var.scope) end private def relate_to_memory(mem) be_alias_to(mem) end end class VariableTable def initialize(mem_pool) @memory_pool = mem_pool @named_variables = [{}] @temp_variables = [[]] @scope_stack = [GlobalScope.new] end def all_named_variables @named_variables.map { |hash| hash.values }.flatten end def enter_scope @named_variables.push({}) @temp_variables.push([]) @scope_stack.push(Scope.new(@scope_stack.size)) end def leave_scope @named_variables.pop.each_value do |var| @memory_pool.free(var.binding.memory) end @temp_variables.pop.each do |var| @memory_pool.free(var.binding.memory) end @scope_stack.pop rollback_all_global_variables_value! if current_scope.global? end def declare(dcl, br) if var = lookup(dcl.identifier.value) var.declarations_and_definitions.push(dcl) return var end # NOTE: External variable may have undefined values. define_variable(dcl, br, dcl.type, allocate_memory(dcl), dcl.type.undefined_value) end def define(dcl_or_def, br, init_val = nil) if storage_duration_of(dcl_or_def) == :static && !dcl_or_def.type.const? # NOTE: Value of the inconstant static duration variable should be # arbitrary because execution of its accessors are out of order. # So, a value of the initializer should be ignored. init_val = dcl_or_def.type.arbitrary_value else init_val ||= dcl_or_def.type.undefined_value end if var = lookup(dcl_or_def.identifier.value) if var.scope == current_scope var.declarations_and_definitions.push(dcl_or_def) var.value.force_overwrite!(init_val.coerce_to(var.type)) if repr_elem = var.representative_element repr_elem.value.force_overwrite!(repr_elem.type.arbitrary_value) end return var end end # NOTE: Domain of the init-value will be restricted by type's min-max in # define_variable. define_variable(dcl_or_def, br, dcl_or_def.type, allocate_memory(dcl_or_def), init_val) end def define_temporary(type, init_val) mem = @memory_pool.allocate_dynamic(type.aligned_byte_size) # NOTE: Domain of the init-value will be restricted by type's min-max in # define_variable. define_variable(nil, nil, type, mem, init_val) end def lookup(name_str) @named_variables.reverse_each do |hash| if var = hash[name_str] return var end end nil end def designators @named_variables.map { |hash| hash.keys }.flatten.to_set end def enter_variables_value_versioning_group @named_variables.each do |hash| hash.each_value { |var| var.enter_value_versioning_group } end end def leave_variables_value_versioning_group(raise_complement) @named_variables.each do |hash| hash.each_value do |var| var.leave_value_versioning_group(raise_complement) end end end def begin_variables_value_versioning @named_variables.each do |hash| hash.each_value { |var| var.begin_value_versioning } end end def end_variables_value_versioning @named_variables.each do |hash| hash.each_value { |var| var.end_value_versioning } end end def thin_latest_variables_value_version!(with_rollback) @named_variables.each do |hash| hash.each_value { |var| var.thin_latest_value_version!(with_rollback) } end end def storage_duration_of(dcl_or_def) # NOTE: The ISO C99 standard says; # # 6.2.2 Linkages of identifiers # # 1 An identifier declared in different scopes or in the same scope more # than once can be made to refer to the same object or function by a # process called linkage. There are three kinds of linkage: external, # internal, and none. # # 3 If the declaration of a file scope identifier for an object or a # function contains the storage-class specifier static, the identifier # has internal linkage. # # 4 For an identifier declared with the storage-class specifier extern in # a scope in which a prior declaration of that identifier is visible, # if the prior declaration specifies internal or external linkage, the # linkage of the identifier at the later declaration is the same as the # linkage specified at the prior declaration. If no prior declaration # is visible, or if the prior declaration specifies no linkage, then # the identifier has external linkage. # # 5 If the declaration of an identifier for a function has no # storage-class specifier, its linkage is determined exactly as if it # were declared with the storage-class specifier extern. If the # declaration of an identifier for an object has file scope and no # storage-class specifier, its linkage is external. # # 6 The following identifiers have no linkage: an identifier declared to # be anything other than an object or a function; an identifier # declared to be a function parameter; a block scope identifier for an # object declared without the storage-class specifier extern. # # 6.2.4 Storage durations of objects # # 1 An object has a storage duration that determines its lifetime. There # are three storage durations: static, automatic, and allocated. # Allocated storage is described in 7.20.3. # # 3 An object whose identifier is declared with external or internal # linkage, or with the storage-class specifier static has static # storage duration. Its lifetime is the entire execution of the program # and its stored value is initialized only once, prior to program # startup. # # 4 An object whose identifier is declared with no linkage and without # the storage-class specifier static has automatic storage duration. if sc_spec = dcl_or_def.storage_class_specifier and sc_spec.type == :EXTERN || sc_spec.type == :STATIC :static else current_scope.global? ? :static : :automatic end end private def define_variable(dcl_or_def, br, type, mem, init_val) var = create_variable(dcl_or_def, type, mem) var.assign!(init_val, dcl_or_def, br) if var.named? @named_variables.last[var.name] = var else @temp_variables.last.push(var) end var end def allocate_memory(dcl_or_def) byte_size = dcl_or_def.type.aligned_byte_size if storage_duration_of(dcl_or_def) == :static @memory_pool.allocate_static(byte_size) else @memory_pool.allocate_dynamic(byte_size) end end def create_variable(dcl_or_def, type, mem) if dcl_or_def NamedVariable.new(mem, dcl_or_def, current_scope) else TemporaryVariable.new(mem, type, current_scope) end end def current_scope @scope_stack.last end def rollback_all_global_variables_value! @named_variables.first.each_value do |var| # NOTE: Rollback effects recorded to global variables because execution # of its accessors are out of order. var.rollback_all_value_versions! end end end # == DESCRIPTION # === Function class hierarchy # Function # <-- NamedFunction ------> Nameable <> # <-- ExplicitFunction # <-- ImplicitFunction # <-- BuiltinFunction # <-- AnonymousFunction class Function < TypedObject def initialize(dcl_or_def, type) super(type, dcl_or_def) end def name subclass_responsibility end def named? false end def temporary? false end def variable? false end def function? true end def explicit? subclass_responsibility end def implicit? !explicit? end def builtin? subclass_responsibility end def call(interp, funcall_expr, args) assign_arguments_to_parameters(interp, args) return_values_via_pointer_arguments(interp, funcall_expr, args) if type.return_type.function? interp.create_tmpvar else ret_type = type.return_type interp.create_tmpvar(ret_type, ret_type.return_value) end end def signature subclass_responsibility end private def assign_arguments_to_parameters(interp, args) args.zip(type.parameter_types).each do |(arg, expr), param_type| arg_var = interp.object_to_variable(arg, expr) if param_type case when arg_var.type.pointer? && param_type.array? conved = interp.pointee_of(arg_var) when !arg_var.type.same_as?(param_type) conved = interp.do_conversion(arg_var, param_type) || interp.create_tmpvar(param_type) interp.notify_implicit_conv_performed(expr, arg_var, conved) else conved = arg_var end else conved = interp.do_default_argument_promotion(arg_var) if arg_var != conved interp.notify_implicit_conv_performed(expr, arg_var, conved) end end # NOTE: Value of the argument is referred when the assignment to the # parameter is performed. interp.notify_variable_value_referred(expr, arg_var) end end def return_values_via_pointer_arguments(interp, funcall_expr, args) args.zip(type.parameter_types).each do |(arg, expr), param_type| next if param_type && param_type.void? next unless arg.variable? and arg.type.pointer? || arg.type.array? param_type = param_type.unqualify if param_type case when param_type.nil? && (arg.type.pointer? || arg.type.array?), param_type && param_type.pointer? && !param_type.base_type.const?, param_type && param_type.array? && !param_type.base_type.const? else next end case when arg.type.pointer? pointee = interp.pointee_of(arg) if pointee && pointee.designated_by_lvalue? && pointee.variable? sink = pointee else next end when arg.type.array? sink = arg end ret_val = sink.type.return_value sink.assign!(ret_val, funcall_expr, interp.current_branch) interp.notify_variable_value_updated(expr, sink) # NOTE: Returning a value via a pointer parameter can be considered as # an evaluation of a statement-expression with a # simple-assignment-expression. # Control will reach to a sequence-point at the end of a full # expression. interp.notify_sequence_point_reached( SequencePoint.new(funcall_expr, false)) end end end class NamedFunction < Function include Nameable def initialize(dcl_or_def, type, name) super(dcl_or_def, type) self.name = name end def designated_by_lvalue? true end def call(*) case name when "exit", "_exit", "abort" BreakEvent.of_return.throw when "longjmp", "siglongjmp" BreakEvent.of_return.throw else super end end def signature FunctionSignature.new(name, type) end end class ExplicitFunction < NamedFunction def initialize(dcl_or_def) super(dcl_or_def, dcl_or_def.type, dcl_or_def.identifier.value) end def explicit? true end def builtin? false end end class ImplicitFunction < NamedFunction def initialize(type, name) super(nil, type, name) end def explicit? false end def builtin? false end end class AnonymousFunction < Function def initialize(type) super(nil, type) end def designated_by_lvalue? false end def explicit? false end def builtin? false end def signature FunctionSignature.new("__adlint__anon_func", type) end end class FunctionTable def initialize(mem_pool) @memory_pool = mem_pool @functions = [{}] @scope_stack = [GlobalScope.new] end def enter_scope @functions.push({}) @scope_stack.push(Scope.new(@scope_stack.size)) end def leave_scope @functions.pop.each_value do |fun| @memory_pool.free(fun.binding.memory) end @scope_stack.pop end def declare_explicitly(dcl) if fun = lookup(dcl.identifier.value) and fun.explicit? fun.declarations_and_definitions.push(dcl) return fun end define(ExplicitFunction.new(dcl)) end def declare_implicitly(fun) if fun.named? && fun.implicit? define(fun, true) end fun end def define(fun, in_global_scope = false) # NOTE: A function has a starting address in the TEXT segment. # This is ad-hoc implementation, but it's enough for analysis. fun.bind_to(@memory_pool.allocate_static(0)) if in_global_scope @functions.first[fun.name] = fun else @functions.last[fun.name] = fun if fun.named? end fun end def lookup(name_str) @functions.reverse_each do |hash| if fun = hash[name_str] return fun end end nil end def designators @functions.map { |hash| hash.keys }.flatten.to_set end end class Memory include Bindable def initialize(addr, byte_size) @address = addr @byte_size = byte_size @value = nil end attr_reader :address attr_reader :byte_size def static? subclass_responsibility end def dynamic? subclass_responsibility end def read @value end def write(val, src, br) if @value @value.overwrite!(val, TransitionTag.new([src], [br])) else @value = VersionedValue.new(val, TransitionTag.new([src], [br])) end end def _cascade_update(src, br) # NOTE: This method will be called only from # #narrow_value_domain! and # #widen_value_domain! of Variable to propagate memory mutation to # the upper MemoryBlock from MemoryWindow. end end class MemoryBlock < Memory def initialize(addr, byte_size) super @windows = [] end attr_reader :windows def create_window(offset, byte_size) MemoryWindow.new(self, @address + offset, byte_size).tap do |win| win.on_written += method(:handle_written_through_window) @windows.push(win) end end def create_unmapped_window UnmappedMemoryWindow.new(self).tap do |win| win.on_written += method(:handle_written_through_window) end end alias :_orig_write :write def write(val, src, br) super if !@windows.empty? and @value.array? && val.array? or @value.composite? && val.composite? @windows.zip(val.to_single_value.values).each do |win, inner_val| win.write(inner_val, src, br, false) end end end protected def create_value_from_windows if @value case when @value.scalar? @value when @value.array? ArrayValue.new(@windows.map { |w| w.create_value_from_windows }) when @value.composite? CompositeValue.new(@windows.map { |w| w.create_value_from_windows }) else __NOTREACHED__ end else nil end end private def handle_written_through_window(win, src, br) if val = create_value_from_windows unless win.read.test_must_be_undefined.true? val = val.to_defined_value end _orig_write(val, src, br) end end end class MemoryWindow < MemoryBlock def initialize(owner, addr, byte_size) super(addr, byte_size) @owner = owner end extend Pluggable def_plugin :on_written def static? @owner.static? end def dynamic? @owner.dynamic? end def write(val, src, br, cascade = true) super(val, src, br) _cascade_update(src, br) if cascade end def _cascade_update(src, br) on_written.invoke(self, src, br) end private def handle_written_through_window(win, src, br) super _cascade_update(src, br) end end class UnmappedMemoryWindow < MemoryWindow def initialize(owner) super(owner, owner.address, owner.byte_size) end end class StaticMemoryBlock < MemoryBlock def static? true end def dynamic? false end end class DynamicMemoryBlock < MemoryBlock def static? false end def dynamic? true end end class MemoryPool def initialize @memory_blocks = {} @address_ranges = [] # NOTE: To make room for NULL and controlling expressions. @free_address = 10 end def allocate_static(byte_size) mem_block = StaticMemoryBlock.new(@free_address, byte_size) @free_address += allocating_byte_size(byte_size) @memory_blocks[mem_block.address] = mem_block @address_ranges.push(mem_block.address...@free_address) mem_block end def allocate_dynamic(byte_size) mem_block = DynamicMemoryBlock.new(@free_address, byte_size) @free_address += allocating_byte_size(byte_size) @memory_blocks[mem_block.address] = mem_block @address_ranges.push(mem_block.address...@free_address) mem_block end def free(mem_block) @memory_blocks.delete(mem_block.address) @address_ranges.reject! { |range| range.include?(mem_block.address) } end def lookup(addr) if mem_block = @memory_blocks[addr] return mem_block else if addr_range = @address_ranges.find { |r| r.include?(addr) } mem_block = @memory_blocks[addr_range.first] return mem_block.windows.find { |w| w.address == addr } end end nil end private def allocating_byte_size(byte_size) byte_size == 0 ? 1 : byte_size end end end end adlint-3.2.0/lib/adlint/driver.rb0000644000004100000410000001077412224440633016671 0ustar www-datawww-data# Analysis drivers. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/prelude" require "adlint/traits" require "adlint/message" require "adlint/analyzer" module AdLint #:nodoc: class AdLint def initialize(traits_fpath, output_dpath = nil, verbose = false, cmd_name = File.basename($0)) @cmd_name = cmd_name @traits = load_traits(traits_fpath) @msg_catalog = load_message_catalog(@traits) @output_dpath = output_dpath @verbose = verbose if verbose $stdout.sync = true at_exit { print_elapsed_time($stdout) } end end attr_reader :traits attr_reader :msg_catalog attr_reader :verbose def run_sma!(src_fpath, strip_num = 0) FileUtils.mkdir_p(sma_output_dpath(src_fpath, strip_num, @output_dpath)) SingleModuleAnalyzer.new(@traits, @msg_catalog, src_fpath, strip_num, @output_dpath, @verbose).run end def run_cma!(met_fpaths) FileUtils.mkdir_p(@output_dpath) if @output_dpath CrossModuleAnalyzer.new(@traits, @msg_catalog, met_fpaths, @output_dpath, @verbose).run end def run_chk!(src_fpath, strip_num = 0) FileUtils.mkdir_p(sma_output_dpath(src_fpath, strip_num, @output_dpath)) ConfigurationValidator.new(@traits, @msg_catalog, src_fpath, strip_num, @output_dpath, @verbose).run end def met_fpaths_of(src_fpaths, strip_num) src_fpaths.map do |fpath| if @output_dpath @output_dpath.join(fpath.strip(strip_num)).add_ext(".met.csv") else fpath.strip(strip_num).add_ext(".met.csv") end end end private def load_traits(traits_fpath) begin traits = Traits.new(traits_fpath) unless traits.valid? $stderr.puts "#{@cmd_name}: Failed to read `#{traits_fpath}'." $stderr.puts $stderr.puts "Detailed message is below;" traits.errors.each_with_index do |err, idx| $stderr.puts "#{idx + 1}. #{err}" end $stderr.puts exit 3 end traits rescue Psych::SyntaxError, StandardError => ex $stderr.puts "#{@cmd_name}: Failed to read `#{traits_fpath}'." $stderr.puts $stderr.puts "Detailed message is below;" $stderr.puts ex.message, ex.backtrace $stderr.puts exit 2 end end def load_message_catalog(traits) begin MessageCatalog.new(traits) rescue Psych::SyntaxError, StandardError => ex $stderr.puts "#{@cmd_name}: Failed to read the message catalog for " + "`#{traits.of_message.language}'." $stderr.puts $stderr.puts "Detailed message is below;" $stderr.puts ex.message, ex.backtrace $stderr.puts exit 2 end end def sma_output_dpath(src_fpath, strip_num, output_dpath) src_fpath.strip(strip_num).expand_path(output_dpath).dirname end def print_elapsed_time(io) tms = Process.times io.print " %.3fs user, %.3fs system, " % [tms.utime, tms.stime] total = tms.utime + tms.stime h = total / 3600 m = total / 60 % 60 s = (total % 60).floor io.puts "%02d:%02d:%02d.%02d total" % [h, m, s, ((total % 60) - s) * 100] end end end adlint-3.2.0/lib/adlint/token.rb0000644000004100000410000000672212224440633016514 0ustar www-datawww-data# Lexical token classes. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/location" module AdLint #:nodoc: # == DESCRIPTION # Token. class Token include LocationHolder include Comparable # === DESCRIPTION # Constructs a token. # # === PARAMETER # _type_:: Symbol | String -- Type of the token. # _val_:: String -- String value of the token. # _loc_:: Location -- Location of the token. # _type_hint_:: Symbol | String -- Hint of the token type. def initialize(type, val, loc, type_hint = nil) @type, @value, @location = type, val, loc @type_hint = type_hint end # === VALUE # Symbol | String -- Type of this token. attr_reader :type # === VALUE # String -- Value of this token. attr_reader :value # === VALUE # Location -- Location of this token. attr_reader :location # === VALUE # Symbol | String -- Hint of the type of this token. attr_reader :type_hint def replaced? false end def need_no_further_replacement? false end # === DESCRIPTION # Compares tokens. # # === PARAMETER # _rhs_:: Token -- Right-hand-side token. # # === RETURN VALUE # Integer -- Comparision result. def <=>(rhs) case rhs when Symbol, String @type <=> rhs when Token if (type_diff = @type <=> rhs.type) == 0 if (val_diff = @value <=> rhs.value) == 0 @location <=> rhs.location else val_diff end else type_diff end else raise TypeError end end def eql?(rhs_tok) @type == rhs_tok.type && @value == rhs_tok.value && @location == rhs_tok.location end def hash [@type, @value, @location].hash end end class ReplacedToken < Token def initialize(type, val, loc, type_hint = nil, no_further_repl = true) super(type, val, loc, type_hint) @need_no_further_replacement = no_further_repl end def need_no_further_replacement? @need_no_further_replacement end def replaced? true end def eql?(rhs_tok) equal?(rhs_tok) end def hash object_id end end # == DESCRIPTION # Array of tokens. class TokenArray < Array; end end adlint-3.2.0/lib/adlint/annot.rb0000644000004100000410000000730312224440633016507 0ustar www-datawww-data# Source code annotations. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/supp" module AdLint #:nodoc: class Annotation def self.parse(str, loc) FileWiseMessageSuppressionSpecifier.parse(str, loc) || LineWiseMessageSuppressionSpecifier.parse(str, loc) end def initialize(loc) @location = loc end def message_suppression_specifier? subclass_responsibility end end class MessageSuppressionSpecifier < Annotation def initialize(loc, msg_id_ary) super(loc) @message_ids = msg_id_ary.to_set end def message_suppression_specifier? true end def file_wise? subclass_responsibility end def line_wise? subclass_responsibility end def create_suppressor subclass_responsibility end private def parse_message_specifiers(trailer) msg_specs = [] scanner = StringScanner.new(trailer) loop do case when scanned = scanner.scan(/:[a-z][a-z_0-9]*:\[.*?\]/m) *, pkg_name, msg_names = scanned.split(":") msg_specs.concat(parse_message_name_list(msg_names).map { |msg_name| MessageId.new(pkg_name, msg_name) }) when scanned = scanner.scan(/:\[.*?\]/m) *, msg_names = scanned.split(":") msg_specs.concat(parse_message_name_list(msg_names).map { |msg_name| MessageId.new(nil, msg_name) }) else break end end msg_specs end def parse_message_name_list(msg_names) msg_names.slice(/\[(.*)\]/m, 1).split(",").map do |msg_name_str| msg_name_str.strip.to_sym end end end class FileWiseMessageSuppressionSpecifier < MessageSuppressionSpecifier def self.parse(str, loc) str =~ /ADLINT:SF(:.*)\z/m ? new(loc, $1) : nil end def initialize(loc, trailer) super(loc, parse_message_specifiers(trailer)) end def file_wise? true end def line_wise? false end def create_suppressor FileWiseMessageSuppressor.new(@message_ids, @location) end end class LineWiseMessageSuppressionSpecifier < MessageSuppressionSpecifier def self.parse(str, loc) str =~ /ADLINT:SL(:.*)\z/m ? new(loc, $1) : nil end def initialize(loc, trailer) super(loc, parse_message_specifiers(trailer)) end def file_wise? false end def line_wise? true end def create_suppressor LineWiseMessageSuppressor.new(@message_ids, @location) end end end adlint-3.2.0/lib/adlint/phase.rb0000644000004100000410000000741612224440633016475 0ustar www-datawww-data# Base of analysis phase classes. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/error" require "adlint/report" require "adlint/monitor" module AdLint #:nodoc: # == DESCRIPTION # Base of analysis phase classes. class Phase include MonitorUtil # === DESCRIPTION # Constructs an analysis pass. # # === PARAMETER # _phase_ctxt_:: PhaseContext -- Analysis context. def initialize(phase_ctxt, pkg_name, phase_name) @phase_ctxt = phase_ctxt @pkg_name = pkg_name @phase_name = phase_name end # === DESCRIPTION # Executes the analysis. def execute monitored_region(@phase_name) do |mon| do_execute(@phase_ctxt, mon) register_examinations(@phase_ctxt) end rescue Error => ex report.write_message(FatalErrorMessage.new(message_catalog, ex)) raise end private # === DESCRIPTION # Executes the analysis. # # Subclasses must implement this method. def do_execute(phase_ctxt, monitor) subclass_responsibility end def register_examinations(phase_ctxt) key = context_key_of("examinations") phase_ctxt[key] ||= [] traits.exam_packages.each do |exam_pkg| exam_pkg.catalog.examination_classes.each do |exam_class| next unless exam_class.registrant_phase_class == self.class if exam_class.required?(phase_ctxt) phase_ctxt[key].push(exam_class.new(phase_ctxt)) end end end end def examinations @phase_ctxt[context_key_of("examinations")] || [] end def context_key_of(str) "#{@pkg_name}_#{str}".to_sym end extend Forwardable def_delegator :@phase_ctxt, :traits private :traits def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def_delegator :@phase_ctxt, :monitor private :monitor def_delegator :@phase_ctxt, :logger private :logger end class PhaseContext < Hash def initialize(analyzer, report, monitor) super() @analyzer = analyzer @report = report @monitor = monitor end attr_reader :report attr_reader :monitor extend Forwardable def_delegator :@analyzer, :traits def_delegator :@analyzer, :message_catalog def_delegator :@analyzer, :logger def_delegator :@report, :msg_fpath def_delegator :@report, :met_fpath def_delegator :@report, :log_fpath def flush_deferred_report! if supps = self[:suppressors] @report.flush_deferred_messages(supps) end end end end adlint-3.2.0/lib/adlint/exam.rb0000644000004100000410000001505312224440633016323 0ustar www-datawww-data# Base of all source code examinations. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/message" require "adlint/report" require "adlint/util" module AdLint #:nodoc: # == DESCRIPTION # Base of all kinds of source code examinations. class Examination include ReportUtil include LogUtil class << self attr_reader :registrant_phase_class def required?(phase_ctxt) subclass_responsibility end def catalog eval "::#{self.name.sub(/(.*::).*\z/, "\\1")}Catalog" end memoize :catalog private def inherited(subclass) subclass.instance_variable_set(:@registrant_phase_class, nil) end def def_registrant_phase(phase_class) @registrant_phase_class = phase_class end end def initialize(phase_ctxt) @phase_ctxt = phase_ctxt end def execute do_prepare(@phase_ctxt) do_execute(@phase_ctxt) end private def do_prepare(phase_ctxt) subclass_responsibility end def do_execute(phase_ctxt) subclass_responsibility end def targeted_method(name, loc_holder_idx = 0) lambda do |*args| if args[loc_holder_idx].analysis_target?(traits) self.__send__(name, *args) end end end alias :T :targeted_method alias :M :method extend Forwardable def_delegator :@phase_ctxt, :traits private :traits def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def_delegator :@phase_ctxt, :logger private :logger def suppressors @phase_ctxt[:suppressors] end end class ExaminationCatalog def initialize(loader_fpath) @loader_fpath = loader_fpath yield(self) if block_given? end attr_accessor :name attr_accessor :major_version attr_accessor :minor_version attr_accessor :patch_version attr_accessor :release_date attr_accessor :examination_classes def short_version "#{major_version}.#{minor_version}.#{patch_version}" end def message_definition_dpath Pathname.new("etc/mesg.d/#{name}").expand_path(package_prefix) end private def package_prefix catalog_dpath = Pathname.new(@loader_fpath).realpath.dirname Pathname.new("../../..").expand_path(catalog_dpath) end end class ExaminationPackage def initialize(name) @name = name end attr_reader :name def load require "adlint/exam/#{@name}.rb" true rescue LoadError false end def catalog eval "Exam::#{module_name}::Catalog" end private def module_name @name.sub(/\A./) { |str| str.upcase }.gsub(/_(.)/) { $1.upcase } end end # == DESCRIPTION # Base of code checking classes. class CodeCheck < Examination class << self def message_name self.name.sub(/.*::(W\d{4}).*\z/, "\\1").to_sym end memoize :message_name def message_id MessageId.new(catalog.name, message_name) end def required?(phase_ctxt) excluded?(phase_ctxt) ? included?(phase_ctxt) : true end def must_be_unique? @must_be_unique end def must_be_deferred? @must_be_deferred end private def inherited(subclass) subclass.instance_variable_set(:@must_be_unique, false) subclass.instance_variable_set(:@must_be_deferred, false) end def mark_as_unique @must_be_unique = true end def mark_as_deferred @must_be_deferred = true end def excluded?(phase_ctxt) excluded_by_category?(phase_ctxt) || excluded_by_severity?(phase_ctxt) || excluded_by_id?(phase_ctxt) end def included?(phase_ctxt) included_by_id?(phase_ctxt) end def excluded_by_category?(phase_ctxt) exclusion = phase_ctxt.traits.of_message.exclusion if exclusion.categories.empty? false else if tmpl = phase_ctxt.message_catalog.lookup(message_id) exclusion.categories.any? { |cat| tmpl.categories.include?(cat) } else false end end end def excluded_by_severity?(phase_ctxt) exclusion = phase_ctxt.traits.of_message.exclusion if exclusion.severities false else if tmpl = phase_ctxt.message_catalog.lookup(message_id) tmpl.severities.any? { |sev| sev =~ exclusion.severities } else false end end end def excluded_by_id?(phase_ctxt) exclusion = phase_ctxt.traits.of_message.exclusion exclusion.messages.include?(message_id) end def included_by_id?(phase_ctxt) inclusion = phase_ctxt.traits.of_message.inclusion inclusion.messages.include?(message_id) end end def message_name self.class.message_name end end class PassiveCodeCheck < CodeCheck private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) end end # == DESCRIPTION # Base of metric measurement classes. class MetricMeasurement < Examination def self.required?(phase_ctxt) true end end # == DESCRIPTION # Base of code structure extraction classes. class CodeExtraction < Examination def self.required?(phase_ctxt) true end end end adlint-3.2.0/lib/adlint/location.rb0000644000004100000410000001042112224440633017173 0ustar www-datawww-data# Location identifier of tokens. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: # == DESCRIPTION # Location identifier of tokens. class Location include Comparable # === Constructs a location identifier. # # Param:: _fpath_ (Pathname) Path name of the file contains the token. # Param:: _line_no_ (Integer) Line-no where the token appears. # Param:: _column_no_ (Integer) Column-no where the token appears. def initialize(fpath = nil, line_no = nil, column_no = nil, appearance_column_no = column_no) @fpath, @line_no, @column_no = fpath, line_no, column_no @appearance_column_no = appearance_column_no end # === VALUE # Pathname -- Path name of the file contains this token. attr_reader :fpath # === VALUE # Integer -- Line-no where this token appears. attr_reader :line_no # === VALUE # Integer -- Column-no where this token appears. attr_reader :column_no attr_reader :appearance_column_no def in_analysis_target?(traits) if @fpath under_inclusion_paths?(@fpath, traits) && !under_exclusion_paths?(@fpath, traits) and !@fpath.identical?(traits.of_project.initial_header) && !@fpath.identical?(traits.of_compiler.initial_header) else false end end # NOTE: Value of #in_analysis_target? depends on the `traits' parameter. # But the `traits' parameter always points the same object in an # AdLint instance. # So, it is safe to treat this method as nullary method for improving # the performance. memoize :in_analysis_target?, force_nullary: true def <=>(rhs) self.to_a <=> rhs.to_a end def eql?(rhs) self == rhs end def hash to_a.hash end # === DESCRIPTION # Converts this location identifier to an array representation. # # === RETURN VALUE # Array< Object > -- Array representation of this location identifier. def to_a [@fpath, @line_no, @column_no] end # === DESCRIPTION # Converts this location to a human readable string representation. # # === RETURN VALUE # String -- String representation of this location identifier. def to_s "#{@fpath}:#{@line_no}:#{@column_no}" end # === DESCRIPTION # Converts this location to debugging dump representation. # # === RETURN VALUE # String -- String representation of this location identifier. def inspect "#{@fpath ? @fpath : 'nil'}:" + "#{@line_no ? @line_no : 'nil'}:#{@column_no ? @column_no : 'nil'}" end private def under_inclusion_paths?(fpath, traits) traits.of_project.target_files.inclusion_paths.any? do |dpath| fpath.under?(dpath) end end def under_exclusion_paths?(fpath, traits) traits.of_project.target_files.exclusion_paths.any? do |dpath| fpath.under?(dpath) end end end module LocationHolder # NOTE: Host class must respond to #location. def analysis_target?(traits) location.in_analysis_target?(traits) end end end adlint-3.2.0/lib/adlint/message.rb0000644000004100000410000002655512224440633017026 0ustar www-datawww-data# Base classes of the warning and the error messages. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/token" require "adlint/error" module AdLint #:nodoc: class MessageId def initialize(pkg_name, msg_name) @package_name = pkg_name @message_name = msg_name end attr_reader :package_name attr_reader :message_name def qualified? !@package_name.nil? end def ==(rhs) self.eql?(rhs) end def eql?(rhs) if self.qualified? && rhs.qualified? @package_name == rhs.package_name && @message_name == rhs.message_name else @message_name == rhs.message_name end end def hash @message_name.hash end end # == DESCRIPTION # Base class of all messages. class Message # === DESCRIPTION # Constructs a message. # # === PARAMETER # _msg_tmpl_:: MessageTemplate -- Template for the creating message. # _loc_:: Location -- Location where the message detected. # _parts_:: Array< Object > -- Message formatting parts. def initialize(msg_tmpl, loc, *parts) @template = msg_tmpl @location = loc @parts = parts @complements = [] end attr_reader :location def id @template.message_id end def must_be_unique? subclass_responsibility end def must_be_deferred? subclass_responsibility end def complement_with(msg) @complements.push(msg) end def eql?(rhs) id == rhs.id && @location == rhs.location && @parts == rhs.parts end def hash [id, @location, @parts].hash end def print_as_str(io) io.puts(to_s) @complements.each { |comp| comp.print_as_str(io) } end def print_as_csv(io) io.puts(to_csv) @complements.each { |comp| comp.print_as_csv(io) } end # === DESCRIPTION # Converts this message into a string for human readable output. # # === RETURN VALUE # String -- String representation of this message. def to_s begin "#{@location.to_s.to_default_external}:" + "#{type_str.to_default_external}:" + "#{id.package_name}:#{id.message_name.to_s}:" + "#{@template.typical_class.category}:" + "#{@template.typical_class.severity}:" + "#{@template.format(@parts)}" rescue raise InvalidMessageFormatError.new(id, @location) end end protected attr_reader :parts private # === DESCRIPTION # Reads the type of this message. # # Subclasses must implement this method. # # === RETURN VALUE # Symbol -- Message type symbol. def type subclass_responsibility end # === DESCRIPTION # Reads the type string of this message. # # Subclasses must implement this method. # # === RETURN VALUE # String -- Message type string. def type_str subclass_responsibility end # === DESCRIPTION # Converts this message into an array of message elements. # # === RETURN VALUE # Array< Object > -- Array of message elements. def to_a begin [ type.to_s, *@location.to_a, id.package_name, id.message_name, @template.typical_class.category, @template.typical_class.severity, @template.format(@parts) ] rescue raise InvalidMessageFormatError.new(id, @location) end end def to_csv to_a.map { |obj| obj && obj.to_s.to_default_external }.to_csv end end # == DESCRIPTION # Syntactical error message. class ErrorMessage < Message def initialize(msg_catalog, msg_name, loc, *parts) super(msg_catalog.lookup(MessageId.new("core", msg_name)), loc, *parts) end def must_be_unique? false end def must_be_deferred? false end private # === DESCRIPTION # Reads the type of this message. # # === RETURN VALUE # Symbol -- Message type symbol. def type :E end # === DESCRIPTION # Reads the type string of this message. # # === RETURN VALUE # String -- Message type string. def type_str "error" end end # == DESCRIPTION # AdLint specific internal fatal error message. class FatalErrorMessage < Message # === DESCRIPTION # Constructs a AdLint specific internal fatal error message. # # === PARAMETER # _msg_catalog_:: MessageCatalog -- Message catalog. # _cause_ex_:: Exception -- Cause exception. def initialize(msg_catalog, cause_ex) msg_id = MessageId.new("core", cause_ex.message_name) super(msg_catalog.lookup(msg_id), cause_ex.location || Location.new, *cause_ex.parts) @cause_ex = cause_ex end def must_be_unique? false end def must_be_deferred? false end private # === DESCRIPTION # Reads the type of this message. # # === RETURN VALUE # Symbol -- Message type symbol. def type :X end # === DESCRIPTION # Reads the type string of this message. # # === RETURN VALUE # String -- Message type string. def type_str "fatal error" end end # == DESCRIPTION # Semantical warning message. class WarningMessage < Message def initialize(msg_catalog, check_class, loc, *parts) super(msg_catalog.lookup(check_class.message_id), loc, *parts) @check_class = check_class end def must_be_unique? @check_class.must_be_unique? end def must_be_deferred? @check_class.must_be_deferred? end private # === DESCRIPTION # Reads the type of this message. # # === RETURN VALUE # Symbol -- Message type symbol. def type :W end # === DESCRIPTION # Reads the type string of this message. # # === RETURN VALUE # String -- Message type string. def type_str "warning" end end # == DESCRIPTION # Message complements other messages. class ContextMessage < Message def initialize(msg_catalog, msg_name, check_class, loc, *parts) msg_id = MessageId.new(check_class.catalog.name, msg_name) super(msg_catalog.lookup(msg_id), loc, *parts) end def must_be_unique? false end def must_be_deferred? false end private # === DESCRIPTION # Reads the type of this message. # # === RETURN VALUE # Symbol -- Message type symbol. def type :C end # === DESCRIPTION # Reads the type string of this message. # # === RETURN VALUE # String -- Message type string. def type_str "context" end end class MessageClass def initialize(class_str) @category, @severity = class_str.split(":").map { |str| str.to_default_external } end attr_reader :category attr_reader :severity end # == DESCRIPTION # Message catalog entry. class MessageTemplate def initialize(msg_id, classes, fmt) @message_id = msg_id @classes = classes.map { |class_str| MessageClass.new(class_str) } @format = fmt @typical_class = @classes.sort { |msg_class| msg_class.severity }.first end attr_reader :message_id attr_reader :classes attr_reader :typical_class def categories @classes.map { |c| c.category } end def severities @classes.map { |c| c.severity } end def format(parts) @format.to_s.to_default_external % parts.map { |obj| obj.to_s.to_default_external } end end class MessageDefinitionFile MESSAGES_FNAME = Pathname.new("messages.yml") private_constant :MESSAGES_FNAME def initialize(pkg_name, lang_name) @package_name = pkg_name @language_name = lang_name end def read_into(msg_catalog) File.open(fpath, "r:utf-8") do |io| case ary_or_stream = YAML.load_stream(io) when Array # NOTE: YAML.load_stream returns Array in Ruby 1.9.3-preview1. doc = ary_or_stream.first when YAML::Stream doc = ary_or_stream.documents.first end validate_version(doc["version"]) if msg_def = doc["message_definition"] msg_catalog.merge!(@package_name, msg_def) else raise "invalid form of the message definition file." end end self end private def base_dpath subclass_responsibility end def fpath base_dpath.join(Pathname.new(@language_name)).join(MESSAGES_FNAME) end def validate_version(ver) # NOTE: Version field of the message catalog does not mean the schema # version of the catalog file, but a revision number of the catalog # contents. # When AdLint is installed normally, the schema version of the # catalog is always valid. So, schema version validation is # unnecessary. end end class CoreMessageDefinitionFile < MessageDefinitionFile def initialize(lang_name) super("core", lang_name) end private def base_dpath Pathname.new("mesg.d/core").expand_path(Config[:etcdir]) end end class ExamMessageDefinitionFile < MessageDefinitionFile def initialize(exam_pkg, lang_name) super(exam_pkg.name, lang_name) @exam_pkg = exam_pkg end private def base_dpath @exam_pkg.catalog.message_definition_dpath end end # == DESCRIPTION # Message catalog. class MessageCatalog def initialize(traits) @traits = traits @hash = Hash.new message_definition_files.each { |def_file| def_file.read_into(self) } end def lookup(msg_id) @hash[msg_id] or raise InvalidMessageIdError.new(msg_id) end def merge!(pkg_name, msg_def) msg_def.each do |msg_name_str, cont| msg_id = MessageId.new(pkg_name, msg_name_str.to_sym) if changed = @traits.of_message.change_list[msg_id] cont = changed end @hash[msg_id] = MessageTemplate.new(msg_id, cont["classes"], cont["format"]) end end private def message_definition_files lang_name = @traits.of_message.language [CoreMessageDefinitionFile.new(lang_name)] + @traits.exam_packages.map { |pkg| ExamMessageDefinitionFile.new(pkg, lang_name) } end end end adlint-3.2.0/lib/adlint/report.rb0000644000004100000410000004155112224440633016706 0ustar www-datawww-data# Analysis report and its manipulation utility. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/message" require "adlint/code" require "adlint/metric" require "adlint/util" module AdLint #:nodoc: class Report def initialize(msg_fpath, met_fpath, log_fpath, verbose, &block) @msg_fpath = msg_fpath @msg_file = open_msg_file(msg_fpath) @met_fpath = met_fpath @met_file = open_met_file(met_fpath) @log_fpath = log_fpath @verbose = verbose @unique_msgs = Set.new @deferred_msgs = [] yield(self) ensure @msg_file.close if @msg_file @met_file.close if @met_file end attr_reader :msg_fpath attr_reader :met_fpath attr_reader :log_fpath # === DESCRIPTION # Writes a message on this report. # # === PARAMETER # _message_:: Message -- Message to be written. # # === RETURN VALUE # Report -- Self. def write_message(msg, suppressors = nil) if suppressors.nil? || !suppressors.suppress?(msg) unless msg.must_be_unique? && !@unique_msgs.add?(msg) if msg.must_be_deferred? @deferred_msgs.push(msg) else rawrite_message(msg) end end end self end def flush_deferred_messages(suppressors) @deferred_msgs.each do |msg| rawrite_message(msg) unless suppressors.suppress?(msg) end @deferred_msgs.clear self end # === DESCRIPTION # Writes a code structure information on this report. # # === PARAMETER # _code_struct_:: CodeStructure -- Code structure info to be written. # # === RETURN VALUE # Report -- Self. def write_code_struct(code_struct) code_struct.print_as_csv(@met_file) self end # === DESCRIPTION # Writes a code quality metric on this report. # # === PARAMETER # _code_metric_:: CodeMetric -- Code metric information to be written. # # === RETURN VALUE # Report -- Self. def write_code_metric(code_metric) code_metric.print_as_csv(@met_file) self end private def rawrite_message(msg) msg.print_as_csv(@msg_file) msg.print_as_str($stderr) unless @verbose end def open_msg_file(fpath) File.open(fpath, "w").tap do |io| io.set_encoding(Encoding.default_external) io.puts(["V", SHORT_VERSION, Time.now.to_s, Dir.getwd].to_csv) end end def open_met_file(fpath) File.open(fpath, "w").tap do |io| io.set_encoding(Encoding.default_external) io.puts(["VER", SHORT_VERSION, Time.now.to_s, Dir.getwd].to_csv) end end end module ReportUtil # NOTE: Host class must respond to #report. # NOTE: Host class must respond to #message_catalog. # NOTE: Host class which needs #write_warning_message must respond to # #suppressors. # === DESCRIPTION # Writes an error message on the report. # # Abbreviation below is available. # write_error_message(msg_name, loc, ...) => E(msg_name, loc, ...) # # === PARAMETER # _msg_name_:: Symbol -- Message name. # _loc_:: Location -- Location where the message points to. # _parts_:: Array< Object > -- Message formatting parts. # # === RETURN VALUE # None. def write_error_message(msg_name, loc, *parts) report.write_message( ErrorMessage.new(message_catalog, msg_name, loc, *parts)) end alias :E :write_error_message # === DESCRIPTION # Writes a warning message on the report. # # Abbreviation below is available. # write_warning_message(loc, ...) => W(loc, ...) # # === PARAMETER # _loc_:: Location -- Location where the message points to. # # === RETURN VALUE # None. def write_warning_message(*args) check_class = self.class check_class = check_class.outer_module until check_class < CodeCheck head_msg = nil args.chunk { |arg| arg.kind_of?(Message) }.each do |*, chunk| case chunk.first when Message if head_msg chunk.each { |ctxt_msg| head_msg.complement_with(ctxt_msg) } end else head_msg = WarningMessage.new(message_catalog, check_class, *chunk) end end report.write_message(head_msg, suppressors) if head_msg end alias :W :write_warning_message # === DESCRIPTION # Creates a context message. # # Abbreviation below is available. # create_context_message(msg_name, loc, ...) => C(msg_name, loc, ...) # # === PARAMETER # _msg_name_:: Symbol -- Message name. # _loc_:: Location -- Location where the message points to. # _parts_:: Array< Object > -- Message formatting parts. # # === RETURN VALUE # ContextMessage -- New context message. def create_context_message(msg_name, loc, *parts) ContextMessage.new(message_catalog, msg_name, self.class, loc, *parts) end alias :C :create_context_message # === DESCRIPTION # Writes a type declaration information on the report. # # Abbreviation below is available. # write_typedcl(...) => TYPEDCL(...) # # === PARAMETER # _loc_:: Location -- Location where the declaration appears. # _dcl_type_:: String -- Type declaration type. # _type_name_:: String -- Type name. # _type_rep_:: String -- Type representation string. # # === RETURN VALUE # None. def write_typedcl(loc, dcl_type, type_name, type_rep) write_code_struct(TypeDcl.new(loc, dcl_type, type_name, type_rep)) end alias :TYPEDCL :write_typedcl # === DESCRIPTION # Writes a global variable decaration information on the report. # # Abbreviation below is available. # write_gvardcl(...) => GVARDCL(...) # # === PARAMETER # _loc_:: Location -- Location where the declaration appears. # _var_name_:: String -- Global variable name. # _type_rep_:: String -- Type representation string. # # === RETURN VALUE # None. def write_gvardcl(loc, var_name, type_rep) write_code_struct(GVarDcl.new(loc, var_name, type_rep)) end alias :GVARDCL :write_gvardcl # === DESCRIPTION # Writes a function declaration information on the report. # # Abbreviation below is available. # write_fundcl(...) => FUNDCL(...) # # === PARAMETER # _loc_:: Location -- Location where the declaration appears. # _linkage_:: String -- Function linkage type string. # _scope_type_:: String -- Declaration scope type string. # _dcl_type_:: String -- Declaration type string. # _fun_id_:: FunctionId -- Identifier of the function. # # === RETURN VALUE # None. def write_fundcl(loc, linkage, scope_type, dcl_type, fun_id) write_code_struct(FunDcl.new(loc, linkage, scope_type, dcl_type, fun_id)) end alias :FUNDCL :write_fundcl # === DESCRIPTION # Writes a variable definition information on the report. # # Abbreviation below is available. # write_vardef(...) => VARDEF(...) # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _linkage_type_:: String -- Variable linkage type string. # _scope_type_:: String -- Variable scope type string. # _sc_type_:: String -- Variable storage class type. # _var_name_:: String -- Variable name. # _type_rep_:: String -- Variable type representation string. # # === RETURN VALUE # None. def write_vardef(loc, linkage, scope_type, sc_type, var_name, type_rep) write_code_struct(VarDef.new(loc, linkage, scope_type, sc_type, var_name, type_rep)) end alias :VARDEF :write_vardef # === DESCRIPTION # Writes a function definition information on the report. # # Abbreviation below is available. # write_fundef(...) => FUNDEF(...) # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _linkage_:: String -- Function linkage type string. # _scope_type_:: String -- Definition scope type string. # _fun_id_:: FunctionId -- Identifier of the function. # _lines_:: Integer -- Physical lines. # # === RETURN VALUE # None. def write_fundef(loc, linkage, scope_type, fun_id, lines) write_code_struct(FunDef.new(loc, linkage, scope_type, fun_id, lines)) end alias :FUNDEF :write_fundef # === DESCRIPTION # Writes a macro definition information on the report. # # Abbreviation below is available. # write_macrodef(...) => MACRODEF(...) # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _macro_name_:: String -- Macro name. # _macro_type_:: String -- Macro type string. # # === RETURN VALUE # None. def write_macrodef(loc, macro_name, macro_type) write_code_struct(MacroDef.new(loc, macro_name, macro_type)) end alias :MACRODEF :write_macrodef # === DESCRIPTION # Writes a label definition information on the report. # # Abbreviation below is available. # write_labeldef(...) => LABELDEF(...) # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _label_name_:: String -- Label name. # # === RETURN VALUE # None. def write_labeldef(loc, label_name) write_code_struct(LabelDef.new(loc, label_name)) end alias :LABELDEF :write_labeldef # === DESCRIPTION # Writes an initialization information on the report. # # Abbreviation below is available. # write_initialization(...) => INITIALIZATION(...) # # === PARAMETER # _loc_:: Location -- Location where the variable appears. # _var_name_:: String -- Initialized variable name. # _init_rep_:: String -- String representation of the initializer. # # === RETURN VALUE # None. def write_initialization(loc, var_name, init_rep) write_code_struct(Initialization.new(loc, var_name, init_rep)) end alias :INITIALIZATION :write_initialization # === DESCRIPTION # Writes an assignment information on the report. # # Abbreviation below is available. # write_assignment(...) => ASSIGNMENT(...) # # === PARAMETER # _loc_:: Location -- Location where the variable appears. # _var_name_:: String -- Assigned variable name. # _assign_rep_:: String -- String representation of the assignment. # # === RETURN VALUE # None. def write_assignment(loc, var_name, assign_rep) write_code_struct(Assignment.new(loc, var_name, assign_rep)) end alias :ASSIGNMENT :write_assignment # === DESCRIPTION # Writes a header include information on the report. # # Abbreviation below is available. # write_include(...) => INCLUDE(...) # # === PARAMETER # _loc_:: Location -- Location where the directive appears. # _fpath_:: Pathname -- Path name of the included file. # # === RETURN VALUE # None. def write_include(loc, fpath) write_code_struct(Include.new(loc, fpath)) end alias :INCLUDE :write_include # === DESCRIPTION # Writes a function call information on the report. # # Abbreviation below is available. # write_funcall(...) => FUNCALL(...) # # === PARAMETER # _loc_:: Location -- Location where the function call appears. # _caller_fun_:: FunctionId -- Calling function identifier. # _callee_fun_:: FunctionId -- Called function identifier. def write_funcall(loc, caller_fun, callee_fun) write_code_struct(Funcall.new(loc, caller_fun, callee_fun)) end alias :FUNCALL :write_funcall # === DESCRIPTION # Writes a variable cross reference information on the report. # # Abbreviation below is available. # write_xref_variable(...) => XREF_VAR(...) # # === PARAMETER # _loc_:: Location -- Location where the cross-ref appears. # _referrer_:: FunctionId -- Accessing function identifier. # _ref_type_:: String -- Access type string. # _var_name_:: String -- Accessed variable name. # # === RETURN VALUE # None. def write_xref_variable(loc, referrer, ref_type, var_name) write_code_struct(XRefVar.new(loc, referrer, ref_type, var_name)) end alias :XREF_VAR :write_xref_variable # === DESCRIPTION # Writes a function cross reference information on the report. # # Abbreviation below is available. # write_xref_function(...) => XREF_FUNC(...) # # === PARAMETER # _loc_:: Location -- Location where the cross-ref appears. # _referrer_:: FunctionId -- Accessing function identifier. # _ref_type_:: String -- Access type string. # _fun_:: FunctionId -- Accessed function identifier. # # === RETURN VALUE # None. def write_xref_function(loc, referrer, ref_type, fun) write_code_struct(XRefFun.new(loc, referrer, ref_type, fun)) end alias :XREF_FUNC :write_xref_function def write_literal(loc, lit_type, prefix, suffix, value) write_code_struct(Literal.new(loc, lit_type, prefix, suffix, value)) end alias :LIT :write_literal def write_pp_directive(loc, pp_dire, pp_tokens) write_code_struct(PPDirective.new(loc, pp_dire, pp_tokens)) end alias :PP_DIRECTIVE :write_pp_directive def write_FL_STMT(fpath, stmt_cnt) write_code_metric(FL_STMT_Metric.new(fpath, stmt_cnt)) end alias :FL_STMT :write_FL_STMT def write_FL_FUNC(fpath, fun_cnt) write_code_metric(FL_FUNC_Metric.new(fpath, fun_cnt)) end alias :FL_FUNC :write_FL_FUNC def write_FN_STMT(fun_id, loc, stmt_cnt) write_code_metric(FN_STMT_Metric.new(fun_id, loc, stmt_cnt)) end alias :FN_STMT :write_FN_STMT def write_FN_UNRC(fun_id, loc, unreached_stmt_cnt) write_code_metric(FN_UNRC_Metric.new(fun_id, loc, unreached_stmt_cnt)) end alias :FN_UNRC :write_FN_UNRC def write_FN_LINE(fun_id, loc, fun_lines) write_code_metric(FN_LINE_Metric.new(fun_id, loc, fun_lines)) end alias :FN_LINE :write_FN_LINE def write_FN_PARA(fun_id, loc, param_cnt) write_code_metric(FN_PARA_Metric.new(fun_id, loc, param_cnt)) end alias :FN_PARA :write_FN_PARA def write_FN_UNUV(fun_id, loc, useless_var_cnt) write_code_metric(FN_UNUV_Metric.new(fun_id, loc, useless_var_cnt)) end alias :FN_UNUV :write_FN_UNUV def write_FN_CSUB(fun_id, loc, funcall_cnt) write_code_metric(FN_CSUB_Metric.new(fun_id, loc, funcall_cnt)) end alias :FN_CSUB :write_FN_CSUB def write_FN_GOTO(fun_id, loc, goto_cnt) write_code_metric(FN_GOTO_Metric.new(fun_id, loc, goto_cnt)) end alias :FN_GOTO :write_FN_GOTO def write_FN_RETN(fun_id, loc, ret_cnt) write_code_metric(FN_RETN_Metric.new(fun_id, loc, ret_cnt)) end alias :FN_RETN :write_FN_RETN def write_FN_UELS(fun_id, loc, if_stmt_cnt) write_code_metric(FN_UELS_Metric.new(fun_id, loc, if_stmt_cnt)) end alias :FN_UELS :write_FN_UELS def write_FN_NEST(fun_id, loc, max_nest) write_code_metric(FN_NEST_Metric.new(fun_id, loc, max_nest)) end alias :FN_NEST :write_FN_NEST def write_FN_PATH(fun_id, loc, path_cnt) write_code_metric(FN_PATH_Metric.new(fun_id, loc, path_cnt)) end alias :FN_PATH :write_FN_PATH def write_FN_CYCM(fun_id, loc, cycl_compl) write_code_metric(FN_CYCM_Metric.new(fun_id, loc, cycl_compl)) end alias :FN_CYCM :write_FN_CYCM def write_FN_CALL(fun_sig, loc, caller_cnt) write_code_metric(FN_CALL_Metric.new(fun_sig, loc, caller_cnt)) end alias :FN_CALL :write_FN_CALL private def write_code_struct(code_struct) report.write_code_struct(code_struct) nil end def write_code_metric(code_metric) report.write_code_metric(code_metric) nil end end end adlint-3.2.0/lib/adlint/monitor.rb0000644000004100000410000000702512224440633017060 0ustar www-datawww-data# Progress monitoring mechanism. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/token" require "adlint/error" require "adlint/report" module AdLint #:nodoc: module MonitorUtil # NOTE: Host class must respond to #monitor. def monitored_region(title, total = 1) monitor.start(title, total) retval = yield(monitor) monitor.finish retval rescue Error monitor.abort raise rescue => ex monitor.abort raise InternalError.new(ex, monitor.location) end def checkpoint(loc_or_num) case loc_or_num when Location monitor.location = loc_or_num when Numeric monitor.progress = loc_or_num end end end class ProgressMonitor def initialize(fpath, phase_num, verbose) @fpath = fpath @phase_num = phase_num @verbose = verbose @start_time = Time.now @cur_phase = 0 end attr_reader :location attr_reader :progress def start(title, total = 1) @total = total @title = title @location = nil @progress = 0 @cur_phase += 1 draw end def finish @progress = @total if @cur_phase == @phase_num draw_finished else draw end end def abort draw_aborted end def location=(loc) @location = loc if false && @fpath.identical?(@location.fpath) self.progress = @location.line_no end end def progress=(val) @progress = val draw end private def draw if @verbose draw_bar(@fpath, @title) print " %3d%%" % (total_progress * 100).to_i end end def draw_finished if @verbose draw_bar(@fpath, "fin") puts " %.3fs" % (Time.now - @start_time) end end def draw_aborted if @verbose draw_bar(@fpath, @title) puts " %.3fs!" % (Time.now - @start_time) end end def total_progress phase_start = (@cur_phase - 1).to_f / @phase_num phase_progress = @progress.to_f / @total / @phase_num phase_start + phase_progress end def draw_bar(fpath, title) print "\r%30.30s [%3.3s] |" % [fpath.to_s.scan(/.{,30}\z/).first, title] print "=" * (28 * total_progress).to_i print " " * (28 - (28 * total_progress).to_i) print "|" end end end adlint-3.2.0/lib/adlint/traits.rb0000644000004100000410000004735212224440633016706 0ustar www-datawww-data# AdLint analysis project configuration. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/version" require "adlint/util" module AdLint #:nodoc: # == DESCRIPTION # Analysis configuration information. class Traits include Validation def initialize(traits_fpath) File.open(traits_fpath, "r:utf-8") do |io| case ary_or_stream = YAML.load_stream(io) when Array # NOTE: YAML.load_stream returns Array in Ruby 1.9.3-preview1. doc = ary_or_stream.first when YAML::Stream doc = ary_or_stream.documents.first end validate_version(doc["version"]) @exam_packages = (doc["exam_packages"] || []).uniq.map { |name| ExaminationPackage.new(name) }.freeze @project_traits = ProjectTraits.new(doc["project_traits"]).freeze @compiler_traits = CompilerTraits.new(doc["compiler_traits"]).freeze @linker_traits = LinkerTraits.new(doc["linker_traits"]).freeze @message_traits = MessageTraits.new(doc["message_traits"]).freeze end end attr_reader :exam_packages def of_project @project_traits end def of_compiler @compiler_traits end def of_linker @linker_traits end def of_message @message_traits end def entity_name "" end ensure_exam_packages_presence_of :exam_packages ensure_validity_of :project_traits ensure_validity_of :compiler_traits ensure_validity_of :linker_traits ensure_validity_of :message_traits private def validate_version(ver) ver == TRAITS_SCHEMA_VERSION or raise "invalid version of the traits file.\n" + "regenerate or migrate traits file by new `adlintize' command." end end class ProjectTraits include Validation include CompoundPathParser def initialize(doc) @project_name = doc["project_name"] @project_root = Pathname.new(doc["project_root"]) @target_files = TargetFiles.new(doc["target_files"]) @initial_header = doc["initial_header"] @file_search_paths = parse_compound_path_list(doc["file_search_paths"]) @coding_style = CodingStyle.new(doc["coding_style"]) @file_encoding = doc["file_encoding"] end def entity_name "project_traits" end attr_reader :project_name ensure_presence_of :project_name attr_reader :project_root ensure_dir_presence_of :project_root attr_reader :target_files ensure_validity_of :target_files attr_reader :initial_header ensure_file_presence_of :initial_header, :allow_nil => true attr_reader :file_search_paths ensure_dirs_presence_of :file_search_paths attr_reader :coding_style ensure_validity_of :coding_style attr_reader :file_encoding ensure_with :file_encoding, :message => "is not a valid encoding name.", :validator => Encoding.method(:include_name?) class TargetFiles include Validation include CompoundPathParser def initialize(doc) @inclusion_paths = parse_compound_path_list(doc["inclusion_paths"]) @exclusion_paths = parse_compound_path_list(doc["exclusion_paths"]) end def entity_name "project_traits:target_files" end attr_reader :inclusion_paths ensure_dirs_presence_of :inclusion_paths attr_reader :exclusion_paths ensure_dirs_presence_of :exclusion_paths def freeze @inclusion_paths.freeze @exclusion_paths.freeze super end end class CodingStyle include Validation K_AND_R = "K&R" ALLMAN = "Allman" GNU = "GNU" def initialize(doc) @indent_style = doc["indent_style"] @tab_width = doc["tab_width"] @indent_width = doc["indent_width"] end def entity_name "project_traits:coding_style" end attr_reader :indent_style ensure_inclusion_of :indent_style, :values => [K_AND_R, ALLMAN, GNU] attr_reader :tab_width ensure_numericality_of :tab_width, :only_integer => true, :min => 1 attr_reader :indent_width ensure_numericality_of :indent_width, :only_integer => true, :min => 1 def freeze @indent_style.freeze @tab_width.freeze @indent_width.freeze super end end def freeze @project_name.freeze @target_files.freeze @file_search_paths.freeze @coding_style.freeze @file_encoding.freeze super end end # == DESCRIPTION # Traits information of the compiler used in the project. class CompilerTraits include Validation include CompoundPathParser def initialize(doc) @initial_header = doc["initial_header"] @file_search_paths = parse_compound_path_list(doc["file_search_paths"]) @standard_types = StandardTypes.new(doc["standard_types"]) @arithmetic = Arithmetic.new(doc["arithmetic"]) @identifier_max = doc["identifier_max"] @extension_substitutions = doc["extension_substitutions"] || {} @arbitrary_substitutions = doc["arbitrary_substitutions"] || {} end def entity_name "compiler_traits" end # === VALUE # String -- The file path of the initial source. attr_reader :initial_header ensure_file_presence_of :initial_header, :allow_nil => true # === VALUE # Array< String > -- System include paths. attr_reader :file_search_paths ensure_dirs_presence_of :file_search_paths # === VALUE # CompilerTraits::StandardTypes -- The standard type traits information. attr_reader :standard_types ensure_validity_of :standard_types # === VALUE # CompilerTraits::Arithmetic -- The arithmetic traits information. attr_reader :arithmetic ensure_validity_of :arithmetic # === VALUE # Integer -- Max length of all symbols identified by the compiler. attr_reader :identifier_max ensure_numericality_of :identifier_max, :only_integer => true, :min => 1 # === VALUE # Hash -- The compiler-extension code substitution # settings. attr_reader :extension_substitutions # === VALUE # Hash -- The arbitrary code substitution settings. attr_reader :arbitrary_substitutions # == DESCRIPTION # Traits information of standard types. class StandardTypes include Validation def initialize(doc) @char_size = doc["char_size"] @char_alignment = doc["char_alignment"] @short_size = doc["short_size"] @short_alignment = doc["short_alignment"] @int_size = doc["int_size"] @int_alignment = doc["int_alignment"] @long_size = doc["long_size"] @long_alignment = doc["long_alignment"] @long_long_size = doc["long_long_size"] @long_long_alignment = doc["long_long_alignment"] @float_size = doc["float_size"] @float_alignment = doc["float_alignment"] @double_size = doc["double_size"] @double_alignment = doc["double_alignment"] @long_double_size = doc["long_double_size"] @long_double_alignment = doc["long_double_alignment"] @code_ptr_size = doc["code_ptr_size"] @code_ptr_alignment = doc["code_ptr_alignment"] @data_ptr_size = doc["data_ptr_size"] @data_ptr_alignment = doc["data_ptr_alignment"] @char_as_unsigned_char = doc["char_as_unsigned_char"] end def entity_name "compiler_traits:standard_types" end # === VALUE # Integer -- Bit length of the `char' type. attr_reader :char_size ensure_numericality_of :char_size, :only_integer => true, :min => 1, :max => 256 attr_reader :char_alignment ensure_numericality_of :char_alignment, :only_integer => true, :min => 1 # === VALUE # Integer -- Bit length of the `short' type. attr_reader :short_size ensure_numericality_of :short_size, :only_integer => true, :min => 1, :max => 256 attr_reader :short_alignment ensure_numericality_of :short_alignment, :only_integer => true, :min => 1 # === VALUE # Integer -- Bit length of the `int' type. attr_reader :int_size ensure_numericality_of :int_size, :only_integer => true, :min => 1, :max => 256 attr_reader :int_alignment ensure_numericality_of :int_alignment, :only_integer => true, :min => 1 # === VALUE # Integer -- Bit length of the `long' type. attr_reader :long_size ensure_numericality_of :long_size, :only_integer => true, :min => 1, :max => 256 attr_reader :long_alignment ensure_numericality_of :long_alignment, :only_integer => true, :min => 1 # === VALUE # Integer -- Bit length of the `long long' type. attr_reader :long_long_size ensure_numericality_of :long_long_size, :only_integer => true, :min => 1, :max => 256 attr_reader :long_long_alignment ensure_numericality_of :long_long_alignment, :only_integer => true, :min => 1 # === VALUE # Integer -- Bit length of the `float' type. attr_reader :float_size ensure_numericality_of :float_size, :only_integer => true, :min => 1, :max => 256 attr_reader :float_alignment ensure_numericality_of :float_alignment, :only_integer => true, :min => 1 # === VALUE # Integer -- Bit length of the `double' type. attr_reader :double_size ensure_numericality_of :double_size, :only_integer => true, :min => 1, :max => 256 attr_reader :double_alignment ensure_numericality_of :double_alignment, :only_integer => true, :min => 1 # === VALUE # Integer -- Bit length of the `long double' type. attr_reader :long_double_size ensure_numericality_of :long_double_size, :only_integer => true, :min => 1, :max => 256 attr_reader :long_double_alignment ensure_numericality_of :long_double_alignment, :only_integer => true, :min => 1 attr_reader :code_ptr_size ensure_numericality_of :code_ptr_size, :only_integer => true, :min => 1, :max => 256 attr_reader :code_ptr_alignment ensure_numericality_of :code_ptr_alignment, :only_integer => true, :min => 1 attr_reader :data_ptr_size ensure_numericality_of :data_ptr_size, :only_integer => true, :min => 1, :max => 256 attr_reader :data_ptr_alignment ensure_numericality_of :data_ptr_alignment, :only_integer => true, :min => 1 # === VALUE # Boolean -- The flag indicates `char' is `unsigned char'. attr_reader :char_as_unsigned_char ensure_true_or_false_of :char_as_unsigned_char def freeze @char_size.freeze @char_alignment.freeze @short_size.freeze @short_alignment.freeze @int_size.freeze @int_alignment.freeze @long_size.freeze @long_alignment.freeze @long_long_size.freeze @long_long_alignment.freeze @float_size.freeze @float_alignment.freeze @double_size.freeze @double_alignment.freeze @long_double_size.freeze @long_double_alignment.freeze @code_ptr_size.freeze @code_ptr_alignment.freeze @data_ptr_size.freeze @data_ptr_alignment.freeze @char_as_unsigned_char.freeze super end end private_constant :StandardTypes # == DESCRIPTION # Traits information of arithmetic process. class Arithmetic include Validation def initialize(doc) @logical_right_shift = doc["logical_right_shift"] end def entity_name "compiler_traits:arithmetic" end # === VALUE # Boolean -- The flag value indicates the right shift operation is # logical. attr_reader :logical_right_shift ensure_true_or_false_of :logical_right_shift def freeze @logical_right_shift.freeze super end end private_constant :Arithmetic def freeze @file_search_paths.freeze @standard_types.freeze @arithmetic.freeze @identifier_max.freeze @extension_substitutions.freeze @arbitrary_substitutions.freeze super end end # == DESCRIPTION # Traits information of the linker used in the project. class LinkerTraits include Validation def initialize(doc) @identifier_max = doc["identifier_max"] @identifier_ignore_case = doc["identifier_ignore_case"] end def entity_name "linker_traits" end # === VALUE # Integer -- Max length of all external symbols identified by the linker. attr_reader :identifier_max ensure_numericality_of :identifier_max, :only_integer => true, :min => 1 # === VALUE # Boolean -- The flag indicates that external symbols are identified # without case by the linker. attr_reader :identifier_ignore_case ensure_true_or_false_of :identifier_ignore_case def freeze @identifier_max.freeze @identifier_ignore_case.freeze super end end class MessageTraits include Validation include CompoundPathParser def initialize(doc) @language = doc["language"] @individual_suppression = doc["individual_suppression"] @exclusion = Exclusion.new(doc["exclusion"]) @inclusion = Inclusion.new(doc["inclusion"]) @change_list = (doc["change_list"] || []).each_with_object({}) { |(name, cont), hash| hash[MessageId.new(cont["package"], name.to_sym)] = cont } end def entity_name "message_traits" end attr_reader :language ensure_inclusion_of :language, :values => %w(ja_JP en_US) attr_reader :individual_suppression ensure_true_or_false_of :individual_suppression attr_reader :exclusion ensure_validity_of :exclusion attr_reader :inclusion ensure_validity_of :inclusion attr_reader :change_list class Exclusion include Validation def initialize(doc) if doc @categories = doc["categories"] || [] @severities = doc["severities"] ? Regexp.new(doc["severities"]) : nil @messages = (doc["messages"] || {}).map { |msg_name, pkg_name| MessageId.new(pkg_name, msg_name.to_sym) }.to_set else @categories = [] @severities = nil @messages = Set.new end end def entity_name "message_traits:exclusion" end attr_reader :categories attr_reader :severities attr_reader :messages def freeze @categories.freeze @severities.freeze @messages.freeze super end end private_constant :Exclusion class Inclusion include Validation def initialize(doc) if doc @messages = (doc["messages"] || {}).map { |msg_name, pkg_name| MessageId.new(pkg_name, msg_name.to_sym) }.to_set else @messages = Set.new end end def entity_name "message_traits:inclusion" end attr_reader :messages def freeze @messages.freeze super end end private_constant :Inclusion def freeze @language.freeze @individual_suppression.freeze @exclusion.freeze @inclusion.freeze @change_list.freeze super end end module CodingStyleAccessor # NOTE: Host class must respond to #traits. def coding_style traits.of_project.coding_style end def indent_style coding_style.indent_style end def tab_width coding_style.tab_width end def indent_width coding_style.indent_width end INDENT_STYLE_K_AND_R = ProjectTraits::CodingStyle::K_AND_R INDENT_STYLE_ALLMAN = ProjectTraits::CodingStyle::ALLMAN INDENT_STYLE_GNU = ProjectTraits::CodingStyle::GNU end module StandardTypesAccessor # NOTE: Host class must respond to #traits. def standard_types traits.of_compiler.standard_types end def char_size standard_types.char_size end def char_alignment standard_types.char_alignment end def short_size standard_types.short_size end def short_alignment standard_types.short_alignment end def int_size standard_types.int_size end def int_alignment standard_types.int_alignment end def long_size standard_types.long_size end def long_alignment standard_types.long_alignment end def long_long_size standard_types.long_long_size end def long_long_alignment standard_types.long_long_alignment end def float_size standard_types.float_size end def float_alignment standard_types.float_alignment end def double_size standard_types.double_size end def double_alignment standard_types.double_alignment end def long_double_size standard_types.long_double_size end def long_double_alignment standard_types.long_double_alignment end def code_ptr_size standard_types.code_ptr_size end def code_ptr_alignment standard_types.code_ptr_alignment end def data_ptr_size standard_types.data_ptr_size end def data_ptr_alignment standard_types.data_ptr_alignment end def char_as_unsigned_char? standard_types.char_as_unsigned_char end end module ArithmeticAccessor # NOTE: Host class must respond to #traits. def arithmetic traits.of_compiler.arithmetic end def logical_right_shift? arithmetic.logical_right_shift end end module ExclusionAccessor # NOTE: Host class must respond to #traits. def exclusion traits.of_message.exclusion end def categories exclusion.categories end def severities exclusion.severities end def messages exclusion.messages end end module InclusionAccessor # NOTE: Host class must respond to #traits. def inclusion traits.of_message.inclusion end def messages inclusion.messages end end end adlint-3.2.0/lib/adlint/lexer.rb0000644000004100000410000001604012224440633016505 0ustar www-datawww-data# Lexical analyzer base classes. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/token" require "adlint/source" require "adlint/traits" require "adlint/error" module AdLint #:nodoc: # == DESCRIPTION # Token queue to interface to the parser. class TokenQueue < Array # === DESCRIPTION # Constructs an empty token queue or a solid token queue from specified # token array. # # === PARAMETER # _token_ary_:: TokenArray -- Array of tokens. def initialize(tok_ary = nil) if tok_ary super else super() end end def expect(tok_type) tok = self.first tok && tok.type == tok_type ? true : false end end # == DESCRIPTION # Object represents the whole content of something. class Content def location subclass_responsibility end def empty? subclass_responsibility end end # == DESCRIPTION # Object represents the whole content of the string. class StringContent < Content # === DESCRIPTION # Constructs the content object of the string. # # === PARAMETER # _str_:: String -- Target string. # _fpath_:: Pathname -- File path name contains the target string. # _line_no_:: Integer -- Initial line-no of the target string. def initialize(str, tab_width = 8, fpath = nil, line_no = 1, column_no = 1) @scanner = StringScanner.new(str) @tab_width = tab_width @fpath, @line_no, @column_no = fpath, line_no, column_no @appearance_column_no = column_no end def location Location.new(@fpath, @line_no, @column_no, @appearance_column_no) end memoize :location # === DESCRIPTION # Scans a token. # # === PARAMETER # _regexp_:: Regexp -- Token pattern. # # === RETURN VALUE # String -- Token string or nil. def scan(regexp) tok = @scanner.scan(regexp) if tok update_location(tok) tok else nil end end def check(regexp) @scanner.check(regexp) end # === DESCRIPTION # Skips a content. # # === PARAMETER # _len_:: Integer -- Skipping content length. # # === RETURN VALUE # String -- Eaten string. def eat!(len = 1) self.scan(/.{#{len}}/m) end # === DESCRIPTION # Checks whether this content is currently empty or not. # # === RETURN VALUE # Boolean -- Returns true if already empty. def empty? @scanner.eos? end def _debug_inspect @scanner.rest end private def update_location(tok) if (nl_cnt = tok.count("\n")) > 0 @line_no += nl_cnt lst_line = tok[tok.rindex("\n")..-1] @column_no = lst_line.length @appearance_column_no = lst_line.gsub(/\t/, " " * @tab_width).length else @column_no += tok.length @appearance_column_no += tok.gsub(/\t/, " " * @tab_width).length end forget_memo_of__location end end # == DESCRIPTION # Object represents the whole content of the source file. class SourceContent < StringContent # === DESCRIPTION # Constructs the content object of the source file. # # === PARAMETER # _src_:: Source -- Target source object. def initialize(src, tab_width) super(src.open { |io| io.read }, tab_width, src.fpath) end end class TokensContent < Content def initialize(tok_ary) @token_ary = tok_ary end def location if self.empty? nil else @token_ary.first.location end end def empty? @token_ary.empty? end def next_token if empty? nil else @token_ary.shift end end end # == DESCRIPTION # Generic lexical analysis context. class LexerContext # === DESCRIPTION # Constructs a lexical analysis context object. # # === PARAMETER # _cont_:: SourceContent | StringContent -- Target content. def initialize(cont) @content = cont end # === VALUE # SourceContent | StringContent -- The target content of this context. attr_reader :content # === DESCRIPTION # Reads the current location of the target content. # # === RETURN VALUE # Location -- Current location. def location @content.location end end # == DESCRIPTION # Base class of the lexical analyzer of the string. class StringLexer # === DESCRIPTION # Constructs a lexical analyzer of the string. # # === PARAMETER # _str_:: String -- Target string. def initialize(str) @str = str end # === DESCRIPTION # Executes the lexical analysis. # # === RETURN VALUE # TokenArray -- Scanned tokens. def execute lexer_ctxt = create_lexer_context(@str) tokenize(lexer_ctxt) rescue Error raise rescue => ex if lexer_ctxt raise InternalError.new(ex, lexer_ctxt.location) else raise InternalError.new(ex, nil) end end private # === DESCRIPTION # Creates the context object. # # Subclasses must implement this method. # # === PARAMETER # _str_:: String -- Target string object. def create_lexer_context(str) subclass_responsibility end # === DESCRIPTION # Tokenize the target content. # # Subclasses must implement this method. # # === PARAMETER # _lexer_ctxt_:: LexerContext -- Lexical analysis context. def tokenize(lexer_ctxt) subclass_responsibility end end class TokensRelexer def initialize(tok_ary) @lexer_ctxt = create_lexer_context(tok_ary) end def next_token tokenize(@lexer_ctxt) rescue Error raise rescue => ex raise InternalError.new(ex, @lexer_ctxt.location) end private def create_lexer_context(tok_ary) subclass_responsibility end def tokenize(lexer_ctxt) subclass_responsibility end end end adlint-3.2.0/lib/adlint/lang.rb0000644000004100000410000000565112224440633016315 0ustar www-datawww-data# Programming language detection mechanism. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cpp/scanner" require "adlint/cpp/phase" require "adlint/cc1/scanner" require "adlint/cc1/phase" module AdLint #:nodoc: # == DESCRIPTION # Programming language. class Language # === DESCRIPTION # Detects programming language of the specified source file. # # === PARAMETER # _fpath_:: Pathname -- File path of the source file. # # === RETURN VALUE # Language -- Object of the derived class of Language class. def self.of(fpath) # FIXME: Dummy implementation. C end class Cpp extend ::AdLint::Cpp::Scanner class << self def single_module_phases; [] end def check_phases; [] end end end class C include Cc1::ScannerConstants extend Cc1::Scanner class << self def single_module_phases [ ::AdLint::Cpp::Prepare1Phase, ::AdLint::Cpp::Prepare2Phase, ::AdLint::Cpp::EvalPhase, ::AdLint::Cpp::SubstPhase, ::AdLint::Cc1::Prepare1Phase, ::AdLint::Cc1::ParsePhase, ::AdLint::Cc1::ResolvePhase, ::AdLint::Cc1::Prepare2Phase, ::AdLint::Cc1::InterpPhase, ::AdLint::Cpp::ReviewPhase, ::AdLint::Cc1::ReviewPhase, ::AdLint::Cpp::ExaminationPhase, ::AdLint::Cc1::ExaminationPhase ].freeze end def check_phases [ ::AdLint::Cpp::Prepare1Phase, ::AdLint::Cpp::EvalPhase, ::AdLint::Cpp::SubstPhase, ::AdLint::Cc1::Prepare1Phase, ::AdLint::Cc1::ParsePhase ].freeze end end end end end adlint-3.2.0/lib/adlint/supp.rb0000644000004100000410000000602112224440633016353 0ustar www-datawww-data# Message suppressions. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: class MessageSuppressorSet def initialize @file_wise_suppressions = {} @line_wise_suppressions = {} end def add(supp) case when supp.file_wise? @file_wise_suppressions[supp.key] = supp when supp.line_wise? @line_wise_suppressions[supp.key] = supp end end def suppress?(msg) (supp = @file_wise_suppressions[file_wise_key_of(msg)]) && supp.suppress?(msg) or (supp = @line_wise_suppressions[line_wise_key_of(msg)]) && supp.suppress?(msg) or false end private def file_wise_key_of(msg) FileWiseMessageSuppressor.key_of(msg.location) end def line_wise_key_of(msg) LineWiseMessageSuppressor.key_of(msg.location) end end class MessageSuppressor def initialize(target_msg_ids) @target_msg_ids = target_msg_ids end def key subclass_responsibility end def file_wise? subclass_responsibility end def line_wise? subclass_responsibility end def suppress?(msg) @target_msg_ids.include?(msg.id) end end class FileWiseMessageSuppressor < MessageSuppressor def self.key_of(loc) [loc.fpath] end def initialize(target_msg_ids, annot_loc) super(target_msg_ids) @key = [annot_loc.fpath] end attr_reader :key def file_wise? true end def line_wise? false end end class LineWiseMessageSuppressor < MessageSuppressor def self.key_of(loc) [loc.fpath, loc.line_no] end def initialize(target_msg_ids, annot_loc) super(target_msg_ids) @key = [annot_loc.fpath, annot_loc.line_no] end attr_reader :key def file_wise? false end def line_wise? true end end end adlint-3.2.0/lib/adlint/memo.rb0000644000004100000410000001536012224440633016327 0ustar www-datawww-data# Memoizing utility. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Memoizable def memoize(name, *opts) force_nullary, key_indices = extract_memoize_options(opts) case when instance_method(name).arity == 0 || force_nullary memoize_nullary_method(name) when instance_method(name).arity == 1 || key_indices.size == 1 memoize_unary_method(name, key_indices.first || 0) else memoize_polynomial_method(name, key_indices) end end private def extract_memoize_options(opts) hash = opts.first || {} [hash[:force_nullary], hash[:key_indices] || []] end def memoize_nullary_method(name) save_memoizing_method(name) prepare_nullary_method_cache(name) class_eval <<-EOS define_method(:#{name}) do |*args| if #{cache_name_of(name)}_initialized ||= false #{cache_name_of(name)}_forbidden = false #{cache_name_of(name)} else if #{cache_name_of(name)}_forbidden ||= false #{cache_name_of(name)}_forbidden = false #{orig_name_of(name)} else #{cache_name_of(name)}_initialized = true #{cache_name_of(name)} = #{orig_name_of(name)}(*args) end end end EOS end def memoize_unary_method(name, key_index) save_memoizing_method(name) prepare_unary_method_cache(name, key_index) class_eval <<-EOS define_method(:#{name}) do |*args| key = args[#{key_index}] if #{cache_name_of(name)}_initialized ||= false #{cache_name_of(name)}_forbidden = false if #{cache_name_of(name)}.include?(key) #{cache_name_of(name)}[key] else #{cache_name_of(name)}[key] = #{orig_name_of(name)}(*args) end else if #{cache_name_of(name)}_forbidden ||= false #{cache_name_of(name)}_forbidden = false #{orig_name_of(name)}(*args) else #{cache_name_of(name)}_initialized = true #{cache_name_of(name)} = {} #{cache_name_of(name)}[key] = #{orig_name_of(name)}(*args) end end end EOS end def memoize_polynomial_method(name, key_indices) save_memoizing_method(name) prepare_polynomial_method_cache(name, key_indices) class_eval <<-EOS define_method(:#{name}) do |*args| key = __key_for_#{name}(*args) if #{cache_name_of(name)}_initialized ||= false #{cache_name_of(name)}_forbidden = false if #{cache_name_of(name)}.include?(key) #{cache_name_of(name)}[key] else #{cache_name_of(name)}[key] = #{orig_name_of(name)}(*args) end else if #{cache_name_of(name)}_forbidden ||= false #{cache_name_of(name)}_forbidden = false #{orig_name_of(name)}(*args) else #{cache_name_of(name)}_initialized = true #{cache_name_of(name)} = {} #{cache_name_of(name)}[key] = #{orig_name_of(name)}(*args) end end end EOS end def prepare_nullary_method_cache(name) class_eval <<-EOS define_method(:forbid_once_memo_of__#{name}) do #{cache_name_of(name)}_forbidden = true end define_method(:clear_memo_of__#{name}) do #{cache_name_of(name)} = nil #{cache_name_of(name)}_initialized = false end define_method(:forget_memo_of__#{name}) do clear_memo_of__#{name} end EOS end def prepare_unary_method_cache(name, key_index) class_eval <<-EOS define_method(:forbid_once_memo_of__#{name}) do #{cache_name_of(name)}_forbidden = true end define_method(:clear_memo_of__#{name}) do #{cache_name_of(name)} = nil #{cache_name_of(name)}_initialized = false end define_method(:forget_memo_of__#{name}) do |*args| if #{cache_name_of(name)}_initialized #{cache_name_of(name)}.delete(args[#{key_index}]) end end EOS end def prepare_polynomial_method_cache(name, key_indices) define_key_generator(name, key_indices) class_eval <<-EOS define_method(:forbid_once_memo_of__#{name}) do #{cache_name_of(name)}_forbidden = true end define_method(:clear_memo_of__#{name}) do #{cache_name_of(name)} = nil #{cache_name_of(name)}_initialized = false end define_method(:forget_memo_of__#{name}) do |*args| if #{cache_name_of(name)}_initialized #{cache_name_of(name)}.delete(__key_for_#{name}(*args)) end end EOS end def define_key_generator(name, key_indices) if key_indices.empty? class_eval <<-EOS define_method(:__key_for_#{name}) do |*args| args end EOS else class_eval <<-EOS define_method(:__key_for_#{name}) do |*args| args.values_at(#{key_indices.join(',')}) end EOS end class_eval "private(:__key_for_#{name})" end def save_memoizing_method(name) class_eval <<-EOS alias_method(:#{orig_name_of(name)}, :#{name}) private(:#{orig_name_of(name)}) EOS end def cache_name_of(name) "@__cache_of__#{name.to_s.sub("?", "_p")}" end def orig_name_of(name) "__orig_#{name}" end end end adlint-3.2.0/lib/adlint/cpp/0000755000004100000410000000000012224440633015622 5ustar www-datawww-dataadlint-3.2.0/lib/adlint/cpp/asm.rb0000644000004100000410000000452312224440633016733 0ustar www-datawww-data# Inline assembly notations. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cpp/subst" module AdLint #:nodoc: module Cpp #:nodoc: module InlineAssemblyDefinition def create_inline_assembly_substitutions(src) [create_cxx_asm_definition(src)] + create_extended_asm_definitions(src) end def create_cxx_asm_definition(src) CodeSubstitution.new("asm(__adlint__any);", "").tap do |sub| sub.on_substitution += lambda { |matched_toks| src.on_inline_assembly.invoke(matched_toks) } end end def create_extended_asm_definitions(src) [ "__asm(__adlint__any);", "asm { __adlint__any }", "__asm { __adlint__any }", "__asm__(__adlint__any);", "__asm__ volatile (__adlint__any);", "__asm__ __volatile__ (__adlint__any);", "asm(__adlint__any);", "asm volatile (__adlint__any);", "asm __volatile__ (__adlint__any);" ].map do |ptn| CodeSubstitution.new(ptn, "").tap { |sub| sub.on_substitution += lambda { |matched_toks| src.on_inline_assembly.invoke(matched_toks) } } end end end end end adlint-3.2.0/lib/adlint/cpp/macro.rb0000644000004100000410000005642212224440633017261 0ustar www-datawww-data# C preprocessor macros. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/token" require "adlint/report" require "adlint/util" require "adlint/cpp/syntax" require "adlint/cpp/lexer" module AdLint #:nodoc: module Cpp #:nodoc: class Macro include LocationHolder def initialize(define_line) @define_line = define_line end attr_reader :define_line def name @define_line.identifier end def replacement_list @define_line.replacement_list end def location @define_line.location end def expand(toks, macro_tbl, repl_ctxt) @define_line.mark_as_referred_by(toks.first) end def function_like? subclass_responsibility end end class ObjectLikeMacro < Macro def replaceable_size(toks) if toks.first.value == "NULL" then 0 else name.value == toks.first.value ? 1 : 0 end end def expand(toks, macro_tbl, repl_ctxt) super if repl_list = self.replacement_list loc = toks.first.location rslt_toks = repl_list.tokens.map { |tok| ReplacedToken.new(tok.type, tok.value, loc, tok.type_hint, false) } else rslt_toks = [] end macro_tbl.notify_object_like_macro_replacement(self, toks, rslt_toks) rslt_toks end def function_like?; false end end class FunctionLikeMacro < Macro def initialize(define_line) super if params = define_line.identifier_list @parameter_names = params.identifiers.map { |tok| tok.value } else @parameter_names = [] end end attr_reader :parameter_names def replaceable_size(toks) return 0 unless name.value == toks.first.value args, idx = parse_arguments(toks, 1) case when args && @parameter_names.empty? idx + 1 when args && @parameter_names.size >= args.size idx + 1 else 0 end end def expand(toks, macro_tbl, repl_ctxt) super args, * = parse_arguments(toks, 1) args = [] if @parameter_names.empty? args_hash = @parameter_names.zip(args).each_with_object({}) { |(param, arg), hash| hash[param] = arg } rslt_toks = expand_replacement_list(args_hash, toks.first.location, macro_tbl, repl_ctxt) macro_tbl.notify_function_like_macro_replacement(self, toks, args, rslt_toks) rslt_toks end def function_like?; true end private def parse_arguments(toks, idx) while tok = toks[idx] case when tok.type == :NEW_LINE idx += 1 when tok.value == "(" idx += 1 break else return nil, idx end end return nil, idx unless tok args = [] loop do arg, idx, lst = parse_one_argument(toks, idx) args.push(arg) break if lst end return args, idx end def parse_one_argument(toks, idx) arg = [] paren_depth = 0 while tok = toks[idx] case tok.value when "(" arg.push(tok) paren_depth += 1 when ")" paren_depth -= 1 if paren_depth >= 0 arg.push(tok) else return arg, idx, true end when "," if paren_depth > 0 arg.push(tok) else return arg, idx + 1, false end when "\n" ; else arg.push(tok) end idx += 1 end return arg, idx, true # NOTREACHED end def expand_replacement_list(args, loc, macro_tbl, repl_ctxt) unless repl_list = self.replacement_list return [] end rslt_toks = [] idx = 0 while cur_tok = repl_list.tokens[idx] nxt_tok = repl_list.tokens[idx + 1] case when arg = args[cur_tok.value] substitute_argument(cur_tok, nxt_tok, arg, loc, rslt_toks, macro_tbl, repl_ctxt) when cur_tok.value == "#" if nxt_tok tok = stringize_argument(args[nxt_tok.value], loc, macro_tbl) rslt_toks.push(tok) idx += 1 end when cur_tok.value == "##" && nxt_tok.value == "#" if nxt_nxt_tok = repl_list.tokens[idx + 2] tok = stringize_argument(args[nxt_nxt_tok.value], loc, macro_tbl) concat_with_last_token([tok], loc, rslt_toks, macro_tbl) idx += 2 end when cur_tok.value == "##" if nxt_tok and arg = args[nxt_tok.value] concat_with_last_token(arg, loc, rslt_toks, macro_tbl) else concat_with_last_token([nxt_tok], loc, rslt_toks, macro_tbl) end idx += 1 else rslt_toks.push(ReplacedToken.new(cur_tok.type, cur_tok.value, loc, cur_tok.type_hint, false)) end idx += 1 end rslt_toks end def substitute_argument(param_tok, nxt_tok, arg, loc, rslt_toks, macro_tbl, repl_ctxt) # NOTE: The ISO C99 standard says; # # 6.10.3.1 Argument substitution # # 1 After the arguments for the invocation of a function-like macro have # been identified, argument substitution take place. A parameter in # the replacement list, unless proceeded by a # or ## preprocessing # token or followed by a ## preprocessing token, is replaced by the # corresponding argument after all macros contained therein have been # expanded. Before being substituted, each argument's preprocessing # tokens are completely macro replaced as if they formed the rest of # the preprocessing file; no other preprocessing tokens are available. if nxt_tok && nxt_tok.value == "##" rslt_toks.concat(arg.map { |tok| ReplacedToken.new(tok.type, tok.value, loc, tok.type_hint, false) }) else macro_tbl.replace(arg, repl_ctxt) rslt_toks.concat(arg.map { |tok| ReplacedToken.new(tok.type, tok.value, loc, tok.type_hint, true) }) end end def stringize_argument(arg, expansion_loc, macro_tbl) # NOTE: The ISO C99 standard says; # # 6.10.3.2 The # operator # # Constraints # # 1 Each # preprocessing token in the replacement list for a # function-like macro shall be followed by a parameter as the next # preprocessing token in the replacement list. # # Semantics # # 2 If, in the replacement list, a parameter is immediately proceeded by # a # preprocessing token, both are replaced by a single character # string literal preprocessing token that contains the spelling of the # preprocessing token sequence for the corresponding argument. Each # occurrence of white space between the argument's preprocessing tokens # becomes a single space character in the character string literal. # White space before the first preprocessing token and after the last # preprocessing token composing the argument is deleted. Otherwise, # the original spelling of each preprocessing token in the argument is # retained in the character string literal, except for special handling # for producing the spelling of string literals and character # constants: a \ character is inserted before each " and \ character of # a character constant or string literal (including the delimiting " # characters), except that it is implementation-defined whether a \ # character is inserted before the \ character beginning of universal # character name. If the replacement that results is not a valid # character string literal, the behavior is undefined. The character # string literal corresponding to an empty argument is "". The order # of evaluation of # and ## operators is unspecified. # # NOTE: This code does not concern about contents of the string literal. # But, it is enough for analysis. str = arg.map { |tok| tok.value }.join if str =~ /((:?\\*))\\\z/ && $1.length.even? str.chop! macro_tbl.notify_last_backslash_ignored(arg.last) end ReplacedToken.new(:PP_TOKEN, "\"#{str.gsub(/["\\]/) { "\\" + $& }}\"", expansion_loc, :STRING_LITERAL, false) end def concat_with_last_token(arg_toks, expansion_loc, rslt_toks, macro_tbl) # NOTE: The ISO C99 standard says; # # 6.10.3.3 The ## operator # # Constraints # # 1 A ## preprocessing token shall not occur at the beginning or at the # end of a replacement list for either form of macro definition. # # Semantics # # 2 If, in the replacement list of a function-form macro, a parameter is # immediately preceded or followed by a ## preprocessing token, the # parameter is replaced by the corresponding argument's preprocessing # token sequence; however, if an argument consists of no preprocessing # tokens, the parameter is replaced by a placemarker preprocessing # token instead. # # 3 For both object-like and function-like macro invocations, before the # replacement list is reexamined for more macro names to replace, each # instance of a ## preprocessing token in the replacement list (not # from an argument) is deleted and the preceding preprocessing token is # concatenated with the following preprocessing token. Placemarker # preprocessing tokens are handled specially: concatenation of two # placemarkers results in a single placemarker preprocessing token, and # concatenation of a placemarker with a non-placemarker preprocessing # token results in the non-placemarker preprocessing token. If the # result is not a valid preprocessing token, the behavior is undefined. # The resulting token is available for further macro replacement. The # order of evaluation of ## operators is unspecified. if lhs = rslt_toks.pop unless arg_toks.empty? # NOTE: To avoid syntax error when the concatenated token can be # retokenize to two or more tokens. unlexed_arg = unlex_tokens(arg_toks) new_toks = StringToPPTokensLexer.new(lhs.value + unlexed_arg).execute new_toks.map! do |tok| ReplacedToken.new(tok.type, tok.value, expansion_loc, tok.type_hint, false) end rslt_toks.concat(new_toks) macro_tbl.notify_sharpsharp_operator_evaled( lhs, Token.new(:MACRO_ARG, unlexed_arg, arg_toks.first.location), new_toks) else new_toks = [ReplacedToken.new(lhs.type, lhs.value, expansion_loc, lhs.type_hint, false)] rslt_toks.concat(new_toks) end end end def unlex_tokens(arg_toks) # NOTE: To regenerate source string from pp_tokens in preparation for # the argument substitution. # 6.10.3 Macro replacement # # Semantics # # 11 The sequence of preprocessing tokens bounded by the outside-most # matching parentheses forms the list of arguments for the # function-like macro. The individual arguments within the list are # separated by comma preprocessing tokens, but comma preprocessing # tokens between matching inner parentheses do not separate arguments. # If there are sequences of preprocessing tokens within the list of # arguments that would otherwise act as preprocessing directives, the # behavior is undefined. arg_toks.each_cons(2).reduce(arg_toks.first.value) do |str, (lhs, rhs)| lhs_loc, rhs_loc = lhs.location, rhs.location if lhs_loc.line_no == rhs_loc.line_no tok_gap = rhs_loc.column_no - lhs_loc.column_no - lhs.value.length str + " " * [tok_gap, 0].max + rhs.value else "#{str} #{rhs.value}" end end end end class SpecialMacro < ObjectLikeMacro def initialize(name_str) super(PseudoObjectLikeDefineLine.new(name_str)) @replacement_list = nil end attr_reader :replacement_list def expand(toks, macro_tbl, repl_ctxt) @replacement_list = generate_replacement_list(toks.first) super end private def generate_replacement_list(tok) subclass_responsibility end end class DateMacro < SpecialMacro def initialize super("__DATE__") end private def generate_replacement_list(tok) date = Time.now.strftime("%h %d %Y") PPTokens.new.push(Token.new(:PP_TOKEN, "\"#{date}\"", tok.location, :STRING_LITERAL)) end end class FileMacro < SpecialMacro def initialize super("__FILE__") end private def generate_replacement_list(tok) PPTokens.new.push( Token.new(:PP_TOKEN, "\"#{tok.location.fpath}\"", tok.location, :STRING_LITERAL)) end end class LineMacro < SpecialMacro def initialize super("__LINE__") end private def generate_replacement_list(tok) PPTokens.new.push( Token.new(:PP_TOKEN, "#{tok.location.line_no}", tok.location, :STRING_LITERAL)) end end class StdcMacro < SpecialMacro def initialize super("__STDC__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class StdcHostedMacro < SpecialMacro def initialize super("__STDC_HOSTED__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class StdcMbMightNeqWcMacro < SpecialMacro def initialize super("__STDC_MB_MIGHT_NEQ_WC__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class StdcVersionMacro < SpecialMacro def initialize super("__STDC_VERSION__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "199901L", tok.location, :CONSTANT)) end end class TimeMacro < SpecialMacro def initialize super("__TIME__") end private def generate_replacement_list(tok) time = Time.now.strftime("%H:%M:%S") PPTokens.new.push(Token.new(:PP_TOKEN, "\"#{time}\"", tok.location, :STRING_LITERAL)) end end class StdcIec559Macro < SpecialMacro def initialize super("__STDC_IEC_559__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "0", tok.location, :CONSTANT)) end end class StdcIec559ComplexMacro < SpecialMacro def initialize super("__STDC_IEC_559_COMPLEX__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "0", tok.location, :CONSTANT)) end end class StdcIso10646Macro < SpecialMacro def initialize super("__STDC_ISO_10646__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "199712L", tok.location, :CONSTANT)) end end class PragmaOperator < FunctionLikeMacro def initialize super(PseudoFunctionLikeDefineLine.new("_Pragma", ["str"])) end def expand(toks, macro_tbl, repl_ctxt) # TODO: Should implement pragma handling feature. [] end end class LintSpecificMacro1 < SpecialMacro def initialize super("__LINT__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class LintSpecificMacro2 < SpecialMacro def initialize super("lint") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class LintSpecificMacro3 < SpecialMacro def initialize super("__lint") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class LintSpecificMacro4 < SpecialMacro def initialize super("__lint__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class AdLintSpecificMacro1 < SpecialMacro def initialize super("__ADLINT__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class AdLintSpecificMacro2 < SpecialMacro def initialize super("adlint") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class AdLintSpecificMacro3 < SpecialMacro def initialize super("__adlint") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class AdLintSpecificMacro4 < SpecialMacro def initialize super("__adlint__") end private def generate_replacement_list(tok) PPTokens.new.push(Token.new(:PP_TOKEN, "1", tok.location, :CONSTANT)) end end class MacroReplacementContext def initialize @hide_sets = Hash.new { |hash, key| hash[key] = Set.new } end def add_to_hide_set(orig_tok, new_toks, macro_name) new_toks.each do |new_tok| @hide_sets[new_tok].merge(@hide_sets[orig_tok]) @hide_sets[new_tok].add(macro_name) end end def hidden?(tok, macro_name) @hide_sets[tok].include?(macro_name) end end class MacroTable def initialize @macros = {} predefine_special_macros end extend Pluggable def_plugin :on_object_like_macro_replacement def_plugin :on_function_like_macro_replacement def_plugin :on_sharpsharp_operator_evaled def_plugin :on_last_backslash_ignored def define(macro) @macros[macro.name.value] = macro self end def undef(name_str) @macros.delete(name_str) self end def lookup(name_str) @macros[name_str] end def replace(toks, repl_ctxt = nil) replaced = false idx = 0 while tok = toks[idx] case tok.value when "defined" in_defined = true when "(", ")" ; else if in_defined in_defined = false else if new_idx = do_replace(toks, idx, repl_ctxt) idx = new_idx replaced = true end end end idx += 1 end replaced end def notify_object_like_macro_replacement(macro, replacing_toks, rslt_toks) on_object_like_macro_replacement.invoke(macro, replacing_toks, rslt_toks) end def notify_function_like_macro_replacement(macro, replacing_toks, args, rslt_toks) on_function_like_macro_replacement.invoke(macro, replacing_toks, args, rslt_toks) end def notify_sharpsharp_operator_evaled(lhs_tok, rhs_tok, new_toks) on_sharpsharp_operator_evaled.invoke(lhs_tok, rhs_tok, new_toks) end def notify_last_backslash_ignored(tok) on_last_backslash_ignored.invoke(tok) end private def do_replace(toks, idx, repl_ctxt) repl_ctxt ||= MacroReplacementContext.new return nil unless tok = toks[idx] and macro = lookup(tok.value) return nil if repl_ctxt.hidden?(tok, macro.name.value) size = macro.replaceable_size(toks[idx..-1]) if toks[idx, size].all? { |t| t.need_no_further_replacement? } return nil end expanded = macro.expand(toks[idx, size], self, repl_ctxt) repl_ctxt.add_to_hide_set(toks[idx], expanded, macro.name.value) # NOTE: The ISO C99 standard says; # # 6.10.3.4 Rescanning and further replacement # # 1 After all parameters in the replacement list have been substituted # and # and ## processing has take place, all placemarker preprocessing # tokens are removed. Then, the resulting preprocessing token sequence # is rescanned, along with all subsequent preprocessing tokens of the # source file, for more macro names to replace. # # 2 If the name of the macro being replaced is found during this scan of # the replacement list (not including the rest of the source file's # preprocessing tokens), it is not replaced. Furthermore, if any # nested replacements encounter the name of the macro being replaced, # it is not replaced. These nonreplaced macro name preprocessing # tokens are no longer available for further replacement even if they # are later (re)examined in contexts in which that macro name # preprocessing token whould otherwise have been replaced. while replace(expanded, repl_ctxt); end toks[idx, size] = expanded idx + expanded.size - 1 end def predefine_special_macros define(DateMacro.new) define(FileMacro.new) define(LineMacro.new) define(StdcMacro.new) define(StdcHostedMacro.new) define(StdcMbMightNeqWcMacro.new) define(StdcVersionMacro.new) define(TimeMacro.new) define(StdcIec559Macro.new) define(StdcIec559ComplexMacro.new) define(StdcIso10646Macro.new) define(PragmaOperator.new) define(LintSpecificMacro1.new) define(LintSpecificMacro2.new) define(LintSpecificMacro3.new) define(LintSpecificMacro4.new) define(AdLintSpecificMacro1.new) define(AdLintSpecificMacro2.new) define(AdLintSpecificMacro3.new) define(AdLintSpecificMacro4.new) end end end end adlint-3.2.0/lib/adlint/cpp/subst.rb0000644000004100000410000001574612224440633017324 0ustar www-datawww-data# Pre-analysis code substitution mechanism. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/report" require "adlint/util" require "adlint/cpp/lexer" module AdLint #:nodoc: module Cpp #:nodoc: class CodeSubstitution def initialize(ptn_str, repl_str) @pattern = StringToPPTokensLexer.new(ptn_str).execute.to_a @replacement = StringToPPTokensLexer.new(repl_str).execute.to_a end extend Pluggable def_plugin :on_substitution def execute(toks) rslt_toks = [] idx = 0 while first_tok = toks[idx] matcher = Matcher.new(@pattern) matched_len = matcher.match(toks, idx) if matcher.accepted? || idx + matched_len == toks.size notify_substitution(toks, idx, matched_len) rslt_toks.concat(@replacement.map { |tok| Token.new(tok.type, tok.value, first_tok.location, tok.type_hint) }) idx += matched_len else rslt_toks.push(first_tok) idx += 1 end end rslt_toks end private def notify_substitution(toks, idx, len) matched_toks = toks[idx, len] on_substitution.invoke(matched_toks) unless matched_toks.empty? end end class Matcher def initialize(ptn_toks) @state = OuterTokenMatching.new(self) @pattern_tokens = ptn_toks @pattern_index = 0 end def rest_pattern_tokens @pattern_tokens[@pattern_index..-1] end def next_pattern_token ptn_tok = @pattern_tokens[@pattern_index] @pattern_index += 1 ptn_tok end def match(toks, idx) return 0 if head = toks[idx] and head.type == :NEW_LINE match_len = 0 while tok = toks[idx] unless tok.type == :NEW_LINE @state = @state.process(tok) break unless @state.matching? end match_len += 1 idx += 1 end match_len end def accepted? @state.accepted? end def matching? @state.matching? end def rejected? @state.rejected? end class State def initialize(matcher) @matcher = matcher end attr_reader :matcher def process(tok) subclass_responsibility end def accepted? subclass_responsibility end def rejected? subclass_responsibility end def matching? !accepted? && !rejected? end private def next_pattern_token @matcher.next_pattern_token end def rest_pattern_tokens @matcher.rest_pattern_tokens end end private_constant :State class Accepted < State def accepted? true end def rejected? false end end private_constant :Accepted class Rejected < State def accepted? false end def rejected? true end end private_constant :Rejected class Matching < State def accepted? false end def rejected? false end end private_constant :Matching class OuterTokenMatching < Matching def process(tok) if ptn_tok = next_pattern_token if tok.value == ptn_tok.value case tok.value when "(", "[", "{" InnerTokenMatching.new(matcher, self) else self end else if ptn_tok.value == "__adlint__any" if sentry_tok = rest_pattern_tokens.first and tok.value == sentry_tok.value case tok.value when "(", "[", "{" InnerTokenMatching.new(matcher, self).process(tok) else self end else OuterAnyMatching.new(matcher) end else Rejected.new(matcher) end end else Accepted.new(matcher) end end end private_constant :OuterTokenMatching class OuterAnyMatching < Matching def process(tok) if sentry_tok = rest_pattern_tokens.first if tok.value == sentry_tok.value return OuterTokenMatching.new(@matcher).process(tok) end end self end end private_constant :OuterAnyMatching class InnerTokenMatching < Matching def initialize(matcher, prv_state) super(matcher) @prv_state = prv_state end def process(tok) if ptn_tok = next_pattern_token if tok.value == ptn_tok.value case tok.value when "(", "[", "{" InnerTokenMatching.new(matcher, self) when ")", "]", "}" @prv_state else self end else if ptn_tok.value == "__adlint__any" case tok.value when "(", "[", "{" InnerAnyMatching.new(matcher, self, 1) else InnerAnyMatching.new(matcher, self, 0) end else Rejected.new(matcher) end end else Accepted.new(matcher) end end end private_constant :InnerTokenMatching class InnerAnyMatching < Matching def initialize(matcher, prv_state, depth) super(matcher) @prv_state = prv_state @depth = depth end def process(tok) case tok.value when "(", "[", "{" @depth += 1 when ")", "]", "}" @depth -= 1 end if sentry_tok = rest_pattern_tokens.first if tok.value == sentry_tok.value if @depth < 0 return @prv_state.process(tok) end end end self end end private_constant :InnerAnyMatching end end end adlint-3.2.0/lib/adlint/cpp/phase.rb0000644000004100000410000001123112224440633017245 0ustar www-datawww-data# Analysis phases for C preprocessor language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/phase" require "adlint/annot" require "adlint/cpp/lexer" require "adlint/cpp/eval" require "adlint/cpp/util" module AdLint #:nodoc: module Cpp #:nodoc: class CppPhase < Phase def initialize(phase_ctxt, phase_name) super(phase_ctxt, "cpp", phase_name) end end class Prepare1Phase < CppPhase def initialize(phase_ctxt) super(phase_ctxt, "pr1") end private def do_execute(phase_ctxt, *) root_src = phase_ctxt[:sources].first phase_ctxt[:cc1_source] = PreprocessedSource.new(root_src) phase_ctxt[:cpp_macro_table] = MacroTable.new phase_ctxt[:cpp_interpreter] = Preprocessor.new phase_ctxt[:cpp_ast_traversal] = SyntaxTreeMulticastVisitor.new register_annotation_parser end def register_annotation_parser parser = method(:parse_annotation) @phase_ctxt[:cpp_interpreter].on_line_comment_found += parser @phase_ctxt[:cpp_interpreter].on_block_comment_found += parser end def parse_annotation(comment, loc) if annot = Annotation.parse(comment, loc) @phase_ctxt[:annotations].push(annot) if annot.message_suppression_specifier? && traits.of_message.individual_suppression @phase_ctxt[:suppressors].add(annot.create_suppressor) end end end end class Prepare2Phase < CppPhase def initialize(phase_ctxt) super(phase_ctxt, "pr2") end private def do_execute(*) end end class EvalPhase < CppPhase def initialize(phase_ctxt) super(phase_ctxt, "cpp") end private def do_execute(phase_ctxt, *) pp_ctxt = PreprocessContext.new(phase_ctxt) process_cinit_header(phase_ctxt, pp_ctxt) process_pinit_header(phase_ctxt, pp_ctxt) process_target_source(phase_ctxt, pp_ctxt) end def process_cinit_header(phase_ctxt, pp_ctxt) if fpath = traits.of_compiler.initial_header fenc = traits.of_project.file_encoding init_header = Source.new(Pathname.new(fpath), fenc) else init_header = EmptySource.new end phase_ctxt[:cpp_ast] = phase_ctxt[:cpp_interpreter].execute(pp_ctxt, init_header) end def process_pinit_header(phase_ctxt, pp_ctxt) if fpath = traits.of_project.initial_header fenc = traits.of_project.file_encoding init_header = Source.new(Pathname.new(fpath), fenc) else init_header = EmptySource.new end phase_ctxt[:cpp_ast].concat( phase_ctxt[:cpp_interpreter].execute(pp_ctxt, init_header)) end def process_target_source(phase_ctxt, pp_ctxt) root_src = phase_ctxt[:sources].first phase_ctxt[:cpp_ast].concat( phase_ctxt[:cpp_interpreter].execute(pp_ctxt, root_src)) end end class SubstPhase < CppPhase def initialize(phase_ctxt) super(phase_ctxt, "sub") end private def do_execute(phase_ctxt, *) phase_ctxt[:cc1_source].substitute_code_blocks(traits) end end class ReviewPhase < CppPhase def initialize(phase_ctxt) super(phase_ctxt, "rv1") end private def do_execute(phase_ctxt, *) phase_ctxt[:cpp_ast].accept(phase_ctxt[:cpp_ast_traversal]) end end class ExaminationPhase < CppPhase def initialize(phase_ctxt) super(phase_ctxt, "ex1") end private def do_execute(phase_ctxt, *) examinations.each { |exam| exam.execute } end end end end adlint-3.2.0/lib/adlint/cpp/scanner.rb0000644000004100000410000000522412224440633017603 0ustar www-datawww-data# Scanner for C preprocessor language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cpp #:nodoc: # == DESCRIPTION # Utility module for scanning the C preprocessor language code. module Scanner # === DESCRIPTION # Scans CPP keyword. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns CPP keyword string if found at head of the content. def scan_keyword(cont) cont.scan(/defined\b/) end # === DESCRIPTION # Scans CPP punctuator. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns CPP punctuator string if found at head of the content. def scan_punctuator(cont) Language::C.scan_punctuator(cont) or cont.scan(/##?/) end # === DESCRIPTION # Scans CPP user header name. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns CPP user header name string if found at head of the # content. def scan_user_header_name(cont) cont.scan(/"[^"]*"/) end # === DESCRIPTION # Scans CPP system header name. # # === PARAMETER # _cont_:: StringContent -- Scanning source. # # === RETURN VALUE # String -- Returns CPP system header name string if found at head of the # content. def scan_system_header_name(cont) cont.scan(/<[^>]*>/) end end end end adlint-3.2.0/lib/adlint/cpp/syntax.rb0000644000004100000410000007461312224440633017510 0ustar www-datawww-data# AST of C preprocessor language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/symbol" require "adlint/location" require "adlint/exam" require "adlint/util" module AdLint #:nodoc: module Cpp #:nodoc: class SyntaxNode include Visitable include LocationHolder def location subclass_responsibility end def inspect(indent = 0) subclass_responsibility end def short_class_name self.class.name.sub(/\A.*::/, "") end end class IdentifierList < SyntaxNode def initialize(ids = []) @identifiers = ids end attr_reader :identifiers def push(id) @identifiers.push(id) self end def location @identifiers.first.location end def inspect(indent = 0) ([" " * indent + short_class_name] + @identifiers.map { |child| child.inspect }).join("\n") end end class PreprocessingFile < SyntaxNode def initialize(fpath, group = nil) @fpath = fpath @group = group end attr_reader :fpath attr_reader :group def location @group.location end def concat(pp_file) @group.group_parts.concat(pp_file.group.group_parts) end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + (@group ? @group.inspect(indent + 1) : "") end end class Group < SyntaxNode def initialize super @group_parts = [] end attr_reader :group_parts def push(group_part) @group_parts.push(group_part) self end def location @group_parts.first.location end def inspect(indent = 0) ([" " * indent + short_class_name] + @group_parts.map { |child| child.inspect(indent + 1) }).join("\n") end end class GroupPart < SyntaxNode; end class IfSection < GroupPart def initialize(if_group, elif_groups, else_group, endif_line) @if_group = if_group @elif_groups = elif_groups @else_group = else_group @endif_line = endif_line end attr_reader :if_group attr_reader :elif_groups attr_reader :else_group attr_reader :endif_line def location @if_group.location end def inspect(indent = 0) [" " * indent + short_class_name, @if_group ? @if_group.inspect(indent + 1) : nil, @elif_groups ? @elif_groups.inspect(indent + 1) : nil, @else_group ? @else_group.inspect(indent + 1) : nil, @endif_line ? @endif_line.inspect(indent + 1) : nil ].compact.join("\n") end end class IfGroup < SyntaxNode def initialize(keyword) @keyword = keyword end attr_reader :keyword def location @keyword.location end end class IfStatement < IfGroup def initialize(keyword, expr, group) super(keyword) @expression = expr @group = group end attr_accessor :expression attr_reader :group def inspect(indent = 0) [" " * indent + "#{short_class_name}", @expression.inspect(indent + 1), @group ? @group.inspect(indent + 1) : nil].compact.join("\n") end end class IfdefStatement < IfGroup def initialize(keyword, id, group) super(keyword) @identifier = id @group = group end attr_reader :identifier attr_reader :group def inspect(indent = 0) [" " * indent + "#{short_class_name} #{@identifier.inspect}", @group ? @group.inspect(indent + 1) : nil].join("\n") end end class IfndefStatement < IfGroup def initialize(keyword, id, group) super(keyword) @identifier = id @group = group end attr_reader :identifier attr_reader :group def inspect(indent = 0) [" " * indent + "#{short_class_name} #{@identifier.inspect}", @group ? @group.inspect(indent + 1) : nil].join("\n") end end class ElifGroups < SyntaxNode def initialize super @elif_statements = [] end attr_reader :elif_statements def push(elif_stmt) @elif_statements.push(elif_stmt) self end def inspect(indent = 0) ([" " * indent + short_class_name] + @elif_statements.map { |child| child.inspect(indent + 1) }).join("\n") end end class ElifGroup < SyntaxNode def initialize(keyword) @keyword = keyword end attr_reader :keyword def location @keyword.location end end class ElifStatement < ElifGroup def initialize(keyword, expr, group) super(keyword) @expression = expr @group = group end attr_accessor :expression attr_reader :group def inspect(indent = 0) [" " * indent + "#{short_class_name} #{@expression.inspect}", @group ? @group.inspect(indent + 1) : nil].compact.join("\n") end end class ElseGroup < SyntaxNode def initialize(keyword) @keyword = keyword end attr_reader :keyword def location @keyword.location end end class ElseStatement < ElseGroup def initialize(keyword, group) super(keyword) @group = group end attr_reader :group def inspect(indent = 0) [" " * indent + short_class_name, @group ? @group.inspect(indent + 1) : nil].compact.join("\n") end end class EndifLine < SyntaxNode def initialize(keyword) @keyword = keyword end attr_reader :keyword def location @keyword.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@keyword.inspect})" end end class ControlLine < GroupPart def initialize(keyword) @keyword = keyword end attr_reader :keyword def location @keyword.location end end class IncludeLine < ControlLine def initialize(keyword, header_name, include_depth) super(keyword) @header_name = header_name @include_depth = include_depth end attr_reader :include_depth attr_reader :header_name attr_accessor :fpath end class UserIncludeLine < IncludeLine def initialize(keyword, usr_header_name, include_depth) super(keyword, usr_header_name, include_depth) end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{header_name.inspect})" end end class UserIncludeNextLine < UserIncludeLine; end class SystemIncludeLine < IncludeLine def initialize(keyword, sys_header_name, include_depth) super(keyword, sys_header_name, include_depth) end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{header_name.inspect})" end end class SystemIncludeNextLine < SystemIncludeLine; end class DefineLine < ControlLine include SymbolicElement def initialize(keyword, id, repl_list, sym) super(keyword) @identifier = id @replacement_list = repl_list @symbol = sym end attr_reader :identifier attr_reader :replacement_list attr_reader :symbol end class ObjectLikeDefineLine < DefineLine def inspect(indent = 0) " " * indent + "#{short_class_name} (#{identifier.inspect})" end end class PseudoObjectLikeDefineLine < DefineLine def initialize(name_str) super(Token.new(:DEFINE, "#define", Location.new), Token.new(:PP_TOKEN, name_str, Location.new), nil, nil) end def mark_as_referred_by(tok) end end class FunctionLikeDefineLine < DefineLine def initialize(keyword, id, id_list, repl_list, sym) super(keyword, id, repl_list, sym) @identifier_list = id_list end attr_reader :identifier_list def have_va_list? false end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{identifier.inspect})" end end class PseudoFunctionLikeDefineLine < FunctionLikeDefineLine def initialize(name_str, param_names) id_list = IdentifierList.new( param_names.map { |str| Token.new(:PP_TOKEN, str, Location.new) }) super(Token.new(:DEFINE, "#define", Location.new), Token.new(:PP_TOKEN, name_str, Location.new), id_list, nil, nil) end def mark_as_referred_by(tok) end end class VaFunctionLikeDefineLine < FunctionLikeDefineLine def have_va_list? true end end class UndefLine < ControlLine def initialize(keyword, id) super(keyword) @identifier = id end attr_reader :identifier def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@identifier.inspect})" end end class LineLine < ControlLine def initialize(keyword, pp_toks) super(keyword) @pp_tokens = pp_toks end attr_reader :pp_tokens def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@pp_tokens.inspect})" end end class ErrorLine < ControlLine def initialize(keyword, pp_toks) super(keyword) @pp_tokens = pp_toks end attr_reader :pp_tokens def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@pp_tokens ? @pp_tokens.inspect : ""})" end end class PragmaLine < ControlLine def initialize(keyword, pp_toks) super(keyword) @pp_tokens = pp_toks end attr_reader :pp_tokens def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@pp_tokens ? @pp_tokens.inspect : ""})" end end class TextLine < GroupPart def initialize(tok) @token = tok end attr_reader :token def location @token.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@token.inspect})" end end class NullDirective < GroupPart def initialize(tok) @token = tok end attr_reader :token def location @token.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@token.inspect})" end end class UnknownDirective < GroupPart def initialize(tok) @token = tok end attr_reader :token def location @token.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@token.inspect})" end end class AsmSection < GroupPart def initialize(asm_line, endasm_line) @asm_line = asm_line @endasm_line = endasm_line end attr_reader :asm_line attr_reader :endasm_line def location @asm_line.location end def inspect(indent = 0) [" " * indent + short_class_name, @asm_line.inspect(indent + 1), @endasm_line.inspect(indent + 1)].join("\n") end end class AsmLine < SyntaxNode def initialize(keyword) @keyword = keyword end attr_reader :keyword def location @keyword.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@keyword.inspect})" end end class EndasmLine < SyntaxNode def initialize(keyword) @keyword = keyword end attr_reader :keyword def location @keyword.location end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@keyword.inspect})" end end class PPTokens < SyntaxNode def initialize super @tokens = [] end attr_reader :tokens def push(tok) @tokens.push(tok) self end def location @tokens.first.location end def may_represent_expression? return false if @tokens.size < 2 @tokens.all? do |pp_tok| case pp_tok.value when "{", "}" false when ";" false when "while", "do", "for", "if", "else", "switch", "case", "default", "goto", "return", "break", "continue" false when "typedef", "extern", "static", "auto", "regisiter" false else true end end end def may_represent_initializer? return false if @tokens.size < 2 if @tokens.first.value == "{" && @tokens.last.value == "}" @tokens.all? do |pp_tok| case pp_tok.value when "while", "do", "for", "if", "else", "switch", "case", "default", "goto", "return", "break", "continue" false when ";" false else true end end else false end end def may_represent_block? return false if @tokens.size < 2 if @tokens.first.value == "{" && @tokens.last.value == "}" @tokens.any? { |pp_tok| pp_tok.value == ";" } else false end end def may_represent_do_while_zero_idiom? return false if @tokens.size < 4 @tokens[0].value == "do" && @tokens[-4].value == "while" && @tokens[-3].value == "(" && @tokens[-2].value == "0" && @tokens[-1].value == ")" end def may_represent_specifier_qualifier_list? @tokens.select { |pp_tok| case pp_tok.value when "const", "volatile", "restrict" true when "*" true when "void", "signed", "unsigned", "char", "short", "int", "long", "float", "double" true else false end }.size > 1 end def may_represent_declaration_specifiers_head? @tokens.all? do |pp_tok| case pp_tok.value when "typedef", "extern", "static", "auto", "register" true when "const", "volatile", "restrict" true else false end end end PUNCTUATORS = [ "[", "]", "(", ")", "{", "}", ".", "->", "++", "--", "&", "*", "+", "-", "~", "!", "/", "%", "<<", ">>", "<", ">", "<=", ">=", "==", "!=", "^", "|", "&&", "||", "?", ":", ";", "...", "=", "*=", "/=", "%=", "+=", "-=", "<<=", ">>=", "&=", "^=", "|=", ",", "#", "##", "<:", ":>", "<%", "%>", "%:", "%:%:" ].to_set.freeze private_constant :PUNCTUATORS def may_represent_punctuator? @tokens.size == 1 && PUNCTUATORS.include?(@tokens.first.value) end def may_represent_controlling_keyword? return false if @tokens.size > 1 case @tokens.first.value when "while", "do", "for", "if", "else", "switch", "case", "default", "goto", "return", "break", "continue" true else false end end def to_s @tokens.map { |tok| tok.value }.join(" ") end def inspect(indent = 0) " " * indent + self.to_s end end class Expression < SyntaxNode def initialize(val) @value = val end attr_reader :value def to_s subclass_responsibility end end class ErrorExpression < Expression def initialize(err_tok) super(0) @error_token = err_tok end attr_reader :error_token def location @error_token.location end def to_s "" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@error_token.inspect})" end end class PrimaryExpression < Expression; end class ConstantSpecifier < PrimaryExpression def initialize(val, const) super(val) @constant = const end attr_reader :constant def location @constant.location end def to_s @constant.value end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{constant.inspect})" end end class GroupedExpression < PrimaryExpression def initialize(val, expr) super(val) @expression = expr end attr_reader :expression def location @expression.location end def to_s "(#{@expression.to_s})" end def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expression.inspect(indent + 1) end end class UnaryExpression < Expression def initialize(val, op) super(val) @operator = op end attr_reader :operator def location @operator.location end end class UnaryArithmeticExpression < UnaryExpression def initialize(val, op, expr) super(val, op) @expression = expr end attr_reader :expression def to_s "#{operator.value} #{@expression.to_s}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{operator.inspect})\n" + @expression.inspect(indent + 1) end end class DefinedExpression < UnaryExpression def initialize(val, op, id) super(val, op) @identifier = id end attr_reader :identifier def to_s "#{operator.value}(#{@identifier.value})" end def inspect(indent = 0) " " * indent + "#{short_class_name} " + "(#{operator.inspect} #{@identifier.inspect}" end end class BinaryExpression < Expression def initialize(val, op, lhs_expr, rhs_expr) super(val) @operator = op @lhs_expression = lhs_expr @rhs_expression = rhs_expr end attr_reader :operator attr_reader :lhs_expression attr_reader :rhs_expression def location @lhs_expression.location end def to_s "#{@lhs_expression.to_s} #{@operator.value} #{@rhs_expression.to_s}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@operator.inspect})\n" + @lhs_expression.inspect(indent + 1) + "\n" + @rhs_expression.inspect(indent + 1) end end class MultiplicativeExpression < BinaryExpression; end class AdditiveExpression < BinaryExpression; end class ShiftExpression < BinaryExpression; end class RelationalExpression < BinaryExpression; end class EqualityExpression < BinaryExpression; end class AndExpression < BinaryExpression; end class ExclusiveOrExpression < BinaryExpression; end class InclusiveOrExpression < BinaryExpression; end class LogicalAndExpression < BinaryExpression; end class LogicalOrExpression < BinaryExpression; end class ConditionalExpression < Expression def initialize(val, cond, fst_expr, snd_expr) super(val) @condition = cond @first_expression = fst_expr @second_expression = snd_expr end attr_reader :condition attr_reader :first_expression attr_reader :second_expression def location @condition.location end def to_s "#{@condition.to_s}? " + "#{@first_expression.to_s} : #{@second_expression.to_s}" end def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@condition.inspect})\n" + @first_expression.inspect(indent + 1) + "\n" + @second_expression.inspect(indent + 1) end end class CommaSeparatedExpression < Expression def initialize(val) super(val) @expressions = [] end attr_writer :expressions def location @expressions.first.location end def to_s @expressions.map { |expr| expr.to_s }.join(",") end def push(expression) @expressions.push(expression) self end def inspect(indent = 0) ([" " * indent + short_class_name] + @expressions.map { |expr| expr.inspect(indent + 1) }).join("\n") end end class SyntaxTreeVisitor def visit_identifier_list(node) end def visit_preprocessing_file(node) node.group.accept(self) if node.group end def visit_group(node) node.group_parts.each { |group_part| group_part.accept(self) } end def visit_if_section(node) node.if_group.accept(self) if node.if_group node.elif_groups.accept(self) if node.elif_groups node.else_group.accept(self) if node.else_group node.endif_line.accept(self) if node.endif_line end def visit_if_statement(node) node.expression.accept(self) node.group.accept(self) if node.group end def visit_ifdef_statement(node) node.group.accept(self) if node.group end def visit_ifndef_statement(node) node.group.accept(self) if node.group end def visit_elif_groups(node) node.elif_statements.each { |elif_stmt| elif_stmt.accept(self) } end def visit_elif_statement(node) node.expression.accept(self) node.group.accept(self) if node.group end def visit_else_statement(node) node.group.accept(self) if node.group end def visit_endif_line(node) end def visit_user_include_line(node) end def visit_system_include_line(node) end def visit_user_include_next_line(node) end def visit_system_include_next_line(node) end def visit_object_like_define_line(node) end def visit_function_like_define_line(node) end def visit_va_function_like_define_line(node) end def visit_undef_line(node) end def visit_line_line(node) end def visit_error_line(node) end def visit_pragma_line(node) end def visit_text_line(node) end def visit_null_directive(node) end def visit_unknown_directive(node) end def visit_asm_section(node) end def visit_pp_tokens(node) end def visit_error_expression(node) end def visit_constant_specifier(node) end def visit_grouped_expression(node) node.expression.accept(self) end def visit_unary_arithmetic_expression(node) node.expression.accept(self) end def visit_defined_expression(node) end def visit_multiplicative_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_additive_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_shift_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_relational_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_equality_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_and_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_exclusive_or_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_inclusive_or_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_logical_and_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_logical_or_expression(node) node.lhs_expression.accept(self) node.rhs_expression.accept(self) end def visit_conditional_expression(node) node.condition.accept(self) node.first_expression.accept(self) node.second_expression.accept(self) end def visit_comma_separated_expression(node) node.expressions.each { |expr| expr.accept(self) } end end class SyntaxTreeMulticastVisitor < SyntaxTreeVisitor extend Pluggable def_plugin :enter_identifier_list def_plugin :leave_identifier_list def_plugin :enter_preprocessing_file def_plugin :leave_preprocessing_file def_plugin :enter_group def_plugin :leave_group def_plugin :enter_if_section def_plugin :leave_if_section def_plugin :enter_if_statement def_plugin :leave_if_statement def_plugin :enter_ifdef_statement def_plugin :leave_ifdef_statement def_plugin :enter_ifndef_statement def_plugin :leave_ifndef_statement def_plugin :enter_elif_groups def_plugin :leave_elif_groups def_plugin :enter_elif_statement def_plugin :leave_elif_statement def_plugin :enter_else_statement def_plugin :leave_else_statement def_plugin :enter_endif_line def_plugin :leave_endif_line def_plugin :enter_user_include_line def_plugin :leave_user_include_line def_plugin :enter_system_include_line def_plugin :leave_system_include_line def_plugin :enter_user_include_next_line def_plugin :leave_user_include_next_line def_plugin :enter_system_include_next_line def_plugin :leave_system_include_next_line def_plugin :enter_object_like_define_line def_plugin :leave_object_like_define_line def_plugin :enter_function_like_define_line def_plugin :leave_function_like_define_line def_plugin :enter_va_function_like_define_line def_plugin :leave_va_function_like_define_line def_plugin :enter_undef_line def_plugin :leave_undef_line def_plugin :enter_line_line def_plugin :leave_line_line def_plugin :enter_error_line def_plugin :leave_error_line def_plugin :enter_pragma_line def_plugin :leave_pragma_line def_plugin :enter_text_line def_plugin :leave_text_line def_plugin :enter_null_directive def_plugin :leave_null_directive def_plugin :enter_unknown_directive def_plugin :leave_unknown_directive def_plugin :enter_pp_tokens def_plugin :leave_pp_tokens def_plugin :enter_error_expression def_plugin :leave_error_expression def_plugin :enter_constant_specifier def_plugin :leave_constant_specifier def_plugin :enter_grouped_expression def_plugin :leave_grouped_expression def_plugin :enter_unary_arithmetic_expression def_plugin :leave_unary_arithmetic_expression def_plugin :enter_defined_expression def_plugin :leave_defined_expression def_plugin :enter_multiplicative_expression def_plugin :leave_multiplicative_expression def_plugin :enter_additive_expression def_plugin :leave_additive_expression def_plugin :enter_shift_expression def_plugin :leave_shift_expression def_plugin :enter_relational_expression def_plugin :leave_relational_expression def_plugin :enter_equality_expression def_plugin :leave_equality_expression def_plugin :enter_and_expression def_plugin :leave_and_expression def_plugin :enter_exclusive_or_expression def_plugin :leave_exclusive_or_expression def_plugin :enter_inclusive_or_expression def_plugin :leave_inclusive_or_expression def_plugin :enter_logical_and_expression def_plugin :leave_logical_and_expression def_plugin :enter_logical_or_expression def_plugin :leave_logical_or_expression def_plugin :enter_conditional_expression def_plugin :leave_conditional_expression def_plugin :enter_comma_separated_expression def_plugin :leave_comma_separated_expression def self.def_visitor_method(node_name) class_eval <<-EOS define_method("visit_#{node_name}") do |*args| visit_with_notifying(__method__, args.first) { super(args.first) } end EOS end private_class_method :def_visitor_method def_visitor_method :identifier_list def_visitor_method :preprocessing_file def_visitor_method :group def_visitor_method :if_section def_visitor_method :if_statement def_visitor_method :ifdef_statement def_visitor_method :ifndef_statement def_visitor_method :elif_groups def_visitor_method :elif_statement def_visitor_method :else_statement def_visitor_method :endif_line def_visitor_method :user_include_line def_visitor_method :system_include_line def_visitor_method :user_include_next_line def_visitor_method :system_include_next_line def_visitor_method :object_like_define_line def_visitor_method :function_like_define_line def_visitor_method :va_function_like_define_line def_visitor_method :undef_line def_visitor_method :line_line def_visitor_method :error_line def_visitor_method :pragma_line def_visitor_method :text_line def_visitor_method :null_directive def_visitor_method :unknown_directive def_visitor_method :pp_tokens def_visitor_method :error_expression def_visitor_method :constant_specifier def_visitor_method :grouped_expression def_visitor_method :unary_arithmetic_expression def_visitor_method :defined_expression def_visitor_method :multiplicative_expression def_visitor_method :additive_expression def_visitor_method :shift_expression def_visitor_method :relational_expression def_visitor_method :equality_expression def_visitor_method :and_expression def_visitor_method :exclusive_or_expression def_visitor_method :inclusive_or_expression def_visitor_method :logical_and_expression def_visitor_method :logical_or_expression def_visitor_method :conditional_expression def_visitor_method :comma_separated_expression private def visit_with_notifying(caller_method, node, &block) suffix = caller_method.to_s.sub(/\Avisit_/, "") __send__("enter_#{suffix}").invoke(node) yield __send__("leave_#{suffix}").invoke(node) end end module SyntaxNodeCollector def collect_define_lines(node) if node DefineLineCollector.new.tap { |col| node.accept(col) }.define_lines else [] end end module_function :collect_define_lines def collect_undef_lines(node) if node UndefLineCollector.new.tap { |col| node.accept(col) }.undef_lines else [] end end module_function :collect_undef_lines end class DefineLineCollector < SyntaxTreeVisitor def initialize @define_lines = [] end attr_reader :define_lines def visit_object_like_define_line(node) super @define_lines.push(node) end def visit_function_like_define_line(node) super @define_lines.push(node) end def visit_va_function_like_define_line(node) super @define_lines.push(node) end end class UndefLineCollector < SyntaxTreeVisitor def initialize @undef_lines = [] end attr_reader :undef_lines def visit_undef_line(node) super @undef_lines.push(node) end end end end adlint-3.2.0/lib/adlint/cpp/lexer.rb0000644000004100000410000005763212224440633017303 0ustar www-datawww-data# Lexical analyzer which tokenizes C language source into pp-tokens. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/lexer" require "adlint/report" require "adlint/util" module AdLint #:nodoc: module Cpp #:nodoc: class Lexer def initialize(src, traits) src.on_cr_at_eol_found += lambda { |loc| on_cr_at_eol_found.invoke(loc) } src.on_eof_mark_at_eof_found += lambda { |loc| on_eof_mark_at_eof_found.invoke(loc) } src.on_eof_newline_not_found += method(:notify_eof_newline_not_found) tab_width = traits.of_project.coding_style.tab_width @content = SourceContent.lazy_new(src, tab_width) @state = Initial.new(self) @top_token = nil end attr_reader :content extend Pluggable def_plugin :on_block_comment_found def_plugin :on_line_comment_found def_plugin :on_nested_block_comment_found def_plugin :on_unterminated_block_comment def_plugin :on_eof_newline_not_found def_plugin :on_unlexable_char_found def_plugin :on_cr_at_eol_found def_plugin :on_eof_mark_at_eof_found def_plugin :on_illformed_newline_escape_found def next_token if @top_token tok = @top_token @top_token = nil return tok end @state.next_token end def top_token @top_token ? @top_token : (@top_token = self.next_token) end def skip_group group_depth = 1 until @content.empty? scan_until_next_directive_or_comment(@content) case when @content.check(/\/\*|\/\//) discard_heading_comments when @content.check(/[ \t]*#[ \t]*(?:if|ifdef|ifndef|asm)\b/) group_depth += 1 @content.scan(/.*?\n/) when @content.check(/[ \t]*#[ \t]*(?:else|elif)\b/) return true if group_depth == 1 @content.scan(/.*?\n/) when @content.check(/[ \t]*#[ \t]*(?:endif|endasm)\b/) group_depth -= 1 return true if group_depth == 0 @content.scan(/.*?\n/) end end false end def discard_heading_comments case when @content.check(/\/\*/) loc = @content.location comment = scan_block_comment(@content) unless comment.empty? notify_block_comment_found(comment, loc) return true end when @content.check(/\/\//) loc = @content.location comment = scan_line_comment(@content) unless comment.empty? notify_line_comment_found(comment, loc) return true end end false end def transit(next_state) @state = next_state end def notify_block_comment_found(comment, loc) on_block_comment_found.invoke(comment, loc) end def notify_line_comment_found(comment, loc) on_line_comment_found.invoke(comment, loc) end def notify_nested_block_comment_found(loc) on_nested_block_comment_found.invoke(loc) end def notify_unterminated_block_comment(loc) on_unterminated_block_comment.invoke(loc) end def notify_eof_newline_not_found(loc) on_eof_newline_not_found.invoke(loc) end def notify_unlexable_char_found(char, loc) on_unlexable_char_found.invoke(char, loc) end def notify_illformed_newline_escape_found(loc) on_illformed_newline_escape_found.invoke(loc) end private GROUP_DIRECTIVE_RE = /^[ \t]*#[ \t]*(?:if|ifdef|ifndef|asm|else|elif|endif|endasm)\b/ private_constant :GROUP_DIRECTIVE_RE def scan_until_next_directive_or_comment(cont) cont.scan(/.*?(?=#{GROUP_DIRECTIVE_RE}|\/\*|\/\/)/m) end def scan_block_comment(cont) comment = "" nest_depth = 0 until cont.empty? loc = cont.location case when nest_depth == 0 && cont.scan(/\/\*/) nest_depth = 1 comment += "/*" when nest_depth > 0 && cont.check(/\/\*\//) comment += cont.scan(/\//) when nest_depth > 0 && cont.check(/\/\*/) nest_depth += 1 comment += cont.scan(/\/\*/) notify_nested_block_comment_found(loc) when cont.scan(/\*\//) comment += "*/" break when nest_depth == 0 return nil else if scanned = cont.scan(/.*?(?=\/\*|\*\/)/m) comment += scanned else notify_unterminated_block_comment(loc) end end end comment end def scan_line_comment(cont) cont.scan(/\/\/.*?(?=\n)/) end end class LexerState def initialize(lexer) @lexer = lexer end def next_token subclass_responsibility end private def discard_heading_comments @lexer.discard_heading_comments end def scan_escaped_newline(cont) loc = cont.location case when escaped_nl = cont.scan(/\\\n/) escaped_nl when escaped_nl = cont.scan(/\\[ \t]+\n/) @lexer.notify_illformed_newline_escape_found(loc) escaped_nl else nil end end def tokenize_pp_token(cont) loc = cont.location case when val = Language::C.scan_keyword(cont), val = Language::Cpp.scan_keyword(cont) Token.new(:PP_TOKEN, val, loc, Language::C::KEYWORDS[val]) when val = Language::C.scan_char_constant(cont), val = Language::C.scan_floating_constant(cont), val = Language::C.scan_integer_constant(cont) Token.new(:PP_TOKEN, val, loc, :CONSTANT) when val = Language::C.scan_string_literal(cont) Token.new(:PP_TOKEN, val, loc, :STRING_LITERAL) when val = Language::C.scan_null_constant(cont) Token.new(:PP_TOKEN, val, loc, :NULL) when val = Language::C.scan_identifier(cont) Token.new(:PP_TOKEN, val, loc, :IDENTIFIER) when val = Language::Cpp.scan_punctuator(cont) Token.new(:PP_TOKEN, val, loc, val) else nil end end def tokenize_new_line(cont) loc = cont.location if val = cont.scan(/\n/) return Token.new(:NEW_LINE, val, loc) end nil end def tokenize_header_name(cont) loc = cont.location if val = Language::Cpp.scan_system_header_name(cont) return Token.new(:SYS_HEADER_NAME, val, loc) elsif val = Language::Cpp.scan_user_header_name(cont) return Token.new(:USR_HEADER_NAME, val, loc) end nil end def tokenize_identifier(cont) loc = cont.location if val = Language::C.scan_identifier(cont) return Token.new(:IDENTIFIER, val, loc) end nil end def tokenize_punctuator(cont) loc = cont.location if punctuator = Language::Cpp.scan_punctuator(cont) return Token.new(punctuator, punctuator, loc) end nil end def tokenize_extra_token(cont) # NOTE: #tokenize_pp_token can tokenize almost all types of tokens. if tok = tokenize_pp_token(cont) Token.new(:EXTRA_TOKEN, tok.value, tok.location) else nil end end end class Initial < LexerState def next_token # NOTE: An escaped newline may appear at the line above a preprocessing # directive line. loop do unless discard_heading_comments || scan_escaped_newline(@lexer.content) break end end case when @lexer.content.check(/[ \t]*#/) case when tok = tokenize_if_directive(@lexer.content) @lexer.transit(InIfDirective.new(@lexer)) when tok = tokenize_ifdef_directive(@lexer.content) @lexer.transit(InIfdefDirective.new(@lexer)) when tok = tokenize_ifndef_directive(@lexer.content) @lexer.transit(InIfndefDirective.new(@lexer)) when tok = tokenize_elif_directive(@lexer.content) @lexer.transit(InElifDirective.new(@lexer)) when tok = tokenize_else_directive(@lexer.content) @lexer.transit(InElseDirective.new(@lexer)) when tok = tokenize_endif_directive(@lexer.content) @lexer.transit(InEndifDirective.new(@lexer)) when tok = tokenize_include_directive(@lexer.content) @lexer.transit(InIncludeDirective.new(@lexer)) when tok = tokenize_include_next_directive(@lexer.content) @lexer.transit(InIncludeNextDirective.new(@lexer)) when tok = tokenize_define_directive(@lexer.content) @lexer.transit(InDefineDirective.new(@lexer)) when tok = tokenize_undef_directive(@lexer.content) @lexer.transit(InUndefDirective.new(@lexer)) when tok = tokenize_line_directive(@lexer.content) @lexer.transit(InLineDirective.new(@lexer)) when tok = tokenize_error_directive(@lexer.content) @lexer.transit(InErrorDirective.new(@lexer)) when tok = tokenize_pragma_directive(@lexer.content) @lexer.transit(InPragmaDirective.new(@lexer)) when tok = tokenize_asm_directive(@lexer.content) @lexer.transit(InAsmDirective.new(@lexer)) when tok = tokenize_endasm_directive(@lexer.content) @lexer.transit(InEndasmDirective.new(@lexer)) else tok = tokenize_null_directive(@lexer.content) || tokenize_unknown_directive(@lexer.content) end else tok = tokenize_text_line(@lexer.content) end tok end private def tokenize_if_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*if\b/) return Token.new(:IF, val, loc) end nil end def tokenize_ifdef_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*ifdef\b/) return Token.new(:IFDEF, val, loc) end nil end def tokenize_ifndef_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*ifndef\b/) return Token.new(:IFNDEF, val, loc) end nil end def tokenize_elif_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*elif\b/) return Token.new(:ELIF, val, loc) end nil end def tokenize_else_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*else\b/) return Token.new(:ELSE, val, loc) end nil end def tokenize_endif_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*endif\b/) return Token.new(:ENDIF, val, loc) end nil end def tokenize_include_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*include\b/) return Token.new(:INCLUDE, val, loc) end nil end def tokenize_include_next_directive(cont) # NOTE: #include_next directive is a GCC extension. loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*include_next\b/) return Token.new(:INCLUDE_NEXT, val, loc) end nil end def tokenize_define_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*define\b/) return Token.new(:DEFINE, val, loc) end nil end def tokenize_undef_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*undef\b/) return Token.new(:UNDEF, val, loc) end nil end def tokenize_line_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*line\b/) return Token.new(:LINE, val, loc) end nil end def tokenize_error_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*error\b/) return Token.new(:ERROR, val, loc) end nil end def tokenize_pragma_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*pragma\b/) return Token.new(:PRAGMA, val, loc) end nil end def tokenize_asm_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*asm\b/) return Token.new(:ASM, val, loc) end nil end def tokenize_endasm_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]*endasm\b/) return Token.new(:ENDASM, val, loc) end nil end def tokenize_null_directive(cont) loc = cont.location if val = cont.scan(/[ \t]*#[ \t]\n/) return Token.new(:NULL_DIRECTIVE, val, loc) end nil end def tokenize_unknown_directive(cont) loc = cont.location val = cont.scan(/[ \t]*#/) until cont.empty? next if discard_heading_comments || scan_escaped_newline(cont) case when str = cont.scan(/.+?(?=\/\*|\/\/|\\[ \t]*\n|L?"|L?'|\n)/i) val += str when str = cont.scan(/\n/) val += str break end end Token.new(:UNKNOWN_DIRECTIVE, val, loc) end def tokenize_text_line(cont) loc = cont.location val = "" until cont.empty? if tok = cont.scan(/.*?(?=\/\*|\/\/|\\[ \t]*\n|L?"|L?'|\n)/i) val += tok end if tok = cont.scan(/\n/) val += tok break end next if scan_escaped_newline(cont) case when cont.check(/\/\*/) discard_heading_comments when cont.check(/\/\//) discard_heading_comments when cont.check(/L?"/i) string_literal = Language::C.scan_string_literal(cont) val += string_literal when cont.check(/L?'/i) char_constant = Language::C.scan_char_constant(cont) val += char_constant end end val.empty? ? nil : Token.new(:TEXT_LINE, val, loc) end end class InIfDirective < LexerState def next_token until @lexer.content.empty? if discard_heading_comments || scan_escaped_newline(@lexer.content) next end tok = tokenize_pp_token(@lexer.content) || tokenize_new_line(@lexer.content) || tokenize_extra_token(@lexer.content) if tok break else @lexer.content.eat! end end unless tok tok = Token.new(:NEW_LINE, "\n", @lexer.content.location) @lexer.notify_eof_newline_not_found(tok.location) end if tok.type == :NEW_LINE @lexer.transit(Initial.new(@lexer)) end tok end end class InIfdefDirective < LexerState def next_token until @lexer.content.empty? if discard_heading_comments || scan_escaped_newline(@lexer.content) next end tok = tokenize_identifier(@lexer.content) || tokenize_new_line(@lexer.content) || tokenize_extra_token(@lexer.content) if tok break else @lexer.content.eat! end end unless tok tok = Token.new(:NEW_LINE, "\n", @lexer.content.location) @lexer.notify_eof_newline_not_found(tok.location) end if tok.type == :NEW_LINE @lexer.transit(Initial.new(@lexer)) end tok end end class InIfndefDirective < InIfdefDirective; end class InElifDirective < InIfDirective; end class InElseDirective < LexerState def next_token until @lexer.content.empty? if discard_heading_comments || scan_escaped_newline(@lexer.content) next end tok = tokenize_new_line(@lexer.content) || tokenize_extra_token(@lexer.content) if tok break else @lexer.content.eat! end end unless tok tok = Token.new(:NEW_LINE, "\n", @lexer.content.location) @lexer.notify_eof_newline_not_found(tok.location) end if tok.type == :NEW_LINE @lexer.transit(Initial.new(@lexer)) end tok end end class InEndifDirective < InElseDirective; end class InIncludeDirective < LexerState def next_token until @lexer.content.empty? if discard_heading_comments || scan_escaped_newline(@lexer.content) next end tok = tokenize_header_name(@lexer.content) || tokenize_pp_token(@lexer.content) || tokenize_new_line(@lexer.content) || tokenize_extra_token(@lexer.content) if tok break else @lexer.content.eat! end end unless tok tok = Token.new(:NEW_LINE, "\n", @lexer.content.location) @lexer.notify_eof_newline_not_found(tok.location) end if tok.type == :NEW_LINE @lexer.transit(Initial.new(@lexer)) end tok end end class InIncludeNextDirective < InIncludeDirective; end class InDefineDirective < LexerState def initialize(lexer) super @tokens = [] end def next_token if @tokens.empty? tokenize_macro_name(@lexer.content) tokenize_pp_tokens(@lexer.content) end tok = @tokens.shift @lexer.transit(Initial.new(@lexer)) if @tokens.empty? tok end private def tokenize_macro_name(cont) until cont.empty? next if discard_heading_comments || scan_escaped_newline(cont) if tok = tokenize_identifier(cont) @tokens.push(tok) break else cont.eat! end end return unless cont.check(/\(/) paren_depth = 0 until cont.empty? next if discard_heading_comments || scan_escaped_newline(cont) if tok = tokenize_identifier(cont) @tokens.push(tok) next end if tok = tokenize_punctuator(cont) @tokens.push(tok) case tok.type when "(" paren_depth += 1 when ")" paren_depth -= 1 break if paren_depth == 0 end next end if tok = tokenize_new_line(cont) @tokens.push(tok) break end cont.eat! end end def tokenize_pp_tokens(cont) until cont.empty? next if discard_heading_comments || scan_escaped_newline(cont) tok = tokenize_pp_token(cont) || tokenize_new_line(cont) if tok @tokens.push(tok) if tok.type == :NEW_LINE break end else loc = cont.location if eaten = cont.eat! and eaten !~ /\A\s\z/ @lexer.notify_unlexable_char_found(eaten, loc) end end end unless @tokens.last && @tokens.last.type == :NEW_LINE tok = Token.new(:NEW_LINE, "\n", cont.location) @lexer.notify_eof_newline_not_found(tok.location) @tokens.push(tok) end end end class InUndefDirective < InDefineDirective; end class InLineDirective < InIfDirective; end class InErrorDirective < InLineDirective; end class InPragmaDirective < InLineDirective; end class InAsmDirective < InElseDirective; end class InEndasmDirective < InElseDirective; end class StringToPPTokensLexer < StringLexer def initialize(str, tab_width = 8) super(str) @tab_width = tab_width end private def create_lexer_context(str) lexer_ctxt = LexerContext.new(create_content(str)) class << lexer_ctxt attr_accessor :last_symbol end lexer_ctxt end def create_content(str) StringContent.new(str, @tab_width) end def tokenize(lexer_ctxt) tok_ary = TokenArray.new until lexer_ctxt.content.empty? next if tokenize_pp_token(lexer_ctxt, tok_ary) loc = lexer_ctxt.location if new_line = lexer_ctxt.content.scan(/\n/) tok_ary.push(Token.new(:NEW_LINE, new_line, loc)) break else lexer_ctxt.content.eat! end end tok_ary end def tokenize_pp_token(lexer_ctxt, tok_ary) pp_tok = tokenize_keyword(lexer_ctxt) || tokenize_constant(lexer_ctxt) || tokenize_string_literal(lexer_ctxt) || tokenize_null_constant(lexer_ctxt) || tokenize_identifier(lexer_ctxt) || tokenize_punctuator(lexer_ctxt) || tokenize_backslash(lexer_ctxt) if pp_tok tok_ary.push(pp_tok) return true end false end def tokenize_keyword(lexer_ctxt) loc = lexer_ctxt.location keyword = Language::C.scan_keyword(lexer_ctxt.content) || Language::Cpp.scan_keyword(lexer_ctxt.content) if keyword lexer_ctxt.last_symbol = :KEYWORD Token.new(:PP_TOKEN, keyword, loc, Language::C::KEYWORDS[keyword]) else nil end end def tokenize_constant(lexer_ctxt) loc = lexer_ctxt.location # NOTE: For extended bit-access operators. return nil if lexer_ctxt.last_symbol == :IDENTIFIER constant = Language::C.scan_char_constant(lexer_ctxt.content) || Language::C.scan_floating_constant(lexer_ctxt.content) || Language::C.scan_integer_constant(lexer_ctxt.content) if constant lexer_ctxt.last_symbol = :CONSTANT return Token.new(:PP_TOKEN, constant, loc, :CONSTANT) end nil end def tokenize_string_literal(lexer_ctxt) loc = lexer_ctxt.location string_literal = Language::C.scan_string_literal(lexer_ctxt.content) if string_literal lexer_ctxt.last_symbol = :STRING_LITERAL return Token.new(:PP_TOKEN, string_literal, loc, :STRING_LITERAL) end nil end def tokenize_null_constant(lexer_ctxt) loc = lexer_ctxt.location null_constant = Language::C.scan_null_constant(lexer_ctxt.content) if null_constant lexer_ctxt.last_symbol = :NULL return Token.new(:PP_TOKEN, null_constant, loc, :NULL) end nil end def tokenize_identifier(lexer_ctxt) loc = lexer_ctxt.location identifier = Language::C.scan_identifier(lexer_ctxt.content) if identifier lexer_ctxt.last_symbol = :IDENTIFIER return Token.new(:PP_TOKEN, identifier, loc, :IDENTIFIER) end nil end def tokenize_punctuator(lexer_ctxt) loc = lexer_ctxt.location punctuator = Language::Cpp.scan_punctuator(lexer_ctxt.content) if punctuator lexer_ctxt.last_symbol = :PUNCTUATOR return Token.new(:PP_TOKEN, punctuator, loc, punctuator) end nil end def tokenize_backslash(lexer_ctxt) loc = lexer_ctxt.location backslash = lexer_ctxt.content.scan(/\\/) if backslash lexer_ctxt.last_symbol = :BACKSLASH return Token.new(:PP_TOKEN, backslash, loc, backslash) end nil end end class TextLineToPPTokensLexer < StringToPPTokensLexer def initialize(text_line, tab_width) super(text_line.token.value, tab_width) @text_line = text_line end private def create_content(str) StringContent.new(str, @tab_width, *@text_line.location.to_a) end end end end adlint-3.2.0/lib/adlint/cpp/eval.rb0000644000004100000410000007552212224440633017111 0ustar www-datawww-data# C preprocessor. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/error" require "adlint/source" require "adlint/report" require "adlint/util" require "adlint/cpp/syntax" require "adlint/cpp/source" require "adlint/cpp/macro" require "adlint/cpp/lexer" require "adlint/cpp/constexpr" module AdLint #:nodoc: module Cpp #:nodoc: # == DESCRIPTION # C preprocessor language evaluator. # # Preprocessor executes recursive descent parsing and evaluation at a time. class Preprocessor include ReportUtil include LogUtil def execute(pp_ctxt, src) @pp_ctxt = pp_ctxt @pp_ctxt.push_lexer(create_lexer(@pp_ctxt, src)) preprocessing_file(@pp_ctxt) end extend Pluggable def_plugin :on_user_header_included def_plugin :on_system_header_included def_plugin :on_object_like_macro_defined def_plugin :on_function_like_macro_defined def_plugin :on_va_function_like_macro_defined def_plugin :on_macro_undefined def_plugin :on_asm_section_evaled def_plugin :on_unknown_pragma_evaled def_plugin :on_pp_token_extracted def_plugin :on_block_comment_found def_plugin :on_line_comment_found def_plugin :on_nested_block_comment_found def_plugin :on_eof_newline_not_found def_plugin :on_unlexable_char_found def_plugin :on_cr_at_eol_found def_plugin :on_eof_mark_at_eof_found def_plugin :on_illformed_newline_escape_found def_plugin :on_illformed_defined_op_found def_plugin :on_undefined_macro_referred def_plugin :on_extra_tokens_found private def preprocessing_file(pp_ctxt) PreprocessingFile.new(pp_ctxt.tunit_root_fpath, group(pp_ctxt)) end def group(pp_ctxt) if group_part = group_part(pp_ctxt) group = Group.new.push(group_part) while group_part = group_part(pp_ctxt) group.push(group_part) end return group end nil end def group_part(pp_ctxt) if top_tok = pp_ctxt.top_token case top_tok.type when :IF, :IFDEF, :IFNDEF return if_section(pp_ctxt) when :INCLUDE, :INCLUDE_NEXT, :DEFINE, :UNDEF, :LINE, :ERROR, :PRAGMA return control_line(pp_ctxt) when :ASM return asm_section(pp_ctxt) when :NULL_DIRECTIVE return NullDirective.new(pp_ctxt.next_token) when :UNKNOWN_DIRECTIVE return UnknownDirective.new(pp_ctxt.next_token) when :TEXT_LINE text_line = TextLine.new(pp_ctxt.next_token) toks = TextLineNormalizer.normalize(text_line, pp_ctxt) if toks pp_ctxt.deferred_text_lines.clear toks.each do |tok| pp_ctxt.source.add_token(tok) notify_pp_token_extracted(tok) end else pp_ctxt.deferred_text_lines.push(text_line) end return text_line end end nil end def if_section(pp_ctxt) pp_ctxt.push_branch if_group = if_group(pp_ctxt) while top_tok = pp_ctxt.top_token case top_tok.type when :ELIF elif_groups = elif_groups(pp_ctxt) when :ELSE else_group = else_group(pp_ctxt) when :ENDIF endif_line = endif_line(pp_ctxt) break end end E(:E0004, if_group.location) unless endif_line pp_ctxt.pop_branch IfSection.new(if_group, elif_groups, else_group, endif_line) end def if_group(pp_ctxt) if keyword = pp_ctxt.top_token case keyword.type when :IF return if_statement(pp_ctxt) when :IFDEF return ifdef_statement(pp_ctxt) when :IFNDEF return ifndef_statement(pp_ctxt) end end nil end def if_statement(pp_ctxt) keyword = pp_ctxt.next_token unless pp_toks = pp_tokens(pp_ctxt) return nil end discard_extra_tokens_until_newline(pp_ctxt) expr = ExpressionNormalizer.normalize(pp_toks, pp_ctxt, self) if expr.value == 0 pp_ctxt.skip_group else group = group(pp_ctxt) pp_ctxt.branch_evaluated = true end IfStatement.new(keyword, expr, group) end def ifdef_statement(pp_ctxt) keyword = pp_ctxt.next_token unless id = pp_ctxt.next_token and id.type == :IDENTIFIER return nil end discard_extra_tokens_until_newline(pp_ctxt) if macro_defined?(pp_ctxt, id) group = group(pp_ctxt) pp_ctxt.branch_evaluated = true else pp_ctxt.skip_group end IfdefStatement.new(keyword, id, group) end def ifndef_statement(pp_ctxt) keyword = pp_ctxt.next_token unless id = pp_ctxt.next_token and id.type == :IDENTIFIER return nil end discard_extra_tokens_until_newline(pp_ctxt) if macro_defined?(pp_ctxt, id) pp_ctxt.skip_group else group = group(pp_ctxt) pp_ctxt.branch_evaluated = true end IfndefStatement.new(keyword, id, group) end def elif_groups(pp_ctxt) if elif_group = elif_group(pp_ctxt) elif_groups = ElifGroups.new.push(elif_group) while elif_group = elif_group(pp_ctxt) elif_groups.push(elif_group) end return elif_groups end nil end def elif_group(pp_ctxt) unless top_tok = pp_ctxt.top_token and top_tok.type == :ELIF return nil end if keyword = pp_ctxt.next_token if keyword.type == :ELIF unless pp_toks = pp_tokens(pp_ctxt) return nil end discard_extra_tokens_until_newline(pp_ctxt) expr = ExpressionNormalizer.normalize(pp_toks, pp_ctxt, self) if pp_ctxt.branch_evaluated? || expr.value == 0 pp_ctxt.skip_group else group = group(pp_ctxt) pp_ctxt.branch_evaluated = true end return ElifStatement.new(keyword, expr, group) end end nil end def else_group(pp_ctxt) if keyword = pp_ctxt.next_token if keyword.type == :ELSE discard_extra_tokens_until_newline(pp_ctxt) if pp_ctxt.branch_evaluated? pp_ctxt.skip_group else group = group(pp_ctxt) pp_ctxt.branch_evaluated = true end return ElseStatement.new(keyword, group) end end nil end def endif_line(pp_ctxt) if keyword = pp_ctxt.next_token if keyword.type == :ENDIF discard_extra_tokens_until_newline(pp_ctxt) return EndifLine.new(keyword) end end nil end def control_line(pp_ctxt) if keyword = pp_ctxt.top_token case keyword.type when :INCLUDE return include_line(pp_ctxt) when :INCLUDE_NEXT return include_next_line(pp_ctxt) when :DEFINE return define_line(pp_ctxt) when :UNDEF return undef_line(pp_ctxt) when :LINE return line_line(pp_ctxt) when :ERROR return error_line(pp_ctxt) when :PRAGMA return pragma_line(pp_ctxt) end end nil end def include_line(pp_ctxt) keyword = pp_ctxt.next_token if header_name = pp_ctxt.top_token case header_name.type when :USR_HEADER_NAME return user_include_line(pp_ctxt, keyword) when :SYS_HEADER_NAME return system_include_line(pp_ctxt, keyword) else return macro_include_line(pp_ctxt, keyword) end end nil end def include_next_line(pp_ctxt) keyword = pp_ctxt.next_token if header_name = pp_ctxt.top_token case header_name.type when :USR_HEADER_NAME return user_include_next_line(pp_ctxt, keyword) when :SYS_HEADER_NAME return system_include_next_line(pp_ctxt, keyword) else return macro_include_next_line(pp_ctxt, keyword) end end nil end def user_include_line(pp_ctxt, keyword) header_name = pp_ctxt.next_token discard_extra_tokens_until_newline(pp_ctxt) usr_include_line = UserIncludeLine.new(keyword, header_name, pp_ctxt.include_depth) include_first_user_header(usr_include_line, pp_ctxt) usr_include_line end def user_include_next_line(pp_ctxt, keyword) header_name = pp_ctxt.next_token discard_extra_tokens_until_newline(pp_ctxt) usr_include_next_line = UserIncludeNextLine.new(keyword, header_name, pp_ctxt.include_depth) include_next_user_header(usr_include_next_line, pp_ctxt) usr_include_next_line end def system_include_line(pp_ctxt, keyword) header_name = pp_ctxt.next_token discard_extra_tokens_until_newline(pp_ctxt) sys_include_line = SystemIncludeLine.new(keyword, header_name, pp_ctxt.include_depth) include_first_system_header(sys_include_line, pp_ctxt) sys_include_line end def system_include_next_line(pp_ctxt, keyword) header_name = pp_ctxt.next_token discard_extra_tokens_until_newline(pp_ctxt) sys_include_next_line = SystemIncludeNextLine.new(keyword, header_name, pp_ctxt.include_depth) include_next_system_header(sys_include_next_line, pp_ctxt) sys_include_next_line end def macro_include_line(pp_ctxt, keyword) unless pp_toks = pp_tokens(pp_ctxt) return nil end discard_extra_tokens_until_newline(pp_ctxt) PPTokensNormalizer.normalize(pp_toks, pp_ctxt) unless pp_toks.tokens.empty? case param = pp_toks.tokens.map { |tok| tok.value }.join when /\A".*"\z/ usr_include_line = UserIncludeLine.new( keyword, Token.new(:USR_HEADER_NAME, param, pp_toks.tokens.first.location), pp_ctxt.include_depth) include_first_user_header(usr_include_line, pp_ctxt) return usr_include_line when /\A<.*>\z/ sys_include_line = SystemIncludeLine.new( keyword, Token.new(:SYS_HEADER_NAME, param, pp_toks.tokens.first.location), pp_ctxt.include_depth) include_first_system_header(sys_include_line, pp_ctxt) return sys_include_line end end E(:E0017, keyword.location) raise IllformedIncludeDirectiveError.new( keyword.location, pp_ctxt.msg_fpath, pp_ctxt.log_fpath) end def macro_include_next_line(pp_ctxt, keyword) unless pp_toks = pp_tokens(pp_ctxt) return nil end discard_extra_tokens_until_newline(pp_ctxt) PPTokensNormalizer.normalize(pp_toks, pp_ctxt) return nil if pp_toks.tokens.empty? case param = pp_toks.tokens.map { |tok| tok.value }.join when /\A".*"\z/ usr_include_next_line = UserIncludeNextLine.new( keyword, Token.new(:USR_HEADER_NAME, param, pp_toks.tokens.first.location), pp_ctxt.include_depth) include_next_user_header(usr_include_next_line, pp_ctxt) return usr_include_next_line when /\A<.*>\z/ sys_include_next_line = SystemIncludeNextLine.new( keyword, Token.new(:SYS_HEADER_NAME, param, pp_toks.tokens.first.location), pp_ctxt.include_depth) include_next_system_header(sys_include_next_line, pp_ctxt) return sys_include_next_line end nil end def define_line(pp_ctxt) keyword = pp_ctxt.next_token unless id = pp_ctxt.next_token and id.type == :IDENTIFIER return nil end sym = pp_ctxt.symbol_table.create_new_symbol(MacroName, id) if paren = pp_ctxt.top_token and paren.type == "(" pp_ctxt.next_token id_list = identifier_list(pp_ctxt) unless paren_or_ellipsis = pp_ctxt.next_token return nil end case paren_or_ellipsis.type when "..." ellipsis = paren_or_ellipsis if paren = pp_ctxt.top_token and paren.type == ")" pp_ctxt.next_token else return nil end when ")" ellipsis = nil else return nil end repl_list = replacement_list(pp_ctxt) discard_extra_tokens_until_newline(pp_ctxt) if ellipsis define_line = VaFunctionLikeDefineLine.new(keyword, id, id_list, repl_list, sym) macro = FunctionLikeMacro.new(define_line) notify_va_function_like_macro_defined(define_line, macro) else define_line = FunctionLikeDefineLine.new(keyword, id, id_list, repl_list, sym) macro = FunctionLikeMacro.new(define_line) notify_function_like_macro_defined(define_line, macro) end else repl_list = replacement_list(pp_ctxt) discard_extra_tokens_until_newline(pp_ctxt) define_line = ObjectLikeDefineLine.new(keyword, id, repl_list, sym) macro = ObjectLikeMacro.new(define_line) notify_object_like_macro_defined(define_line, macro) end pp_ctxt.macro_table.define(macro) define_line end def undef_line(pp_ctxt) keyword = pp_ctxt.next_token unless id = pp_ctxt.next_token and id.type == :IDENTIFIER return nil end discard_extra_tokens_until_newline(pp_ctxt) undef_line = UndefLine.new(keyword, id) macro = pp_ctxt.macro_table.lookup(id.value) # NOTE: Undefining macro may be nil if not defined. notify_macro_undefined(undef_line, macro) pp_ctxt.macro_table.undef(id.value) undef_line end def line_line(pp_ctxt) keyword = pp_ctxt.next_token pp_toks = pp_tokens(pp_ctxt) discard_extra_tokens_until_newline(pp_ctxt) # NOTE: The ISO C99 standard says; # # 6.10.4 Line control # # Semantics # # 5 A preprocessing directive of the form # # line pp-tokens new-line # that does not match one of the two previous forms is permitted. The # preprocessing tokens after line on the directive are processed just # as in normal text (each identifier currently defined as a macro name # is replaced by its replacement list of preprocessing tokens). The # directive resulting after all replacements shall match one of the two # previous forms and is then processed as appropriate. PPTokensNormalizer.normalize(pp_toks, pp_ctxt) if pp_toks LineLine.new(keyword, pp_toks) end def error_line(pp_ctxt) keyword = pp_ctxt.next_token pp_toks = pp_tokens(pp_ctxt) discard_extra_tokens_until_newline(pp_ctxt) ErrorLine.new(keyword, pp_toks) end def pragma_line(pp_ctxt) keyword = pp_ctxt.next_token pp_toks = pp_tokens(pp_ctxt) discard_extra_tokens_until_newline(pp_ctxt) pragma_line = PragmaLine.new(keyword, pp_toks) if pp_toks and pp_toks.tokens.size == 1 && pp_toks.tokens.first.value == "once" pp_ctxt.once_set.add(keyword.location.fpath) else notify_unknown_pragma_evaled(pragma_line) end pragma_line end def identifier_list(pp_ctxt) unless id = pp_ctxt.top_token and id.type == :IDENTIFIER return nil end id_list = IdentifierList.new while tok = pp_ctxt.next_token if tok.type == :IDENTIFIER id_list.push(tok) end if comma = pp_ctxt.top_token and comma.type == "," pp_ctxt.next_token else break end unless id = pp_ctxt.top_token and id.type == :IDENTIFIER break end end id_list end def replacement_list(pp_ctxt) pp_tokens(pp_ctxt) end def pp_tokens(pp_ctxt) unless pp_tok = pp_ctxt.top_token and pp_tok.type == :PP_TOKEN return nil end pp_toks = PPTokens.new while tok = pp_ctxt.top_token if tok.type == :PP_TOKEN pp_toks.push(pp_ctxt.next_token) else break end end pp_toks end def asm_section(pp_ctxt) asm_line = asm_line(pp_ctxt) pp_ctxt.skip_group endasm_line = endasm_line(pp_ctxt) asm_section = AsmSection.new(asm_line, endasm_line) notify_asm_section_evaled(asm_section) asm_section end def asm_line(pp_ctxt) if keyword = pp_ctxt.next_token if keyword.type == :ASM discard_extra_tokens_until_newline(pp_ctxt) return AsmLine.new(keyword) end end nil end def endasm_line(pp_ctxt) if keyword = pp_ctxt.next_token if keyword.type == :ENDASM discard_extra_tokens_until_newline(pp_ctxt) return EndasmLine.new(keyword) end end nil end def include_first_user_header(include_line, pp_ctxt) basename = include_line.header_name.value.sub(/\A"(.*)"\z/, "\\1") cur_dpath = include_line.location.fpath.dirname if fpath = resolve_first_user_header(basename, cur_dpath, pp_ctxt) include_user_header(fpath, include_line, pp_ctxt) else E(:E0010, include_line.location, basename) raise MissingUserHeaderError.new(include_line.location, basename, pp_ctxt.msg_fpath, pp_ctxt.log_fpath) end end def include_next_user_header(include_line, pp_ctxt) basename = include_line.header_name.value.sub(/\A"(.*)"\z/, "\\1") cur_dpath = include_line.location.fpath.dirname if fpath = resolve_next_user_header(basename, cur_dpath, pp_ctxt) include_user_header(fpath, include_line, pp_ctxt) else E(:E0010, include_line.location, basename) raise MissingUserHeaderError.new(include_line.location, basename, pp_ctxt.msg_fpath, pp_ctxt.log_fpath) end end def include_user_header(fpath, include_line, pp_ctxt) unless pp_ctxt.once_set.include?(fpath) LOG_I("including \"#{fpath}\" at #{include_line.location.to_s}") include_line.fpath = fpath usr_header = UserHeader.new(fpath, pp_ctxt.traits.of_project.file_encoding, include_line.location) pp_ctxt.push_lexer(create_lexer(pp_ctxt, usr_header)) pp_ctxt.sources.push(usr_header) notify_user_header_included(include_line, usr_header) end end def include_first_system_header(include_line, pp_ctxt) basename = include_line.header_name.value.sub(/\A<(.*)>\z/, "\\1") if fpath = resolve_first_system_header(basename, pp_ctxt) include_system_header(fpath, include_line, pp_ctxt) else E(:E0009, include_line.location, basename) raise MissingSystemHeaderError.new(include_line.location, basename, pp_ctxt.msg_fpath, pp_ctxt.log_fpath) end end def include_next_system_header(include_line, pp_ctxt) basename = include_line.header_name.value.sub(/\A<(.*)>\z/, "\\1") if fpath = resolve_next_system_header(basename, pp_ctxt) include_system_header(fpath, include_line, pp_ctxt) else E(:E0009, include_line.location, basename) raise MissingSystemHeaderError.new(include_line.location, basename, pp_ctxt.msg_fpath, pp_ctxt.log_fpath) end end def include_system_header(fpath, include_line, pp_ctxt) unless pp_ctxt.once_set.include?(fpath) LOG_I("including <#{fpath}> at #{include_line.location.to_s}") include_line.fpath = fpath # FIXME: The character encoding of system headers may not be same as # one of project's source files. sys_header = SystemHeader.new(fpath, pp_ctxt.traits.of_project.file_encoding, include_line.location) pp_ctxt.push_lexer(create_lexer(pp_ctxt, sys_header)) pp_ctxt.sources.push(sys_header) notify_system_header_included(include_line, sys_header) end end def resolve_first_user_header(basename, cur_dpath, pp_ctxt) resolve_user_headers(basename, cur_dpath, 1, pp_ctxt).first end def resolve_next_user_header(basename, cur_dpath, pp_ctxt) resolve_user_headers(basename, cur_dpath, 2, pp_ctxt).last end def resolve_user_headers(basename, cur_dpath, max_num, pp_ctxt) search_paths = [cur_dpath] search_paths += pp_ctxt.traits.of_project.file_search_paths search_paths += pp_ctxt.traits.of_compiler.file_search_paths base_fpath = Pathname.new(basename) if base_fpath.absolute? && base_fpath.readable? [base_fpath] else resolved = [] search_paths.each do |dpath| fpath = dpath.join(base_fpath) fpath = Pathname.new(fpath.to_s.gsub(/\\\\|\\/, "/")) resolved.push(fpath) if fpath.readable? break if resolved.size == max_num end resolved end end def resolve_first_system_header(basename, pp_ctxt) resolve_system_headers(basename, 1, pp_ctxt).first end def resolve_next_system_header(basename, pp_ctxt) resolve_system_headers(basename, 2, pp_ctxt).last end def resolve_system_headers(basename, max_num, pp_ctxt) search_paths = pp_ctxt.traits.of_project.file_search_paths search_paths += pp_ctxt.traits.of_compiler.file_search_paths base_fpath = Pathname.new(basename) if base_fpath.absolute? && base_fpath.readable? [base_fpath] else resolved = [] search_paths.each do |dpath| fpath = dpath.join(base_fpath) fpath = Pathname.new(fpath.to_s.gsub(/\\\\|\\/, "/")) resolved.push(fpath) if fpath.readable? break if resolved.size == max_num end resolved end end def macro_defined?(pp_ctxt, id) if macro = pp_ctxt.macro_table.lookup(id.value) macro.define_line.mark_as_referred_by(id) true else false end end def discard_extra_tokens_until_newline(pp_ctxt) extra_toks = [] while tok = pp_ctxt.next_token if tok.type == :NEW_LINE break else extra_toks.push(tok) end end notify_extra_tokens_found(extra_toks) unless extra_toks.empty? end def create_lexer(pp_ctxt, src) Lexer.new(src, pp_ctxt.traits).tap { |lexer| attach_lexer_plugin(lexer) } end def attach_lexer_plugin(lexer) lexer.on_block_comment_found += lambda { |*args| on_block_comment_found.invoke(*args) } lexer.on_line_comment_found += lambda { |*args| on_line_comment_found.invoke(*args) } lexer.on_nested_block_comment_found += lambda { |*args| on_nested_block_comment_found.invoke(*args) } lexer.on_unterminated_block_comment += lambda { |*args| handle_unterminated_block_comment(*args) } lexer.on_eof_newline_not_found += lambda { |*args| on_eof_newline_not_found.invoke(*args) } lexer.on_unlexable_char_found += lambda { |*args| on_unlexable_char_found.invoke(*args) } lexer.on_cr_at_eol_found += lambda { |*args| on_cr_at_eol_found.invoke(*args) } lexer.on_eof_mark_at_eof_found += lambda { |*args| on_eof_mark_at_eof_found.invoke(*args) } lexer.on_illformed_newline_escape_found += lambda { |*args| on_illformed_newline_escape_found.invoke(*args) } end def notify_user_header_included(usr_include_line, usr_header) on_user_header_included.invoke(usr_include_line, usr_header) end def notify_system_header_included(sys_include_line, sys_header) on_system_header_included.invoke(sys_include_line, sys_header) end def notify_object_like_macro_defined(define_line, macro) on_object_like_macro_defined.invoke(define_line, macro) end def notify_function_like_macro_defined(define_line, macro) on_function_like_macro_defined.invoke(define_line, macro) end def notify_va_function_like_macro_defined(define_line, macro) on_va_function_like_macro_defined.invoke(define_line, macro) end def notify_macro_undefined(undef_line, macro) on_macro_undefined.invoke(undef_line, macro) end def notify_asm_section_evaled(asm_section) on_asm_section_evaled.invoke(asm_section) end def notify_unknown_pragma_evaled(pragma_line) on_unknown_pragma_evaled.invoke(pragma_line) end def notify_pp_token_extracted(pp_tok) on_pp_token_extracted.invoke(pp_tok) end def notify_illformed_defined_op_found(loc, no_args) on_illformed_defined_op_found.invoke(loc, no_args) end def notify_undefined_macro_referred(id) on_undefined_macro_referred.invoke(id) end def notify_extra_tokens_found(extra_toks) on_extra_tokens_found.invoke(extra_toks) end def handle_unterminated_block_comment(loc) E(:E0016, loc) raise UnterminatedCommentError.new(loc, @pp_ctxt.msg_fpath, @pp_ctxt.log_fpath) end extend Forwardable def_delegator :@pp_ctxt, :report private :report def_delegator :@pp_ctxt, :message_catalog private :message_catalog def_delegator :@pp_ctxt, :logger private :logger end class PreprocessContext def initialize(phase_ctxt) @phase_ctxt = phase_ctxt @deferred_text_lines = [] @lexer_stack = [] @branch_stack = [] @once_set = Set.new end attr_reader :deferred_text_lines attr_reader :once_set extend Forwardable def_delegator :@phase_ctxt, :traits def_delegator :@phase_ctxt, :message_catalog def_delegator :@phase_ctxt, :report def_delegator :@phase_ctxt, :logger def_delegator :@phase_ctxt, :msg_fpath def_delegator :@phase_ctxt, :log_fpath def tunit_root_fpath @phase_ctxt[:sources].first.fpath end def source @phase_ctxt[:cc1_source] end def sources @phase_ctxt[:sources] end def symbol_table @phase_ctxt[:symbol_table] end def macro_table @phase_ctxt[:cpp_macro_table] end def push_lexer(lexer) @lexer_stack.push(lexer) end def top_token unless @lexer_stack.empty? unless tok = @lexer_stack.last.top_token @lexer_stack.pop top_token else tok end else nil end end def next_token if top_token @lexer_stack.last.next_token else nil end end def skip_group until @lexer_stack.last.skip_group @lexer_stack.pop break if @lexer_stack.empty? end end def push_branch @branch_stack.push(false) end def pop_branch @branch_stack.pop end def branch_evaluated=(evaluated) @branch_stack[-1] = evaluated end def branch_evaluated? @branch_stack.last end def include_depth @lexer_stack.size end end module PPTokensNormalizer def normalize(pp_toks, pp_ctxt) pp_ctxt.macro_table.replace(pp_toks.tokens) pp_toks end module_function :normalize end module ExpressionNormalizer def normalize(pp_toks, pp_ctxt, preprocessor = nil) PPTokensNormalizer.normalize(pp_toks, pp_ctxt) const_expr = ConstantExpression.new(pp_ctxt, pp_toks.tokens) if preprocessor const_expr.on_illformed_defined_op_found += preprocessor.method(:notify_illformed_defined_op_found) const_expr.on_undefined_macro_referred += preprocessor.method(:notify_undefined_macro_referred) end const_expr.evaluate end module_function :normalize end module TextLineNormalizer def normalize(text_line, pp_ctxt) tab_width = pp_ctxt.traits.of_project.coding_style.tab_width pp_toks = [] unless pp_ctxt.deferred_text_lines.empty? pp_ctxt.deferred_text_lines.each do |deferred_line| lexer = TextLineToPPTokensLexer.new(deferred_line, tab_width) pp_toks += lexer.execute.to_a end end lexer = TextLineToPPTokensLexer.new(text_line, tab_width) pp_toks += lexer.execute.to_a fun_like_macro_referred = pp_toks.any? { |tok| (macro = pp_ctxt.macro_table.lookup(tok.value)) ? macro.function_like? : false } if fun_like_macro_referred return nil unless complete_macro_reference?(pp_toks, pp_ctxt) end pp_ctxt.macro_table.replace(pp_toks) pp_toks end module_function :normalize def complete_macro_reference?(pp_toks, pp_ctxt) idx = 0 while tok = pp_toks[idx] idx += 1 macro = pp_ctxt.macro_table.lookup(tok.value) if macro && macro.function_like? next if not_calling_function_like_macro?(pp_toks, idx) else next end # NOTE: It's not completed when a new-line appears after the macro # name. return false unless pp_toks[idx..-1].any? { |t| t.value == "(" } paren_cnt = 0 while tok = pp_toks[idx] case tok.value when "(" paren_cnt += 1 when ")" paren_cnt -= 1 break if paren_cnt == 0 end idx += 1 end return false if paren_cnt > 0 end true end module_function :complete_macro_reference? def not_calling_function_like_macro?(pp_toks, idx) while pp_tok = pp_toks[idx] case when pp_tok.value == "(" return false when pp_tok.type == :NEW_LINE idx += 1 else return true end end false end module_function :not_calling_function_like_macro? end end end adlint-3.2.0/lib/adlint/cpp/source.rb0000644000004100000410000001125012224440633017446 0ustar www-datawww-data# Preprocessed pure C language source. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/util" require "adlint/cpp/asm" require "adlint/cpp/subst" module AdLint #:nodoc: module Cpp #:nodoc: class PreprocessedSource include InlineAssemblyDefinition def initialize(root_fpath) @root_fpath = root_fpath @tokens = [] end extend Pluggable def_plugin :on_language_extension def_plugin :on_inline_assembly attr_reader :root_fpath def add_token(tok) @tokens.push(tok) end def pp_tokens @tokens.select { |tok| tok.type == :PP_TOKEN } end def substitute_code_blocks(traits) traits.of_compiler.extension_substitutions.each do |ptn, repl| @tokens = create_extension_substitution(ptn, repl).execute(@tokens) end traits.of_compiler.arbitrary_substitutions.each do |ptn, repl| @tokens = create_arbitrary_substitution(ptn, repl).execute(@tokens) end create_inline_assembly_substitutions(self).each do |sub| @tokens = sub.execute(@tokens) end self end def to_s @lst_fpath = nil @lst_line_no = 0 @lst_column_no = 1 @lst_token = nil @io = StringIO.new @io.set_encoding(Encoding.default_external) @tokens.each { |tok| print(tok) } @io.string end private def create_extension_substitution(ptn, repl) CodeSubstitution.new(ptn, repl).tap do |sub| sub.on_substitution += lambda { |matched_toks| on_language_extension.invoke(matched_toks) } end end def create_arbitrary_substitution(ptn, repl) CodeSubstitution.new(ptn, repl) end def print(tok) return if @lst_column_no == 1 && tok.type == :NEW_LINE if tok.location.fpath == @lst_fpath if @lst_line_no < tok.location.line_no if (vsp = tok.location.line_no - @lst_line_no) > 3 insert_line_marker(tok) else vsp.times { @io.puts } end end if (hsp = tok.location.appearance_column_no - @lst_column_no) > 0 @io.print(" " * hsp) elsif need_hspace?(tok) @io.print(" ") end if tok.type == :NEW_LINE @io.puts @lst_line_no = tok.location.line_no + 1 @lst_column_no = 1 else @io.print(tok.value.to_default_external) @lst_line_no = tok.location.line_no @lst_column_no = tok.location.appearance_column_no + tok.value.length end else insert_line_marker(tok) print(tok) end @lst_token = tok end def need_hspace?(tok) return false unless @lst_token if keyword_or_identifier?(@lst_token.value) !start_with_punctuator?(tok.value) else !(end_with_punctuator?(@lst_token.value) || start_with_punctuator?(tok.value)) end end def start_with_punctuator?(str) str !~ /\A[a-z_0-9]/i end def end_with_punctuator?(str) str !~ /[a-z_0-9]\z/i end def keyword_or_identifier?(str) str =~ /\A[a-z_][a-z_0-9]*\z/i end def insert_line_marker(tok) if @lst_column_no > 1 @io.puts end line_marker = "# #{tok.location.line_no.to_s.to_default_external} " + "\"#{tok.location.fpath.to_s.to_default_external}\"" @io.puts(line_marker.to_default_external) @lst_fpath = tok.location.fpath @lst_line_no = tok.location.line_no @lst_column_no = 1 end end end end adlint-3.2.0/lib/adlint/cpp/constexpr.y0000644000004100000410000002516112224440633020046 0ustar www-datawww-data# The constant-expression evaluator. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ class AdLint::Cpp::ConstantExpression token CONSTANT IDENTIFIER DEFINED start constant_expression rule primary_expression : CONSTANT { case val[0].value when /\A0b([01]+)[UL]*\z/i value = $1.to_i(2) when /\A(0[0-9]*)[UL]*\z/i value = $1.to_i(8) when /\A([1-9][0-9]*)[UL]*\z/i value = $1.to_i(10) when /\A0x([0-9a-f]+)[UL]*\z/i value = $1.to_i(16) when /\A([0-9]*\.[0-9]*E[+-]?[0-9]+|[0-9]+\.?E[+-]?[0-9]+)[FL]*\z/i, /\A([0-9]*\.[0-9]+|[0-9]+\.)[FL]*/i value = $1.to_f when /\AL?'(.*)'\z/i if $1.length > 1 && $1[0] == "\\" value = EscapeSequence.new($1).value else value = $1[0].ord end else value = 0 end result = ConstantSpecifier.new(value, val[0]) yyerrok } | IDENTIFIER { notify_undefined_macro_referred(val[0]) result = ErrorExpression.new(val[0]) yyerrok } | "(" expression ")" { result = GroupedExpression.new(val[1].value, val[1]) yyerrok } ; postfix_expression : primary_expression ; unary_expression : postfix_expression | "+" unary_expression { value = val[1].value result = UnaryArithmeticExpression.new(value, val[0], val[1]) } | "-" unary_expression { value = -val[1].value result = UnaryArithmeticExpression.new(value, val[0], val[1]) } | "~" unary_expression { value = ~val[1].value result = UnaryArithmeticExpression.new(value, val[0], val[1]) } | "!" unary_expression { value = val[1].value == 0 ? 1 : 0 result = UnaryArithmeticExpression.new(value, val[0], val[1]) } | DEFINED "(" IDENTIFIER ")" { if macro = @macro_tbl.lookup(val[2].value) macro.define_line.mark_as_referred_by(val[2]) value = 1 else value = 0 end result = DefinedExpression.new(value, val[0], val[2]) } | DEFINED IDENTIFIER { if macro = @macro_tbl.lookup(val[1].value) macro.define_line.mark_as_referred_by(val[1]) value = 1 else value = 0 end result = DefinedExpression.new(value, val[0], val[1]) } | DEFINED error { notify_illformed_defined_operator(loc_of(val[0]), val[1] == "$") result = ErrorExpression.new(val[1]) } ; multiplicative_expression : unary_expression | multiplicative_expression "*" unary_expression { value = val[0].value * val[2].value result = MultiplicativeExpression.new(value, val[1], val[0], val[2]) } | multiplicative_expression "/" unary_expression { unless val[2].value == 0 value = val[0].value / val[2].value else value = 0 end result = MultiplicativeExpression.new(value, val[1], val[0], val[2]) } | multiplicative_expression "%" unary_expression { unless val[2].value == 0 value = val[0].value % val[2].value else value = 0 end result = MultiplicativeExpression.new(value, val[1], val[0], val[2]) } ; additive_expression : multiplicative_expression | additive_expression "+" multiplicative_expression { value = val[0].value + val[2].value result = AdditiveExpression.new(value, val[1], val[0], val[2]) } | additive_expression "-" multiplicative_expression { value = val[0].value - val[2].value result = AdditiveExpression.new(value, val[1], val[0], val[2]) } ; shift_expression : additive_expression | shift_expression "<<" additive_expression { value = val[0].value << val[2].value result = ShiftExpression.new(value, val[1], val[0], val[2]) } | shift_expression ">>" additive_expression { value = val[0].value >> val[2].value result = ShiftExpression.new(value, val[1], val[0], val[2]) } ; relational_expression : shift_expression | relational_expression "<" shift_expression { value = val[0].value < val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) } | relational_expression ">" shift_expression { value = val[0].value > val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) } | relational_expression "<=" shift_expression { value = val[0].value <= val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) } | relational_expression ">=" shift_expression { value = val[0].value >= val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) } ; equality_expression : relational_expression | equality_expression "==" relational_expression { value = val[0].value == val[2].value ? 1 : 0 result = EqualityExpression.new(value, val[1], val[0], val[2]) } | equality_expression "!=" relational_expression { value = val[0].value != val[2].value ? 1 : 0 result = EqualityExpression.new(value, val[1], val[0], val[2]) } ; and_expression : equality_expression | and_expression "&" equality_expression { value = val[0].value & val[2].value result = AndExpression.new(value, val[1], val[0], val[2]) } ; exclusive_or_expression : and_expression | exclusive_or_expression "^" and_expression { value = val[0].value ^ val[2].value result = ExclusiveOrExpression.new(value, val[1], val[0], val[2]) } ; inclusive_or_expression : exclusive_or_expression | inclusive_or_expression "|" exclusive_or_expression { value = val[0].value | val[2].value result = InclusiveOrExpression.new(value, val[1], val[0], val[2]) } ; logical_and_expression : inclusive_or_expression | logical_and_expression "&&" inclusive_or_expression { value = val[0].value == 1 && val[2].value == 1 ? 1 : 0 result = LogicalAndExpression.new(value, val[1], val[0], val[2]) } ; logical_or_expression : logical_and_expression | logical_or_expression "||" logical_and_expression { value = val[0].value == 1 || val[2].value == 1 ? 1 : 0 result = LogicalOrExpression.new(value, val[1], val[0], val[2]) } ; conditional_expression : logical_or_expression | logical_or_expression "?" expression ":" conditional_expression { value = val[0].value == 1 ? val[2].value : val[4].value result = ConditionalExpression.new(value, val[0], val[2], val[4]) } ; constant_expression : conditional_expression ; expression : constant_expression | constant_expression "," expression { case val[0] when CommaSeparatedExpression then val[0].value = val[2].value result = val[0].push(val[2]) else value = val[2].value result = CommaSeparatedExpression.new(value).push(val[0]).push(val[2]) end } ; end ---- header require "adlint/report" require "adlint/util" require "adlint/cpp/util" ---- inner include ReportUtil def initialize(pp_ctxt, expr_toks) @pp_ctxt = pp_ctxt @expr_toks = expr_toks @macro_tbl = pp_ctxt.macro_table @fpath = expr_toks.first.location.fpath @lst_line_no = expr_toks.last.location.line_no end extend Pluggable def_plugin :on_illformed_defined_op_found def_plugin :on_undefined_macro_referred def evaluate @tok_queue = relex(@expr_toks) if expr = do_parse expr else ErrorExpression.new(nil) end end private def relex(expr_toks) tok_queue = [] expr_toks.each do |tok| case tok.value when /\A(?:0x[0-9a-f]+|[0-9]+)[UL]*\z/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when /\A(?:[0-9]*\.[0-9]*e[+-]?[0-9]+|[0-9]+\.?e[+-]?[0-9]+)[FL]*/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when /\AL?'.*'\z/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when /\AL?".*"\z/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when "(", ")", "+", "-", "~", "!", "*", "/", "%", "<<", ">>", "<", ">", "<=", ">=", "==", "!=", "&", "^", "|", "&&", "||", "?", ":" tok_queue.push(Token.new(tok.value, tok.value, tok.location)) when "defined" tok_queue.push(Token.new(:DEFINED, tok.value, tok.location)) else tok_queue.push(Token.new(:IDENTIFIER, tok.value, tok.location)) end end tok_queue end def next_token (tok = @tok_queue.shift) ? [tok.type, tok] : nil end def on_error(err_tok_id, err_val, *) E(:E0007, loc_of(err_val), val_of(err_val)) end def loc_of(tok) tok == "$" ? Location.new(@fpath, @lst_line_no) : tok.location end def val_of(tok) tok == "$" ? "EOF" : tok.value end def notify_illformed_defined_operator(loc, no_args) on_illformed_defined_op_found.invoke(loc, no_args) end def notify_undefined_macro_referred(id) on_undefined_macro_referred.invoke(id) end extend Forwardable def_delegator :@pp_ctxt, :report private :report def_delegator :@pp_ctxt, :message_catalog private :message_catalog # vim:ft=racc:sw=2:ts=2:sts=2:et: adlint-3.2.0/lib/adlint/cpp/util.rb0000644000004100000410000001103012224440633017117 0ustar www-datawww-data# Miscellaneous utilities for C preprocessor language. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Cpp #:nodoc: class EscapeSequence # TODO: Remove duplication in cc1/util.rb and cpp/util.rb . def initialize(str) @str = str end def value case @str when "\\'" then "'".ord when "\\\"" then "\"".ord when "\\?" then "?".ord when "\\\\" then "\\".ord when "\\a" then "\a".ord when "\\b" then "\b".ord when "\\f" then "\f".ord when "\\n" then "\n".ord when "\\r" then "\r".ord when "\\t" then "\t".ord when "\\v" then "\v".ord else case @str when /\A\\([0-9]{1,3})\z/ $1.to_i(8) when /\A\\x([0-9A-F]+)\z/i $1.to_i(16) when /\A\\u([0-9A-F]{4,8})\z/i $1.to_i(16) else 0 end end end end module BasicSourceCharacterSet def include?(str) str.chars.all? { |ch| CHARS.include?(ch.ord) } end module_function :include? def select_adapted(str) str.chars.select { |ch| CHARS.include?(ch.ord) } end module_function :select_adapted def select_not_adapted(str) str.chars.to_a - select_adapted(str) end module_function :select_not_adapted # NOTE: The ISO C99 standard says; # # 5.2 Environmental considerations # 5.2.1 Character sets # # 1 Two sets of characters and their associated collating sequences shall # be defined: the set in which source files are written (the source # character set), and the set interpreted in the execution environment # (the execution character set). Each set is further divided into a basic # character set, whose contents are given by this subclause, and a set of # zero or more locale-specific members (which are not members of the # basic character set) called extended characters. The combined set is # also called the extended character set. The values of the members of # the execution character set are implementation-defined. # # 3 Both the basic source and basic execution character sets shall have the # following members: the 26 uppercase letters of the Latin alphabet # A B C D E F G H I J K L M # N O P Q R S T U V W X Y Z # the 26 lowercase letters of the Latin alphabet # a b c d e f g h i j k l m # n o p q r s t u v w x y z # the 10 decimal digits # 0 1 2 3 4 5 6 7 8 9 # the following 29 graphic characters # ! " # % & ' ( ) * + , - . / : # ; < = > ? [ \ ] ^ _ { | } ~ # the space character, and control characters representing horizontal # tab, vertical tab, and form feed. CHARS = [ "A", "B" , "C" , "D" , "E" , "F", "G", "H", "I" , "J", "K", "L", "M", "N", "O" , "P" , "Q" , "R" , "S", "T", "U", "V" , "W", "X", "Y", "Z", "a", "b" , "c" , "d" , "e" , "f", "g", "h", "i" , "j", "k", "l", "m", "n", "o" , "p" , "q" , "r" , "s", "t", "u", "v" , "w", "x", "y", "z", "0", "1" , "2" , "3" , "4" , "5", "6", "7", "8" , "9", "!", '"' , "#" , "%" , "&" , "'", "(", ")", "*" , "+", ",", "-", ".", "/", ":" , ";" , "<" , "=" , ">", "?", "[", "\\", "]", "^", "_", "{", "|", "}" , "~" , " ", "\t", "\v", "\f", "\n" ].map { |ch| ch.ord }.to_set.freeze private_constant :CHARS end end end adlint-3.2.0/lib/adlint/cpp/constexpr.rb0000644000004100000410000004746012224440633020207 0ustar www-datawww-data# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.9 # from Racc grammer file "". # require 'racc/parser.rb' require "adlint/report" require "adlint/util" require "adlint/cpp/util" module AdLint module Cpp class ConstantExpression < Racc::Parser module_eval(<<'...end constexpr.y/module_eval...', 'constexpr.y', 311) include ReportUtil def initialize(pp_ctxt, expr_toks) @pp_ctxt = pp_ctxt @expr_toks = expr_toks @macro_tbl = pp_ctxt.macro_table @fpath = expr_toks.first.location.fpath @lst_line_no = expr_toks.last.location.line_no end extend Pluggable def_plugin :on_illformed_defined_op_found def_plugin :on_undefined_macro_referred def evaluate @tok_queue = relex(@expr_toks) if expr = do_parse expr else ErrorExpression.new(nil) end end private def relex(expr_toks) tok_queue = [] expr_toks.each do |tok| case tok.value when /\A(?:0x[0-9a-f]+|[0-9]+)[UL]*\z/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when /\A(?:[0-9]*\.[0-9]*e[+-]?[0-9]+|[0-9]+\.?e[+-]?[0-9]+)[FL]*/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when /\AL?'.*'\z/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when /\AL?".*"\z/i tok_queue.push(Token.new(:CONSTANT, tok.value, tok.location)) when "(", ")", "+", "-", "~", "!", "*", "/", "%", "<<", ">>", "<", ">", "<=", ">=", "==", "!=", "&", "^", "|", "&&", "||", "?", ":" tok_queue.push(Token.new(tok.value, tok.value, tok.location)) when "defined" tok_queue.push(Token.new(:DEFINED, tok.value, tok.location)) else tok_queue.push(Token.new(:IDENTIFIER, tok.value, tok.location)) end end tok_queue end def next_token (tok = @tok_queue.shift) ? [tok.type, tok] : nil end def on_error(err_tok_id, err_val, *) E(:E0007, loc_of(err_val), val_of(err_val)) end def loc_of(tok) tok == "$" ? Location.new(@fpath, @lst_line_no) : tok.location end def val_of(tok) tok == "$" ? "EOF" : tok.value end def notify_illformed_defined_operator(loc, no_args) on_illformed_defined_op_found.invoke(loc, no_args) end def notify_undefined_macro_referred(id) on_undefined_macro_referred.invoke(id) end extend Forwardable def_delegator :@pp_ctxt, :report private :report def_delegator :@pp_ctxt, :message_catalog private :message_catalog # vim:ft=racc:sw=2:ts=2:sts=2:et: ...end constexpr.y/module_eval... ##### State transition tables begin ### racc_action_table = [ 2, 3, 11, 4, 24, 7, 8, 9, 10, 2, 3, 11, 4, 77, 7, 8, 9, 10, 2, 3, 11, 4, 47, 7, 8, 9, 10, 2, 3, 11, 4, 48, 7, 8, 9, 10, 2, 3, 11, 4, 49, 7, 8, 9, 10, 2, 3, 11, 4, 50, 7, 8, 9, 10, 2, 3, 11, 4, 53, 7, 8, 9, 10, 2, 3, 11, 4, 54, 7, 8, 9, 10, 2, 3, 11, 4, 55, 7, 8, 9, 10, 2, 3, 11, 4, 47, 7, 8, 9, 10, 2, 3, 11, 4, 48, 7, 8, 9, 10, 2, 3, 11, 4, 49, 7, 8, 9, 10, 2, 3, 11, 4, 50, 7, 8, 9, 10, 2, 3, 11, 4, 78, 7, 8, 9, 10, 2, 3, 11, 4, 56, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 2, 3, 11, 4, nil, 7, 8, 9, 10, 33, nil, 32, nil, 31, 41, 42, 43, 44, 41, 42, 43, 44, 41, 42, 43, 44, 34, 35, 36, 34, 35, 36, 34, 35, 36, 39, 40, 39, 40, 45, 46, 39, 40, 39, 40, 37, 38, 51, 52, 45, 46, 37, 38, 39, 40, 37, 38 ] racc_action_check = [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 38, 38, 38, 38, 56, 38, 38, 38, 38, 4, 4, 4, 4, 18, 4, 4, 4, 4, 7, 7, 7, 7, 19, 7, 7, 7, 7, 8, 8, 8, 8, 20, 8, 8, 8, 8, 9, 9, 9, 9, 21, 9, 9, 9, 9, 10, 10, 10, 10, 24, 10, 10, 10, 10, 55, 55, 55, 55, 25, 55, 55, 55, 55, 52, 52, 52, 52, 26, 52, 52, 52, 52, 51, 51, 51, 51, 71, 51, 51, 51, 51, 50, 50, 50, 50, 72, 50, 50, 50, 50, 49, 49, 49, 49, 73, 49, 49, 49, 49, 48, 48, 48, 48, 74, 48, 48, 48, 48, 47, 47, 47, 47, 75, 47, 47, 47, 47, 46, 46, 46, 46, 31, 46, 46, 46, 46, 45, 45, 45, 45, nil, 45, 45, 45, 45, 44, 44, 44, 44, nil, 44, 44, 44, 44, 43, 43, 43, 43, nil, 43, 43, 43, 43, 42, 42, 42, 42, nil, 42, 42, 42, 42, 41, 41, 41, 41, nil, 41, 41, 41, 41, 40, 40, 40, 40, nil, 40, 40, 40, 40, 39, 39, 39, 39, nil, 39, 39, 39, 39, 34, 34, 34, 34, nil, 34, 34, 34, 34, 35, 35, 35, 35, nil, 35, 35, 35, 35, 36, 36, 36, 36, nil, 36, 36, 36, 36, 37, 37, 37, 37, nil, 37, 37, 37, 37, 78, 78, 78, 78, nil, 78, 78, 78, 78, 11, nil, 11, nil, 11, 16, 16, 16, 16, 69, 69, 69, 69, 68, 68, 68, 68, 13, 13, 13, 60, 60, 60, 61, 61, 61, 65, 65, 66, 66, 17, 17, 67, 67, 15, 15, 14, 14, 22, 22, 70, 70, 63, 63, 64, 64, 62, 62 ] racc_action_pointer = [ -2, 4, nil, nil, 16, nil, nil, 25, 34, 43, 52, 242, nil, 249, 272, 263, 232, 253, 0, 8, 16, 24, 255, nil, 58, 61, 47, nil, nil, nil, nil, 127, nil, nil, 196, 205, 214, 223, 7, 187, 178, 169, 160, 151, 142, 133, 124, 115, 106, 97, 88, 79, 70, nil, nil, 61, 7, nil, nil, nil, 252, 255, 282, 278, 273, 255, 257, 261, 240, 236, 263, 63, 71, 79, 87, 93, nil, nil, 232, nil ] racc_action_default = [ -46, -46, -1, -2, -46, -4, -5, -46, -46, -46, -46, -46, -13, -17, -20, -23, -28, -31, -33, -35, -37, -39, -41, -43, -46, -46, -44, -6, -7, -8, -9, -46, -11, -12, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, 80, -3, -46, -46, -14, -15, -16, -18, -19, -21, -22, -24, -25, -26, -27, -29, -30, -32, -34, -36, -38, -40, -46, -45, -10, -46, -42 ] racc_goto_table = [ 25, 27, 28, 29, 30, 64, 65, 66, 67, 60, 61, 62, 63, 68, 69, 1, 70, 71, 72, 73, 74, 79, nil, nil, nil, nil, nil, nil, 57, 58, 59, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 75, nil, nil, 76 ] racc_goto_check = [ 3, 5, 5, 5, 5, 8, 8, 8, 8, 6, 6, 7, 7, 9, 9, 1, 10, 11, 12, 13, 14, 16, nil, nil, nil, nil, nil, nil, 5, 5, 5, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3, nil, nil, 3 ] racc_goto_pointer = [ nil, 15, nil, -4, nil, -6, -28, -28, -36, -32, -31, -31, -31, -31, -31, nil, -57 ] racc_goto_default = [ nil, 26, 5, nil, 6, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] racc_reduce_table = [ 0, 0, :racc_error, 1, 32, :_reduce_1, 1, 32, :_reduce_2, 3, 32, :_reduce_3, 1, 34, :_reduce_none, 1, 35, :_reduce_none, 2, 35, :_reduce_6, 2, 35, :_reduce_7, 2, 35, :_reduce_8, 2, 35, :_reduce_9, 4, 35, :_reduce_10, 2, 35, :_reduce_11, 2, 35, :_reduce_12, 1, 36, :_reduce_none, 3, 36, :_reduce_14, 3, 36, :_reduce_15, 3, 36, :_reduce_16, 1, 37, :_reduce_none, 3, 37, :_reduce_18, 3, 37, :_reduce_19, 1, 38, :_reduce_none, 3, 38, :_reduce_21, 3, 38, :_reduce_22, 1, 39, :_reduce_none, 3, 39, :_reduce_24, 3, 39, :_reduce_25, 3, 39, :_reduce_26, 3, 39, :_reduce_27, 1, 40, :_reduce_none, 3, 40, :_reduce_29, 3, 40, :_reduce_30, 1, 41, :_reduce_none, 3, 41, :_reduce_32, 1, 42, :_reduce_none, 3, 42, :_reduce_34, 1, 43, :_reduce_none, 3, 43, :_reduce_36, 1, 44, :_reduce_none, 3, 44, :_reduce_38, 1, 45, :_reduce_none, 3, 45, :_reduce_40, 1, 46, :_reduce_none, 5, 46, :_reduce_42, 1, 31, :_reduce_none, 1, 33, :_reduce_none, 3, 33, :_reduce_45 ] racc_reduce_n = 46 racc_shift_n = 80 racc_token_table = { false => 0, :error => 1, :CONSTANT => 2, :IDENTIFIER => 3, :DEFINED => 4, "(" => 5, ")" => 6, "+" => 7, "-" => 8, "~" => 9, "!" => 10, "*" => 11, "/" => 12, "%" => 13, "<<" => 14, ">>" => 15, "<" => 16, ">" => 17, "<=" => 18, ">=" => 19, "==" => 20, "!=" => 21, "&" => 22, "^" => 23, "|" => 24, "&&" => 25, "||" => 26, "?" => 27, ":" => 28, "," => 29 } racc_nt_base = 30 racc_use_result_var = true Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ "$end", "error", "CONSTANT", "IDENTIFIER", "DEFINED", "\"(\"", "\")\"", "\"+\"", "\"-\"", "\"~\"", "\"!\"", "\"*\"", "\"/\"", "\"%\"", "\"<<\"", "\">>\"", "\"<\"", "\">\"", "\"<=\"", "\">=\"", "\"==\"", "\"!=\"", "\"&\"", "\"^\"", "\"|\"", "\"&&\"", "\"||\"", "\"?\"", "\":\"", "\",\"", "$start", "constant_expression", "primary_expression", "expression", "postfix_expression", "unary_expression", "multiplicative_expression", "additive_expression", "shift_expression", "relational_expression", "equality_expression", "and_expression", "exclusive_or_expression", "inclusive_or_expression", "logical_and_expression", "logical_or_expression", "conditional_expression" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted module_eval(<<'.,.,', 'constexpr.y', 44) def _reduce_1(val, _values, result) case val[0].value when /\A0b([01]+)[UL]*\z/i value = $1.to_i(2) when /\A(0[0-9]*)[UL]*\z/i value = $1.to_i(8) when /\A([1-9][0-9]*)[UL]*\z/i value = $1.to_i(10) when /\A0x([0-9a-f]+)[UL]*\z/i value = $1.to_i(16) when /\A([0-9]*\.[0-9]*E[+-]?[0-9]+|[0-9]+\.?E[+-]?[0-9]+)[FL]*\z/i, /\A([0-9]*\.[0-9]+|[0-9]+\.)[FL]*/i value = $1.to_f when /\AL?'(.*)'\z/i if $1.length > 1 && $1[0] == "\\" value = EscapeSequence.new($1).value else value = $1[0].ord end else value = 0 end result = ConstantSpecifier.new(value, val[0]) yyerrok result end .,., module_eval(<<'.,.,', 'constexpr.y', 70) def _reduce_2(val, _values, result) notify_undefined_macro_referred(val[0]) result = ErrorExpression.new(val[0]) yyerrok result end .,., module_eval(<<'.,.,', 'constexpr.y', 76) def _reduce_3(val, _values, result) result = GroupedExpression.new(val[1].value, val[1]) yyerrok result end .,., # reduce 4 omitted # reduce 5 omitted module_eval(<<'.,.,', 'constexpr.y', 89) def _reduce_6(val, _values, result) value = val[1].value result = UnaryArithmeticExpression.new(value, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 94) def _reduce_7(val, _values, result) value = -val[1].value result = UnaryArithmeticExpression.new(value, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 99) def _reduce_8(val, _values, result) value = ~val[1].value result = UnaryArithmeticExpression.new(value, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 104) def _reduce_9(val, _values, result) value = val[1].value == 0 ? 1 : 0 result = UnaryArithmeticExpression.new(value, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 109) def _reduce_10(val, _values, result) if macro = @macro_tbl.lookup(val[2].value) macro.define_line.mark_as_referred_by(val[2]) value = 1 else value = 0 end result = DefinedExpression.new(value, val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 119) def _reduce_11(val, _values, result) if macro = @macro_tbl.lookup(val[1].value) macro.define_line.mark_as_referred_by(val[1]) value = 1 else value = 0 end result = DefinedExpression.new(value, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 129) def _reduce_12(val, _values, result) notify_illformed_defined_operator(loc_of(val[0]), val[1] == "$") result = ErrorExpression.new(val[1]) result end .,., # reduce 13 omitted module_eval(<<'.,.,', 'constexpr.y', 138) def _reduce_14(val, _values, result) value = val[0].value * val[2].value result = MultiplicativeExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 143) def _reduce_15(val, _values, result) unless val[2].value == 0 value = val[0].value / val[2].value else value = 0 end result = MultiplicativeExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 152) def _reduce_16(val, _values, result) unless val[2].value == 0 value = val[0].value % val[2].value else value = 0 end result = MultiplicativeExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 17 omitted module_eval(<<'.,.,', 'constexpr.y', 165) def _reduce_18(val, _values, result) value = val[0].value + val[2].value result = AdditiveExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 170) def _reduce_19(val, _values, result) value = val[0].value - val[2].value result = AdditiveExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 20 omitted module_eval(<<'.,.,', 'constexpr.y', 179) def _reduce_21(val, _values, result) value = val[0].value << val[2].value result = ShiftExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 184) def _reduce_22(val, _values, result) value = val[0].value >> val[2].value result = ShiftExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 23 omitted module_eval(<<'.,.,', 'constexpr.y', 193) def _reduce_24(val, _values, result) value = val[0].value < val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 198) def _reduce_25(val, _values, result) value = val[0].value > val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 203) def _reduce_26(val, _values, result) value = val[0].value <= val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 208) def _reduce_27(val, _values, result) value = val[0].value >= val[2].value ? 1 : 0 result = RelationalExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 28 omitted module_eval(<<'.,.,', 'constexpr.y', 217) def _reduce_29(val, _values, result) value = val[0].value == val[2].value ? 1 : 0 result = EqualityExpression.new(value, val[1], val[0], val[2]) result end .,., module_eval(<<'.,.,', 'constexpr.y', 222) def _reduce_30(val, _values, result) value = val[0].value != val[2].value ? 1 : 0 result = EqualityExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 31 omitted module_eval(<<'.,.,', 'constexpr.y', 231) def _reduce_32(val, _values, result) value = val[0].value & val[2].value result = AndExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 33 omitted module_eval(<<'.,.,', 'constexpr.y', 240) def _reduce_34(val, _values, result) value = val[0].value ^ val[2].value result = ExclusiveOrExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 35 omitted module_eval(<<'.,.,', 'constexpr.y', 249) def _reduce_36(val, _values, result) value = val[0].value | val[2].value result = InclusiveOrExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 37 omitted module_eval(<<'.,.,', 'constexpr.y', 258) def _reduce_38(val, _values, result) value = val[0].value == 1 && val[2].value == 1 ? 1 : 0 result = LogicalAndExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 39 omitted module_eval(<<'.,.,', 'constexpr.y', 267) def _reduce_40(val, _values, result) value = val[0].value == 1 || val[2].value == 1 ? 1 : 0 result = LogicalOrExpression.new(value, val[1], val[0], val[2]) result end .,., # reduce 41 omitted module_eval(<<'.,.,', 'constexpr.y', 276) def _reduce_42(val, _values, result) value = val[0].value == 1 ? val[2].value : val[4].value result = ConditionalExpression.new(value, val[0], val[2], val[4]) result end .,., # reduce 43 omitted # reduce 44 omitted module_eval(<<'.,.,', 'constexpr.y', 289) def _reduce_45(val, _values, result) case val[0] when CommaSeparatedExpression then val[0].value = val[2].value result = val[0].push(val[2]) else value = val[2].value result = CommaSeparatedExpression.new(value).push(val[0]).push(val[2]) end result end .,., def _reduce_none(val, _values, result) val[0] end end # class ConstantExpression end # module Cpp end # module AdLint adlint-3.2.0/lib/adlint/source.rb0000644000004100000410000000730112224440633016666 0ustar www-datawww-data# Analyzing source files. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/traits" require "adlint/report" require "adlint/util" module AdLint #:nodoc: # == DESCRIPTION # Target source file. class Source # === DESCRIPTION # Constructs a target source file. # # === PARAMETER # _fpath_:: Pathname -- Path name of the target source file. # _content_:: String -- Source content. def initialize(fpath, fenc, included_at = Location.new) @fpath = fpath @fenc = fenc @included_at = included_at @content = nil end extend Pluggable def_plugin :on_cr_at_eol_found def_plugin :on_eof_mark_at_eof_found def_plugin :on_eof_newline_not_found # === VALUE # String -- The path name of this source file. attr_reader :fpath attr_reader :included_at def user_header? false end def system_header? false end def analysis_target?(traits) Location.new(@fpath).in_analysis_target?(traits) end # === DESCRIPTION # Opens the target source file. # # === PARAMETER # _block_:: Proc -- Yieldee block. def open(&block) @content ||= read_content(@fpath) io = StringIO.new(@content) yield(io) ensure io && io.close end # === DESCRIPTION # Converts this source content into string. # # === RETURN VALUE # String -- Content of this source file. def to_s @content ||= read_content(@fpath) end private def read_content(fpath) cont = IO.read(fpath, mode: "rb", encoding: @fenc || "binary") if cont =~ /\r/ notify_cr_at_eol_found(Location.new(fpath)) cont = cont.gsub(/\r\n|\r/, "\n") end if cont =~ /\x1a/ notify_eof_mark_at_eof_found(Location.new(fpath)) cont = cont.gsub(/\x1a/, "") end unless cont.end_with?("\n") notify_eof_newline_not_found(Location.new(fpath)) cont << "\n" end cont end def notify_cr_at_eol_found(loc) on_cr_at_eol_found.invoke(loc) end def notify_eof_mark_at_eof_found(loc) on_eof_mark_at_eof_found.invoke(loc) end def notify_eof_newline_not_found(loc) on_eof_newline_not_found.invoke(loc) end end class EmptySource < Source def initialize super(File::NULL, nil, nil) @content = "\n" end end class UserHeader < Source def user_header? true end end class SystemHeader < Source def system_header? true end end end adlint-3.2.0/lib/adlint/metric.rb0000644000004100000410000003500612224440633016654 0ustar www-datawww-data# Code quality metrics. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: class CodeMetric def print_as_csv(io) io.puts(to_csv) end def to_s delim = ",".to_default_external to_a.map { |obj| obj.to_s.to_default_external }.join(delim) end private def to_a subclass_responsibility end def to_csv to_a.map { |obj| obj ? obj.to_s.to_default_external : nil }.to_csv end end class FileMetric < CodeMetric def initialize(name, fpath, val) @name = name @fpath = fpath @val = val end private def to_a ["MET", @name, @fpath, @val] end end class FL_STMT_Metric < FileMetric def initialize(fpath, stmt_cnt) super("FL_STMT", fpath, stmt_cnt) end end class FL_FUNC_Metric < FileMetric def initialize(fpath, fun_cnt) super("FL_FUNC", fpath, fun_cnt) end end class FunctionMetric < CodeMetric def initialize(name, fun_id, loc, val) @name = name @fun_id = fun_id @loc = loc @val = val end private def to_a ["MET", @name, *@fun_id.to_a, *@loc.to_a, @val] end end class FN_STMT_Metric < FunctionMetric def initialize(fun_id, loc, stmt_cnt) super("FN_STMT", fun_id, loc, stmt_cnt) end end class FN_UNRC_Metric < FunctionMetric def initialize(fun_id, loc, unreached_stmt_cnt) super("FN_UNRC", fun_id, loc, unreached_stmt_cnt) end end class FN_LINE_Metric < FunctionMetric def initialize(fun_id, loc, fun_lines) super("FN_LINE", fun_id, loc, fun_lines) end end class FN_PARA_Metric < FunctionMetric def initialize(fun_id, loc, param_cnt) super("FN_PARA", fun_id, loc, param_cnt) end end class FN_UNUV_Metric < FunctionMetric def initialize(fun_id, loc, useless_var_cnt) super("FN_UNUV", fun_id, loc, useless_var_cnt) end end class FN_CSUB_Metric < FunctionMetric def initialize(fun_id, loc, funcall_cnt) super("FN_CSUB", fun_id, loc, funcall_cnt) end end class FN_GOTO_Metric < FunctionMetric def initialize(fun_id, loc, goto_cnt) super("FN_GOTO", fun_id, loc, goto_cnt) end end class FN_RETN_Metric < FunctionMetric def initialize(fun_id, loc, ret_cnt) super("FN_RETN", fun_id, loc, ret_cnt) end end class FN_UELS_Metric < FunctionMetric def initialize(fun_id, loc, if_stmt_cnt) super("FN_UELS", fun_id, loc, if_stmt_cnt) end end class FN_NEST_Metric < FunctionMetric def initialize(fun_id, loc, max_nest) super("FN_NEST", fun_id, loc, max_nest) end end class FN_PATH_Metric < FunctionMetric def initialize(fun_id, loc, path_cnt) super("FN_PATH", fun_id, loc, path_cnt) end end class FN_CYCM_Metric < FunctionMetric def initialize(fun_id, loc, cycl_compl) super("FN_CYCM", fun_id, loc, cycl_compl) end end class FN_CALL_Metric < FunctionMetric def initialize(fun_id, loc, caller_cnt) super("FN_CALL", fun_id, loc, caller_cnt) end end class MetricRecord < CsvRecord def self.of(csv_row, sma_wd) case csv_row[0] when "VER" create_version_record(csv_row) when "DCL" create_declaration_record(csv_row, sma_wd) when "DEF" create_definition_record(csv_row, sma_wd) when "INI" create_initialization_record(csv_row, sma_wd) when "ASN" create_assignment_record(csv_row, sma_wd) when "DEP" create_dependency_record(csv_row, sma_wd) when "LIT" create_literal_record(csv_row, sma_wd) when "PRE" create_pp_directive_record(csv_row, sma_wd) when "MET" create_metric_record(csv_row, sma_wd) else raise "invalid metric record." end end def initialize(csv_row, sma_wd) super(csv_row) @sma_wd = sma_wd end def type field_at(0) end def fpath sma_abs_fpath = Pathname.new(field_at(1)).expand_path(@sma_wd) sma_abs_fpath.relative_path_from(Pathname.pwd) end def line_no field_at(2).to_i end def column_no field_at(3).to_i end def location Location.new(fpath, line_no, column_no) end memoize :location def version?; false end def typedef_declaration?; false end def struct_declaration?; false end def union_declaration?; false end def enum_declaration?; false end def global_variable_declaration?; false end def function_declaration?; false end def variable_definition?; false end def function_definition?; false end def macro_definition?; false end def label_definition?; false end def initialization?; false end def assignment?; false end def include?; false end def function_call?; false end def variable_xref?; false end def function_xref?; false end def literal?; false end def pp_directive?; false end def self.create_version_record(csv_row) VersionRecord.new(csv_row) end private_class_method :create_version_record def self.create_declaration_record(csv_row, sma_wd) case csv_row[4] when "T" case csv_row[5] when "T" TypedefDeclarationRecord.new(csv_row, sma_wd) when "S" StructDeclarationRecord.new(csv_row, sma_wd) when "U" UnionDeclarationRecord.new(csv_row, sma_wd) when "E" EnumDeclarationRecord.new(csv_row, sma_wd) else raise "invalid DCL record." end when "V" GlobalVariableDeclarationRecord.new(csv_row, sma_wd) when "F" FunctionDeclarationRecord.new(csv_row, sma_wd) else raise "invalid DCL record." end end private_class_method :create_declaration_record def self.create_definition_record(csv_row, sma_wd) case csv_row[4] when "V" VariableDefinitionRecord.new(csv_row, sma_wd) when "F" FunctionDefinitionRecord.new(csv_row, sma_wd) when "M" MacroDefinitionRecord.new(csv_row, sma_wd) when "L" LabelDefinitionRecord.new(csv_row, sma_wd) else raise "invalid DEF record." end end private_class_method :create_definition_record def self.create_initialization_record(csv_row, sma_wd) InitializationRecord.new(csv_row, sma_wd) end private_class_method :create_initialization_record def self.create_assignment_record(csv_row, sma_wd) AssignmentRecord.new(csv_row, sma_wd) end private_class_method :create_assignment_record def self.create_dependency_record(csv_row, sma_wd) case csv_row[4] when "I" IncludeRecord.new(csv_row, sma_wd) when "C" FunctionCallRecord.new(csv_row, sma_wd) when "X" case csv_row[5] when "V" VariableXRefRecord.new(csv_row, sma_wd) when "F" FunctionXRefRecord.new(csv_row, sma_wd) else raise "invalid DEP record." end else raise "invalid DEP record." end end private_class_method :create_dependency_record def self.create_literal_record(csv_row, sma_wd) LiteralRecord.new(csv_row, sma_wd) end private_class_method :create_literal_record def self.create_pp_directive_record(csv_row, sma_wd) PPDirectiveRecord.new(csv_row, sma_wd) end private_class_method :create_pp_directive_record def self.create_metric_record(csv_row, sma_wd) new(csv_row, sma_wd) end private_class_method :create_metric_record class VersionRecord < MetricRecord def initialize(csv_row) super(csv_row, nil) end def version? true end def version_number field_at(1) end def exec_timestamp field_at(2) end def exec_working_directory field_at(3) end end private_constant :VersionRecord class TypedefDeclarationRecord < MetricRecord def typedef_declaration? true end def typedcl_type field_at(5) end def type_name field_at(6) end def type_rep field_at(7) end end private_constant :TypedefDeclarationRecord class StructDeclarationRecord < MetricRecord def struct_declaration? true end def typedcl_type field_at(5) end def type_name field_at(6) end def type_rep field_at(7) end end private_constant :StructDeclarationRecord class UnionDeclarationRecord < MetricRecord def union_declaration? true end def typedcl_type field_at(5) end def type_name field_at(6) end def type_rep field_at(7) end end private_constant :UnionDeclarationRecord class EnumDeclarationRecord < MetricRecord def enum_declaration? true end def typedcl_type field_at(5) end def type_name field_at(6) end def type_rep field_at(7) end end private_constant :EnumDeclarationRecord class GlobalVariableDeclarationRecord < MetricRecord def global_variable_declaration? true end def variable_name field_at(5) end def type_rep field_at(6) end end private_constant :GlobalVariableDeclarationRecord class FunctionDeclarationRecord < MetricRecord def function_declaration? true end def function_linkage_type field_at(5) end def function_scope_type field_at(6) end def function_declaration_type field_at(7) end def function_id FunctionId.new(field_at(8), field_at(9)) end end private_constant :FunctionDeclarationRecord class VariableDefinitionRecord < MetricRecord def variable_definition? true end def variable_linkage_type field_at(5) end def variable_scope_type field_at(6) end def storage_class_type field_at(7) end def variable_name field_at(8) end def type_rep field_at(9) end end private_constant :VariableDefinitionRecord class FunctionDefinitionRecord < MetricRecord def function_definition? true end def function_linkage_type field_at(5) end def function_scope_type field_at(6) end def function_id FunctionId.new(field_at(7), field_at(8)) end def lines field_at(9) end end private_constant :FunctionDefinitionRecord class MacroDefinitionRecord < MetricRecord def macro_definition? true end def macro_name field_at(5) end def macro_type field_at(6) end end private_constant :MacroDefinitionRecord class LabelDefinitionRecord < MetricRecord def label_definition? true end def label_name field_at(5) end end private_constant :LabelDefinitionRecord class InitializationRecord < MetricRecord def initialization? true end def variable_name field_at(4) end def initializer_rep field_at(5) end end private_constant :InitializationRecord class AssignmentRecord < MetricRecord def assignment? true end def variable_name field_at(4) end def assignment_rep field_at(5) end end private_constant :AssignmentRecord class IncludeRecord < MetricRecord def include? true end def included_fpath Pathname.new(field_at(5)) end end private_constant :IncludeRecord class FunctionCallRecord < MetricRecord def function_call? true end def caller_function FunctionId.new(field_at(5), field_at(6)) end def callee_function FunctionId.new(field_at(7), field_at(8)) end end private_constant :FunctionCallRecord class VariableXRefRecord < MetricRecord def variable_xref? true end def accessor_function FunctionId.new(field_at(6), field_at(7)) end def access_type field_at(8) end def accessee_variable field_at(9) end end private_constant :VariableXRefRecord class FunctionXRefRecord < MetricRecord def function_xref? true end def accessor_function FunctionId.new(field_at(6), field_at(7)) end def access_type field_at(8) end def accessee_function FunctionId.new(field_at(9), field_at(10)) end end private_constant :FunctionXRefRecord class LiteralRecord < MetricRecord def literal? true end def literal_type field_at(4) end def literal_prefix field_at(5) end def literal_suffix field_at(6) end def literal_value field_at(7) end end private_constant :LiteralRecord class PPDirectiveRecord < MetricRecord def pp_directive? true end def pp_directive field_at(4) end def pp_tokens field_at(5) end end private_constant :PPDirectiveRecord end end adlint-3.2.0/lib/adlint/error.rb0000644000004100000410000001076212224440633016524 0ustar www-datawww-data# AdLint specific runtime error classes. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/token" module AdLint #:nodoc: # == DESCRIPTION # Error base class for AdLint specific errors. class Error < StandardError # === DESCRIPTION # Constructs an error object. # # === PARAMETER # _msg_:: String -- Error message. # _loc_:: Location -- Location where an error occured. # _parts_:: Array< Object > -- Message formatting values. def initialize(msg, loc = nil, *parts) super(msg) @location = loc @parts = parts end # === VALUE # Location -- The location where this error occured. attr_reader :location # === VALUE # Array -- Message formatting values. attr_reader :parts def message_name subclass_responsibility end end # == DESCRIPTION # \AdLint fatal internal error. class InternalError < Error # === DESCRIPTION # Constructs an AdLint specific fatal internal error object. # # === PARAMETER # _cause_ex_:: Exception -- Cause exception object. # _loc_:: Location -- Location where an error occured. def initialize(cause_ex, loc) @cause_ex = cause_ex super(cause_ex.message, loc, "#{cause_ex.class} : #{cause_ex.message}") end def message_name :X0001 end # === DESCRIPTION # Reads the message of this error. # # === RETURN VALUE # String -- Error message. def message @cause_ex.message end # === DESCRIPTION # Reads the backtrace information of this error. # # === RETURN VALUE # Array -- Backtrace information. def backtrace @cause_ex.backtrace end end # == DESCRIPTION # Internal error which indicates invalid message ID used. class InvalidMessageIdError < Error # === DESCRIPTION # Constructs a invalid message ID error. # # === PARAMETER # _msg_id_:: Symbol -- Invalid message ID. # _loc_:: Location -- Location where the error occured. def initialize(msg_id, loc = nil) super(msg_id.message_name, loc, msg_id.package_name, msg_id.message_name) end def message_name :X0002 end end class InvalidMessageFormatError < Error def initialize(msg_id, loc = nil) super(msg_id.message_name, loc, msg_id.package_name, msg_id.message_name) end def message_name :X0004 end end class FatalError < Error def message_name :X0003 end end class ParseError < FatalError def initialize(loc, msg_fpath, log_fpath) super("failed to parse preprocessed file.", loc, msg_fpath, log_fpath) end end class MissingUserHeaderError < FatalError def initialize(loc, basename, msg_fpath, log_fpath) super("cannot open \"#{basename}\".", loc, msg_fpath, log_fpath) end end class MissingSystemHeaderError < FatalError def initialize(loc, basename, msg_fpath, log_fpath) super("cannot open <#{basename}>.", loc, msg_fpath, log_fpath) end end class IllformedIncludeDirectiveError < FatalError def initialize(loc, msg_fpath, log_fpath) super("#include expects a filename", loc, msg_fpath, log_fpath) end end class UnterminatedCommentError < FatalError def initialize(loc, msg_fpath, log_fpath) super("unterminated comment block found.", loc, msg_fpath, log_fpath) end end end adlint-3.2.0/lib/adlint/code.rb0000644000004100000410000003303712224440633016305 0ustar www-datawww-data# Code structure information. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: # == DESCRIPTION # Base class of code structure information. class CodeStructure def print_as_csv(io) io.puts(to_csv) end # === DESCRIPTION # Converts this code structure information into string representation. # # === RETURN VALUE # String -- String representation. def to_s delim = ",".to_default_external to_a.map { |obj| obj.to_s.to_default_external }.join(delim) end private # === DESCRIPTION # Converts this code structure information into array representation. # # Subclasses must implement this method. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a subclass_responsibility end def to_csv to_a.map { |obj| obj ? obj.to_s.to_default_external : nil }.to_csv end end # == DESCRIPTION # Type declaration information. class TypeDcl < CodeStructure # === DESCRIPTION # Constructs the type declaration information. # # === PARAMETER # _loc_:: Location -- Location where the declaration appears. # _dcl_type_:: String -- Type string of the type declaration. # _type_name_:: String -- Type name. # _type_rep_:: String -- Type representation. def initialize(loc, dcl_type, type_name, type_rep) @loc = loc @dcl_type = dcl_type @type_name = type_name @type_rep = type_rep end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DCL", *@loc.to_a, "T", @dcl_type, @type_name, @type_rep] end end # == DESCRIPTION # Global variable declaration information. class GVarDcl < CodeStructure # === DESCRIPTION # Constructs the global variable declaration information. # # === PARAMETER # _loc_:: Location -- Location where the declaration appears. # _var_name_:: String -- Global variable name. # _type_rep_:: String -- Type of the global variable. def initialize(loc, var_name, type_rep) @loc = loc @var_name = var_name @type_rep = type_rep end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DCL", *@loc.to_a, "V", @var_name, @type_rep] end end # == DESCRIPTION # Function declaration information. class FunDcl < CodeStructure # === DESCRIPTION # Constructs the function declaration information. # # === PARAMETER # _loc_:: Location -- Location where the declaration appears. # _linkage_:: String -- Function linkage type string. # _scope_type_:: String -- Declaration scope type string. # _dcl_type_:: String -- Declaration type string. # _fun_id_:: FunctionId -- Identifier of the function. def initialize(loc, linkage, scope_type, dcl_type, fun_id) @loc = loc @linkage = linkage @scope_type = scope_type @dcl_type = dcl_type @fun_id = fun_id end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DCL", *@loc.to_a, "F", @linkage, @scope_type, @dcl_type, *@fun_id.to_a] end end # == DESCRIPTION # Variable definition information. class VarDef < CodeStructure # === DESCRIPTION # Constructs the variable definition information. # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _linkage_:: String -- Variable linkage type string. # _scope_type_:: String -- Variable scope type string. # _sc_type_:: String -- Variable storage class type. # _var_name_:: String -- Variable name. # _type_rep_:: String -- Variable type representation string. def initialize(loc, linkage, scope_type, sc_type, var_name, type_rep) @loc = loc @linkage = linkage @scope_type = scope_type @sc_type = sc_type @var_name = var_name @type_rep = type_rep end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEF", *@loc.to_a, "V", @linkage, @scope_type, @sc_type, @var_name, @type_rep] end end # == DESCRIPTION # Function definition information. class FunDef < CodeStructure # === DESCRIPTION # Constructs the function definition information. # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _linkage_:: String -- Function linkage type string. # _scope_type_:: String -- Definition scope type string. # _fun_id_:: FunctionId -- Function identifier. # _lines_:: Integer -- Physical lines. def initialize(loc, linkage, scope_type, fun_id, lines) @loc = loc @linkage = linkage @scope_type = scope_type @fun_id = fun_id @lines = lines end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEF", *@loc.to_a, "F", @linkage, @scope_type, *@fun_id.to_a, @lines] end end # == DESCRIPTION # Macro definition information. class MacroDef < CodeStructure # === DESCRIPTION # Constructs the macro definition information. # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _macro_name_:: String -- Macro name. # _macro_type_:: String -- Macro type string. def initialize(loc, macro_name, macro_type) @loc = loc @macro_name = macro_name @macro_type = macro_type end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEF", *@loc.to_a, "M", @macro_name, @macro_type] end end # == DESCRIPTION # Label definition information. class LabelDef < CodeStructure # === DESCRIPTION # Constructs the label definition information. # # === PARAMETER # _loc_:: Location -- Location where the definition appears. # _label_name_:: String -- Label name. def initialize(loc, label_name) @loc = loc @label_name = label_name end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEF", *@loc.to_a, "L", @label_name] end end # == DESCRIPTION # Initialization information. class Initialization < CodeStructure # === DESCRIPTION # Constructs the initialization information. # # === PARAMETER # _loc_:: Location -- Location where the variable appears. # _var_name_:: String -- Initialized variable name. # _init_rep_:: String -- Initializer representation. def initialize(loc, var_name, init_rep) @loc = loc @var_name = var_name @init_rep = init_rep end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["INI", *@loc.to_a, @var_name, @init_rep] end end # == DESCRIPTION # Assignment information. class Assignment < CodeStructure # === DESCRIPTION # Constructs the assignment information. # # === PARAMETER # _loc_:: Location -- Location where the variable appears. # _var_name_:: String -- Assigned variable name. # _assign_rep_:: String -- Assignment expression representation. def initialize(loc, var_name, assign_rep) @loc = loc @var_name = var_name @assign_rep = assign_rep end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["ASN", *@loc.to_a, @var_name, @assign_rep] end end # == DESCRIPTION # Header include information. class Include < CodeStructure # === DESCRIPTION # Constructs the header include information. # # === PARAMETER # _loc_:: Location -- Location where the directive appears. # _fpath_:: Pathname -- Path name of the included file. def initialize(loc, fpath) @loc = loc @fpath = fpath end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEP", *@loc.to_a, "I", @fpath] end end # == DESCRIPTION # Function call information. class Funcall < CodeStructure # === DESCRIPTION # Constructs the function call informatin. # # === PARAMETER # _loc_:: Location -- Location where the function call appears. # _caller_fun_:: FunctionId -- Calling function identifier. # _callee_fun_:: FunctionId -- Called function identifier. def initialize(loc, caller_fun, callee_fun) @loc = loc @caller_fun = caller_fun @callee_fun = callee_fun end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEP", *@loc.to_a, "C", *@caller_fun.to_a, *@callee_fun.to_a] end end # == DESCRIPTION # Variable cross reference information. class XRefVar < CodeStructure # === DESCRIPTION # Constructs the cross reference information. # # === PARAMETER # _loc_:: Location -- Location where the cross-ref appears. # _referrer_:: FunctionId -- Accessing function identifier. # _ref_type_:: String -- Referencing type string. # _var_name_:: String -- Accessed variable name. def initialize(loc, referrer, ref_type, var_name) @loc = loc @referrer = referrer @ref_type = ref_type @var_name = var_name end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEP", *@loc.to_a, "X", "V", *@referrer.to_a, @ref_type, @var_name] end end class XRefFun < CodeStructure # === DESCRIPTION # Constructs the cross reference information. # # === PARAMETER # _loc_:: Location -- Location where the cross-ref appears. # _referrer_:: FunctionId -- Accessing function identifier. # _ref_type_:: String -- Referencing type string. # _fun_:: FunctionId -- Accessed function identifier. def initialize(loc, referrer, ref_type, fun) @loc = loc @referrer = referrer @ref_type = ref_type @fun = fun end private # === DESCRIPTION # Converts this code structure information into array representation. # # === RETURN VALUE # Array< Object > -- Array representation. def to_a ["DEP", *@loc.to_a, "X", "F", *@referrer.to_a, @ref_type, *@fun.to_a] end end class Literal < CodeStructure def initialize(loc, lit_type, prefix, suffix, value) @loc = loc @lit_type = lit_type @prefix = prefix @suffix = suffix @value = value end private def to_a ["LIT", *@loc.to_a, @lit_type, @prefix, @suffix, @value] end end class PPDirective < CodeStructure def initialize(loc, pp_dire, pp_tokens) @loc = loc @pp_dire = pp_dire @pp_tokens = pp_tokens end private def to_a ["PRE", *@loc.to_a, @pp_dire, @pp_tokens] end end class FunctionId def self.of_ctors_section # NOTE: To represent an object referrer of non-function in case of global # function table initialization. self.new(nil, nil) end def initialize(name, sig_str) @name, @signature = name, sig_str end attr_reader :name attr_reader :signature def named? !@name.nil? end def to_a [@name, @signature] end end end adlint-3.2.0/lib/adlint/util.rb0000644000004100000410000003314312224440633016346 0ustar www-datawww-data# Miscellaneous utilities. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/memo" module AdLint #:nodoc: module Validation # NOTE: Host class must respond to #entity_name. def ensure_validity_of(*args) @validators ||= [] attr_names = _attr_names_in(args) attr_names.each do |attr_name| @validators.push(ObjectValidator.new(attr_name)) end self end def ensure_presence_of(*args) @validators ||= [] attr_names = _attr_names_in(args) attr_names.each do |attr_name| @validators.push(PresenceValidator.new(attr_name)) end self end def ensure_numericality_of(*args) @validators ||= [] attr_names, opts = _attr_names_in(args), _options_in(args) only_int = opts[:only_integer] ? true : false min = opts[:min] max = opts[:max] attr_names.each do |attr_name| @validators.push(NumericalityValidator.new(attr_name, only_int, min, max)) end self end def ensure_file_presence_of(*args) @validators ||= [] attr_names, opts = _attr_names_in(args), _options_in(args) allow_nil = opts[:allow_nil] attr_names.each do |attr_name| @validators.push(FilePresenceValidator.new(attr_name, allow_nil)) end self end def ensure_dir_presence_of(*args) @validators ||= [] attr_names, opts = _attr_names_in(args), _options_in(args) allow_nil = opts[:allow_nil] attr_names.each do |attr_name| @validators.push(DirPresenceValidator.new(attr_name, allow_nil)) end self end def ensure_dirs_presence_of(*args) @validators ||= [] attr_names = _attr_names_in(args) attr_names.each do |attr_name| @validators.push(DirsPresenceValidator.new(attr_name)) end self end def ensure_inclusion_of(*args) @validators ||= [] attr_names, opts = _attr_names_in(args), _options_in(args) vals = opts[:values] || [] attr_names.each do |attr_name| @validators.push(InclusionValidator.new(attr_name, vals)) end self end def ensure_true_or_false_of(*args) @validators ||= [] attr_names = _attr_names_in(args) attr_names.each do |attr_name| @validators.push(TrueOrFalseValidator.new(attr_name)) end self end def ensure_exam_packages_presence_of(*args) @validators ||= [] attr_names = _attr_names_in(args) attr_names.each do |attr_name| @validators.push(ExamPackagesPresenceValidator.new(attr_name)) end self end def ensure_with(*args) @validators ||= [] attr_names, opts = _attr_names_in(args), _options_in(args) msg = opts[:message] || "is not valid." validator = opts[:validator] || lambda { |val| val } attr_names.each do |attr_name| @validators.push(CustomValidator.new(attr_name, msg, validator)) end self end def validators @validators ||= [] end def valid? if self.class.validators self.class.validators.map { |validator| validator.execute(self) }.all? else true end end def errors if self.class.validators self.class.validators.map { |validator| validator.errors }.flatten else [] end end def self.included(class_or_module) class_or_module.extend(self) end private def _attr_names_in(args) args.select { |obj| obj.kind_of?(Symbol) } end def _options_in(args) args.find { |obj| obj.kind_of?(Hash) } || {} end class Validator def initialize(attr_name) @attr_name = attr_name @errors = [] end attr_reader :errors def execute(attr_owner) subclass_responsibility end private def target_value(attr_owner) attr_owner.instance_variable_get("@#{@attr_name}") end def qualified_attr_name(attr_owner) if attr_owner.entity_name.nil? || attr_owner.entity_name.empty? @attr_name else "#{attr_owner.entity_name}:#{@attr_name}" end end end private_constant :Validator class ObjectValidator < Validator def execute(attr_owner) if obj = target_value(attr_owner) return true if obj.valid? @errors.concat(obj.errors) end false end end private_constant :ObjectValidator class PresenceValidator < Validator def execute(attr_owner) if target_value(attr_owner).nil? @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not specified.") return false end true end end private_constant :PresenceValidator class NumericalityValidator < PresenceValidator def initialize(attr_name, only_int, min, max) super(attr_name) @only_integer = only_int @min = min @max = max end def execute(attr_owner) return false unless super val = target_value(attr_owner) case val when Numeric if @only_integer && !val.integer? @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not an integer.") return false end if @min && val < @min @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not greater than or equal to #{@min}.") return false end if @max && @max < val @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not less than or equal to #{@max}.") return false end else @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not a numerical value.") return false end true end end private_constant :NumericalityValidator class FilePresenceValidator < Validator def initialize(attr_name, allow_nil) super(attr_name) @allow_nil = allow_nil end def execute(attr_owner) val = target_value(attr_owner) unless val if @allow_nil return true else @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not specified.") return false end end unless File.exist?(val) && File.file?(val) @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is non-existent pathname (#{val.to_s}).") return false end true end end private_constant :FilePresenceValidator class DirPresenceValidator < Validator def initialize(attr_name, allow_nil) super(attr_name) @allow_nil = allow_nil end def execute(attr_owner) val = target_value(attr_owner) unless val if @allow_nil return true else @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not specified.") return false end end unless File.exist?(val) && File.directory?(val) @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is non-existent pathname (#{val.to_s}).") return false end true end end private_constant :DirPresenceValidator class DirsPresenceValidator < Validator def execute(attr_owner) val = target_value(attr_owner) bad_paths = val.reject { |path| File.exist?(path) && File.directory?(path) } unless bad_paths.empty? bad_paths.each do |path| @errors.push("`#{qualified_attr_name(attr_owner)}' " + "contains non-existent pathname (#{path.to_s}).") end return false end true end end private_constant :DirsPresenceValidator class InclusionValidator < PresenceValidator def initialize(attr_name, vals) super(attr_name) @values = vals end def execute(attr_owner) return false unless super val = target_value(attr_owner) unless @values.include?(val) @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not one of #{@values.join(", ")}.") return false end true end end private_constant :InclusionValidator class TrueOrFalseValidator < PresenceValidator def execute(attr_owner) return false unless super case target_value(attr_owner) when TrueClass, FalseClass true else @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not a boolean value.") false end end end private_constant :TrueOrFalseValidator class ExamPackagesPresenceValidator < Validator def execute(attr_owner) val = target_value(attr_owner) if val.empty? @errors.push("`#{qualified_attr_name(attr_owner)}' " + "is not specified.") return false end bad_exams = val.reject { |exam_pkg| exam_pkg.load } unless bad_exams.empty? bad_exams.each do |exam_pkg| @errors.push("`#{qualified_attr_name(attr_owner)}' " + "contains non-existent exam-package name " + "(#{exam_pkg.name}).") end return false end true end end private_constant :ExamPackagesPresenceValidator class CustomValidator < Validator def initialize(attr_name, msg, validator) super(attr_name) @message = msg @validator = validator end def execute(attr_owner) unless @validator[target_value(attr_owner)] @errors.push("`#{qualified_attr_name(attr_owner)}' " + @message) return false end true end end private_constant :CustomValidator end module Visitable def accept(visitor) visitor.__send__(visitor_method_name, self) end private def visitor_method_name node_name = self.class.name.sub(/\A.*::/, "") node_name = node_name.gsub(/([A-Z][a-z])/, "_\\1") node_name = node_name.sub(/\A_/, "").tr("A-Z", "a-z") "visit_#{node_name}".to_sym end memoize :visitor_method_name end class CsvRecord def initialize(ary) @ary = ary end def field_at(idx) @ary.fetch(idx) end end class Plugin def initialize(methods = []) @methods = methods end def +(method) Plugin.new(@methods + [method]) end def invoke(*args) @methods.each { |method| method.call(*args) } end end module Pluggable def def_plugin(event) class_eval <<-EOS define_method("#{event}") do |*args| @#{event}_plugin ||= Plugin.new end define_method("#{event}=") do |*args| @#{event}_plugin = args.first end EOS end end module CompoundPathParser def parse_compound_path_list(ary) (ary || []).compact.map { |str| parse_compound_path_str(str) }.flatten end module_function :parse_compound_path_list def parse_compound_path_str(str) str.split(File::PATH_SEPARATOR).map { |s| Pathname.new(s) } end module_function :parse_compound_path_str end module LogUtil # NOTE: Host class must respond to #logger. def log_fatal(*args, &block) logger.fatal(*args, &block) end alias :LOG_F :log_fatal def log_error(*args, &block) logger.error(*args, &block) end alias :LOG_E :log_error def log_warn(*args, &block) logger.warn(*args, &block) end alias :LOG_W :log_warn def log_info(*args, &block) logger.info(*args, &block) end alias :LOG_I :log_info def log_debug(*args, &block) logger.debug(*args, &block) end alias :LOG_D :log_debug end end if $0 == __FILE__ require_relative "prelude.rb" class Foo def initialize p "foo" end extend AdLint::Pluggable def_plugin :on_initialization def run on_initialization.invoke(1, 2) end end def bar(a1, a2) p a1, a2 end def baz(a1, a2) p "baz" end foo = Foo.lazy_new p "foo?" foo.on_initialization += method(:bar) foo.on_initialization += method(:baz) foo.run end adlint-3.2.0/lib/adlint/ld/0000755000004100000410000000000012224440633015437 5ustar www-datawww-dataadlint-3.2.0/lib/adlint/ld/typedef.rb0000644000004100000410000000562712224440633017436 0ustar www-datawww-data# C typedef models for cross module analysis. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/location" require "adlint/metric" module AdLint #:nodoc: module Ld #:nodoc: class Typedef include LocationHolder def initialize(name, loc) @name = name @location = loc end attr_reader :name attr_reader :location def eql?(rhs) @name == rhs.name && @location == rhs.location end alias :== :eql? def hash "#{name} #{location}".hash end end class TypedefMap def initialize @name_index = Hash.new { |hash, key| hash[key] = Set.new } @composing_fpaths = Set.new end attr_reader :composing_fpaths def add(typedef) @name_index[typedef.name].add(typedef) @composing_fpaths.add(typedef.location.fpath) end def all_typedefs @name_index.values.each_with_object([]) do |typedefs, all| all.concat(typedefs.to_a) end end def lookup(typedef_name) @name_index[typedef_name].to_a end end class TypedefMapper def initialize @map = TypedefMap.new end attr_reader :map def execute(met_fpath) sma_wd = Pathname.pwd CSV.foreach(met_fpath) do |csv_row| rec = MetricRecord.of(csv_row, sma_wd) case when rec.version? sma_wd = Pathname.new(rec.exec_working_directory) when rec.typedef_declaration? @map.add(Typedef.new(rec.type_name, rec.location)) end end end end class TypedefTraversal def initialize(typedef_map) @map = typedef_map end extend Pluggable def_plugin :on_declaration def execute @map.all_typedefs.each { |tdef| on_declaration.invoke(tdef) } end end end end adlint-3.2.0/lib/adlint/ld/phase.rb0000644000004100000410000001407212224440633017070 0ustar www-datawww-data# Phases of cross module analysis. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/phase" require "adlint/annot" require "adlint/cpp/lexer" require "adlint/ld/object" require "adlint/ld/typedef" require "adlint/ld/util" module AdLint #:nodoc: module Ld #:nodoc: class LdPhase < Phase def initialize(phase_ctxt, phase_name) super(phase_ctxt, "ld", phase_name) end end class MapTypedefPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "mtd") end private def do_execute(phase_ctxt, monitor) mapper = TypedefMapper.new phase_ctxt[:metric_fpaths].each do |fpath| mapper.execute(fpath) monitor.progress += 1.0 / phase_ctxt[:metric_fpaths].size end phase_ctxt[:ld_typedef_map] = mapper.map end end class MapFunctionPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "mfn") end private def do_execute(phase_ctxt, monitor) mapper = FunctionMapper.new phase_ctxt[:metric_fpaths].each do |fpath| mapper.execute(fpath) monitor.progress += 1.0 / phase_ctxt[:metric_fpaths].size end phase_ctxt[:ld_function_map] = mapper.map end end class MapVariablePhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "mvr") end private def do_execute(phase_ctxt, monitor) mapper = VariableMapper.new phase_ctxt[:metric_fpaths].each do |fpath| mapper.execute(fpath) monitor.progress += 1.0 / phase_ctxt[:metric_fpaths].size end phase_ctxt[:ld_variable_map] = mapper.map end end class BuildCallGraphPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "ld1") end private def do_execute(phase_ctxt, monitor) builder = FunctionCallGraphBuilder.new(phase_ctxt[:ld_function_map]) phase_ctxt[:metric_fpaths].each do |fpath| builder.execute(fpath) monitor.progress += 1.0 / phase_ctxt[:metric_fpaths].size end phase_ctxt[:ld_call_graph] = builder.graph ensure DebugUtil.dump_function_call_graph(phase_ctxt) end end class BuildXRefGraphPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "ld2") end private def do_execute(phase_ctxt, monitor) builder = ObjectXRefGraphBuilder.new( phase_ctxt[:ld_variable_map], phase_ctxt[:ld_function_map], phase_ctxt[:ld_call_graph]) phase_ctxt[:metric_fpaths].each do |fpath| builder.execute(fpath) monitor.progress += 1.0 / phase_ctxt[:metric_fpaths].size end phase_ctxt[:ld_xref_graph] = builder.graph ensure DebugUtil.dump_variable_reference_graph(phase_ctxt) end end class PreparePhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "pre") end private def do_execute(phase_ctxt, *) collect_annotations phase_ctxt[:ld_typedef_traversal] = TypedefTraversal.new(phase_ctxt[:ld_typedef_map]) phase_ctxt[:ld_function_traversal] = FunctionTraversal.new(phase_ctxt[:ld_function_map]) phase_ctxt[:ld_variable_traversal] = VariableTraversal.new(phase_ctxt[:ld_variable_map]) end def collect_annotations composing_fpaths.each do |fpath| lexer = Cpp::Lexer.new( Source.new(fpath, traits.of_project.file_encoding), traits) parser = method(:parse_annotation) lexer.on_line_comment_found += parser lexer.on_block_comment_found += parser while lexer.next_token; end end end def composing_fpaths @phase_ctxt[:ld_function_map].composing_fpaths + @phase_ctxt[:ld_variable_map].composing_fpaths + @phase_ctxt[:ld_typedef_map].composing_fpaths end def parse_annotation(comment, loc) if annot = Annotation.parse(comment, loc) @phase_ctxt[:annotations].push(annot) if annot.message_suppression_specifier? && traits.of_message.individual_suppression @phase_ctxt[:suppressors].add(annot.create_suppressor) end end end end class TypedefReviewPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "rtd") end private def do_execute(phase_ctxt, *) phase_ctxt[:ld_typedef_traversal].execute end end class FunctionReviewPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "rfn") end private def do_execute(phase_ctxt, *) phase_ctxt[:ld_function_traversal].execute end end class VariableReviewPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "rvr") end private def do_execute(phase_ctxt, *) phase_ctxt[:ld_variable_traversal].execute end end class ExaminationPhase < LdPhase def initialize(phase_ctxt) super(phase_ctxt, "exm") end private def do_execute(phase_ctxt, *) examinations.each { |exam| exam.execute } end end end end adlint-3.2.0/lib/adlint/ld/util.rb0000644000004100000410000000677512224440633016760 0ustar www-datawww-data# Miscellaneous utilities for cross module analysis. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ module AdLint #:nodoc: module Ld #:nodoc: module DebugUtil def dump_function_call_graph(phase_ctxt) if $DEBUG proj_name = phase_ctxt.traits.of_project.project_name map_fname = Pathname.new("#{proj_name}.map") map_fpath = map_fname.expand_path(phase_ctxt.msg_fpath.dirname) map = phase_ctxt[:ld_function_map] call_graph = phase_ctxt[:ld_call_graph] return unless map && call_graph File.open(map_fpath, "w") do |io| io.puts("-- Function Call Graph --") map.all_functions.each do |callee| io.puts("DC of #{callee.signature}") call_graph.direct_callers_of(callee).each do |ref| if fun = ref.function io.puts(" #{fun.signature}") end end io.puts io.puts("IC of #{callee.signature}") call_graph.indirect_callers_of(callee).each do |ref| if fun = ref.function io.puts(" #{fun.signature}") end end io.puts end end end end module_function :dump_function_call_graph def dump_variable_reference_graph(phase_ctxt) if $DEBUG proj_name = phase_ctxt.traits.of_project.project_name map_fname = Pathname.new("#{proj_name}.map") map_fpath = map_fname.expand_path(phase_ctxt.msg_fpath.dirname) map = phase_ctxt[:ld_variable_map] ref_graph = phase_ctxt[:ld_xref_graph] return unless map && ref_graph File.open(map_fpath, "a") do |io| io.puts("-- Variable Reference Graph --") map.all_variables.each do |accessee| io.puts("DR of #{accessee.name}") ref_graph.direct_referrers_of(accessee).each do |ref| if fun = ref.function io.puts(" #{fun.signature}") end end io.puts io.puts("IR or #{accessee.name}") ref_graph.indirect_referrers_of(accessee).each do |ref| if fun = ref.function io.puts(" #{fun.signature}") end end io.puts end end end end module_function :dump_variable_reference_graph end end end adlint-3.2.0/lib/adlint/ld/object.rb0000644000004100000410000003417312224440633017242 0ustar www-datawww-data# C runtime object models for cross module analysis. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/location" require "adlint/metric" require "adlint/util" module AdLint #:nodoc: module Ld #:nodoc: class Variable include LocationHolder def initialize(var_def_rec) @met_record = var_def_rec end def location @met_record.location end def name @met_record.variable_name end def type @met_record.type_rep end def extern? @met_record.variable_linkage_type == "X" end def eql?(rhs) name == rhs.name && location == rhs.location end alias :== :eql? def hash "#{name} #{location}".hash end end class VariableDeclaration include LocationHolder def initialize(gvar_dcl_rec) @met_record = gvar_dcl_rec end def location @met_record.location end def name @met_record.variable_name end def type @met_record.type_rep end def extern? true end def eql?(rhs) name == rhs.name && location == rhs.location end alias :== :eql? def hash "#{name} #{location}".hash end end class VariableMap def initialize @def_index = Hash.new { |hash, key| hash[key] = Set.new } @dcl_index = Hash.new { |hash, key| hash[key] = Set.new } @composing_fpaths = Set.new end attr_reader :composing_fpaths def add_variable(var) @def_index[var.name].add(var) @composing_fpaths.add(var.location.fpath) end def add_variable_declaration(var_dcl) @dcl_index[var_dcl.name].add(var_dcl) @composing_fpaths.add(var_dcl.location.fpath) end def all_variables @def_index.values.reduce(Set.new) { |all, vars| all + vars }.to_a end def all_variable_declarations @dcl_index.values.reduce(Set.new) { |all, dcls| all + dcls }.to_a end def lookup_variables(var_name) @def_index[var_name].to_a end def lookup_variable_declarations(var_name) @dcl_index[var_name].to_a end end class VariableMapper def initialize @map = VariableMap.new end attr_reader :map def execute(met_fpath) sma_wd = Pathname.pwd CSV.foreach(met_fpath) do |csv_row| rec = MetricRecord.of(csv_row, sma_wd) case when rec.version? sma_wd = Pathname.new(rec.exec_working_directory) when rec.variable_definition? if rec.variable_linkage_type == "X" @map.add_variable(Variable.new(rec)) end when rec.global_variable_declaration? @map.add_variable_declaration(VariableDeclaration.new(rec)) end end end end class VariableTraversal def initialize(var_map) @map = var_map end extend Pluggable def_plugin :on_declaration def_plugin :on_definition def execute @map.all_variable_declarations.each do |var_dcl| on_declaration.invoke(var_dcl) end @map.all_variables.each do |var_def| on_definition.invoke(var_def) end end end class Function include LocationHolder def initialize(fun_def_rec) @met_record = fun_def_rec end def location @met_record.location end def signature @met_record.function_id.signature end def name @met_record.function_id.name end def extern? @met_record.function_linkage_type == "X" end def eql?(rhs) signature == rhs.signature && location == rhs.location end alias :== :eql? def hash "#{signature} #{location}".hash end end class FunctionDeclaration include LocationHolder def initialize(fun_dcl_rec) @met_record = fun_dcl_rec end def location @met_record.location end def signature @met_record.function_id.signature end def name @met_record.function_id.name end def extern? @met_record.function_linkage_type == "X" end def explicit? @met_record.function_declaration_type == "E" end def implicit? @met_record.function_declaration_type == "I" end def eql?(rhs) signature == rhs.signature && location == rhs.location end alias :== :eql? def hash "#{signature} #{location}".hash end end class FunctionMap def initialize @def_index = Hash.new { |hash, key| hash[key] = Set.new } @dcl_index = Hash.new { |hash, key| hash[key] = Set.new } @composing_fpaths = Set.new end attr_reader :composing_fpaths def add_function(fun) @def_index[fun.name].add(fun) @composing_fpaths.add(fun.location.fpath) end def add_function_declaration(fun_dcl) @dcl_index[fun_dcl.name].add(fun_dcl) @composing_fpaths.add(fun_dcl.location.fpath) end def all_functions @def_index.values.reduce(Set.new) { |all, funs| all + funs }.to_a end def all_function_declarations @dcl_index.values.reduce(Set.new) { |all, dcls| all + dcls }.to_a end def lookup_functions(fun_name) @def_index[fun_name].to_a end def lookup_function_declarations(fun_name) @dcl_index[fun_name].to_a end end class FunctionMapper def initialize @map = FunctionMap.new end attr_reader :map def execute(met_fpath) sma_wd = Pathname.pwd CSV.foreach(met_fpath) do |csv_row| rec = MetricRecord.of(csv_row, sma_wd) case when rec.version? sma_wd = Pathname.new(rec.exec_working_directory) when rec.function_definition? @map.add_function(Function.new(rec)) when rec.function_declaration? @map.add_function_declaration(FunctionDeclaration.new(rec)) end end end end class FunctionTraversal def initialize(fun_map) @map = fun_map end extend Pluggable def_plugin :on_declaration def_plugin :on_definition def execute @map.all_function_declarations.each do |fun_dcl| on_declaration.invoke(fun_dcl) end @map.all_functions.each do |fun_def| on_definition.invoke(fun_def) end end end class ObjectReferrer class << self def of_function(fun) Function.new(fun) end def of_ctors_section(ref_loc) CtorsSection.new(ref_loc) end end def location subclass_responsibility end def function subclass_responsibility end def hash subclass_responsibility end def eql?(rhs) subclass_responsibility end class Function < ObjectReferrer def initialize(fun) @function = fun end attr_reader :function def location @function.location end def hash @function.hash end def eql?(rhs) case rhs when Function @function == rhs.function else false end end end private_constant :Function class CtorsSection < ObjectReferrer def initialize(ref_loc) @location = ref_loc end attr_reader :location def function nil end def hash @location.fpath.hash end def eql?(rhs) case rhs when CtorsSection @location.fpath == rhs.location.fpath else false end end end private_constant :CtorsSection end class ObjectReference include LocationHolder def initialize(ref, obj, loc) @referrer = ref @object = obj @location = loc end attr_reader :referrer attr_reader :object attr_reader :location def eql?(rhs) to_a == rhs.to_a end alias :== :eql? def hash to_a.hash end def to_a [@referrer, @object, @location] end end class ObjectXRefGraph def initialize(funcall_graph) @funcall_graph = funcall_graph @obj_index = Hash.new { |hash, key| hash[key] = Set.new } end def add(obj_ref) @obj_index[obj_ref.object].add(obj_ref) end def all_referrers_of(obj) direct_referrers_of(obj) + indirect_referrers_of(obj) end def direct_referrers_of(obj) @obj_index[obj].map { |obj_ref| obj_ref.referrer }.to_set end def indirect_referrers_of(obj) direct_referrers_of(obj).reduce(Set.new) do |res, ref| if fun = ref.function res + @funcall_graph.all_callers_of(fun) else res end end end end class ObjectXRefGraphBuilder def initialize(var_map, fun_map, funcall_graph) @var_map, @fun_map = var_map, fun_map @graph = ObjectXRefGraph.new(funcall_graph) end attr_reader :graph def execute(met_fpath) sma_wd = Pathname.pwd CSV.foreach(met_fpath) do |csv_row| rec = MetricRecord.of(csv_row, sma_wd) case when rec.version? sma_wd = Pathname.new(rec.exec_working_directory) when rec.variable_xref? var = @var_map.lookup_variables(rec.accessee_variable).first fun_id = rec.accessor_function if fun_id.named? fun = @fun_map.lookup_functions(fun_id.name).first ref = ObjectReferrer.of_function(fun) else ref = ObjectReferrer.of_ctors_section(rec.location) end @graph.add(ObjectReference.new(ref, var, rec.location)) if var when rec.function_xref? ref, fun = lookup_referrer_and_function_by_xref(rec) @graph.add(ObjectReference.new(ref, fun, rec.location)) if ref && fun end end end private def lookup_referrer_and_function_by_xref(fun_xref) caller_id = fun_xref.accessor_function if caller_id.named? caller_fun = @fun_map.lookup_functions(caller_id.name).find { |fun| fun.location.fpath == fun_xref.location.fpath } return nil, nil unless caller_fun ref = ObjectReferrer.of_function(caller_fun) else ref = ObjectReferrer.of_ctors_section(fun_xref.location) end callee_funs = @fun_map.lookup_functions(fun_xref.accessee_function.name) callee_fun = callee_funs.find { |fun| fun.location.fpath == ref.location.fpath } || callee_funs.first return ref, callee_fun end end class FunctionCall def initialize(caller_ref, callee_fun) @caller = caller_ref @callee = callee_fun end attr_reader :caller attr_reader :callee def eql?(rhs) to_a == rhs.to_a end alias :== :eql? def hash to_a.hash end def to_a [@caller, @callee] end end class FunctionCallGraph def initialize @callee_index = Hash.new { |hash, key| hash[key] = Set.new } end def add(funcall) @callee_index[funcall.callee].add(funcall) end def all_callers_of(fun) direct_callers_of(fun) + indirect_callers_of(fun) end memoize :all_callers_of def direct_callers_of(fun) @callee_index[fun].map { |funcall| funcall.caller }.to_set end memoize :direct_callers_of def indirect_callers_of(fun) direct_callers_of(fun).reduce(Set.new) do |res, ref| if fun = ref.function res + collect_callers_of(fun, res) else res end end end memoize :indirect_callers_of private def collect_callers_of(fun, exclusions) direct_callers_of(fun).reduce(Set.new) do |res, ref| case when exclusions.include?(ref) res.add(ref) when caller_fun = ref.function res.add(ref) + collect_callers_of(caller_fun, exclusions + res) else res.add(ref) end end end memoize :collect_callers_of, key_indices: [0] end class FunctionCallGraphBuilder def initialize(fun_map) @fun_map = fun_map @graph = FunctionCallGraph.new end attr_reader :graph def execute(met_fpath) sma_wd = Pathname.pwd CSV.foreach(met_fpath) do |csv_row| rec = MetricRecord.of(csv_row, sma_wd) case when rec.version? sma_wd = Pathname.new(rec.exec_working_directory) when rec.function_call? caller_ref, callee_fun = lookup_functions_by_call(rec) if caller_ref && callee_fun @graph.add(FunctionCall.new(caller_ref, callee_fun)) end end end end private def lookup_functions_by_call(funcall_rec) caller_fun = @fun_map.lookup_functions( funcall_rec.caller_function.name).find { |fun| fun.location.fpath == funcall_rec.location.fpath } if caller_fun caller_ref = ObjectReferrer.of_function(caller_fun) else return nil, nil end callee_funs = @fun_map.lookup_functions(funcall_rec.callee_function.name) callee_fun = callee_funs.first callee_funs.each do |fun| if fun.location.fpath == caller_ref.location.fpath callee_fun = fun break end end return caller_ref, callee_fun end end end end adlint-3.2.0/lib/adlint/ld.rb0000644000004100000410000000253012224440633015764 0ustar www-datawww-data# AdLint::Ld package loader. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/ld/object" require "adlint/ld/util" require "adlint/ld/typedef" require "adlint/ld/phase" adlint-3.2.0/lib/adlint/prelude.rb0000644000004100000410000002011612224440633017025 0ustar www-datawww-data# Global ruby extensions preloaded before execution. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/memo" module Kernel private def subclass_responsibility raise NotImplementedError, self.class.name end module_function :subclass_responsibility def __NOTREACHED__ raise "NOTREACHED" end module_function :__NOTREACHED__ end class Module include ::AdLint::Memoizable # NOTE: Module.private_constant is added in Ruby 1.9.3-p0. unless public_instance_methods.include?(:private_constant) def private_constant(*) end end def outer_module eval self.name.sub(/(.*)::.*\z/, "\\1") end memoize :outer_module end class Encoding def self.include_name?(enc_name) if enc_name && !enc_name.empty? Encoding.find(enc_name) end true rescue false end end class String def to_default_external encode(Encoding.default_external, :invalid => :replace, :undef => :replace) end end class LazyInstantiation def initialize(klass, *args, &block) @klass = klass @args = args @block = block end undef_method(*(Object.new.public_methods - [:__id__, :object_id, :__send__])) def method_missing(name, *args) @receiver ||= @klass.new(*@args, &@block) @receiver.__send__(name, *args) end end class Class def lazy_new(*args, &block) LazyInstantiation.new(self, *args, &block) end end class Integer # NOTE: To restrict the bit-shift width. SHIFT_MAX_BITS = 64 def logical_right_shift(rhs) return self if rhs < 0 bits = to_s(2) shift_width = [rhs, SHIFT_MAX_BITS].min if bits.length < shift_width 0 else ("0" * shift_width + bits[0..-(shift_width + 1)]).to_i(2) end end def arithmetic_right_shift(rhs) rhs < 0 ? self : self >> [rhs, SHIFT_MAX_BITS].min end def left_shift(rhs) rhs < 0 ? self : self << [rhs, SHIFT_MAX_BITS].min end end class Pathname def components self.each_filename.to_a end memoize :components def real_components self.realpath.each_filename.to_a end memoize :real_components memoize :realpath memoize :cleanpath def strip(num = 0) comps = self.components comps = comps.slice(num..-1) if num >= 0 && num < comps.size Pathname.new(comps.reduce { |stripped, comp| File.join(stripped, comp) }) end def add_ext(ext_str) Pathname.new(self.to_s + ext_str) end def identical?(rhs) case rhs when Pathname self.cleanpath == rhs.cleanpath when String self.cleanpath == Pathname.new(rhs).cleanpath else false end end memoize :identical? def under?(parent_dpath) lhs_comps, rhs_comps = self.real_components, parent_dpath.real_components if rhs_comps.size < lhs_comps.size rhs_comps.zip(lhs_comps).all? { |rhs, lhs| lhs == rhs } else false end end end class String # === DESCRIPTION # Finds the longest common substrings in two strings. # # Fast and small memory footprint clone detection algorithm developed by # Yutaka Yanoh. # This algorithm is based on "suffix array with height" data structure. # # === PARAMETER # _rhs_:: String -- A String comparing to the receiver. # # === RETURN VALUE # Array< SubstringPair > -- The longest common substrings. def longest_common_substrings_with(rhs) suffix_array = SuffixArray.new(LeftSuffix.of(self) + RightSuffix.of(rhs)) suffix_array.longest_common_substrings end end class Substring < String def initialize(str, idx, len) @range = idx...(idx + len) super(str.slice(@range)) end attr_reader :range end class SubstringPair < Array def initialize(lhs_suffix, rhs_suffix, len) super([lhs_suffix.prefix(len), rhs_suffix.prefix(len)]) end def lhs self.first end def rhs self.last end end class Suffix include Comparable def self.of(str) str.length.times.map { |idx| new(str, idx) } end def initialize(owner, idx) @owner = owner @index = idx end private_class_method :new def lhs? subclass_responsibility end def rhs? !lhs? end def same_owner?(rhs) @owner.equal?(rhs.owner) end def common_prefix_length(rhs) to_s.chars.zip(rhs.to_s.chars).take_while { |lch, rch| lch == rch }.size end def prefix(len) Substring.new(@owner, @index, len) end def <=>(rhs) self.to_s <=> rhs.to_s end def to_s @owner.slice(@index..-1) end protected attr_reader :owner end class LeftSuffix < Suffix def lhs? true end end class RightSuffix < Suffix def lhs? false end end class SuffixArray < Array def initialize(suffixes) super(suffixes.sort.map { |suffix| [suffix, 0] }) update_height_of_each_suffixes! end def longest_common_substrings len = self.longest_common_prefix_length return [] if len == 0 self.each_index.reduce([]) { |result, idx| self[idx][1] == len ? result + create_substring_pairs(idx, len) : result } end def longest_common_prefix_length self.map { |suffix, height| height }.max end private def update_height_of_each_suffixes! (1...self.size).each do |idx| self[idx][1] = self[idx - 1][0].common_prefix_length(self[idx][0]) end end def create_substring_pairs(idx, len) base_suffix = self[idx][0] if base_suffix.lhs? create_entry = lambda { |lhs, rhs, l| SubstringPair.new(lhs, rhs, l) } else create_entry = lambda { |rhs, lhs, l| SubstringPair.new(lhs, rhs, l) } end result = [] (0...idx).reverse_each do |i| break unless self[i + 1][1] == len unless base_suffix.same_owner?(self[i][0]) result.push(create_entry[base_suffix, self[i][0], len]) end end result end end # NOTE: To support environment variable substitution in YAML file. # # Syntax of embedding environment variable is below; # env_var_specifier : '$' env_var_name # | '$' '{' env_var_name '}' # env_var_name : [A-Za-z_][0-9A-Za-z_]* # # Examples of environment variable as any scalar value; # string_item: $VAR # boolean_item: $VAR # decimal_item: $VAR # # Examples of embedding environment variable in string; # string_item: "foo${VAR}baz" # class Psych::TreeBuilder < Psych::Handler alias :_orig_scalar :scalar def scalar(value, anchor, tag, plain, quoted, style) _orig_scalar(substitute_environment_variables(value), anchor, tag, plain, quoted, style) end private def substitute_environment_variables(string) string.gsub(/(? [["geho", "geho"], ["hoge", "hoge"], ["hoge", "hoge"]] p substrs.map { |l, r| l.range } # => [10...14, 3...7, 3...7] p substrs.map { |l, r| r.range } # => [2...6, 4...8, 0...4] end adlint-3.2.0/lib/adlint/analyzer.rb0000644000004100000410000002107312224440633017215 0ustar www-datawww-data# Analyzer classes. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/version" require "adlint/traits" require "adlint/report" require "adlint/metric" require "adlint/phase" require "adlint/lang" require "adlint/source" require "adlint/supp" require "adlint/symbol" require "adlint/monitor" require "adlint/util" require "adlint/ld/phase" module AdLint #:nodoc: class Analyzer def initialize(name, traits, msg_catalog, target_name, output_dpath, log_basename, verbose) @name = name @traits = traits @message_catalog = msg_catalog @target_name = target_name @output_dpath = output_dpath @log_basename = log_basename @verbose = verbose @logger = nil end attr_reader :traits attr_reader :message_catalog attr_reader :logger def run File.open(log_fpath, "w") do |log_io| @logger = Logger.new(log_io).tap { |logger| logger.progname = @name logger.datetime_format = "%F %T " } begin log_start_analysis execute(ProgressMonitor.new(@target_name, phases.size, @verbose)) rescue => ex @logger.fatal(ex) return false end end true end private def execute(monitor) subclass_responsibility end def phases subclass_responsibility end def log_fpath log_fname = @log_basename.add_ext(".log") @output_dpath ? @output_dpath.join(log_fname) : log_fname end def log_start_analysis exam_vers = @traits.exam_packages.map { |exam_pkg| exam_pkg.catalog }.map { |exam_cat| "#{exam_cat.name}-#{exam_cat.short_version}" } msg = "start analysis by adlint-#{SHORT_VERSION} with " if exam_vers.size < 3 msg += exam_vers.join(" and ") else msg += exam_vers[0..-2].join(", ") + " and " + exam_vers.last end @logger.info("#{msg}.") end end # == Single module analysis driver. class SingleModuleAnalyzer < Analyzer def initialize(traits, msg_catalog, src_fpath, strip_num, output_dpath, verbose) super("SMA-#{SHORT_VERSION}", traits, msg_catalog, src_fpath.to_s, output_dpath, src_fpath.strip(strip_num), verbose) @src_fpath = src_fpath @strip_num = strip_num end private def execute(monitor) Report.new(msg_fpath, met_fpath, log_fpath, @verbose) do |report| src = Source.new(@src_fpath, @traits.of_project.file_encoding) phase_ctxt = PhaseContext.new(self, report, monitor) phase_ctxt[:sources] = [src] phase_ctxt[:annotations] = [] phase_ctxt[:suppressors] = MessageSuppressorSet.new phase_ctxt[:symbol_table] = SymbolTable.new begin phases.each { |phase| phase.new(phase_ctxt).execute } phase_ctxt.flush_deferred_report! ensure File.open(i_fpath, "w") do |io| io.set_encoding(Encoding.default_external) io.puts(phase_ctxt[:cc1_source].to_s) end end end rescue if @verbose $stderr.puts "An error was occurred while processing `#{@src_fpath}'." $stderr.puts "See `#{msg_fpath}' and `#{log_fpath}' for more details." end raise end def phases (lang = Language.of(@src_fpath)) ? lang.single_module_phases : [] end def msg_fpath msg_fname = @src_fpath.strip(@strip_num).add_ext(".msg.csv") @output_dpath ? @output_dpath.join(msg_fname) : msg_fname end def met_fpath met_fname = @src_fpath.strip(@strip_num).add_ext(".met.csv") @output_dpath ? @output_dpath.join(met_fname) : met_fname end def i_fpath i_fname = @src_fpath.strip(@strip_num).sub_ext(".i") @output_dpath ? @output_dpath.join(i_fname) : i_fname end end class CrossModuleAnalyzer < Analyzer def initialize(traits, msg_catalog, met_fpaths, output_dpath, verbose) proj_name = traits.of_project.project_name super("CMA-#{SHORT_VERSION}", traits, msg_catalog, proj_name, output_dpath, Pathname.new(proj_name), verbose) @met_fpaths = met_fpaths end private def execute(monitor) Report.new(msg_fpath, met_fpath, log_fpath, @verbose) do |report| phase_ctxt = PhaseContext.new(self, report, monitor) phase_ctxt[:metric_fpaths] = @met_fpaths phase_ctxt[:annotations] = [] phase_ctxt[:suppressors] = MessageSuppressorSet.new phases.each { |phase| phase.new(phase_ctxt).execute } phase_ctxt.flush_deferred_report! end rescue if @verbose $stderr.puts "Error was occurred in cross module analysis." $stderr.puts "See `#{log_fpath}' for more details." end raise end def phases [ Ld::MapTypedefPhase, Ld::MapFunctionPhase, Ld::MapVariablePhase, Ld::BuildCallGraphPhase, Ld::BuildXRefGraphPhase, Ld::PreparePhase, Ld::TypedefReviewPhase, Ld::FunctionReviewPhase, Ld::VariableReviewPhase, Ld::ExaminationPhase ] end def msg_fpath proj_name = @traits.of_project.project_name msg_fname = Pathname.new(proj_name).add_ext(".msg.csv") @output_dpath ? @output_dpath.join(msg_fname) : msg_fname end def met_fpath proj_name = @traits.of_project.project_name met_fname = Pathname.new(proj_name).add_ext(".met.csv") @output_dpath ? @output_dpath.join(met_fname) : met_fname end end # == Configuration files validator. class ConfigurationValidator < Analyzer def initialize(traits, msg_catalog, src_fpath, strip_num, output_dpath, verbose) super("CHK-#{SHORT_VERSION}", traits, msg_catalog, src_fpath.to_s, output_dpath, src_fpath.strip(strip_num), verbose) @src_fpath = src_fpath @strip_num = strip_num end private def execute(monitor) Report.new(msg_fpath, met_fpath, log_fpath, @verbose) do |report| src = Source.new(@src_fpath, @traits.of_project.file_encoding) phase_ctxt = PhaseContext.new(self, report, monitor) phase_ctxt[:sources] = [src] phase_ctxt[:annotations] = [] phase_ctxt[:suppressors] = MessageSuppressorSet.new phase_ctxt[:symbol_table] = SymbolTable.new begin phases.each { |phase| phase.new(phase_ctxt).execute } phase_ctxt.flush_deferred_report! ensure File.open(i_fpath, "w") do |io| io.set_encoding(Encoding.default_external) io.puts(phase_ctxt[:cc1_source].to_s) end end end rescue if @verbose $stderr.puts "An error was occurred while processing `#{@src_fpath}'." $stderr.puts "See `#{msg_fpath}' and `#{log_fpath}' for more details." end raise end def phases (lang = Language.of(@src_fpath)) ? lang.check_phases : [] end def msg_fpath msg_fname = @src_fpath.strip(@strip_num).add_ext(".msg.csv") @output_dpath ? @output_dpath.join(msg_fname) : msg_fname end def met_fpath met_fname = @src_fpath.strip(@strip_num).add_ext(".met.csv") @output_dpath ? @output_dpath.join(met_fname) : met_fname end def i_fpath i_fname = @src_fpath.strip(@strip_num).sub_ext(".i") @output_dpath ? @output_dpath.join(i_fname) : i_fname end end end adlint-3.2.0/lib/adlint/cpp.rb0000644000004100000410000000303412224440633016147 0ustar www-datawww-data# AdLint::Cpp package loader. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cpp/asm" require "adlint/cpp/eval" require "adlint/cpp/constexpr" require "adlint/cpp/lexer" require "adlint/cpp/macro" require "adlint/cpp/phase" require "adlint/cpp/scanner" require "adlint/cpp/source" require "adlint/cpp/subst" require "adlint/cpp/syntax" require "adlint/cpp/util" adlint-3.2.0/lib/adlint/cc1.rb0000644000004100000410000000373412224440633016042 0ustar www-datawww-data# AdLint::Cc1 package loader. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/cc1/branch" require "adlint/cc1/builtin" require "adlint/cc1/ctrlexpr" require "adlint/cc1/const" require "adlint/cc1/conv" require "adlint/cc1/domain" require "adlint/cc1/enum" require "adlint/cc1/environ" require "adlint/cc1/expr" require "adlint/cc1/format" require "adlint/cc1/interp" require "adlint/cc1/lexer" require "adlint/cc1/mediator" require "adlint/cc1/object" require "adlint/cc1/operator" require "adlint/cc1/option" require "adlint/cc1/parser" require "adlint/cc1/phase" require "adlint/cc1/resolver" require "adlint/cc1/scanner" require "adlint/cc1/scope" require "adlint/cc1/seqp" require "adlint/cc1/syntax" require "adlint/cc1/trace" require "adlint/cc1/type" require "adlint/cc1/util" require "adlint/cc1/value" adlint-3.2.0/lib/adlint/symbol.rb0000644000004100000410000000522712224440633016700 0ustar www-datawww-data# Reference recordable symbols. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/source" module AdLint #:nodoc: class Symbol def initialize(id) @identifier = id @referred = false end attr_writer :referred def location @identifier.location end def to_s subclass_responsibility end def useless? !@referred end end class MacroName < Symbol def to_s @identifier.value end end class ObjectName < Symbol def to_s @identifier.value end end class TypedefName < Symbol def to_s @identifier.value end end class StructTag < Symbol def to_s "struct #{@identifier.value}" end end class UnionTag < Symbol def to_s "union #{@identifier.value}" end end class EnumTag < Symbol def to_s "enum #{@identifier.value}" end end class EnumeratorName < Symbol def to_s @identifier.value end end class SymbolTable def initialize @hash = Hash.new { |hash, key| hash[key] = [] } end def create_new_symbol(sym_class, id) sym = sym_class.new(id) @hash[sym.location.fpath].push(sym) sym end def symbols_appeared_in(src) @hash[src.fpath] end end module SymbolicElement # NOTE: Host class must respond to #symbol. def mark_as_referred_by(tok) unless tok.location.fpath == symbol.location.fpath symbol.referred = true end end end end adlint-3.2.0/lib/adlint/exam/0000755000004100000410000000000012224440633015772 5ustar www-datawww-dataadlint-3.2.0/lib/adlint/exam/c_builtin/0000755000004100000410000000000012224440633017742 5ustar www-datawww-dataadlint-3.2.0/lib/adlint/exam/c_builtin/ld_metric.rb0000644000004100000410000000363512224440633022240 0ustar www-datawww-data# Metric measurements (ld-phase) of adlint-exam-c_builtin package. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/ld/phase" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class FN_CALL < MetricMeasurement def_registrant_phase Ld::PreparePhase def initialize(phase_ctxt) super phase_ctxt[:ld_function_traversal].on_definition += T(:measure) @call_graph = phase_ctxt[:ld_call_graph] end private def do_prepare(*) end def do_execute(*) end def measure(fun) FN_CALL(FunctionId.new(fun.name, fun.signature), fun.location, @call_graph.all_callers_of(fun).count { |ref| ref.function }) end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/cpp_check.rb0000644000004100000410000011210512224440633022206 0ustar www-datawww-data# Code checkings (cpp-phase) of adlint-exam-c_builtin package. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/traits" require "adlint/cpp/phase" require "adlint/cpp/util" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class W0001_Cpp < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0001 may be duplicative when the same header which has the deeply # grouped expression is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_grouped_expression += T(:enter_grouped_expression) traversal.leave_grouped_expression += T(:leave_grouped_expression) @group_depth = 0 end private def enter_grouped_expression(node) @group_depth += 1 W(node.location) if @group_depth == 32 end def leave_grouped_expression(node) @group_depth -= 1 end end class W0025 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_user_header_included += T(:check_user_include) interp.on_system_header_included += T(:check_system_include) @usr_header_fpaths = Set.new @sys_header_fpaths = Set.new end private def check_user_include(usr_include_line, usr_header) if @usr_header_fpaths.include?(usr_header.fpath) W(usr_include_line.location, usr_include_line.fpath) else if usr_include_line.include_depth == 1 @usr_header_fpaths.add(usr_header.fpath) end end end def check_system_include(sys_include_line, sys_header) if @sys_header_fpaths.include?(sys_header.fpath) W(sys_include_line.location, sys_include_line.fpath) else if sys_include_line.include_depth == 1 @sys_header_fpaths.add(sys_header.fpath) end end end end class W0026 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_user_header_included += T(:check_user_include) interp.on_system_header_included += T(:check_system_include) @usr_header_fpaths = Set.new @sys_header_fpaths = Set.new end private def check_user_include(usr_include_line, usr_header) if @usr_header_fpaths.include?(usr_header.fpath) W(usr_include_line.location, usr_include_line.fpath) else if usr_include_line.include_depth > 1 @usr_header_fpaths.add(usr_header.fpath) end end end def check_system_include(sys_include_line, sys_header) if @sys_header_fpaths.include?(sys_header.fpath) W(sys_include_line.location, sys_include_line.fpath) else if sys_include_line.include_depth > 1 @sys_header_fpaths.add(sys_header.fpath) end end end end class W0053 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_user_header_included += T(:check_user_include) end private def check_user_include(usr_include_line, usr_header) if usr_include_line.include_depth == 7 W(usr_include_line.location, usr_header.fpath) end end end class W0054 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_if_section += T(:enter_if_section) traversal.leave_if_section += T(:leave_if_section) @if_depth = 0 end private def enter_if_section(node) @if_depth += 1 W(node.location) if @if_depth == 9 end def leave_if_section(*) @if_depth -= 1 end end class W0055 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_object_like_macro_defined += T(:check) interp.on_function_like_macro_defined += T(:check) interp.on_va_function_like_macro_defined += T(:check) @macro_num = 0 end private def check(define_line, *) unless in_initial_header?(define_line) @macro_num += 1 W(define_line.location) if @macro_num == 1025 end end def in_initial_header?(node) node.location.fpath.identical?(pinit_fpath) || node.location.fpath.identical?(cinit_fpath) end def pinit_fpath if fpath = traits.of_project.initial_header Pathname.new(fpath) else nil end end memoize :pinit_fpath def cinit_fpath if fpath = traits.of_compiler.initial_header Pathname.new(fpath) else nil end end memoize :cinit_fpath end class W0056 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0056 may be duplicative when the same header which has macro # definition with too many parameters is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_function_like_macro_defined += T(:check) interp.on_va_function_like_macro_defined += T(:check) end private def check(define_line, macro) W(define_line.location) if macro.parameter_names.size > 31 end end class W0057 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0057 may be duplicative when the same header which has macro call # with too many arguments is included twice or more. mark_as_unique def initialize(phase_ctxt) super macro_table = phase_ctxt[:cpp_macro_table] macro_table.on_function_like_macro_replacement += T(:check) end private def check(macro, repl_toks, *) W(repl_toks.first.location) if macro.parameter_names.size > 31 end end class W0059 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0059 may be duplicative when the same header which has carriage # return at end of lines is included twice or more. mark_as_unique # NOTE: W0059 may be detected before evaluating the annotation for message # suppression. mark_as_deferred def initialize(phase_ctxt) super phase_ctxt[:cpp_interpreter].on_cr_at_eol_found += M(:check) end private def check(loc) W(loc) if loc.in_analysis_target?(traits) end end class W0060 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0060 may be duplicative when the same header which has the # end-of-file mark is included twice or more. mark_as_unique # NOTE: W0060 may be detected before evaluating the annotation for message # suppression. mark_as_deferred def initialize(phase_ctxt) super phase_ctxt[:cpp_interpreter].on_eof_mark_at_eof_found += M(:check) end private def check(loc) W(loc) if loc.in_analysis_target?(traits) end end class W0061 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0061 may be duplicative when the same header which has the token # sequence of the compiler specific extension is included twice or # more. mark_as_unique def initialize(phase_ctxt) super phase_ctxt[:cc1_source].on_language_extension += M(:check) end private def check(matched_toks) head_loc = matched_toks.first.location if head_loc.in_analysis_target?(traits) W(head_loc, tokens_to_str(matched_toks)) end end def tokens_to_str(toks) toks.map { |tok| tok.type == :NEW_LINE ? nil : tok.value }.compact.join(" ") end end class W0069 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0069 may be duplicative when the same header which has the nested # block comment is included twice or more. mark_as_unique def initialize(phase_ctxt) super phase_ctxt[:cpp_interpreter].on_nested_block_comment_found += M(:check) end private def check(loc) W(loc) if loc.in_analysis_target?(traits) end end class W0072 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0072 may be duplicative when the same header which has non # basic-source-character in the #include directive is included twice # or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_user_include_line += T(:check_user_include_line) traversal.enter_system_include_line += T(:check_system_include_line) end private def check_user_include_line(node) unless Cpp::BasicSourceCharacterSet.include?(node.header_name.value) W(node.header_name.location) end end def check_system_include_line(node) unless Cpp::BasicSourceCharacterSet.include?(node.header_name.value) W(node.header_name.location) end end end class W0073 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0073 may be duplicative when the same header without the # include-guard is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_user_include_line += T(:enter_include_line) traversal.enter_system_include_line += T(:enter_include_line) traversal.enter_text_line += T(:enter_text_line) traversal.enter_if_section += T(:enter_if_section) @main_fpath = phase_ctxt[:sources].first.fpath @last_fpath = nil @enclosed_by_if_section = false @warned_files = Set.new end private def enter_include_line(node) unless node.location.fpath == @last_fpath @enclosed_by_if_section = false @last_fpath = node.location.fpath end return if in_initial_header?(node) || in_main_file?(node) unless @enclosed_by_if_section || in_warned_file?(node) W(node.location) @warned_files.add(node.location.fpath) end end def enter_text_line(node) unless node.location.fpath == @last_fpath @enclosed_by_if_section = false @last_fpath = node.location.fpath end if empty_line?(node) || in_initial_header?(node) || in_main_file?(node) return end unless @enclosed_by_if_section || in_warned_file?(node) W(node.location) @warned_files.add(node.location.fpath) end end def enter_if_section(node) @enclosed_by_if_section = true @last_fpath = node.location.fpath end def empty_line?(node) node.token.value.chomp.empty? end def in_main_file?(node) node.location.fpath == @main_fpath end def in_initial_header?(node) node.location.fpath.identical?(pinit_fpath) || node.location.fpath.identical?(cinit_fpath) end def in_warned_file?(node) @warned_files.include?(node.location.fpath) end def pinit_fpath if fpath = traits.of_project.initial_header Pathname.new(fpath) else nil end end memoize :pinit_fpath def cinit_fpath if fpath = traits.of_compiler.initial_header Pathname.new(fpath) else nil end end memoize :cinit_fpath end class W0442 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0442 may be duplicative when the same header which has # function-like macro definitions is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_function_like_macro_defined += T(:check) interp.on_va_function_like_macro_defined += T(:check) end private def check(define_line, *) W(define_line.location) end end class W0443 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0443 may be duplicative when the same header which has # functionizable function-like macro definitions is included twice or # more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_function_like_define_line += T(:check) traversal.enter_va_function_like_define_line += T(:check) end private def check(node) return unless node.identifier_list if repl_lsit = node.replacement_list should_be_function = repl_lsit.tokens.all? { |pp_tok| if keyword_or_punctuator?(pp_tok) false elsif type_specifier_or_type_qualifier?(pp_tok) false else true end } W(node.location) if should_be_function end end KEYWORDS = [ "sizeof", "typedef", "extern", "static", "auto", "register", "inline", "restrict", "char", "short", "int", "long", "signed", "unsigned", "float", "double", "const", "volatile", "void", "_Bool", "_Complex", "_Imaginary", "struct", "union", "enum", "case", "default", "if", "else", "switch", "while", "do", "for", "goto", "continue", "break", "return" ].to_set.freeze private_constant :KEYWORDS def keyword_or_punctuator?(pp_tok) pp_tok.value == "#" || pp_tok.value == "##" || pp_tok.value == "{" || pp_tok.value == "}" || pp_tok.value == ";" || KEYWORDS.include?(pp_tok.value) end def type_specifier_or_type_qualifier?(pp_tok) pp_tok.value == "const" || pp_tok.value == "volatile" || pp_tok.value == "restrict" || @phase_ctxt[:cc1_type_table].all_type_names.include?(pp_tok.value) end end class W0444 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0444 may be duplicative when the same header which has the # function-like macro definition with `#' and `##' operators is # included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_function_like_macro_defined += T(:check) interp.on_va_function_like_macro_defined += T(:check) end private def check(define_line, macro) if repl_list = macro.replacement_list sharp_op_num = 0 sharpsharp_op_num = 0 repl_list.tokens.each do |pp_tok| case pp_tok.value when "#" sharp_op_num += 1 when "##" sharpsharp_op_num += 1 end end W(define_line.location) if sharp_op_num > 0 && sharpsharp_op_num > 0 end end end class W0445 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0445 may be duplicative when the same header which has the # function-like macro definition with two or more `##' operators is # included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_function_like_macro_defined += T(:check) interp.on_va_function_like_macro_defined += T(:check) end private def check(define_line, macro) if repl_list = macro.replacement_list sharpsharp_op_num = 0 repl_list.tokens.each do |pp_tok| if pp_tok.value == "##" sharpsharp_op_num += 1 end end W(define_line.location) if sharpsharp_op_num > 1 end end end class W0477 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0477 may be duplicative when the same header which has the macro # definition with unbalanced grouping tokens is included twice or # more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_object_like_macro_defined += T(:check) interp.on_function_like_macro_defined += T(:check) interp.on_va_function_like_macro_defined += T(:check) end private def check(define_line, macro) if repl_list = macro.replacement_list paren_count = 0 brace_count = 0 bracket_count = 0 repl_list.tokens.each do |pp_tok| case pp_tok.value when "(" paren_count += 1 when ")" paren_count -= 1 when "{" brace_count += 1 when "}" brace_count -= 1 when "[" bracket_count += 1 when "]" bracket_count -= 1 end end unless paren_count == 0 && brace_count == 0 && bracket_count == 0 W(define_line.location) end end end end class W0478 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0478 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_object_like_define_line += T(:check) traversal.enter_function_like_define_line += T(:check) traversal.enter_va_function_like_define_line += T(:check) end private def check(node) if repl_list = node.replacement_list and repl_list.tokens.size > 1 unless repl_list.may_represent_expression? || repl_list.may_represent_initializer? || repl_list.may_represent_block? || repl_list.may_represent_do_while_zero_idiom? || repl_list.may_represent_specifier_qualifier_list? || repl_list.may_represent_declaration_specifiers_head? W(node.location) end end end end class W0479 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0479 may be duplicative when the same header which has # typedef-able macro definition is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_object_like_define_line += T(:check) end private def check(node) if repl_list = node.replacement_list if repl_list.may_represent_specifier_qualifier_list? W(node.location) end end end end class W0480 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0480 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_object_like_define_line += T(:check) traversal.enter_function_like_define_line += T(:check) traversal.enter_va_function_like_define_line += T(:check) end private def check(node) if repl_list = node.replacement_list and repl_list.may_represent_punctuator? || repl_list.may_represent_controlling_keyword? W(node.location) end end end class W0481 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0481 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_object_like_define_line += T(:check) traversal.enter_function_like_define_line += T(:check) traversal.enter_va_function_like_define_line += T(:check) end private def check(node) if repl_list = node.replacement_list and repl_list.may_represent_block? W(node.location) end end end class W0482 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0482 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_object_like_define_line += T(:check) end private def check(node) if repl_list = node.replacement_list return unless repl_list.tokens.size == 1 if type_specifier?(repl_list.tokens.first) W(node.location) end end end def type_specifier?(pp_tok) case pp_tok.value when "void", "char", "short", "int", "long", "float", "double" true when "signed", "unsigned" true when "struct", "union", "enum" true else false end end end class W0483 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0483 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_object_like_define_line += T(:check) end private def check(node) if repl_list = node.replacement_list if repl_list.may_represent_declaration_specifiers_head? W(node.location) end end end end class W0511 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0511 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super phase_ctxt[:cpp_interpreter].on_line_comment_found += M(:check) end private def check(*, loc) W(loc) if loc.in_analysis_target?(traits) end end class W0528 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0528 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_object_like_macro_defined += T(:check) end private def check(*, macro) if repl_list = macro.replacement_list octal_tok = repl_list.tokens.find { |pp_tok| pp_tok.value =~ /\A0[0-9]+[UL]*\z/i } W(octal_tok.location) if octal_tok end end end class W0541 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0541 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super phase_ctxt[:cc1_source].on_inline_assembly += M(:check) end private def check(asm_toks) head_loc = asm_toks.first.location if head_loc.in_analysis_target?(traits) W(head_loc) unless asm_toks.any? { |tok| tok.replaced? } end end end class W0549 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0549 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_function_like_macro_defined += T(:check) interp.on_va_function_like_macro_defined += T(:check) end private def check(*, macro) return unless macro.replacement_list macro.parameter_names.each do |name| macro.replacement_list.tokens.each_with_index do |pp_tok, idx| next unless pp_tok.value == name prv_tok = macro.replacement_list.tokens[[idx - 1, 0].max] nxt_tok = macro.replacement_list.tokens[idx + 1] next if prv_tok && prv_tok.value =~ /\A##?\z/ next if nxt_tok && nxt_tok.value == "##" unless prv_tok && prv_tok.value == "(" W(pp_tok.location) next end unless nxt_tok && nxt_tok.value == ")" W(pp_tok.location) next end end end end end class W0554 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0554 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_unknown_pragma_evaled += T(:check) end private def check(pragma_line) W(pragma_line.location, pragma_line.pp_tokens ? pragma_line.pp_tokens.to_s : "") end end class W0574 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0574 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_pp_token_extracted += T(:check_pp_token) interp.on_object_like_macro_defined += T(:check_macro) interp.on_function_like_macro_defined += T(:check_macro) interp.on_va_function_like_macro_defined += T(:check_macro) end private def check_pp_token(pp_tok) if pp_tok.value =~ /\AL?'(.*)'\z/ unless Cpp::BasicSourceCharacterSet.include?($1) W(pp_tok.location) end end end def check_macro(*, macro) if repl_lsit = macro.replacement_list repl_lsit.tokens.each { |pp_tok| check_pp_token(pp_tok) } end end end class W0575 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0575 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_pp_token_extracted += T(:check_pp_token) interp.on_object_like_macro_defined += T(:check_macro) interp.on_function_like_macro_defined += T(:check_macro) interp.on_va_function_like_macro_defined += T(:check_macro) end private def check_pp_token(pp_tok) if pp_tok.value =~ /\AL?"(.*)"\z/ unless Cpp::BasicSourceCharacterSet.include?($1) W(pp_tok.location) end end end def check_macro(*, macro) if repl_list = macro.replacement_list repl_list.tokens.each { |pp_tok| check_pp_token(pp_tok) } end end end class W0576 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0576 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_block_comment_found += M(:check) interp.on_line_comment_found += M(:check) @warned_chars = Set.new end private def check(comment, loc) if loc.in_analysis_target?(traits) not_adapted = Cpp::BasicSourceCharacterSet.select_not_adapted(comment) new_chars = not_adapted.to_set - @warned_chars unless new_chars.empty? W(loc, loc.fpath) @warned_chars.merge(new_chars) end end end end class W0577 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0577 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_unlexable_char_found += M(:check) @warned = false end private def check(*, loc) if loc.in_analysis_target?(traits) unless @warned W(loc, loc.fpath) @warned = true end end end end class W0632 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0632 may be duplicative when the same header which has references # to the undefined macro is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_system_include_line += T(:check) traversal.enter_system_include_next_line += T(:check) end private def check(include_line) if include_line.header_name.value =~ /['"]/ W(include_line.location, include_line.header_name.value) end end end class W0633 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0633 may be duplicative when the same header which has references # to the undefined macro is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_user_include_line += T(:check) traversal.enter_user_include_next_line += T(:check) end private def check(include_line) if include_line.header_name.value =~ /'/ W(include_line.location, include_line.header_name.value) end end end class W0634 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0634 may be duplicative when the same header which has references # to the undefined macro is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_user_include_line += T(:check) traversal.enter_user_include_next_line += T(:check) traversal.enter_system_include_line += T(:check) traversal.enter_system_include_next_line += T(:check) end private def check(include_line) if include_line.header_name.value.include?("\\") W(include_line.location) end end end class W0643 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0643 may be duplicative when the same header which has references # to the undefined macro is included twice or more. mark_as_unique def initialize(phase_ctxt) super macro_table = phase_ctxt[:cpp_macro_table] macro_table.on_last_backslash_ignored += T(:check) end private def check(tok) W(tok.location) end end class W0691 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0691 may be duplicative when the same header which has references # to the undefined macro is included twice or more. mark_as_unique def initialize(phase_ctxt) super macro_table = phase_ctxt[:cpp_macro_table] macro_table.on_sharpsharp_operator_evaled += T(:check) end private def check(*, new_toks) W(new_toks.first.location) if new_toks.size > 1 end end class W0692 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0692 may be duplicative when the same header which has references # to the undefined macro is included twice or more. mark_as_unique def initialize(phase_ctxt) super macro_table = phase_ctxt[:cpp_macro_table] macro_table.on_function_like_macro_replacement += T(:check) end private def check(macro, repl_toks, args, *) unless macro.parameter_names.empty? if args.any? { |arg| arg.empty? } W(repl_toks.first.location, macro.name.value) end end end end class W0696 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0696 may be duplicative when the same header which has references # to the undefined macro is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_undefined_macro_referred += T(:check) end private def check(tok) W(tok.location, tok.value) end end class W0804 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0804 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super phase_ctxt[:cpp_interpreter].on_illformed_defined_op_found += M(:check) end private def check(loc, *) W(loc) if loc.in_analysis_target?(traits) end end class W0805 < W0804 def_registrant_phase Cpp::Prepare2Phase # NOTE: W0805 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique private def check(loc, no_args) if loc.in_analysis_target?(traits) W(loc) unless no_args end end end class W0811 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0811 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super macro_table = phase_ctxt[:cpp_macro_table] macro_table.on_object_like_macro_replacement += T(:check) macro_table.on_function_like_macro_replacement += T(:check) end private def check(*, rslt_toks) if defined_tok = rslt_toks.find { |tok| tok.value == "defined" } W(defined_tok.location) end end end class W0831 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0831 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_asm_section_evaled += T(:check) end private def check(asm_section) W(asm_section.location) end end class W0832 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0832 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super phase_ctxt[:cc1_source].on_inline_assembly += M(:check) end private def check(asm_toks) head_loc = asm_toks.first.location W(head_loc) if head_loc.in_analysis_target?(traits) end end class W1040 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W1040 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_extra_tokens_found += M(:check) end private def check(extra_toks) head_loc = extra_toks.first.location W(head_loc) if head_loc.in_analysis_target?(traits) end end class W1041 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W1041 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_unknown_directive += T(:check) end private def check(node) W(node.location, node.token.value.chomp.strip) end end class W1046 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W1046 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_illformed_newline_escape_found += M(:check) end private def check(loc) W(loc) if loc.in_analysis_target?(traits) end end class W9002 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W9002 may be duplicative when the same header which has no newline # at end of the file is included twice or more. mark_as_unique # NOTE: W9002 may be detected before evaluating the annotation for message # suppression. mark_as_deferred def initialize(phase_ctxt) super phase_ctxt[:cpp_interpreter].on_eof_newline_not_found += M(:check) end private def check(loc) W(loc) if loc.in_analysis_target?(traits) end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/ld_check.rb0000644000004100000410000002316212224440633022027 0ustar www-datawww-data# Code checkings (ld-phase) of adlint-exam-c_builtin package. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/ld/phase" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class W0555 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase def initialize(phase_ctxt) super phase_ctxt[:ld_function_traversal].on_definition += T(:check) @call_graph = phase_ctxt[:ld_call_graph] end private def check(fun) refs = @call_graph.indirect_callers_of(fun) if refs.any? { |ref| caller_fun = ref.function and caller_fun == fun } W(fun.location) end end end class W0586 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase def initialize(phase_ctxt) super phase_ctxt[:ld_typedef_traversal].on_declaration += T(:check) @map = phase_ctxt[:ld_typedef_map] end private def check(typedef) if @map.lookup(typedef.name).any? { |td| td != typedef } W(typedef.location, typedef.name) end end end class W0589 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase def initialize(phase_ctxt) super phase_ctxt[:ld_function_traversal].on_definition += T(:check_function) phase_ctxt[:ld_variable_traversal].on_definition += T(:check_variable) @xref_graph = phase_ctxt[:ld_xref_graph] end private def check_function(fun) if fun.extern? refs = @xref_graph.direct_referrers_of(fun) ref_funs = refs.map { |ref| ref.function }.compact.uniq if ref_funs.size == 1 if ref_funs.first.location.fpath == fun.location.fpath W(fun.location, fun.signature, ref_funs.first.signature) end end end end def check_variable(var) if var.extern? refs = @xref_graph.direct_referrers_of(var) ref_funs = refs.map { |ref| ref.function }.compact.uniq if ref_funs.size == 1 if ref_funs.first.location.fpath == var.location.fpath W(var.location, var.name, ref_funs.first.signature) end end end end end class W0591 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase def initialize(phase_ctxt) super phase_ctxt[:ld_function_traversal].on_definition += T(:check) @xref_graph = phase_ctxt[:ld_xref_graph] end private def check(fun) if fun.extern? direct_refs = @xref_graph.direct_referrers_of(fun) if !direct_refs.empty? && direct_refs.all? { |ref| ref.location.fpath == fun.location.fpath } W(fun.location, fun.signature) end end end end class W0593 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase def initialize(phase_ctxt) super phase_ctxt[:ld_variable_traversal].on_definition += T(:check) @xref_graph = phase_ctxt[:ld_xref_graph] end private def check(var) if var.extern? direct_refs = @xref_graph.direct_referrers_of(var) if !direct_refs.empty? && direct_refs.all? { |ref| ref.location.fpath == var.location.fpath } W(var.location, var.name) end end end end class W0628 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase def initialize(phase_ctxt) super phase_ctxt[:ld_function_traversal].on_definition += T(:check) @xref_graph = phase_ctxt[:ld_xref_graph] end private def check(fun) unless fun.name == "main" if @xref_graph.direct_referrers_of(fun).empty? W(fun.location, fun.signature) end end end end class W0770 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase # NOTE: W0770 may be duplicative when function declarations of the same # name appears twice or more in the project. mark_as_unique def initialize(phase_ctxt) super fun_traversal = phase_ctxt[:ld_function_traversal] fun_traversal.on_declaration += T(:check_function_declaration) fun_traversal.on_definition += T(:check_function_definition) @fun_map = phase_ctxt[:ld_function_map] var_traversal = phase_ctxt[:ld_variable_traversal] var_traversal.on_declaration += T(:check_variable) var_traversal.on_definition += T(:check_variable) @var_map = phase_ctxt[:ld_variable_map] end private def check_function_declaration(fun_dcl) if fun_dcl.extern? && fun_dcl.explicit? check_function(fun_dcl) end end def check_function_definition(fun_def) if fun_def.extern? check_function(fun_def) end end def check_function(fun) similar_dcls = @fun_map.lookup_function_declarations(fun.name).select { |fun_dcl| fun_dcl.explicit? } if similar_dcls.size > 1 W(fun.location, fun.signature, *similar_dcls.map { |pair| C(:C0001, pair.location, pair.signature) unless pair == fun }.compact) end end def check_variable(var) if var.extern? similar_dcls = @var_map.lookup_variable_declarations(var.name) if similar_dcls.size > 1 W(var.location, var.name, *similar_dcls.map { |pair| C(:C0001, pair.location, pair.name) unless pair == var }.compact) end end end end class W0791 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase # NOTE: W0791 may be duplicative when definitions of the same name appears # twice or more in the project. mark_as_unique def initialize(phase_ctxt) super phase_ctxt[:ld_function_traversal].on_definition += T(:check_function) phase_ctxt[:ld_variable_traversal].on_definition += T(:check_variable) @fun_map = phase_ctxt[:ld_function_map] @var_map = phase_ctxt[:ld_variable_map] end private def check_function(fun) if fun.extern? similar_funs = @fun_map.lookup_functions(fun.name) if similar_funs.size > 1 W(fun.location, fun.signature, *similar_funs.map { |pair| C(:C0001, pair.location, pair.signature) unless pair == fun }.compact) end end end def check_variable(var) if var.extern? similar_vars = @var_map.lookup_variables(var.name) if similar_vars.size > 1 W(var.location, var.name, *similar_vars.map { |pair| C(:C0001, pair.location, pair.name) unless pair == var }.compact) end end end end class W1037 < PassiveCodeCheck def_registrant_phase Ld::PreparePhase # NOTE: W1037 may be duplicative when declarations or definitions of the # same name appears twice or more in the project. mark_as_unique def initialize(phase_ctxt) super fun_traversal = phase_ctxt[:ld_function_traversal] fun_traversal.on_declaration += T(:check_function_declaration) fun_traversal.on_definition += T(:check_function_definition) @fun_map = phase_ctxt[:ld_function_map] var_traversal = phase_ctxt[:ld_variable_traversal] var_traversal.on_declaration += T(:check_variable) var_traversal.on_definition += T(:check_variable) @var_map = phase_ctxt[:ld_variable_map] end private def check_function_declaration(fun) check_function(fun) if fun.extern? && fun.explicit? end def check_function_definition(fun) check_function(fun) if fun.extern? end def check_function(fun) similar_dcls_or_funs = @fun_map.lookup_function_declarations(fun.name).select { |dcl| dcl.explicit? && dcl.extern? && dcl.signature != fun.signature } + @fun_map.lookup_functions(fun.name).select { |mapped_fun| mapped_fun.extern? && mapped_fun.signature != fun.signature } unless similar_dcls_or_funs.empty? W(fun.location, fun.signature, *similar_dcls_or_funs.map { |pair| C(:C0001, pair.location, pair.signature) }) end end def check_variable(var) if var.extern? dcls_or_vars = @var_map.lookup_variable_declarations(var.name) + @var_map.lookup_variables(var.name) similar_dcls_or_vars = dcls_or_vars.select { |dcl_or_var| dcl_or_var.extern? && dcl_or_var.type != var.type } unless similar_dcls_or_vars.empty? W(var.location, var.name, *similar_dcls_or_vars.map { |pair| C(:C0001, pair.location, pair.name) }) end end end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/cc1_metric.rb0000644000004100000410000006263312224440633022312 0ustar www-datawww-data# Metric measurements (cc1-phase) of adlint-exam-c_builtin package. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/cc1/phase" require "adlint/cc1/syntax" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class FL_STMT < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_error_statement += T(:count_statement) traversal.enter_generic_labeled_statement += T(:count_statement) traversal.enter_case_labeled_statement += T(:count_statement) traversal.enter_default_labeled_statement += T(:count_statement) traversal.enter_expression_statement += T(:count_statement) traversal.enter_if_statement += T(:count_statement) traversal.enter_if_else_statement += T(:count_statement) traversal.enter_switch_statement += T(:count_statement) traversal.enter_while_statement += T(:count_statement) traversal.enter_do_statement += T(:count_statement) traversal.enter_for_statement += T(:count_statement) traversal.enter_c99_for_statement += T(:count_statement) traversal.enter_goto_statement += T(:count_statement) traversal.enter_continue_statement += T(:count_statement) traversal.enter_break_statement += T(:count_statement) traversal.enter_return_statement += T(:count_statement) traversal.leave_translation_unit += M(:measure) @stmt_cnt = 0 end private def do_prepare(*) end def do_execute(*) end def count_statement(stmt) if @fpath == stmt.location.fpath @stmt_cnt += 1 end end def measure(*) FL_STMT(@fpath, @stmt_cnt) end end class FL_FUNC < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:count_function) traversal.enter_kandr_function_definition += T(:count_function) traversal.leave_translation_unit += M(:measure) @fun_cnt = 0 end private def do_prepare(*) end def do_execute(*) end def count_function(fun_def) if @fpath == fun_def.location.fpath @fun_cnt += 1 end end def measure(*) FL_FUNC(@fpath, @fun_cnt) end end class FN_STMT < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_error_statement += T(:count_statement) traversal.enter_generic_labeled_statement += T(:count_statement) traversal.enter_case_labeled_statement += T(:count_statement) traversal.enter_default_labeled_statement += T(:count_statement) traversal.enter_expression_statement += T(:count_statement) traversal.enter_if_statement += T(:count_statement) traversal.enter_if_else_statement += T(:count_statement) traversal.enter_switch_statement += T(:count_statement) traversal.enter_while_statement += T(:count_statement) traversal.enter_do_statement += T(:count_statement) traversal.enter_for_statement += T(:count_statement) traversal.enter_c99_for_statement += T(:count_statement) traversal.enter_goto_statement += T(:count_statement) traversal.enter_continue_statement += T(:count_statement) traversal.enter_break_statement += T(:count_statement) traversal.enter_return_statement += T(:count_statement) @cur_fun = nil @stmt_cnt = 0 end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def @stmt_cnt = 0 end end def leave_function(*) if @cur_fun FN_STMT(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @stmt_cnt) @cur_fun = nil @stmt_cnt = 0 end end def count_statement(*) @stmt_cnt += 1 if @cur_fun end end class FN_UNRC < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_error_statement += T(:count_statement) traversal.enter_generic_labeled_statement += T(:count_statement) traversal.enter_case_labeled_statement += T(:count_statement) traversal.enter_default_labeled_statement += T(:count_statement) traversal.enter_expression_statement += T(:count_statement) traversal.enter_if_statement += T(:count_statement) traversal.enter_if_else_statement += T(:count_statement) traversal.enter_switch_statement += T(:count_statement) traversal.enter_while_statement += T(:count_statement) traversal.enter_do_statement += T(:count_statement) traversal.enter_for_statement += T(:count_statement) traversal.enter_c99_for_statement += T(:count_statement) traversal.enter_goto_statement += T(:count_statement) traversal.enter_continue_statement += T(:count_statement) traversal.enter_break_statement += T(:count_statement) traversal.enter_return_statement += T(:count_statement) @cur_fun = nil @unreached_stmt_cnt = 0 end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def @unreached_stmt_cnt = 0 end end def leave_function(*) if @cur_fun FN_UNRC(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @unreached_stmt_cnt) @cur_fun = nil @unreached_stmt_cnt = 0 end end def count_statement(stmt) if @cur_fun @unreached_stmt_cnt += 1 unless stmt.executed? end end end class FN_LINE < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:measure) traversal.enter_kandr_function_definition += T(:measure) end private def do_prepare(*) end def do_execute(*) end def measure(fun_def) if @fpath == fun_def.location.fpath FN_LINE(FunctionId.new(fun_def.identifier.value, fun_def.signature.to_s), fun_def.location, fun_def.lines) end end end class FN_PARA < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:measure_ansi_function) traversal.enter_kandr_function_definition += T(:measure_kandr_function) end private def do_prepare(*) end def do_execute(*) end def measure_ansi_function(fun_def) if @fpath == fun_def.location.fpath # TODO: Determine how many parameters if function has va_list. if fun_def.parameter_type_list params = fun_def.parameter_definitions FN_PARA(FunctionId.new(fun_def.identifier.value, fun_def.signature.to_s), fun_def.location, params.count { |param| !param.type.void? }) else # TODO: Determine how many parameters if signature is abbreviated. FN_PARA(FunctionId.new(fun_def.identifier.value, fun_def.signature.to_s), fun_def.location, 0) end end end def measure_kandr_function(fun_def) if @fpath == fun_def.location.fpath FN_PARA(FunctionId.new(fun_def.identifier.value, fun_def.signature.to_s), fun_def.location, fun_def.identifier_list.size) end end end class FN_UNUV < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:enter_function) interp.on_function_ended += T(:leave_function) interp.on_variable_defined += T(:define_variable) interp.on_parameter_defined += T(:define_variable) interp.on_variable_referred += T(:refer_variable) interp.on_variable_value_referred += T(:read_variable) interp.on_variable_value_updated += T(:write_variable) @cur_fun = nil @vars = nil end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def, *) if @fpath == fun_def.location.fpath @cur_fun = fun_def @vars = {} end end def leave_function(*) if @cur_fun useless_cnt = @vars.each_value.reduce(0) { |cnt, read_cnt| read_cnt == 0 ? cnt + 1 : cnt } FN_UNUV(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, useless_cnt) @cur_fun = nil @vars = nil end end def define_variable(*, var) if @cur_fun @vars[var.name] = 0 end end def refer_variable(*, var) if @cur_fun @vars[var.name] += 1 if var.named? && @vars[var.name] end end def read_variable(*, var) if @cur_fun @vars[var.name] += 1 if var.named? && @vars[var.name] end end def write_variable(*, var) if @cur_fun @vars[var.name] = 0 if var.named? && @vars[var.name] end end end class FN_CSUB < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_function_call_expression += T(:count_function_call) @cur_fun = nil @funcall_cnt = 0 end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def @funcall_cnt = 0 end end def leave_function(*) if @cur_fun FN_CSUB(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @funcall_cnt) @cur_fun = nil @funcall_cnt = 0 end end def count_function_call(*) if @cur_fun @funcall_cnt += 1 end end end class FN_GOTO < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_goto_statement += T(:count_goto) @cur_fun = nil @goto_cnt = 0 end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def @goto_cnt = 0 end end def leave_function(*) if @cur_fun FN_GOTO(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @goto_cnt) @cur_fun = nil @goto_cnt = 0 end end def count_goto(*) if @cur_fun @goto_cnt += 1 end end end class FN_RETN < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_error_statement += T(:enter_statement) traversal.enter_generic_labeled_statement += T(:enter_statement) traversal.enter_case_labeled_statement += T(:enter_statement) traversal.enter_default_labeled_statement += T(:enter_statement) traversal.enter_expression_statement += T(:enter_statement) traversal.enter_if_statement += T(:enter_statement) traversal.enter_if_else_statement += T(:enter_statement) traversal.enter_switch_statement += T(:enter_statement) traversal.enter_while_statement += T(:enter_statement) traversal.enter_do_statement += T(:enter_statement) traversal.enter_for_statement += T(:enter_statement) traversal.enter_c99_for_statement += T(:enter_statement) traversal.enter_goto_statement += T(:enter_statement) traversal.enter_continue_statement += T(:enter_statement) traversal.enter_break_statement += T(:enter_statement) traversal.enter_return_statement += T(:count_return) @cur_fun = nil @ret_cnt = 0 @lst_stmt = nil end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def @ret_cnt = 0 @lst_stmt = nil end end def leave_function(*) if @cur_fun if @cur_fun.type.return_type.void? && !(@lst_stmt.kind_of?(Cc1::ReturnStatement)) FN_RETN(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @ret_cnt + 1) else FN_RETN(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @ret_cnt) end @cur_fun = nil @ret_cnt = 0 @lst_stmt = nil end end def enter_statement(node) if @cur_fun @lst_stmt = node if node.executed? end end def count_return(node) if @cur_fun @ret_cnt += 1 @lst_stmt = node end end end class FN_UELS < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_if_else_statement += T(:enter_if_else_statement) traversal.leave_if_else_statement += T(:leave_if_else_statement) @cur_fun = nil @if_else_stmt_chain = 0 @incomplete_if_else_stmt_cnt = 0 end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def @if_else_stmt_chain = 0 @incomplete_if_else_stmt_cnt = 0 end end def leave_function(*) if @cur_fun FN_UELS(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @incomplete_if_else_stmt_cnt) @cur_fun = nil @if_else_stmt_chain = 0 @incomplete_if_else_stmt_cnt = 0 end end def enter_if_else_statement(node) @if_else_stmt_chain += 1 if @cur_fun && @if_else_stmt_chain > 0 if node.else_statement.kind_of?(Cc1::IfStatement) @incomplete_if_else_stmt_cnt += 1 end end end def leave_if_else_statement(*) @if_else_stmt_chain -= 1 end end class FN_NEST < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_compound_statement += T(:enter_block) traversal.leave_compound_statement += T(:leave_block) traversal.enter_if_statement += T(:check_statement) traversal.enter_if_else_statement += T(:check_statement) traversal.enter_while_statement += T(:check_statement) traversal.enter_do_statement += T(:check_statement) traversal.enter_for_statement += T(:check_statement) traversal.enter_c99_for_statement += T(:check_statement) @cur_fun = nil end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def # NOTE: Nest level of the top of the function is 0. # Function definition must have a compound-statement as the # function body. @max_nest_level = @cur_nest_level = -1 end end def leave_function(fun_def) if @cur_fun FN_NEST(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @max_nest_level) @cur_fun = nil end end def enter_block(*) if @cur_fun @cur_nest_level += 1 @max_nest_level = [@max_nest_level, @cur_nest_level].max end end def leave_block(*) if @cur_fun @cur_nest_level -= 1 end end def check_statement(stmt) if @cur_fun case stmt when Cc1::IfStatement sub_statement = stmt.statement when Cc1::IfElseStatement if stmt.then_statement.kind_of?(Cc1::CompoundStatement) sub_statement = stmt.else_statement else sub_statement = stmt.then_statement end when Cc1::WhileStatement, Cc1::DoStatement sub_statement = stmt.statement when Cc1::ForStatement, Cc1::C99ForStatement sub_statement = stmt.body_statement end case sub_statement when Cc1::CompoundStatement, Cc1::IfStatement, Cc1::IfElseStatement else @cur_nest_level += 1 @max_nest_level = [@max_nest_level, @cur_nest_level].max end end end end class FN_PATH < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:enter_function) interp.on_function_ended += T(:leave_function) interp.on_branch_started += M(:enter_branch) interp.on_branch_ended += M(:leave_branch) @cur_fun = nil end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def, *) if @fpath == fun_def.location.fpath @cur_fun = fun_def # NOTE: Number of paths in the current function. @paths_in_fun = 1 # NOTE: Stack of the number of paths to enter the current branch group. @paths_to_enter_branch_group = [@paths_in_fun] # NOTE: Stack of the number of paths in the current branch. @paths_in_branch = [@paths_in_fun] # NOTE: Stack of the number of paths in the current branch group. @paths_in_branch_group = [@paths_in_fun] end end def leave_function(*) if @cur_fun FN_PATH(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @paths_in_fun) @cur_fun = nil end end def enter_branch(branch) if @cur_fun # NOTE: Entering into new branch group. if branch.first? @paths_in_fun -= @paths_in_branch.last @paths_to_enter_branch_group.push(@paths_in_branch.last) @paths_in_branch_group.push(0) end # NOTE: Entering into new branch. @paths_in_branch.push(@paths_to_enter_branch_group.last) @paths_in_fun += @paths_to_enter_branch_group.last end end def leave_branch(branch) if @cur_fun paths_in_this_branch = @paths_in_branch.pop # NOTE: Leaving from the current branch whose paths are not terminated. unless branch.break_with_return? @paths_in_branch_group[-1] += paths_in_this_branch end # NOTE: Leaving from the current branch group. if branch.final? paths_to_enter_this_branch_group = @paths_to_enter_branch_group.pop paths_in_this_branch_group = @paths_in_branch_group.pop @paths_in_branch[-1] = paths_in_this_branch_group # NOTE: The current branch group is an incomplete branch group. unless branch.group.complete? @paths_in_fun += paths_to_enter_this_branch_group @paths_in_branch[-1] += paths_to_enter_this_branch_group end end end end end class FN_CYCM < MetricMeasurement def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.enter_if_statement += T(:enter_selection) traversal.enter_if_else_statement += T(:enter_selection) traversal.enter_case_labeled_statement += T(:enter_selection) @cur_fun = nil @cycl_compl = 0 end private def do_prepare(*) end def do_execute(*) end def enter_function(fun_def) if @fpath == fun_def.location.fpath @cur_fun = fun_def @cycl_compl = 0 end end def leave_function(*) if @cur_fun FN_CYCM(FunctionId.new(@cur_fun.identifier.value, @cur_fun.signature.to_s), @cur_fun.location, @cycl_compl + 1) @cur_fun = nil end end def enter_selection(*) @cycl_compl += 1 if @cur_fun end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/cc1_code.rb0000644000004100000410000003327112224440633021735 0ustar www-datawww-data# Code structure extractions (cc1-phase) of adlint-exam-c_builtin package. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/cc1/phase" require "adlint/cc1/syntax" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class TypeDeclExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_typedef_declaration += T(:extract_typedef) traversal.enter_struct_type_declaration += T(:extract_struct) traversal.enter_union_type_declaration += T(:extract_union) traversal.enter_enum_type_declaration += T(:extract_enum) end private def do_prepare(*) end def do_execute(*) end def extract_typedef(typedef_dcl) TYPEDCL(typedef_dcl.identifier.location, "T", typedef_dcl.type.name, typedef_dcl.type.image) end def extract_struct(struct_type_dcl) TYPEDCL(struct_type_dcl.identifier.location, "S", struct_type_dcl.type.name, struct_type_dcl.type.image) end def extract_union(union_type_dcl) TYPEDCL(union_type_dcl.identifier.location, "U", union_type_dcl.type.name, union_type_dcl.type.image) end def extract_enum(enum_type_dcl) TYPEDCL(enum_type_dcl.identifier.location, "E", enum_type_dcl.type.name, enum_type_dcl.type.image) end end class GVarDeclExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:extract) end private def do_prepare(*) end def do_execute(*) end def extract(var_dcl, var) if var.declared_as_extern? GVARDCL(var_dcl.identifier.location, var_dcl.identifier.value, var_dcl.type.brief_image) end end end class FunDclExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_function_declared += T(:extract_explicit_dcl) interp.on_implicit_function_declared += T(:extract_implicit_dcl) interp.on_block_started += T(:enter_block) interp.on_block_ended += T(:leave_block) @block_level = 0 end private def do_prepare(*) end def do_execute(*) end def extract_explicit_dcl(fun_dcl, fun) if fun.declared_as_extern? FUNDCL(fun_dcl.identifier.location, "X", @block_level == 0 ? "F" : "B", "E", FunctionId.new(fun_dcl.identifier.value, fun_dcl.signature.to_s)) else FUNDCL(fun_dcl.identifier.location, "I", @block_level == 0 ? "F" : "B", "E", FunctionId.new(fun_dcl.identifier.value, fun_dcl.signature.to_s)) end end def extract_implicit_dcl(expr, fun) if fun.named? FUNDCL(expr.location, "X", "F", "I", FunctionId.new(fun.name, fun.signature.to_s)) end end def enter_block(*) @block_level += 1 end def leave_block(*) @block_level -= 1 end end class VarDefExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:extract_variable) interp.on_parameter_defined += T(:extract_parameter) interp.on_block_started += T(:enter_block) interp.on_block_ended += T(:leave_block) @block_level = 0 end private def do_prepare(*) end def do_execute(*) end def extract_variable(var_def, var) case when var.declared_as_extern? VARDEF(var_def.identifier.location, "X", @block_level == 0 ? "F" : "B", storage_class_type(var_def.storage_class_specifier), var_def.identifier.value, var_def.type.brief_image) when var.declared_as_static? VARDEF(var_def.identifier.location, "I", @block_level == 0 ? "F" : "B", storage_class_type(var_def.storage_class_specifier), var_def.identifier.value, var_def.type.brief_image) when var.declared_as_auto? VARDEF(var_def.identifier.location, "I", @block_level == 0 ? "F" : "B", storage_class_type(var_def.storage_class_specifier), var_def.identifier.value, var_def.type.brief_image) when var.declared_as_register? VARDEF(var_def.identifier.location, "I", @block_level == 0 ? "F" : "B", storage_class_type(var_def.storage_class_specifier), var_def.identifier.value, var_def.type.brief_image) end end def extract_parameter(param_def, var) if var.named? VARDEF(param_def.identifier.location, "I", "P", storage_class_type(param_def.storage_class_specifier), param_def.identifier.value, param_def.type.brief_image) end end def enter_block(*) @block_level += 1 end def leave_block(*) @block_level -= 1 end def storage_class_type(sc_spec) if sc_spec case sc_spec.type when :AUTO "A" when :REGISTER "R" when :STATIC "S" when :EXTERN "E" else "N" end else "N" end end end class FunDefExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_function_defined += T(:extract_function) end private def do_prepare(*) end def do_execute(*) end def extract_function(fun_def, fun) fun_id = FunctionId.new(fun_def.identifier.value, fun_def.signature.to_s) case when fun.declared_as_extern? FUNDEF(fun_def.identifier.location, "X", "F", fun_id, fun_def.lines) when fun.declared_as_static? FUNDEF(fun_def.identifier.location, "I", "F", fun_id, fun_def.lines) end end end class LabelDefExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_generic_labeled_statement += T(:extract) end private def do_prepare(*) end def do_execute(*) end def extract(labeled_stmt) LABELDEF(labeled_stmt.label.location, labeled_stmt.label.value) end end class InitializationExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:extract) end private def do_prepare(*) end def do_execute(*) end def extract(var_def) if var_def.initializer INITIALIZATION(var_def.identifier.location, var_def.identifier.value, var_def.initializer.to_s) end end end class AssignmentExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_simple_assignment_expression += T(:extract) traversal.enter_compound_assignment_expression += T(:extract) end private def do_prepare(*) end def do_execute(*) end def extract(assign_expr) ASSIGNMENT(assign_expr.operator.location, assign_expr.lhs_operand.to_s, stringify(assign_expr)) end def stringify(assign_expr) "#{assign_expr.operator.value} #{assign_expr.rhs_operand.to_s}" end end class FuncallExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:update_caller) interp.on_function_ended += T(:clear_caller) interp.on_function_call_expr_evaled += T(:extract_function_call) @caller = nil end private def do_prepare(*) end def do_execute(*) end def update_caller(*, fun) @caller = fun end def clear_caller(*) @caller = nil end def extract_function_call(funcall_expr, fun, *) if fun.named? if @caller referrer = FunctionId.new(@caller.name, @caller.signature.to_s) else referrer = FunctionId.of_ctors_section end FUNCALL(funcall_expr.location, referrer, FunctionId.new(fun.name, fun.signature.to_s)) end end end class XRefExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:update_accessor) interp.on_function_ended += T(:clear_accessor) interp.on_variable_value_referred += T(:extract_variable_read) interp.on_variable_value_updated += T(:extract_variable_write) interp.on_function_referred += T(:extract_function_reference) @accessor = nil end private def do_prepare(*) end def do_execute(*) end def update_accessor(*, fun) @accessor = fun end def clear_accessor(*) @accessor = nil end def extract_variable_read(expr, var) if var.scope.global? && var.named? # NOTE: When a value of the inner-variable of array or composite object # is referred, dependency record of only outmost-variable access # should be output. var = var.owner while var.inner? if @accessor referrer = FunctionId.new(@accessor.name, @accessor.signature.to_s) else referrer = FunctionId.of_ctors_section end XREF_VAR(expr.location, referrer, "R", var.name) end end def extract_variable_write(expr, var) # NOTE: When a value of the inner-variable of array or composite # object is updated, dependency record of the inner-variable # access should not be output and the outer variable's value # will also be notified later. return if var.inner? if var.scope.global? && var.named? if @accessor referrer = FunctionId.new(@accessor.name, @accessor.signature.to_s) else referrer = FunctionId.of_ctors_section end XREF_VAR(expr.location, referrer, "W", var.name) end end def extract_function_reference(expr, fun) if fun.named? if @accessor referrer = FunctionId.new(@accessor.name, @accessor.signature.to_s) else referrer = FunctionId.of_ctors_section end XREF_FUNC(expr.location, referrer, "R", FunctionId.new(fun.name, fun.signature.to_s)) end end end class LiteralExtraction < CodeExtraction def_registrant_phase Cc1::Prepare2Phase def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_constant_specifier += T(:extract_constant) traversal.enter_string_literal_specifier += T(:extract_string_literal) end private def do_prepare(*) end def do_execute(*) end def extract_constant(const_spec) LIT(const_spec.location, type_of(const_spec), const_spec.prefix, const_spec.suffix, const_spec.constant.value) end def extract_string_literal(str_lit_spec) LIT(str_lit_spec.location, type_of(str_lit_spec), str_lit_spec.prefix, nil, str_lit_spec.literal.value) end def type_of(const_or_str_lit_spec) case const_or_str_lit_spec when Cc1::ConstantSpecifier case const_or_str_lit_spec.constant.value when /\A0x[0-9a-f]+[UL]*\z/i "HN" when /\A0b[01]+[UL]*\z/i "BN" when /\A0[0-9]+[UL]*\z/i "ON" when /\A[0-9]+[UL]*\z/i "DN" when /\A(?:[0-9]*\.[0-9]*E[+-]?[0-9]+|[0-9]+\.?E[+-]?[0-9]+)[FL]*\z/i, /\A(?:[0-9]*\.[0-9]+|[0-9]+\.)[FL]*\z/i "FN" when /\A'.*'\z/i "CN" when /\AL'.*'\z/i "CW" else "NA" end when Cc1::StringLiteralSpecifier case const_or_str_lit_spec.literal.value when /\A".*"\z/i "SN" when /\AL".*"\z/i "SW" else "NA" end else raise TypeError end end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/cc1_check.rb0000644000004100000410000204677212224440633022114 0ustar www-datawww-data# Code checkings (cc1-phase) of adlint-exam-c_builtin package. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/token" require "adlint/traits" require "adlint/monitor" require "adlint/cc1/phase" require "adlint/cc1/syntax" require "adlint/cc1/type" require "adlint/cc1/format" require "adlint/cc1/option" require "adlint/cc1/conv" require "adlint/cc1/util" require "adlint/cpp/syntax" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class W0001_Cc1 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_grouped_expression += T(:enter_grouped_expression) traversal.leave_grouped_expression += T(:leave_grouped_expression) @group_depth = 0 end private def enter_grouped_expression(node) @group_depth += 1 W(node.location) if @group_depth == 33 end def leave_grouped_expression(node) @group_depth -= 1 end end class W0002 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_kandr_function_definition += T(:check) end private def check(node) W(node.location, node.identifier.value) end end class W0003 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_switch_statement += T(:check) end private def check(node) if node.statement.kind_of?(Cc1::CompoundStatement) unless have_default_statement?(node.statement) W(node.location) end end end def have_default_statement?(compound_stmt) compound_stmt.block_items.any? do |item| case item when Cc1::GenericLabeledStatement, Cc1::CaseLabeledStatement item = item.statement redo when Cc1::DefaultLabeledStatement true else false end end end end class W0007 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_switch_statement += T(:enter_switch_statement) end private def enter_switch_statement(node) prv_item = nil node.statement.block_items.each do |item| if prv_item case item when Cc1::CaseLabeledStatement, Cc1::DefaultLabeledStatement case prv_item when Cc1::CompoundStatement unless end_with_break_or_return_statement?(item) W(item.location) warn_inner_case_labeled_statement(item) end when Cc1::BreakStatement, Cc1::ReturnStatement ; else W(item.location) warn_inner_case_labeled_statement(item) end end end item = item.statement while item.kind_of?(Cc1::LabeledStatement) prv_item = item end end def warn_inner_case_labeled_statement(node) child = node loop do child = child.statement break unless child.kind_of?(Cc1::CaseLabeledStatement) W(child.location) end end def end_with_break_or_return_statement?(stmt) case stmt when Cc1::CompoundStatement end_with_break_or_return_statement?(stmt.block_Items.last) when Cc1::BreakStatement true when Cc1::ReturnStatement true end end end class W0010 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_conditional_expression += T(:check) end private def check(node) if node.then_expression.have_side_effect? || node.else_expression.have_side_effect? W(node.location) end end end class W0013 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_continue_statement += T(:check) end private def check(node) W(node.location) end end class W0016 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) if fmt css = fmt.conversion_specifiers if css.any? { |cs| cs.field_width_value > 509 } W(fmt.location) end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0017 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) if fmt conv_specs = fmt.conversion_specifiers if conv_specs.any? { |cs| cs.field_width_value > 509 } W(fmt.location) end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0018 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) if fmt conv_specs = fmt.conversion_specifiers if conv_specs.any? { |cs| cs.precision_value > 509 } W(fmt.location) end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0019 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check_explicit_conversion) end private def check_explicit_conversion(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type if orig_type.pointer? && orig_type.unqualify.base_type.const? && rslt_type.pointer? && !rslt_type.unqualify.base_type.const? W(expr.location) end end end class W0021 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check_explicit_conversion) end private def check_explicit_conversion(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type if orig_type.pointer? && orig_type.unqualify.base_type.volatile? && rslt_type.pointer? && !rslt_type.unqualify.base_type.volatile? W(expr.location) end end end class W0023 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_additive_expr_evaled += T(:check_binary) @interp.on_multiplicative_expr_evaled += T(:check_binary) end private def check_binary(binary_expr, lhs_var, rhs_var, *) case when lhs_var.type.pointer? && rhs_var.type.scalar? rhs_val = rhs_var.value if rhs_var.value.scalar? && rhs_val.test_must_be_equal_to(scalar_value_of(1)).false? W(binary_expr.location) end when rhs_var.type.pointer? && lhs_var.type.scalar? lhs_val = lhs_var.value if lhs_val.scalar? && lhs_val.test_must_be_equal_to(scalar_value_of(1)).false? W(binary_expr.location) end end end def interpreter @interp end end class W0024 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_additive_expr_evaled += T(:check_binary) @interp.on_prefix_increment_expr_evaled += T(:check_unary_prefix) @interp.on_postfix_increment_expr_evaled += T(:check_unary_postfix) @interp.on_prefix_decrement_expr_evaled += T(:check_unary_prefix) @interp.on_postfix_decrement_expr_evaled += T(:check_unary_postfix) end private def check_binary(binary_expr, lhs_var, rhs_var, *) case when lhs_var.type.pointer? && rhs_var.type.scalar? rhs_val = rhs_var.value if rhs_var.value.scalar? && rhs_val.test_must_be_equal_to(scalar_value_of(1)).true? W(binary_expr.location) end when rhs_var.type.pointer? && lhs_var.type.scalar? lhs_val = lhs_var.value if lhs_var.value.scalar? && lhs_val.test_must_be_equal_to(scalar_value_of(1)).true? W(binary_expr.location) end end end def check_unary_prefix(unary_expr, ope_var, *) if ope_var.type.pointer? W(unary_expr.location) end end def check_unary_postfix(postfix_expr, ope_var, *) if ope_var.type.pointer? W(postfix_expr.location) end end def interpreter @interp end end class W0027 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_relational_expr_evaled += T(:check_comparison) interp.on_equality_expr_evaled += T(:check_comparison) end private def check_comparison(expr, lhs_var, rhs_var, *) return if expr.lhs_operand.kind_of?(Cc1::NullConstantSpecifier) return if expr.rhs_operand.kind_of?(Cc1::NullConstantSpecifier) if lhs_var.type.pointer? || rhs_var.type.pointer? W(expr.location) end end end class W0028 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_indirection_expr_evaled += T(:check_indirection) @interp.on_member_access_expr_evaled += T(:check_member_access) @interp.on_array_subscript_expr_evaled += T(:check_array_subscript) end private def check_indirection(expr, var, *) if constant_expression?(expr.operand) val = var.value if val.scalar? && val.test_must_be_null.true? W(expr.location) end end end def check_member_access(expr, outer_var, *) return unless outer_var.type.pointer? if constant_expression?(expr.expression) val = outer_var.value if val.scalar? && val.test_must_be_null.true? W(expr.location) end end end def check_array_subscript(expr, ptr_var, *) return unless ptr_var.type.pointer? if constant_expression?(expr.expression) val = ptr_var.value if val.scalar? && val.test_must_be_null.true? W(expr.location) end end end def interpreter @interp end end class W0030 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check_binary) @interp.on_additive_expr_evaled += T(:check_binary) @interp.on_shift_expr_evaled += T(:check_binary) @interp.on_and_expr_evaled += T(:check_binary) @interp.on_exclusive_or_expr_evaled += T(:check_binary) @interp.on_inclusive_or_expr_evaled += T(:check_binary) @interp.on_prefix_increment_expr_evaled += T(:check_unary_prefix) @interp.on_postfix_increment_expr_evaled += T(:check_unary_postfix) @interp.on_prefix_decrement_expr_evaled += T(:check_unary_prefix) @interp.on_postfix_decrement_expr_evaled += T(:check_unary_postfix) end private def check_binary(expr, lhs_var, rhs_var, *) lhs_type, lhs_val = lhs_var.type, lhs_var.value rhs_type, rhs_val = rhs_var.type, rhs_var.value if constant_expression?(expr.lhs_operand) && lhs_type.pointer? && lhs_val.test_must_be_null.true? W(expr.lhs_operand.location) end if constant_expression?(expr.rhs_operand) && rhs_type.pointer? && rhs_val.test_must_be_null.true? W(expr.rhs_operand.location) end end def check_unary_prefix(expr, ope_var, orig_val) type, val = ope_var.type, orig_val if constant_expression?(expr.operand) && type.pointer? && val.test_must_be_null.true? W(expr.operand.location) end end def check_unary_postfix(expr, ope_var, *) type, val = ope_var.type, ope_var.value if constant_expression?(expr.operand) && type.pointer? && val.test_must_be_null.true? W(expr.operand.location) end end def interpreter @interp end end class W0031 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:start_function) interp.on_parameter_defined += T(:add_parameter) interp.on_variable_referred += T(:use_parameter) interp.on_variable_value_referred += T(:use_parameter) interp.on_function_ended += T(:check_unused_parameter) @parameters = nil end private def start_function(*) @parameters = {} end def add_parameter(param_def, var) if @parameters && var.named? @parameters[var.name] = [param_def, false] end end def use_parameter(*, var) if @parameters && var.named? if param_def = @parameters[var.name] @parameters[var.name] = [param_def, true] end end end def check_unused_parameter(*) if @parameters @parameters.each do |name, param| W(param[0].location, name) unless param[1] end @parameters = nil end end end class W0033 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:collect_labels) interp.on_goto_stmt_evaled += T(:use_label) interp.on_function_ended += T(:check_unused_label) @labels = nil end private def collect_labels(fun_def, *) @labels = LabelCollector.new.tap { |col| fun_def.function_body.accept(col) }.labels end def end_function(*) @labels = nil end def use_label(*, label_name) if @labels and label = @labels[label_name] @labels[label_name] = [label, true] end end def check_unused_label(*) if @labels @labels.each do |name, label| W(label[0].location, name) unless label[1] end @labels = nil end end class LabelCollector < Cc1::SyntaxTreeVisitor def initialize @labels = {} end attr_reader :labels def visit_generic_labeled_statement(node) @labels[node.label.value] = [node.label, false] end end private_constant :LabelCollector end class W0035 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_logical_or_expr_evaled += T(:check_logical) interp.on_logical_and_expr_evaled += T(:check_logical) interp.on_conditional_expr_evaled += T(:check_conditional) end private def check_logical(expr, lhs_var, rhs_var, *) unless rhs_var.type.scalar? W(expr.location) end end def check_conditional(expr, ctrl_var, *) unless ctrl_var.type.scalar? W(expr.location) end end end class W0036 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_init_declarator += T(:check_init_decl) traversal.enter_struct_declarator += T(:check_struct_decl) traversal.enter_parameter_declaration += T(:check_parameter_decl) traversal.enter_kandr_function_definition += T(:check_kandr_fundef) traversal.enter_ansi_function_definition += T(:check_ansi_fundef) traversal.enter_type_name += T(:check_type_name) end private def check_init_decl(init_dcr) dcr_num = DeclaratorCounter.new.tap { |cnt| init_dcr.declarator.accept(cnt) }.result W(init_dcr.location) if dcr_num > 12 end def check_struct_decl(struct_dcr) if dcr = struct_dcr.declarator dcr_num = DeclaratorCounter.new.tap { |cnt| dcr.accept(cnt) }.result W(struct_dcr.location) if dcr_num > 12 end end def check_parameter_decl(param_dcl) if dcr = param_dcl.declarator dcr_num = DeclaratorCounter.new.tap { |cnt| dcr.accept(cnt) }.result W(param_dcl.location) if dcr_num > 12 end end def check_kandr_fundef(fun_def) dcr_num = DeclaratorCounter.new.tap { |cnt| fun_def.declarator.accept(cnt) }.result W(fun_def.location) if dcr_num > 12 end def check_ansi_fundef(fun_def) dcr_num = DeclaratorCounter.new.tap { |cnt| fun_def.declarator.accept(cnt) }.result W(fun_def.location) if dcr_num > 12 end def check_type_name(type_name) if dcr = type_name.abstract_declarator dcr_num = DeclaratorCounter.new.tap { |cnt| dcr.accept(cnt) }.result W(type_name.location) if dcr_num > 12 end end class DeclaratorCounter < Cc1::SyntaxTreeVisitor def initialize @result = 0 end attr_reader :result def visit_identifier_declarator(node) super if ptr = node.pointer @result += ptr.count { |tok| tok.type == "*" } end end def visit_array_declarator(node) super @result += 1 if ptr = node.pointer @result += ptr.count { |tok| tok.type == "*" } end end def visit_ansi_function_declarator(node) node.base.accept(self) @result += 1 if ptr = node.pointer @result += ptr.count { |tok| tok.type == "*" } end end def visit_kandr_function_declarator(node) super @result += 1 if ptr = node.pointer @result += ptr.count { |tok| tok.type == "*" } end end def visit_abbreviated_function_declarator(node) super @result += 1 if ptr = node.pointer @result += ptr.count { |tok| tok.type == "*" } end end def visit_pointer_abstract_declarator(node) super @result += node.pointer.count { |tok| tok.type == "*" } end def visit_array_abstract_declarator(node) super @result += 1 end def visit_function_abstract_declarator(node) node.base.accept(self) if node.base @result += 1 end end private_constant :DeclaratorCounter end class W0037 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_struct_specifier += T(:enter_struct_specifier) traversal.leave_struct_specifier += T(:leave_struct_specifier) traversal.enter_union_specifier += T(:enter_union_specifier) traversal.leave_union_specifier += T(:leave_union_specifier) @nest_level = 0 end private def enter_struct_specifier(node) @nest_level += 1 W(node.location) if @nest_level == 16 end def leave_struct_specifier(node) @nest_level -= 1 end def enter_union_specifier(node) @nest_level += 1 W(node.location) if @nest_level == 16 end def leave_union_specifier(node) @nest_level -= 1 end end class W0038 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:check) end private def check(node) if node.type.aligned_byte_size > 32767 W(node.location, node.identifier.value) end end end class W0039 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_compound_statement += T(:enter_block) traversal.leave_compound_statement += T(:leave_block) traversal.enter_variable_definition += T(:add_identifier) traversal.enter_variable_declaration += T(:add_identifier) traversal.enter_typedef_declaration += T(:add_identifier) @block_stack = [0] end private def enter_block(node) @block_stack.push(0) end def leave_block(node) @block_stack.pop end def add_identifier(node) @block_stack[-1] += 1 W(node.location) if @block_stack.last == 128 end end class W0040 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_struct_type_declaration += T(:check) traversal.enter_union_type_declaration += T(:check) end private def check(node) node.struct_declarations.each do |struct_dcl| struct_dcl.items.each do |memb_decl| memb_type = memb_decl.type next unless memb_type.scalar? && memb_type.integer? if memb_type.bitfield? && !memb_type.explicitly_signed? W(node.location) return end end end end end class W0041 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_struct_type_declaration += T(:check_struct) traversal.enter_union_type_declaration += T(:check_union) end private def check_struct(node) memb_num = node.struct_declarations.map { |dcl| dcl.items.size }.reduce(0) { |sum, num| sum + num } W(node.location) if memb_num > 127 end def check_union(node) memb_num = node.struct_declarations.map { |dcl| dcl.items.size }.reduce(0) { |sum, num| sum + num } W(node.location) if memb_num > 127 end end class W0042 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_enum_type_declaration += T(:check) end private def check(node) if node.enum_specifier.enumerators.size > 127 W(node.location) end end end class W0043 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:enter_variable_definition) end private def enter_variable_definition(node) return unless node.initializer return unless node.type.array? if inits = node.initializer.initializers if initializer_depth(node.initializer) == type_depth(node.type) check_well_balanced(node.type, inits, node.initializer) else check_flattened(node.type, inits, node.initializer) end end end def check_well_balanced(ary_type, inits, parent_init) return unless ary_type.length if !inits.empty? && inits.size < ary_type.length if inits.size == 1 and expr = inits.first.expression unless expr.kind_of?(Cc1::ConstantSpecifier) && expr.constant.value == "0" warn(expr, parent_init) end else warn(inits.first, parent_init) end end if ary_type.base_type.array? inits.each do |init| if init.initializers check_well_balanced(ary_type.base_type, init.initializers, init) end end end end def check_flattened(ary_type, inits, parent_init) unless total_length = total_length(ary_type) # NOTE: Cannot check the incomplete array. return end flattener = lambda { |init| init.expression || init.initializers.map(&flattener) } exprs = inits.map { |init| flattener.call(init) }.flatten.compact if !exprs.empty? && exprs.size < total_length if exprs.size == 1 and fst = exprs.first if fst.kind_of?(Cc1::ObjectSpecifier) && fst.constant.value != "0" warn(fst, parent_init) end else warn(exprs.first, parent_init) end end end def warn(node, parant_init) if parant_init W(parant_init.location) else W(node.location) end end def initializer_depth(init) if inits = init.initializers 1 + inits.map { |i| initializer_depth(i) }.max else 0 end end def type_depth(type) case when type.array? 1 + type_depth(type.base_type) when type.composite? type.members.empty? ? 1 : 1 + type.members.map { |memb| type_depth(memb.type) }.max else 0 end end def total_length(ary_type) total_len = 1 type = ary_type while type.array? if type.length total_len *= type.length type = type.base_type else return nil end end total_len end end class W0049 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_if_statement += T(:enter_if_statement) traversal.leave_if_statement += T(:leave_if_statement) traversal.enter_switch_statement += T(:enter_switch_statement) traversal.leave_switch_statement += T(:leave_switch_statement) traversal.enter_while_statement += T(:enter_while_statement) traversal.leave_while_statement += T(:leave_while_statement) traversal.enter_do_statement += T(:enter_do_statement) traversal.leave_do_statement += T(:leave_do_statement) traversal.enter_for_statement += T(:enter_for_statement) traversal.leave_for_statement += T(:leave_for_statement) traversal.enter_c99_for_statement += T(:enter_c99_for_statement) traversal.leave_c99_for_statement += T(:leave_c99_for_statement) @ctrl_stmt_level = 0 end private def enter_if_statement(node) @ctrl_stmt_level += 1 W(node.location) if @ctrl_stmt_level == 16 end def leave_if_statement(node) @ctrl_stmt_level -= 1 end def enter_switch_statement(node) @ctrl_stmt_level += 1 W(node.location) if @ctrl_stmt_level == 16 end def leave_switch_statement(node) @ctrl_stmt_level -= 1 end def enter_while_statement(node) @ctrl_stmt_level += 1 W(node.location) if @ctrl_stmt_level == 16 end def leave_while_statement(node) @ctrl_stmt_level -= 1 end def enter_do_statement(node) @ctrl_stmt_level += 1 W(node.location) if @ctrl_stmt_level == 16 end def leave_do_statement(node) @ctrl_stmt_level -= 1 end def enter_for_statement(node) @ctrl_stmt_level += 1 W(node.location) if @ctrl_stmt_level == 16 end def leave_for_statement(node) @ctrl_stmt_level -= 1 end def enter_c99_for_statement(node) @ctrl_stmt_level += 1 W(node.location) if @ctrl_stmt_level == 16 end def leave_c99_for_statement(node) @ctrl_stmt_level -= 1 end end class W0050 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_switch_statement += T(:enter_switch_statement) traversal.leave_switch_statement += T(:leave_switch_statement) traversal.enter_case_labeled_statement += T(:check) @label_num_stack = [] end private def enter_switch_statement(node) @label_num_stack.push(0) end def leave_switch_statement(node) @label_num_stack.pop end def check(node) unless @label_num_stack.empty? @label_num_stack[-1] += 1 W(node.location) if @label_num_stack[-1] == 258 end end end class W0051 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:add_variable) interp.on_variable_defined += T(:add_variable) interp.on_explicit_function_declared += T(:add_function) interp.on_explicit_function_defined += T(:add_function) interp.on_translation_unit_ended += M(:check) @obj_dcls = Hash.new { |hash, key| hash[key] = [] } end private def add_variable(dcl_or_def, var) if var.named? && var.declared_as_extern? @obj_dcls[mangle(var.name)].push(dcl_or_def) end end def add_function(dcl_or_def, fun) if fun.named? && fun.declared_as_extern? @obj_dcls[mangle(fun.name)].push(dcl_or_def) end end def check(*) @obj_dcls.each_value do |dcls| similar_dcls = dcls.uniq { |dcl| dcl.identifier.value } next unless similar_dcls.size > 1 similar_dcls.each do |dcl| W(dcl.location, dcl.identifier.value, *similar_dcls.map { |pair_dcl| next if pair_dcl == dcl C(:C0001, pair_dcl.location, pair_dcl.identifier.value) }.compact) end end end def mangle(name) truncated = name.slice(0...@phase_ctxt.traits.of_linker.identifier_max) if @phase_ctxt.traits.of_linker.identifier_ignore_case truncated.upcase else truncated end end end class W0052 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:declare_object) interp.on_variable_defined += T(:declare_object) interp.on_explicit_function_declared += T(:declare_object) interp.on_explicit_function_defined += T(:declare_object) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @dcl_names = [Hash.new { |hash, key| hash[key] = [] }] end private def declare_object(dcl_or_def, *) dcl_name = dcl_or_def.identifier pair_names = @dcl_names.map { |name_hash| name_hash[mangle(dcl_name.value)] }.reduce([]) { |all_names, similar_names| all_names + similar_names }.uniq { |id| id.value }.reject { |id| id.value == dcl_name.value } unless pair_names.empty? W(dcl_or_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last[mangle(dcl_name.value)].push(dcl_name) end def enter_scope(*) @dcl_names.push(Hash.new { |hash, key| hash[key] = [] }) end def leave_scope(*) @dcl_names.pop end def mangle(name) name.slice(0...@phase_ctxt.traits.of_compiler.identifier_max) end end class W0058 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_string_literal_specifier += T(:check) end private def check(node) if node.literal.value.length - 2 > 509 W(node.location) end end end class W0062 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_typeof_type_specifier += T(:check) end private def check(node) W(node.location) end end class W0063 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_alignof_expression += T(:check) traversal.enter_alignof_type_expression += T(:check) end private def check(node) W(node.location) end end class W0064 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_constant_referred += T(:check) end private def check(const_spec, *) W(const_spec.location) if const_spec.constant.value =~ /\A0b/ end end class W0065 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_simple_assignment_expression += T(:check) end private def check(node) if node.lhs_operand.kind_of?(Cc1::CastExpression) W(node.location) end end end class W0066 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:check_ansi_function) traversal.enter_kandr_function_definition += T(:check_kandr_function) @interp = phase_ctxt[:cc1_interpreter] end private def check_ansi_function(node) check(node) if node.identifier.value == "main" end def check_kandr_function(node) check(node) if node.identifier.value == "main" end def check(node) unless node.type.return_type == int_t W(node.location) return end if node.type.parameter_types.size == 1 && node.type.parameter_types[0] == void_t return end if node.type.parameter_types.size == 2 && node.type.parameter_types[0] == argc_type && node.type.parameter_types[1] == argv_type return end W(node.location) end def argc_type int_t end def argv_type array_type(pointer_type(char_t)) end def interpreter @interp end end class W0067 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_member_access_expr_evaled += T(:check_member_access) end private def check_member_access(expr, outer_var, inner_var) type = outer_var.type unqual_type = type.unqualify if type.pointer? && unqual_type.base_type.incomplete? or type.composite? && type.incomplete? return end W(expr.location) unless inner_var end end class W0068 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_bit_access_by_value_expression += T(:check) traversal.enter_bit_access_by_pointer_expression += T(:check) end private def check(node) W(node.location) end end class W0070 < CodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) sys_headers = phase_ctxt[:sources].select { |src| src.system_header? } sys_headers.each do |src| if src.included_at.in_analysis_target?(traits) syms = phase_ctxt[:symbol_table].symbols_appeared_in(src) if syms.all? { |sym| sym.useless? } W(src.included_at, src.fpath) end end end end end class W0071 < CodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) usr_headers = phase_ctxt[:sources].select { |src| src.user_header? } usr_headers.each do |src| if src.included_at.in_analysis_target?(traits) syms = phase_ctxt[:symbol_table].symbols_appeared_in(src) if syms.all? { |sym| sym.useless? } W(src.included_at, src.fpath) end end end end end class W0076 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_constant_referred += T(:check) end private def check(const_spec, *) if const_spec.constant.value =~ /\A0x[0-9A-F]+\z/i W(const_spec.location) end end end class W0077 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_constant_referred += T(:check) end private def check(const_spec, *) case const_spec.constant.value when /\A(?:[0-9]*\.[0-9]*[Ee][+-]?[0-9]+|[0-9]+\.?[Ee][+-]?[0-9]+).*l\z/, /\A(?:[0-9]*\.[0-9]+|[0-9]+\.).*l\z/, /\A(?:0x[0-9A-Fa-f]+|0b[01]+|[0-9]+)l\z/ W(const_spec.location) end end end class W0078 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_function_declaration += T(:check) end private def check(node) W(node.location) if node.type.parameter_types.empty? end end class W0079 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:check) @interp = phase_ctxt[:cc1_interpreter] end private def check(node) return unless node.initializer && node.initializer.expression if node.type.array? && node.type.base_type.same_as?(char_t) if len = node.type.length finder = StringLiteralSpecifierFinder.new node.initializer.expression.accept(finder) if str_lit = finder.result str = unquote_string_literal(str_lit) W(node.location) if len <= str.length end end end end def unquote_string_literal(str_lit) str_lit.literal.value.sub(/\AL?"(.*)"\z/, "\\1") end def interpreter @interp end class StringLiteralSpecifierFinder < Cc1::SyntaxTreeVisitor def initialize @result = nil end attr_reader :result def visit_string_literal_specifier(node) @result = node end end private_constant :StringLiteralSpecifierFinder end class W0080 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) interp.on_block_started += T(:enter_block) interp.on_block_ended += T(:leave_block) @block_level = 0 end private def check(var_def, var) if @block_level == 0 if var.declared_as_extern? || var.declared_as_static? if var.type.const? && var_def.initializer.nil? W(var_def.location) end end end end def enter_block(*) @block_level += 1 end def leave_block(*) @block_level -= 1 end end class W0081 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_unary_arithmetic_expr_evaled += T(:check) end private def check(expr, ope_var, *) if expr.operator.type == "-" if ope_var.type.same_as?(unsigned_int_t) || ope_var.type.same_as?(unsigned_long_t) || ope_var.type.same_as?(unsigned_long_long_t) W(expr.location) end end end def interpreter @interp end end class W0082 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_unary_arithmetic_expr_evaled += T(:check) end private def check(expr, ope_var, *) if expr.operator.type == "-" if unsigned_underlying_type?(ope_var.type) W(expr.location, ope_var.type.brief_image) end end end def unsigned_underlying_type?(type) type.same_as?(unsigned_char_t) || type.same_as?(unsigned_short_t) || type.bitfield? end def interpreter @interp end end class W0084 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_comma_separated_expression += T(:check) end private def check(node) if node.expressions.size > 1 node.expressions[0..-2].each do |expr| W(expr.location) unless expr.have_side_effect? end end end end class W0085 < CodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) phase_ctxt[:cc1_ast].accept(Visitor.new(phase_ctxt)) end class Visitor < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt end def visit_expression_statement(node) if node.analysis_target?(traits) unless node.expression && node.expression.have_side_effect? W(node.location) end end end def visit_for_statement(node) node.body_statement.accept(self) if node.analysis_target?(traits) end def visit_c99_for_statement(node) node.body_statement.accept(self) if node.analysis_target?(traits) end private extend Forwardable def_delegator :@phase_ctxt, :traits private :traits def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0086 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_conditional_expression += T(:check) end private def check(node) then_expr = node.then_expression else_expr = node.else_expression if then_expr.have_side_effect? != else_expr.have_side_effect? W(node.location) end end end class W0087 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_simple_assignment_expression += T(:enter_assignment) traversal.leave_simple_assignment_expression += T(:leave_assignment) traversal.enter_compound_assignment_expression += T(:enter_assignment) traversal.leave_compound_assignment_expression += T(:leave_assignment) traversal.enter_function_call_expression += T(:enter_assignment) traversal.leave_function_call_expression += T(:leave_assignment) traversal.enter_comma_separated_expression += T(:check) @assignment_depth = 0 end private def enter_assignment(*) @assignment_depth += 1 end def leave_assignment(*) @assignment_depth -= 1 end def check(node) if !node.expressions.last.have_side_effect? && @assignment_depth == 0 W(node.location) end end end class W0088 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_expression_stmt_started += T(:enter_expression_statement) interp.on_expression_stmt_ended += T(:leave_expression_statement) interp.on_logical_and_expr_evaled += T(:check) interp.on_logical_or_expr_evaled += T(:check) @cur_expr_stmt = nil end private def enter_expression_statement(expr_stmt) case expr_stmt.expression when Cc1::SimpleAssignmentExpression, Cc1::CompoundAssignmentExpression, Cc1::FunctionCallExpression @cur_expr_stmt = nil else @cur_expr_stmt = expr_stmt end end def leave_expression_statement(*) @cur_expr_stmt = nil end def check(expr, *) if @cur_expr_stmt unless expr.rhs_operand.have_side_effect? W(expr.operator.location) end end end end class W0093 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) return if expr.operator.type == "*" return unless rhs_var.type.scalar? && rhs_var.value.scalar? unless constant_expression?(expr.rhs_operand) if rhs_var.value.test_must_be_equal_to(scalar_value_of(0)).false? test = rhs_var.value.test_may_be_equal_to(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def interpreter @interp end end class W0096 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) return if expr.operator.type == "*" return unless rhs_var.type.scalar? && rhs_var.value.scalar? if constant_expression?(expr.rhs_operand) test = rhs_var.value.test_must_be_equal_to(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def interpreter @interp end end class W0097 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) return if expr.operator.type == "*" return unless rhs_var.type.scalar? && rhs_var.value.scalar? unless constant_expression?(expr.rhs_operand) test = rhs_var.value.test_must_be_equal_to(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def interpreter @interp end end class W0100 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:define_variable) interp.on_variable_initialized += T(:init_variable) interp.on_variable_value_updated += T(:write_variable) interp.on_block_started += T(:enter_block) interp.on_block_ended += T(:leave_block) interp.on_while_stmt_started += T(:enter_iteration) interp.on_while_stmt_ended += T(:leave_iteration) interp.on_do_stmt_started += T(:enter_iteration) interp.on_do_stmt_ended += T(:leave_iteration) interp.on_for_stmt_started += T(:enter_iteration) interp.on_for_stmt_ended += T(:leave_iteration) interp.on_c99_for_stmt_started += T(:enter_iteration) interp.on_c99_for_stmt_ended += T(:leave_iteration) @var_stack = [{}] @iter_stmt_stack = [] end private def enter_block(*) @var_stack.push({}) end def leave_block(*) check_constant_variables(@var_stack.last) @var_stack.pop end def define_variable(var_def, var) if var.named? @var_stack.last[var] = [var_def.location, 0] end end def init_variable(var_def, var, *) if rec = @var_stack.last[var] rec[1] += 1 end end def write_variable(*, var) var = var.owner while var.inner? return unless var.named? @var_stack.reverse_each do |vars| if rec = vars[var] if @iter_stmt_stack.empty? rec[1] += 1 else # NOTE: Update twice in order not to over-warn about this variable, # because an iteration is treated as a normal selection by # the abstract interpreter. rec[1] += 2 end end end end def enter_iteration(iter_stmt) @iter_stmt_stack.push(iter_stmt) end def leave_iteration(*) @iter_stmt_stack.pop end def check_constant_variables(vars) vars.each do |var, (loc, assign_cnt)| case when var.type.pointer? && var.type.unqualify.base_type.function? next when var.type.array? if assign_cnt <= 1 base_type = var.type.base_type while base_type.array? || base_type.pointer? base_type = base_type.base_type end W(loc, var.name) unless base_type.const? end when !var.type.const? W(loc, var.name) if assign_cnt <= 1 end end end end class W0101 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_assignment_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var) return unless lhs_var.type.pointer? && rhs_var.type.pointer? if rhs_pointee = pointee_of(rhs_var) if rhs_pointee.variable? && rhs_pointee.named? return unless rhs_pointee.binding.memory.dynamic? # NOTE: An array typed parameter can be considered as an alias of the # corresponding argument. So, it is safe to return an address # of the argument. return if rhs_pointee.type.parameter? && rhs_pointee.type.array? case when lhs_var.binding.memory.static? W(expr.location) when lhs_var.scope.depth < rhs_pointee.scope.depth W(expr.location) end end end end def interpreter @interp end end class W0102 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_started += T(:start_function) @interp.on_function_ended += T(:end_function) @interp.on_parameter_defined += T(:add_parameter) @interp.on_indirection_expr_evaled += T(:relate_pointer) @interp.on_assignment_expr_evaled += T(:check_assignment) @params = nil @ptr_relationship = nil end private def start_function(*) @params = Set.new @ptr_relationship = {} end def end_function(*) @params = nil @ptr_relationship = nil end def add_parameter(*, var) if @params && var.named? @params.add(var.name) end end def relate_pointer(*, var, derefed_var) if @ptr_relationship @ptr_relationship[derefed_var] = var end end def check_assignment(expr, lhs_var, rhs_var) return unless @params && @ptr_relationship return unless lhs_var.type.pointer? && rhs_var.type.pointer? if ptr = @ptr_relationship[lhs_var] return unless ptr.named? && @params.include?(ptr.name) else return end if rhs_pointee = pointee_of(rhs_var) if rhs_pointee.variable? && rhs_pointee.named? return unless rhs_pointee.binding.memory.dynamic? # NOTE: An array typed parameter can be considered as an alias of the # corresponding argument. So, it is safe to return an address # of the argument. return if rhs_pointee.type.parameter? && rhs_pointee.type.array? W(expr.location) end end end def interpreter @interp end end class W0103 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_started += T(:start_function) @interp.on_function_ended += T(:end_function) @interp.on_variable_defined += T(:add_local_variable) @interp.on_parameter_defined += T(:add_local_variable) @interp.on_return_stmt_evaled += T(:check_return_statement) @lvars = nil end private def start_function(*) @lvars = Set.new end def end_function(*) @lvars = nil end def add_local_variable(*, var) return unless var.binding.memory.dynamic? if @lvars && var.named? @lvars.add(var.name) end end def check_return_statement(ret_stmt, ret_var) return unless @lvars return unless ret_var && ret_var.type.pointer? if pointee = pointee_of(ret_var) if pointee.variable? && pointee.named? # NOTE: An array typed parameter can be considered as an alias of the # corresponding argument. So, it is safe to return an address # of the argument. return if pointee.type.parameter? && pointee.type.array? if @lvars.include?(pointee.name) W(ret_stmt.location) end end end end def interpreter @interp end end class W0104 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:start_function) interp.on_function_ended += T(:check_constant_parameters) interp.on_parameter_defined += T(:add_parameter) interp.on_variable_value_updated += T(:write_parameter) @params = nil end private def start_function(*) @params = {} end def add_parameter(param_def, var) if @params && var.named? @params[var.name] = [false, var, param_def.location] end end def write_parameter(*, var) if @params && var.named? && @params.include?(var.name) @params[var.name][0] = true end end def check_constant_parameters(*) return unless @params @params.each do |name, (written, var, loc)| next if var.type.const? next if var.type.array? && var.type.base_type.const? W(loc, name) unless written end @params = nil end end class W0105 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:start_function) interp.on_function_ended += T(:check_constant_parameters) interp.on_parameter_defined += T(:add_parameter) interp.on_variable_value_updated += T(:write_parameter) interp.on_indirection_expr_evaled += T(:handle_indirection) interp.on_array_subscript_expr_evaled += T(:handle_array_subscript) @var_relationship = nil @params = nil end private def start_function(*) @var_relationship = {} @params = {} end def add_parameter(param_def, var) if @params && var.type.pointer? && var.named? @params[var] = [param_def.location, false] end end def write_parameter(*, var) return unless @var_relationship && @params if ptr = @var_relationship[var] if @params.include?(ptr) @params[ptr][1] = true end end end def handle_indirection(*, var, derefed_var) if @var_relationship @var_relationship[derefed_var] = var end end def handle_array_subscript(expr, ary_or_ptr, *, rslt_var) if @var_relationship && ary_or_ptr.type.pointer? @var_relationship[rslt_var] = ary_or_ptr end end def check_constant_parameters(*) return unless @params @params.each do |ptr, (loc, written)| base_type = ptr.type.unqualify.base_type unless base_type.function? unless written || base_type.const? W(loc, ptr.name) end end end @var_relationship = nil @params = nil end end class W0107 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_assignment_expr_evaled += T(:check_assignment) end private def check_assignment(expr, lhs_var, rhs_var) return unless lhs_var.type.pointer? && rhs_var.type.pointer? if rhs_pointee = pointee_of(rhs_var) if rhs_pointee.variable? && rhs_pointee.named? return unless rhs_pointee.binding.memory.dynamic? # NOTE: An array typed parameter can be considered as an alias of the # corresponding argument. So, it is safe to return an address # of the argument. return if rhs_pointee.type.parameter? && rhs_pointee.type.array? if lhs_var.scope.local? && lhs_var.binding.memory.static? W(expr.location) end end end end def interpreter @interp end end class W0108 < CodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) phase_ctxt[:cc1_ast].accept(Visitor.new(phase_ctxt)) end class Visitor < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt end def visit_if_statement(node) super if node.analysis_target?(traits) warn(node.expression) end def visit_if_else_statement(node) super if node.analysis_target?(traits) warn(node.expression) end def visit_while_statement(node) super if node.analysis_target?(traits) warn(node.expression) end def visit_do_statement(node) super if node.analysis_target?(traits) warn(node.expression) end def visit_for_statement(node) super if node.analysis_target?(traits) warn(node.condition_statement.expression) end def visit_c99_for_statement(node) super if node.analysis_target?(traits) warn(node.condition_statement.expression) end def visit_relational_expression(node) super if node.analysis_target?(traits) warn(node.lhs_operand) warn(node.rhs_operand) end def visit_equality_expression(node) super if node.analysis_target?(traits) warn(node.lhs_operand) warn(node.rhs_operand) end def visit_unary_arithmetic_expression(node) super if node.analysis_target?(traits) warn(node.operand) if node.operator.type == "!" end def visit_logical_and_expression(node) super if node.analysis_target?(traits) warn(node.lhs_operand) warn(node.rhs_operand) end def visit_logical_or_expression(node) super if node.analysis_target?(traits) warn(node.lhs_operand) warn(node.rhs_operand) end def visit_conditional_expression(node) super if node.analysis_target?(traits) warn(node.condition) end private def warn(node) node = node.expression while node.kind_of?(Cc1::GroupedExpression) if node && node.analysis_target?(traits) case node when Cc1::SimpleAssignmentExpression, Cc1::CompoundAssignmentExpression W(node.location) end end end extend Forwardable def_delegator :@phase_ctxt, :traits private :traits def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0109 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_implicit_function_declared += T(:check) end private def check(obj_spec, fun) W(obj_spec.location, fun.name) if fun.named? end end class W0110 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_for_stmt_started += T(:handle_for_statement) @interp.on_c99_for_stmt_started += T(:handle_for_statement) end private def handle_for_statement(stmt) stmt.accept(ForStatementAnalyzer.new(@phase_ctxt, @interp)) end class ForStatementAnalyzer < Cc1::SyntaxTreeVisitor include Cc1::InterpreterMediator include ReportUtil def initialize(phase_ctxt, interp) @phase_ctxt = phase_ctxt @interp = interp @reported = false end def visit_for_statement(node) node.condition_statement.accept(self) node.expression.accept(self) if node.expression end def visit_c99_for_statement(node) node.condition_statement.accept(self) node.expression.accept(self) if node.expression end def visit_object_specifier(node) return if @reported if var = variable_named(node.identifier.value) if var.type.scalar? && var.type.floating? W(node.location) @reported = true end end end private extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def interpreter @interp end def suppressors @phase_ctxt[:suppressors] end end private_constant :ForStatementAnalyzer end class W0112 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_equality_expr_evaled += T(:check_equality) end private def check_equality(expr, lhs_var, rhs_var, *) if lhs_var.type.scalar? && lhs_var.type.floating? and rhs_var.type.scalar? && rhs_var.type.floating? W(expr.location) end end end class W0114 < CodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) phase_ctxt[:cc1_ast].accept(Visitor.new(phase_ctxt)) end class Visitor < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt @logical_op_num = 0 end def visit_if_statement(node) if node.analysis_target?(traits) @logical_op_num = 0 node.expression.accept(self) check_logical_operation(node.location) node.statement.accept(self) end end def visit_if_else_statement(node) if node.analysis_target?(traits) @logical_op_num = 0 node.expression.accept(self) check_logical_operation(node.location) node.then_statement.accept(self) node.else_statement.accept(self) end end def visit_while_statement(node) if node.analysis_target?(traits) @logical_op_num = 0 node.expression.accept(self) check_logical_operation(node.location) node.statement.accept(self) end end def visit_do_statement(node) if node.analysis_target?(traits) node.statement.accept(self) @logical_op_num = 0 node.expression.accept(self) check_logical_operation(node.location) end end def visit_for_statement(node) if node.analysis_target?(traits) @logical_op_num = 0 node.condition_statement.accept(self) check_logical_operation(node.location) node.body_statement.accept(self) end end def visit_c99_for_statement(node) if node.analysis_target?(traits) @logical_op_num = 0 node.condition_statement.accept(self) check_logical_operation(node.location) node.body_statement.accept(self) end end def visit_unary_arithmetic_expression(node) if node.analysis_target?(traits) if node.operator.type == "!" @logical_op_num += 1 end super end end def visit_relational_expression(node) if node.analysis_target?(traits) @logical_op_num += 1 super end end def visit_equality_expression(node) if node.analysis_target?(traits) @logical_op_num += 1 super end end def visit_logical_and_expression(node) if node.analysis_target?(traits) @logical_op_num += 1 super end end def visit_logical_or_expression(node) if node.analysis_target?(traits) @logical_op_num += 1 super end end def visit_conditional_expression(node) if node.analysis_target?(traits) @logical_op_num = 0 node.condition.accept(self) check_logical_operation(node.condition.location) node.then_expression.accept(self) node.else_expression.accept(self) end end private def check_logical_operation(loc) W(loc) if @logical_op_num == 0 end extend Forwardable def_delegator :@phase_ctxt, :traits private :traits def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0115 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(shift_expr, lhs_var, rhs_var, *) op = shift_expr.operator.type return unless op == "<<" || op == "<<=" if lhs_var.type.unsigned? lhs_limit = scalar_value_of(lhs_var.type.max) >> rhs_var.value test = lhs_var.value.test_must_be_greater_than(lhs_limit) if test.true? W(shift_expr.location, *test.evidence.emit_context_messages(self, shift_expr.location)) end end end def interpreter @interp end end class W0116 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(shift_expr, lhs_var, rhs_var, *) operator = shift_expr.operator.type return unless operator == "<<" || operator == "<<=" if lhs_var.type.unsigned? lhs_limit = scalar_value_of(lhs_var.type.max) >> rhs_var.value if lhs_var.value.test_must_be_greater_than(lhs_limit).false? test = lhs_var.value.test_may_be_greater_than(lhs_limit) if test.true? W(shift_expr.location, *test.evidence.emit_context_messages(self, shift_expr.location)) end end end end def interpreter @interp end end class W0117 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_function_declared += M(:declare_function) interp.on_variable_declared += M(:declare_variable) interp.on_explicit_function_defined += T(:check_function) interp.on_variable_defined += T(:check_variable) @target_fpath = phase_ctxt[:sources].first.fpath @external_syms = Set.new end private def declare_function(*, fun) if fun.named? && fun.declared_as_extern? @external_syms.add(fun.name) end end def declare_variable(*, var) if var.named? && var.declared_as_extern? @external_syms.add(var.name) end end def check_function(fun_def, fun) if fun.named? && fun.declared_as_extern? return if fun.name == "main" unless @external_syms.include?(fun.name) if fun_def.location.fpath == @target_fpath W(fun_def.location, fun.name) end end end end def check_variable(var_def, var) if var.named? && var.declared_as_extern? unless @external_syms.include?(var.name) if var_def.location.fpath == @target_fpath W(var_def.location, var.name) end end end end end class W0118 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] fst_src = phase_ctxt[:sources].first if fst_src && fst_src.analysis_target?(traits) interp.on_explicit_function_declared += M(:check_function) interp.on_variable_declared += M(:check_variable) @target_fpath = fst_src.fpath @external_syms = Set.new end end private def check_function(fun_dcl, fun) if fun.named? && fun.declared_as_extern? unless @external_syms.include?(fun.name) if fun_dcl.location.fpath.identical?(@target_fpath) W(fun_dcl.location, fun.name) else @external_syms.add(fun.name) end end end end def check_variable(var_dcl, var) if var.named? && var.declared_as_extern? unless @external_syms.include?(var.name) if var_dcl.location.fpath.identical?(@target_fpath) W(var_dcl.location, var.name) else @external_syms.add(var.name) end end end end end class W0119 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_implicit_conv_performed += T(:check) end private def check(init_or_expr, from_var, to_var) if match?(from_var, to_var) W(init_or_expr.location) end end def from_type char_t end def to_type signed_char_t end def match?(from_var, to_var) unless from_var.type.same_as?(from_type) && to_var.type.same_as?(to_type) return false end if char_type_family?(from_type) && from_var.type.explicitly_signed? != from_type.explicitly_signed? return false end if char_type_family?(to_type) && to_var.type.explicitly_signed? != to_type.explicitly_signed? return false end true end def char_type_family?(type) type == char_t || type == signed_char_t || type == unsigned_char_t end def interpreter @interp end end class W0120 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_char_t end end class W0121 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_short_t end end class W0122 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_short_t end end class W0123 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_int_t end end class W0124 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_int_t end end class W0125 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_long_t end end class W0126 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_long_t end end class W0127 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type float_t end end class W0128 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type double_t end end class W0129 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type long_double_t end end class W0130 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_long_long_t end end class W0131 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_long_long_t end end class W0132 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type char_t end end class W0133 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type char_t end end class W0134 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type char_t end end class W0135 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type char_t end end class W0136 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type char_t end end class W0137 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type char_t end end class W0138 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type char_t end end class W0139 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type char_t end end class W0140 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type char_t end end class W0141 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type char_t end end class W0142 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_char_t end end class W0143 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_char_t end end class W0144 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_short_t end end class W0145 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_char_t end end class W0146 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_short_t end end class W0147 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_int_t end end class W0148 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_char_t end end class W0149 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_short_t end end class W0150 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_int_t end end class W0151 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_long_t end end class W0152 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_char_t end end class W0153 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_short_t end end class W0154 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_int_t end end class W0155 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_long_t end end class W0156 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_long_long_t end end class W0157 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_char_t end end class W0158 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_short_t end end class W0159 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_int_t end end class W0160 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_long_t end end class W0161 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_char_t end end class W0162 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_short_t end end class W0163 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_int_t end end class W0164 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_long_t end end class W0165 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_char_t end end class W0166 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_short_t end end class W0167 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_int_t end end class W0168 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_long_t end end class W0169 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_char_t end end class W0170 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_short_t end end class W0171 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_int_t end end class W0172 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_long_t end end class W0173 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_long_long_t end end class W0174 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_long_long_t end end class W0175 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_long_long_t end end class W0176 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_long_long_t end end class W0177 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_char_t end end class W0178 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_short_t end end class W0179 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_int_t end end class W0180 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_long_t end end class W0181 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_long_long_t end end class W0182 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type float_t end end class W0183 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type double_t end end class W0184 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type long_double_t end end class W0185 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type float_t end end class W0186 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type double_t end end class W0187 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type long_double_t end end class W0188 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type float_t end end class W0189 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type double_t end end class W0190 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type long_double_t end end class W0191 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type float_t end end class W0192 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type double_t end end class W0193 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type long_double_t end end class W0194 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type float_t end end class W0195 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type double_t end end class W0196 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type long_double_t end end class W0197 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type float_t end end class W0198 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type double_t end end class W0199 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type long_double_t end end class W0200 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type float_t end end class W0201 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type double_t end end class W0202 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type long_double_t end end class W0203 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type float_t end end class W0204 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type double_t end end class W0205 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type long_double_t end end class W0206 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type float_t end end class W0207 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type double_t end end class W0208 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type long_double_t end end class W0209 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type float_t end end class W0210 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type double_t end end class W0211 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type long_double_t end end class W0212 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type char_t end end class W0213 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_char_t end end class W0214 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_char_t end end class W0215 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_short_t end end class W0216 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_short_t end end class W0217 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_int_t end end class W0218 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_int_t end end class W0219 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_long_t end end class W0220 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_long_t end end class W0221 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type char_t end end class W0222 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_char_t end end class W0223 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_char_t end end class W0224 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_short_t end end class W0225 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_short_t end end class W0226 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_int_t end end class W0227 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_int_t end end class W0228 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_long_t end end class W0229 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_long_t end end class W0230 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type char_t end end class W0231 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_char_t end end class W0232 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_char_t end end class W0233 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_short_t end end class W0234 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_short_t end end class W0235 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_int_t end end class W0236 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_int_t end end class W0237 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_long_t end end class W0238 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_long_t end end class W0239 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_long_long_t end end class W0240 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_long_long_t end end class W0241 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_long_long_t end end class W0242 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_long_long_t end end class W0243 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_long_long_t end end class W0244 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_long_long_t end end class W0245 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_short_t end end class W0246 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_int_t end end class W0247 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_long_t end end class W0248 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_int_t end end class W0249 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_long_t end end class W0250 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_long_t end end class W0251 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_long_long_t end end class W0252 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_long_long_t end end class W0253 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_long_long_t end end class W0254 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_long_long_t end end class W0255 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_started += T(:enter_function) @interp.on_function_ended += T(:leave_function) @interp.on_return_stmt_evaled += T(:check) @cur_fun = nil end private def enter_function(fun_def, fun) @cur_fun = fun end def leave_function(fun_def, fun) @cur_fun = nil end def check(ret_stmt, ret_var) if @cur_fun && ret_var if match?(ret_var.type, @cur_fun.type.return_type) W(ret_stmt.location, @cur_fun.name) end end end def from_type char_t end def to_type signed_char_t end def match?(expr_type, fun_type) unless expr_type.same_as?(from_type) && fun_type.same_as?(to_type) return false end if char_type_family?(expr_type) && expr_type.explicitly_signed? != from_type.explicitly_signed? return false end if char_type_family?(fun_type) && fun_type.explicitly_signed? != to_type.explicitly_signed? return false end true end def char_type_family?(type) type == char_t || type == signed_char_t || type == unsigned_char_t end def interpreter @interp end end class W0256 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_char_t end end class W0257 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_short_t end end class W0258 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_short_t end end class W0259 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_int_t end end class W0260 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_int_t end end class W0261 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_long_t end end class W0262 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_long_t end end class W0263 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type float_t end end class W0264 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type double_t end end class W0265 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type long_double_t end end class W0266 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type signed_long_long_t end end class W0267 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type char_t end def to_type unsigned_long_long_t end end class W0268 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type char_t end end class W0269 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type char_t end end class W0270 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type char_t end end class W0271 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type char_t end end class W0272 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type char_t end end class W0273 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type char_t end end class W0274 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type char_t end end class W0275 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type char_t end end class W0276 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type char_t end end class W0277 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type char_t end end class W0278 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_char_t end end class W0279 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_char_t end end class W0280 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_short_t end end class W0281 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_char_t end end class W0282 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_short_t end end class W0283 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_int_t end end class W0284 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_char_t end end class W0285 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_short_t end end class W0286 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_int_t end end class W0287 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_long_t end end class W0288 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_char_t end end class W0289 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_short_t end end class W0290 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_int_t end end class W0291 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_long_t end end class W0292 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type signed_long_long_t end end class W0293 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_char_t end end class W0294 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_short_t end end class W0295 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_int_t end end class W0296 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_long_t end end class W0297 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_char_t end end class W0298 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_short_t end end class W0299 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_int_t end end class W0300 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_long_t end end class W0301 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_char_t end end class W0302 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_short_t end end class W0303 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_int_t end end class W0304 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_long_t end end class W0305 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_char_t end end class W0306 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_short_t end end class W0307 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_int_t end end class W0308 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_long_t end end class W0309 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type unsigned_long_long_t end end class W0310 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type unsigned_long_long_t end end class W0311 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type unsigned_long_long_t end end class W0312 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type unsigned_long_long_t end end class W0313 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_char_t end end class W0314 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_short_t end end class W0315 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_int_t end end class W0316 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_long_t end end class W0317 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type unsigned_long_long_t end end class W0318 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type float_t end end class W0319 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type double_t end end class W0320 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type long_double_t end end class W0321 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type float_t end end class W0322 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type double_t end end class W0323 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_char_t end def to_type long_double_t end end class W0324 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type float_t end end class W0325 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type double_t end end class W0326 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type long_double_t end end class W0327 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type float_t end end class W0328 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type double_t end end class W0329 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type long_double_t end end class W0330 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type float_t end end class W0331 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type double_t end end class W0332 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type long_double_t end end class W0333 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type float_t end end class W0334 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type double_t end end class W0335 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type long_double_t end end class W0336 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type float_t end end class W0337 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type double_t end end class W0338 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type long_double_t end end class W0339 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type float_t end end class W0340 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type double_t end end class W0341 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type long_double_t end end class W0342 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type float_t end end class W0343 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type double_t end end class W0344 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type long_double_t end end class W0345 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type float_t end end class W0346 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type double_t end end class W0347 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type long_double_t end end class W0348 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type char_t end end class W0349 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_char_t end end class W0350 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_char_t end end class W0351 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_short_t end end class W0352 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_short_t end end class W0353 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_int_t end end class W0354 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_int_t end end class W0355 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_long_t end end class W0356 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_long_t end end class W0357 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type char_t end end class W0358 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_char_t end end class W0359 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_char_t end end class W0360 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_short_t end end class W0361 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_short_t end end class W0362 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_int_t end end class W0363 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_int_t end end class W0364 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_long_t end end class W0365 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_long_t end end class W0366 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type char_t end end class W0367 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_char_t end end class W0368 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_char_t end end class W0369 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_short_t end end class W0370 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_short_t end end class W0371 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_int_t end end class W0372 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_int_t end end class W0373 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_long_t end end class W0374 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_long_t end end class W0375 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type signed_long_long_t end end class W0376 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type unsigned_long_long_t end end class W0377 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type signed_long_long_t end end class W0378 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type unsigned_long_long_t end end class W0379 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type signed_long_long_t end end class W0380 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type unsigned_long_long_t end end class W0381 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type signed_char_t end end class W0382 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type unsigned_char_t end end class W0383 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type signed_char_t end end class W0384 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type signed_short_t end end class W0385 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type unsigned_char_t end end class W0386 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type unsigned_short_t end end class W0387 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type signed_char_t end end class W0388 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type signed_short_t end end class W0389 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type signed_int_t end end class W0390 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type unsigned_char_t end end class W0391 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type unsigned_short_t end end class W0392 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type unsigned_int_t end end class W0393 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_char_t end end class W0394 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_short_t end end class W0395 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_int_t end end class W0396 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_long_t end end class W0397 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_char_t end end class W0398 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_short_t end end class W0399 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_int_t end end class W0400 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_long_t end end class W0401 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_short_t end end class W0402 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_int_t end end class W0403 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_long_t end end class W0404 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_int_t end end class W0405 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_long_t end end class W0406 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_long_t end end class W0407 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_char_t end def to_type signed_long_long_t end end class W0408 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type signed_long_long_t end end class W0409 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type signed_long_long_t end end class W0410 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type signed_long_long_t end end class W0411 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_enum_type_declaration += T(:check) end private def check(node) if enums = node.enum_specifier.enumerators exprs = enums.map { |enum| enum.expression } return if exprs.all? { |expr| expr.nil? } return if exprs.first && exprs[1..-1].all? { |expr| expr.nil? } return if exprs.all? { |expr| !expr.nil? } W(node.location) end end end class W0413 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_if_statement += T(:check_if_statement) traversal.enter_if_else_statement += T(:check_if_else_statement) traversal.enter_while_statement += T(:check_while_statement) traversal.enter_do_statement += T(:check_do_statement) traversal.enter_for_statement += T(:check_for_statement) traversal.enter_c99_for_statement += T(:check_for_statement) end private def check_if_statement(node) unless node.header_terminator.location.line_no == node.statement.head_location.line_no unless node.statement.kind_of?(Cc1::CompoundStatement) W(node.statement.location) end end end def check_if_else_statement(node) unless node.then_header_terminator.location.line_no == node.then_statement.head_location.line_no unless node.then_statement.kind_of?(Cc1::CompoundStatement) W(node.then_statement.location) end end unless node.else_header_terminator.location.line_no == node.else_statement.head_location.line_no case node.else_statement when Cc1::CompoundStatement, Cc1::IfStatement, Cc1::IfElseStatement else W(node.else_statement.location) end end end def check_while_statement(node) unless node.header_terminator.location.line_no == node.statement.head_location.line_no unless node.statement.kind_of?(Cc1::CompoundStatement) W(node.statement.location) end end end def check_do_statement(node) unless node.header_terminator.location.line_no == node.statement.head_location.line_no unless node.statement.kind_of?(Cc1::CompoundStatement) W(node.statement.location) end end end def check_for_statement(node) unless node.header_terminator.location.line_no == node.body_statement.head_location.line_no unless node.body_statement.kind_of?(Cc1::CompoundStatement) W(node.body_statement.location) end end end end class W0414 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_if_statement += T(:check_if_statement) traversal.enter_if_else_statement += T(:check_if_else_statement) traversal.enter_while_statement += T(:check_while_statement) traversal.enter_do_statement += T(:check_do_statement) traversal.enter_for_statement += T(:check_for_statement) traversal.enter_c99_for_statement += T(:check_for_statement) end private def check_if_statement(node) if node.header_terminator.location.line_no == node.statement.head_location.line_no unless node.statement.kind_of?(Cc1::CompoundStatement) W(node.statement.location) end end end def check_if_else_statement(node) if node.then_header_terminator.location.line_no == node.then_statement.head_location.line_no unless node.then_statement.kind_of?(Cc1::CompoundStatement) W(node.then_statement.location) end end if node.else_header_terminator.location.line_no == node.else_statement.head_location.line_no case node.else_statement when Cc1::CompoundStatement, Cc1::IfStatement, Cc1::IfElseStatement else W(node.else_statement.location) end end end def check_while_statement(node) if node.header_terminator.location.line_no == node.statement.head_location.line_no unless node.statement.kind_of?(Cc1::CompoundStatement) W(node.statement.location) end end end def check_do_statement(node) if node.header_terminator.location.line_no == node.statement.head_location.line_no unless node.statement.kind_of?(Cc1::CompoundStatement) W(node.statement.location) end end end def check_for_statement(node) if node.header_terminator.location.line_no == node.body_statement.head_location.line_no unless node.body_statement.kind_of?(Cc1::CompoundStatement) W(node.body_statement.location) end end end end class W0421 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_indirection_expr_evaled += T(:check_indirection) @interp.on_member_access_expr_evaled += T(:check_member_access) @interp.on_array_subscript_expr_evaled += T(:check_array_subscript) end private def check_indirection(expr, ptr_var, *) return unless ptr_var.value.scalar? unless constant_expression?(expr.operand) test = ptr_var.value.test_must_be_null if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def check_member_access(expr, outer_var, *) return unless outer_var.type.pointer? return unless outer_var.value.scalar? unless constant_expression?(expr.expression) test = outer_var.value.test_must_be_null if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def check_array_subscript(expr, ary_or_ptr, *) return unless ary_or_ptr.type.pointer? return unless ary_or_ptr.value.scalar? unless constant_expression?(expr.expression) test = ary_or_ptr.value.test_must_be_null if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def interpreter @interp end end class W0422 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_indirection_expr_evaled += T(:check_indirection) @interp.on_member_access_expr_evaled += T(:check_member_access) @interp.on_array_subscript_expr_evaled += T(:check_array_subscript) end private def check_indirection(expr, ptr_var, *) return unless ptr_var.value.scalar? unless constant_expression?(expr.operand) if ptr_var.value.test_must_be_null.false? test = ptr_var.value.test_may_be_null if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def check_member_access(expr, outer_var, *) return unless outer_var.type.pointer? return unless outer_var.value.scalar? unless constant_expression?(expr.expression) if outer_var.value.test_must_be_null.false? test = outer_var.value.test_may_be_null if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def check_array_subscript(expr, ary_or_ptr, *) return unless ary_or_ptr.type.pointer? return unless ary_or_ptr.value.scalar? unless constant_expression?(expr.expression) if ary_or_ptr.value.test_must_be_null.false? test = ary_or_ptr.value.test_may_be_null if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def interpreter @interp end end class W0423 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_multiplicative_expr_evaled += T(:check_binary) interp.on_additive_expr_evaled += T(:check_binary) interp.on_shift_expr_evaled += T(:check_binary) interp.on_and_expr_evaled += T(:check_binary) interp.on_exclusive_or_expr_evaled += T(:check_binary) interp.on_inclusive_or_expr_evaled += T(:check_binary) interp.on_prefix_increment_expr_evaled += T(:check_unary_prefix) interp.on_postfix_increment_expr_evaled += T(:check_unary_postfix) interp.on_prefix_decrement_expr_evaled += T(:check_unary_prefix) interp.on_postfix_decrement_expr_evaled += T(:check_unary_postfix) end private def check_binary(expr, lhs_var, rhs_var, *) lhs_type, lhs_val = lhs_var.type, lhs_var.value rhs_type, rhs_val = rhs_var.type, rhs_var.value if lhs_type.pointer? test = lhs_val.test_must_be_null if test.true? lhs_operand = expr.lhs_operand W(lhs_operand.location, *test.evidence.emit_context_messages(self, lhs_operand.location)) end end if rhs_type.pointer? test = rhs_val.test_must_be_null if test.true? rhs_operand = expr.rhs_operand W(rhs_operand.location, *test.evidence.emit_context_messages(self, rhs_operand.location)) end end end def check_unary_prefix(expr, ope_var, orig_val) type, val = ope_var.type, orig_val if type.pointer? test = val.test_must_be_null if test.true? W(expr.operand.location, *test.evidence.emit_context_messages(self, expr.operand.location)) end end end def check_unary_postfix(expr, ope_var, *) type, val = ope_var.type, ope_var.value if type.pointer? test = val.test_must_be_null if test.true? W(expr.operand.location, *test.evidence.emit_context_messages(self, expr.operand.location)) end end end end class W0424 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_multiplicative_expr_evaled += T(:check_binary) interp.on_additive_expr_evaled += T(:check_binary) interp.on_shift_expr_evaled += T(:check_binary) interp.on_and_expr_evaled += T(:check_binary) interp.on_exclusive_or_expr_evaled += T(:check_binary) interp.on_inclusive_or_expr_evaled += T(:check_binary) interp.on_prefix_increment_expr_evaled += T(:check_unary_prefix) interp.on_postfix_increment_expr_evaled += T(:check_unary_postfix) interp.on_prefix_decrement_expr_evaled += T(:check_unary_prefix) interp.on_postfix_decrement_expr_evaled += T(:check_unary_postfix) end private def check_binary(expr, lhs_var, rhs_var, *) lhs_type, lhs_val = lhs_var.type, lhs_var.value rhs_type, rhs_val = rhs_var.type, rhs_var.value if lhs_type.pointer? && lhs_val.test_must_be_null.false? test = lhs_val.test_may_be_null if test.true? lhs_operand = expr.lhs_operand W(lhs_operand.location, *test.evidence.emit_context_messages(self, lhs_operand.location)) end end if rhs_type.pointer? && rhs_val.test_must_be_null.false? test = rhs_val.test_may_be_null if test.true? rhs_operand = expr.rhs_operand W(rhs_operand.location, *test.evidence.emit_context_messages(self, rhs_operand.location)) end end end def check_unary_prefix(expr, ope_var, orig_val) type, val = ope_var.type, orig_val if type.pointer? && val.test_must_be_null.false? test = val.test_may_be_null if test.true? W(expr.operand.location, *test.evidence.emit_context_messages(self, expr.operand.location)) end end end def check_unary_postfix(expr, ope_var, *) type, val = ope_var.type, ope_var.value if type.pointer? && val.test_must_be_null.false? test = val.test_may_be_null if test.true? W(expr.operand.location, *test.evidence.emit_context_messages(self, expr.operand.location)) end end end end class W0425 < CodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) phase_ctxt[:cc1_ast].accept(Visitor.new(phase_ctxt)) end class Visitor < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt @lst_dcl_or_stmt_loc = Location.new @lst_memb_dcl_loc = Location.new end def visit_function_declaration(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_variable_declaration(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_variable_definition(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_typedef_declaration(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_member_declaration(node) if node.analysis_target?(traits) check_member_decl(node) @lst_memb_dcl_loc = node.location end end def visit_generic_labeled_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_case_labeled_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_default_labeled_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_expression_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_if_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) node.statement.accept(self) @lst_dcl_or_stmt_loc = node.location end end def visit_if_else_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) orig_loc = @lst_dcl_or_stmt_loc node.then_statement.accept(self) @lst_dcl_or_stmt_loc = orig_loc node.else_statement.accept(self) @lst_dcl_or_stmt_loc = node.location end end def visit_switch_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) node.statement.accept(self) @lst_dcl_or_stmt_loc = node.location end end def visit_while_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) node.statement.accept(self) @lst_dcl_or_stmt_loc = node.location end end def visit_do_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) node.statement.accept(self) @lst_dcl_or_stmt_loc = node.location end end def visit_for_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) node.body_statement.accept(self) @lst_dcl_or_stmt_loc = node.location end end def visit_c99_for_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) node.body_statement.accept(self) @lst_dcl_or_stmt_loc = node.location end end def visit_goto_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_continue_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_break_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end def visit_return_statement(node) if node.analysis_target?(traits) check_dcl_or_stmt(node) @lst_dcl_or_stmt_loc = node.location end end private def check_dcl_or_stmt(node) if @lst_dcl_or_stmt_loc.fpath == node.location.fpath && @lst_dcl_or_stmt_loc.line_no == node.location.line_no W(node.location) end end def check_member_decl(node) if @lst_memb_dcl_loc.fpath == node.location.fpath && @lst_memb_dcl_loc.line_no == node.location.line_no W(node.location) end end extend Forwardable def_delegator :@phase_ctxt, :traits private :traits def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0431 < CodeCheck def_registrant_phase Cc1::Prepare2Phase include CodingStyleAccessor include MonitorUtil # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) fpath = phase_ctxt[:sources].first.fpath @tokens = phase_ctxt[:cc1_tokens].select { |tok| tok.location.fpath == fpath } @index = 0 @indent_level = 0 @indent_widths = Hash.new(0) @paren_depth = 0 @lst_token = nil end def last_line_no @lst_token ? @lst_token.location.line_no : 0 end def do_execute(phase_ctxt) while tok = next_token case tok.type when "{" on_left_brace(tok) when "}" on_right_brace(tok) when "(" on_left_paren(tok) when ")" on_right_paren(tok) end case tok.type when :IF, :FOR, :WHILE if last_line_no < tok.location.line_no on_beginning_of_line(tok) end skip_controlling_part unless tok = peek_token and tok.type == "{" skip_simple_substatement end when :ELSE if last_line_no < tok.location.line_no on_beginning_of_line(tok) end unless tok = peek_token and tok.type == :IF || tok.type == "{" skip_simple_substatement end when :DO if last_line_no < tok.location.line_no on_beginning_of_line(tok) end unless tok = peek_token and tok.type == "{" skip_simple_substatement end else if last_line_no < tok.location.line_no on_beginning_of_line(tok) end end end end def skip_controlling_part paren_depth = 0 while tok = next_token case tok.type when "(" paren_depth += 1 when ")" paren_depth -= 1 break if paren_depth == 0 end end end def skip_simple_substatement paren_depth = 0 while tok = next_token case tok.type when "(" paren_depth += 1 when ")" paren_depth -= 1 end case tok.type when :IF, :FOR, :WHILE skip_controlling_part unless tok = peek_token and tok.type == "{" skip_simple_substatement break end when :ELSE unless tok = peek_token and tok.type == :IF || tok.type == "{" skip_simple_substatement break end when :DO unless tok = peek_token and tok.type == "{" skip_simple_substatement skip_simple_substatement break end when ";" break if paren_depth == 0 end end end def next_token return nil unless tok = peek_token @index += 1 case tok.type when :CASE while tok = peek_token @index += 1 break if tok.type == ":" end when :IDENTIFIER, :DEFAULT if nxt_tok = @tokens[@index] and nxt_tok.type == ":" tok = peek_token @index += 1 end end tok end def peek_token if tok = @tokens[@index] @lst_token = @tokens[[0, @index - 1].max] checkpoint(tok.location) end tok end def on_left_brace(tok) if indent_style == INDENT_STYLE_GNU && @indent_level > 0 @indent_level += 2 else @indent_level += 1 end end def on_right_brace(tok) if indent_style == INDENT_STYLE_GNU @indent_level -= 2 @indent_level = 0 if @indent_level < 0 else @indent_level -= 1 end end def on_left_paren(tok) @paren_depth += 1 end def on_right_paren(tok) @paren_depth -= 1 end def on_beginning_of_line(tok) return if @paren_depth > 0 || @lst_token.replaced? case tok.type when "{" if @indent_level == 0 widths_idx = @indent_level else widths_idx = @indent_level - 1 end when "}" if indent_style == INDENT_STYLE_GNU && @indent_level > 0 widths_idx = @indent_level + 1 else widths_idx = @indent_level end else widths_idx = @indent_level end expected_column_no = @indent_widths[widths_idx] if tok.location.appearance_column_no < expected_column_no W(tok.location) if tok.analysis_target?(traits) end @indent_widths[widths_idx] = tok.location.appearance_column_no end def monitor @phase_ctxt.monitor end end class W0432 < CodeCheck def_registrant_phase Cc1::Prepare2Phase include CodingStyleAccessor include MonitorUtil # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) fpath = phase_ctxt[:sources].first.fpath @tokens = phase_ctxt[:cc1_tokens].select { |tok| tok.location.fpath == fpath } @index = 0 @indent_level = 0 @indent_width = indent_width @paren_depth = 0 @lst_token = nil end def last_line_no @lst_token ? @lst_token.location.line_no : 0 end def do_execute(phase_ctxt) while tok = next_token case tok.type when "{" on_left_brace(tok) when "}" on_right_brace(tok) when "(" on_left_paren(tok) when ")" on_right_paren(tok) end case tok.type when :IF, :FOR, :WHILE if last_line_no < tok.location.line_no on_beginning_of_line(tok) end skip_controlling_part unless tok = peek_token and tok.type == "{" process_simple_substatement end when :ELSE if last_line_no < tok.location.line_no on_beginning_of_line(tok) end unless tok = peek_token and tok.type == :IF || tok.type == "{" process_simple_substatement end when :DO if last_line_no < tok.location.line_no on_beginning_of_line(tok) end unless tok = peek_token and tok.type == "{" process_simple_substatement end else if last_line_no < tok.location.line_no on_beginning_of_line(tok) end end end end def skip_controlling_part paren_depth = 0 while tok = next_token case tok.type when "(" paren_depth += 1 when ")" paren_depth -= 1 break if paren_depth == 0 end end end def process_simple_substatement @indent_level += 1 while tok = next_token case tok.type when "{" on_left_brace(tok) when "}" on_right_brace(tok) when "(" on_left_paren(tok) when ")" on_right_paren(tok) end case tok.type when :IF, :FOR, :WHILE if last_line_no < tok.location.line_no on_beginning_of_line(tok) end skip_controlling_part unless tok = peek_token and tok.type == "{" process_simple_substatement break end when :ELSE if last_line_no < tok.location.line_no on_beginning_of_line(tok) end unless tok = peek_token and tok.type == :IF || tok.type == "{" process_simple_substatement break end when :DO if last_line_no < tok.location.line_no on_beginning_of_line(tok) end unless tok = peek_token and tok.type == "{" process_simple_substatement process_simple_substatement break end else if last_line_no < tok.location.line_no on_beginning_of_line(tok) end break if tok.type == ";" end end @indent_level -= 1 end def next_token return nil unless tok = peek_token @index += 1 case tok.type when :CASE while tok = peek_token @index += 1 break if tok.type == ":" end when :IDENTIFIER, :DEFAULT if nxt_tok = @tokens[@index] and nxt_tok.type == ":" tok = peek_token @index += 1 end end tok end def peek_token if tok = @tokens[@index] @lst_token = @tokens[[0, @index - 1].max] checkpoint(tok.location) end tok end def on_left_brace(tok) if indent_style == INDENT_STYLE_GNU && @indent_level > 0 @indent_level += 2 else @indent_level += 1 end end def on_right_brace(tok) if indent_style == INDENT_STYLE_GNU @indent_level -= 2 @indent_level = 0 if @indent_level < 0 else @indent_level -= 1 end end def on_left_paren(tok) @paren_depth += 1 end def on_right_paren(tok) @paren_depth -= 1 end def on_beginning_of_line(tok) return if @paren_depth > 0 || @lst_token.replaced? case tok.type when "{" if @indent_level == 0 expected_column_no = expected_indent_width(tok) else expected_column_no = expected_indent_width(tok, -1) end when "}" if indent_style == INDENT_STYLE_GNU && @indent_level > 0 expected_column_no = expected_indent_width(tok, +1) else expected_column_no = expected_indent_width(tok) end else expected_column_no = expected_indent_width(tok) end unless tok.location.appearance_column_no == expected_column_no W(tok.location) if tok.analysis_target?(traits) end end def expected_indent_width(tok, delta_level = 0) if @indent_width == 0 && @indent_level > 0 @indent_width = (tok.location.appearance_column_no - 1) / @indent_level end if @indent_width > 0 @indent_width * @indent_level + @indent_width * delta_level + 1 else tok.location.appearance_column_no end end def monitor @phase_ctxt.monitor end end class W0440 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include CodingStyleAccessor # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_compound_statement += T(:check) end private def check(node) return if indent_style == INDENT_STYLE_K_AND_R unless node.head_location.appearance_column_no == node.tail_location.appearance_column_no W(node.tail_location) end end end class W0441 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_constant_referred += T(:check) end private def check(const_spec, var) return unless var.type.scalar? && var.type.integer? return if const_spec.character? if const_spec.suffix.nil? && var.type != int_t W(const_spec.location) end end def interpreter @interp end end class W0446 < CodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def do_prepare(phase_ctxt) end def do_execute(phase_ctxt) phase_ctxt[:cc1_ast].accept(Visitor.new(phase_ctxt)) end class Visitor < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt end def visit_simple_assignment_expression(node) if node.analysis_target?(traits) super warn(node.lhs_operand) warn(node.rhs_operand) end end def visit_compound_assignment_expression(node) if node.analysis_target?(traits) super warn(node.lhs_operand) warn(node.rhs_operand) end end def visit_function_call_expression(node) if node.analysis_target?(traits) super node.argument_expressions.each { |expr| warn(expr) } end end def visit_unary_arithmetic_expression(node) if node.analysis_target?(traits) super if node.operator.type == "+" || node.operator.type == "-" warn(node.operand) end end end def visit_multiplicative_expression(node) if node.analysis_target?(traits) super warn(node.lhs_operand) warn(node.rhs_operand) end end def visit_additive_expression(node) if node.analysis_target?(traits) super warn(node.lhs_operand) warn(node.rhs_operand) end end def visit_return_statement(node) if node.analysis_target?(traits) super warn(node.expression) if node.expression end end private def warn(node) node = node.expression while node.kind_of?(Cc1::GroupedExpression) if node && node.analysis_target?(traits) case node when Cc1::SimpleAssignmentExpression, Cc1::CompoundAssignmentExpression W(node.location) end end end extend Forwardable def_delegator :@phase_ctxt, :traits private :traits def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0447 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_comma_separated_expression += T(:check) traversal.enter_for_statement += T(:enter_for_statement) traversal.leave_for_statement += T(:leave_for_statement) traversal.enter_c99_for_statement += T(:enter_for_statement) traversal.leave_c99_for_statement += T(:leave_for_statement) @in_for_stmt = false end private def check(node) W(node.location) unless @in_for_stmt end def enter_for_statement(node) @in_for_stmt = true end def leave_for_statement(node) @in_for_stmt = false end end class W0456 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check_variable) interp.on_explicit_function_defined += T(:check_function) @target_fpath = phase_ctxt[:sources].first.fpath end private def check_variable(var_def, var) if var.declared_as_extern? unless var_def.location.fpath == @target_fpath W(var_def.location, var.name) end end end def check_function(fun_def, fun) if fun.declared_as_extern? unless fun_def.location.fpath == @target_fpath W(fun_def.location, fun.name) end end end end class W0457 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_function_declaration += T(:check_function) traversal.enter_ansi_function_definition += T(:check_function) traversal.enter_kandr_function_definition += T(:check_function) end private def check_function(node) W(node.location) if node.implicitly_typed? end end class W0458 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_declaration += T(:check_variable) traversal.enter_variable_definition += T(:check_variable) traversal.enter_parameter_definition += T(:check_variable) end private def check_variable(node) W(node.location) if node.implicitly_typed? end end class W0459 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_value_referred += T(:check) end private def check(expr, var) return if var.scope.global? || var.binding.memory.static? if var.named? test = var.value.test_must_be_undefined if test.true? var = var.owner while var.inner? W(expr.location, var.name, *test.evidence.emit_context_messages(self, expr.location)) end end end end class W0460 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_value_referred += T(:check) end private def check(expr, var) return if var.scope.global? || var.binding.memory.static? if var.named? if var.value.test_must_be_undefined.false? test = var.value.test_may_be_undefined if test.true? var = var.owner while var.inner? W(expr.location, var.name, *test.evidence.emit_context_messages(self, expr.location)) end end end end end class W0461 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg, type), idx| next unless arg.variable? && arg.value.scalar? next unless type && type.pointer? base_type = type.unqualify.base_type next unless !base_type.function? && base_type.const? if pointee = pointee_of(arg) and pointee.variable? if !pointee.temporary? test = pointee.value.test_must_be_undefined if test.true? arg_expr = funcall_expr.argument_expressions[idx] W(arg_expr.location, *test.evidence.emit_context_messages(self, arg_expr.location)) end end end end end def interpreter @interp end end class W0462 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg, type), idx| next unless arg.variable? && arg.value.scalar? next unless type && type.pointer? next unless type.unqualify.base_type.const? if pointee = pointee_of(arg) and pointee.variable? next if pointee.value.test_must_be_undefined.true? if !pointee.temporary? test = pointee.value.test_may_be_undefined if test.true? arg_expr = funcall_expr.argument_expressions[idx] W(arg_expr.location, *test.evidence.emit_context_messages(self, arg_expr.location)) end end end end end def interpreter @interp end end class W0488 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0488 may be duplicative when problematic operators appear thrice # or more in an expression. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @enclusure_exprs = [expr] @ary_subs_exprs = Hash.new(0) @funcall_exprs = Hash.new(0) @memb_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @enclusure_exprs.push(node) super @enclusure_exprs.pop end def visit_array_subscript_expression(node) node.expression.accept(self) @ary_subs_exprs[current_encl_expr] += 1 AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.expression.accept(self) @funcall_exprs[current_encl_expr] += 1 node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_member_access_by_value_expression(node) super @memb_exprs[current_encl_expr] += 1 end def visit_member_access_by_pointer_expression(node) super @memb_exprs[current_encl_expr] += 1 end def visit_bit_access_by_value_expression(node) super @memb_exprs[current_encl_expr] += 1 end def visit_bit_access_by_pointer_expression(node) super @memb_exprs[current_encl_expr] += 1 end def visit_logical_and_expression(node) super if include_ambiguous_expr? W(current_encl_expr.head_location) end end def visit_logical_or_expression(node) super if include_ambiguous_expr? W(current_encl_expr.head_location) end end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def include_ambiguous_expr? @ary_subs_exprs[current_encl_expr] > 0 || @funcall_exprs[current_encl_expr] > 0 || @memb_exprs[current_encl_expr] > 0 end def current_encl_expr @enclusure_exprs.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0489 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0489 may be duplicative when operators of the same priority are # used thrice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @unary_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_postfix_increment_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_postfix_decrement_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_prefix_increment_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_prefix_decrement_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_address_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_indirection_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_unary_arithmetic_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_sizeof_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_alignof_expression(node) super @unary_exprs[current_encl_expr] += 1 end def visit_cast_expression(node) node.operand.accept(self) @unary_exprs[current_encl_expr] += 1 end def visit_logical_and_expression(node) super if include_ambiguous_expr? W(current_encl_expr.head_location) end end def visit_logical_or_expression(node) super if include_ambiguous_expr? W(current_encl_expr.head_location) end end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def include_ambiguous_expr? @unary_exprs[current_encl_expr] > 0 end def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0490 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0490 may be duplicative when problematic operators appear thrice # or more in an expression. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @highprec_exprs = Hash.new(0) @logical_and_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_array_subscript_expression(node) node.expression.accept(self) AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.expression.accept(self) node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_multiplicative_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_additive_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_shift_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_relational_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_equality_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_and_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_exclusive_or_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_inclusive_or_expression(node) super @highprec_exprs[current_encl_expr] += 1 end def visit_logical_and_expression(node) super cur_encl = current_encl_expr @logical_and_exprs[cur_encl] += 1 if @highprec_exprs[cur_encl] > 0 W(cur_encl.head_location) end end def visit_logical_or_expression(node) super cur_encl = current_encl_expr if @highprec_exprs[cur_encl] + @logical_and_exprs[cur_encl] > 0 W(cur_encl.head_location) end end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0491 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:define_variable) interp.on_variable_declared += T(:declare_variable) interp.on_struct_declared += T(:declare_struct) interp.on_union_declared += T(:declare_union) interp.on_enum_declared += T(:declare_enum) interp.on_typedef_declared += T(:declare_typedef) interp.on_parameter_defined += T(:define_parameter) interp.on_label_defined += T(:define_label) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @dcl_names = [[]] @tag_names = [[]] @label_names = [[]] end private def define_variable(var_def, *) dcl_name = var_def.identifier pair_names = (@tag_names + @label_names).flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(var_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def declare_variable(var_dcl, *) dcl_name = var_dcl.identifier pair_names = (@tag_names + @label_names).flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(var_dcl.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def declare_struct(struct_dcl) tag_name = struct_dcl.identifier return unless tag_name pair_names = (@dcl_names + @label_names).flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(struct_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) end def declare_union(union_dcl) tag_name = union_dcl.identifier return unless tag_name pair_names = (@dcl_names + @label_names).flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(union_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) end def declare_enum(enum_dcl) tag_name = enum_dcl.identifier return unless tag_name pair_names = (@dcl_names + @label_names).flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(enum_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) end def declare_typedef(typedef_dcl) dcl_name = typedef_dcl.identifier pair_names = (@tag_names + @label_names).flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(typedef_dcl.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def define_parameter(param_def, *) dcl_name = param_def.identifier return unless dcl_name pair_names = (@tag_names + @label_names).flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(param_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def define_label(labeled_stmt) label_name = labeled_stmt.label pair_names = (@dcl_names + @tag_names).flatten.select { |id| id.value == label_name.value } unless pair_names.empty? W(labeled_stmt.location, label_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @label_names.last.push(label_name) end def enter_scope(*) @dcl_names.push([]) @tag_names.push([]) @label_names.push([]) end def leave_scope(*) @dcl_names.pop @tag_names.pop @label_names.pop end end class W0492 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:define_variable) interp.on_variable_declared += T(:declare_variable) interp.on_struct_declared += T(:declare_struct_or_union) interp.on_union_declared += T(:declare_struct_or_union) interp.on_enum_declared += T(:declare_enum) interp.on_typedef_declared += T(:declare_typedef) interp.on_parameter_defined += T(:define_parameter) interp.on_label_defined += T(:define_label) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @dcl_names = [[]] @tag_names = [[]] @label_names = [[]] @memb_names = [[]] end private def define_variable(var_def, *) dcl_name = var_def.identifier pair_names = @memb_names.flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(var_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def declare_variable(var_dcl, *) dcl_name = var_dcl.identifier pair_names = @memb_names.flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(var_dcl.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def declare_struct_or_union(struct_or_union_dcl) tag_name = struct_or_union_dcl.identifier return unless tag_name pair_names = @memb_names.flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(struct_or_union_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) declare_members(struct_or_union_dcl) end def declare_members(struct_or_union_dcl) memb_dcls = MemberExtractor.new.tap { |extr| struct_or_union_dcl.accept(extr) }.result memb_dcls.each do |memb_dcl| pair_names = (@dcl_names + @tag_names + @label_names).flatten.select { |id| id.value == memb_dcl.identifier.value } unless pair_names.empty? W(memb_dcl.location, memb_dcl.identifier.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @memb_names.last.push(memb_dcl.identifier) end end def declare_enum(enum_dcl) tag_name = enum_dcl.identifier return unless tag_name pair_names = @memb_names.flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(enum_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) end def declare_typedef(typedef_dcl) dcl_name = typedef_dcl.identifier pair_names = @memb_names.flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(typedef_dcl.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def define_parameter(param_def, *) dcl_name = param_def.identifier return unless dcl_name pair_names = @memb_names.flatten.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(param_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @dcl_names.last.push(dcl_name) end def define_label(labeled_stmt) label_name = labeled_stmt.label pair_names = @memb_names.flatten.select { |id| id.value == label_name.value } unless pair_names.empty? W(labeled_stmt.location, label_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @label_names.last.push(label_name) end def enter_scope(*) @dcl_names.push([]) @tag_names.push([]) @label_names.push([]) @memb_names.push([]) end def leave_scope(*) @dcl_names.pop @tag_names.pop @label_names.pop @memb_names.pop end class MemberExtractor < Cc1::SyntaxTreeVisitor def initialize @result = [] end attr_reader :result def visit_struct_type_declaration(node) if node.struct_declarations node.struct_declarations.each do |struct_dcl| struct_dcl.accept(self) end end end def visit_union_type_declaration(node) if node.struct_declarations node.struct_declarations.each do |struct_dcl| struct_dcl.accept(self) end end end def visit_struct_declaration(node) node.items.each { |item| item.accept(self) } end def visit_member_declaration(node) @result.push(node) end end private_constant :MemberExtractor end class W0493 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, arg_vars, *) if arg_vars.any? { |arg| arg.type.composite? } W(funcall_expr.location) end end end class W0495 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0495 may be duplicative when problematic operators appear thrice # or more in an expression. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @add_exprs = Hash.new(0) @sub_exprs = Hash.new(0) @mul_exprs = Hash.new(0) @div_exprs = Hash.new(0) @mod_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_array_subscript_expression(node) AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_additive_expression(node) cur_encl = current_encl_expr case node.operator.type when "+" @add_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "-" @sub_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_multiplicative_expression(node) cur_encl = current_encl_expr case node.operator.type when "*" @mul_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "/" @div_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "%" @mod_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def include_ambiguous_expr? cur_encl = current_encl_expr return false if @mod_exprs[cur_encl] == 0 additive_exprs = @add_exprs[cur_encl] + @sub_exprs[cur_encl] multiplicative_exprs = @mul_exprs[cur_encl] + @div_exprs[cur_encl] + @mod_exprs[cur_encl] additive_exprs > 0 && multiplicative_exprs > 0 or multiplicative_exprs > 1 end def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0496 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0496 may be duplicative when problematic operators appear thrice # or more in an expression. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @cond_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_conditional_expression(node) super cur_encl = current_encl_expr if @cond_exprs[cur_encl] > 0 W(cur_encl.head_location) end @cond_exprs[cur_encl] += 1 end private def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0497 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0497 may be duplicative when problematic operators appear thrice # or more in an expression. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @shr_exprs = Hash.new(0) @shl_exprs = Hash.new(0) @lt_exprs = Hash.new(0) @gt_exprs = Hash.new(0) @le_exprs = Hash.new(0) @ge_exprs = Hash.new(0) @eq_exprs = Hash.new(0) @ne_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_array_subscript_expression(node) AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_shift_expression(node) cur_encl = current_encl_expr case node.operator.type when "<<" @shl_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when ">>" @shr_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_relational_expression(node) cur_encl = current_encl_expr case node.operator.type when "<" @lt_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when ">" @gt_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "<=" @le_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when ">=" @ge_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_equality_expression(node) cur_encl = current_encl_expr case node.operator.type when "==" @eq_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "!=" @ne_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def include_ambiguous_expr? cur_encl = current_encl_expr @shl_exprs[cur_encl] > 1 || @shr_exprs[cur_encl] > 1 || @lt_exprs[cur_encl] > 1 || @gt_exprs[cur_encl] > 1 || @le_exprs[cur_encl] > 1 || @ge_exprs[cur_encl] > 1 || @eq_exprs[cur_encl] > 1 || @ne_exprs[cur_encl] > 1 end def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0498 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0498 may be duplicative when operators of the same priority are # used thrice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @add_exprs = Hash.new(0) @sub_exprs = Hash.new(0) @mul_exprs = Hash.new(0) @div_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_array_subscript_expression(node) AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_additive_expression(node) cur_encl = current_encl_expr case node.operator.type when "+" @add_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "-" @sub_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_multiplicative_expression(node) cur_encl = current_encl_expr case node.operator.type when "*" @mul_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "/" @div_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def include_ambiguous_expr? cur_encl = current_encl_expr @add_exprs[cur_encl] > 0 && @sub_exprs[cur_encl] > 0 or @mul_exprs[cur_encl] > 0 && @div_exprs[cur_encl] > 0 end def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0499 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0499 may be duplicative when operators of the same priority are # used thrice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @shr_exprs = Hash.new(0) @shl_exprs = Hash.new(0) @lt_exprs = Hash.new(0) @gt_exprs = Hash.new(0) @le_exprs = Hash.new(0) @ge_exprs = Hash.new(0) @eq_exprs = Hash.new(0) @ne_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_array_subscript_expression(node) AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_shift_expression(node) cur_encl = current_encl_expr case node.operator.type when "<<" @shl_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when ">>" @shr_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_relational_expression(node) cur_encl = current_encl_expr case node.operator.type when "<" @lt_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when ">" @gt_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "<=" @le_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when ">=" @ge_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_equality_expression(node) cur_encl = current_encl_expr case node.operator.type when "==" @eq_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "!=" @ne_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def include_ambiguous_expr? cur_encl = current_encl_expr shl_expr_num = @shl_exprs[cur_encl] shr_expr_num = @shr_exprs[cur_encl] lt_expr_num = @lt_exprs[cur_encl] gt_expr_num = @gt_exprs[cur_encl] le_expr_num = @le_exprs[cur_encl] ge_expr_num = @ge_exprs[cur_encl] eq_expr_num = @eq_exprs[cur_encl] ne_expr_num = @ne_exprs[cur_encl] shl_expr_num > 0 && shr_expr_num > 0 or lt_expr_num > 0 && (gt_expr_num + le_expr_num + ge_expr_num) > 0 or gt_expr_num > 0 && (lt_expr_num + le_expr_num + ge_expr_num) > 0 or le_expr_num > 0 && (lt_expr_num + gt_expr_num + ge_expr_num) > 0 or ge_expr_num > 0 && (lt_expr_num + gt_expr_num + le_expr_num) > 0 or eq_expr_num > 0 && ne_expr_num > 0 end def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0500 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0500 may be duplicative when operators of the different priority # are used thrice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @add_exprs = Hash.new(0) @sub_exprs = Hash.new(0) @mul_exprs = Hash.new(0) @div_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_array_subscript_expression(node) AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_multiplicative_expression(node) cur_encl = current_encl_expr case node.operator.type when "*" @mul_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "/" @div_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_additive_expression(node) cur_encl = current_encl_expr case node.operator.type when "+" @add_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? when "-" @sub_exprs[cur_encl] += 1 W(cur_encl.head_location) if include_ambiguous_expr? end super end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def include_ambiguous_expr? cur_encl = current_encl_expr (@add_exprs[cur_encl] + @sub_exprs[cur_encl]) > 0 && (@mul_exprs[cur_encl] + @div_exprs[cur_encl]) > 0 end def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0501 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0501 may be duplicative when problematic operators appear thrice # or more in an expression. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ConditionalExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @group_depth = 0 @ungrouped_expr = 0 end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @group_depth += 1 super @group_depth -= 1 end def visit_multiplicative_expression(node) check_binary_expression super end def visit_additive_expression(node) check_binary_expression super end def visit_shift_expression(node) check_binary_expression super end def visit_relational_expression(node) check_binary_expression super end def visit_equality_expression(node) check_binary_expression super end def visit_and_expression(node) check_binary_expression super end def visit_exclusive_or_expression(node) check_binary_expression super end def visit_inclusive_or_expression(node) check_binary_expression super end def visit_logical_and_expression(node) check_binary_expression super end def visit_logical_or_expression(node) check_binary_expression super end def visit_simple_assignment_expression(node) check_binary_expression super end def visit_compound_assignment_expression(node) check_binary_expression super end private def check_binary_expression @ungrouped_expr += 1 if @group_depth == 0 W(@target_expr.location) if include_ambiguous_expr? end def include_ambiguous_expr? @ungrouped_expr > 0 end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0502 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0502 may be duplicative when operators of the different priority # are used thrice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_initializer += T(:check_initializer) traversal.enter_expression_statement += T(:check_expr_statement) traversal.enter_if_statement += T(:check_selection_statement) traversal.enter_if_else_statement += T(:check_selection_statement) traversal.enter_switch_statement += T(:check_selection_statement) traversal.enter_while_statement += T(:check_iteration_statement) traversal.enter_do_statement += T(:check_iteration_statement) traversal.enter_for_statement += T(:check_iteration_statement) traversal.enter_c99_for_statement += T(:check_iteration_statement) traversal.enter_return_statement += T(:check_return_statement) end private def check_initializer(node) Cc1::ExpressionExtractor.new.tap { |extr| node.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_expr_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_selection_statement(node) Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_iteration_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def check_return_statement(node) return unless node.expression Cc1::ExpressionExtractor.new.tap { |extr| node.expression.accept(extr) }.expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end class AmbiguousExpressionDetector < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt, expr) @phase_ctxt = phase_ctxt @target_expr = expr @encl_expr_stack = [expr] @arith_exprs = Hash.new(0) @shift_exprs = Hash.new(0) @relat_exprs = Hash.new(0) @equal_exprs = Hash.new(0) @and_exprs = Hash.new(0) @xor_exprs = Hash.new(0) @or_exprs = Hash.new(0) @land_exprs = Hash.new(0) end def execute @target_expr.accept(self) end def visit_grouped_expression(node) @encl_expr_stack.push(node) super @encl_expr_stack.pop end def visit_array_subscript_expression(node) AmbiguousExpressionDetector.new(@phase_ctxt, node.array_subscript).execute end def visit_function_call_expression(node) node.argument_expressions.each do |expr| AmbiguousExpressionDetector.new(@phase_ctxt, expr).execute end end def visit_multiplicative_expression(node) super @arith_exprs[current_encl_expr] += 1 end def visit_additive_expression(node) super @arith_exprs[current_encl_expr] += 1 end def visit_shift_expression(node) super @shift_exprs[current_encl_expr] += 1 if current_arith_exprs > 0 W(current_encl_expr.head_location) end end def visit_relational_expression(node) super @relat_exprs[current_encl_expr] += 1 if current_arith_exprs + current_shift_exprs > 0 W(current_encl_expr.head_location) end end def visit_equality_expression(node) super @equal_exprs[current_encl_expr] += 1 if current_arith_exprs + current_shift_exprs + current_relat_exprs > 0 W(current_encl_expr.head_location) end end def visit_and_expression(node) super @and_exprs[current_encl_expr] += 1 if current_arith_exprs + current_shift_exprs + current_relat_exprs + current_equal_exprs > 0 W(current_encl_expr.head_location) end end def visit_exclusive_or_expression(node) super @xor_exprs[current_encl_expr] += 1 if current_arith_exprs + current_shift_exprs + current_relat_exprs + current_equal_exprs + current_and_exprs > 0 W(current_encl_expr.head_location) end end def visit_inclusive_or_expression(node) super @or_exprs[current_encl_expr] += 1 if current_arith_exprs + current_shift_exprs + current_relat_exprs + current_equal_exprs + current_and_exprs + current_xor_exprs > 0 W(current_encl_expr.head_location) end end def visit_logical_and_expression(node) super @land_exprs[current_encl_expr] += 1 if current_arith_exprs + current_shift_exprs + current_relat_exprs + current_equal_exprs + current_and_exprs + current_xor_exprs + current_or_exprs > 0 W(current_encl_expr.head_location) end end def visit_logical_or_expression(node) super if current_arith_exprs + current_shift_exprs + current_relat_exprs + current_equal_exprs + current_and_exprs + current_xor_exprs + current_or_exprs + current_land_exprs > 0 W(current_encl_expr.head_location) end end def visit_conditional_expression(node) cond_expr = node.condition then_expr = node.then_expression else_expr = node.else_expression AmbiguousExpressionDetector.new(@phase_ctxt, cond_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, then_expr).execute AmbiguousExpressionDetector.new(@phase_ctxt, else_expr).execute end private def current_arith_exprs @arith_exprs[current_encl_expr] end def current_shift_exprs @shift_exprs[current_encl_expr] end def current_relat_exprs @relat_exprs[current_encl_expr] end def current_equal_exprs @equal_exprs[current_encl_expr] end def current_and_exprs @and_exprs[current_encl_expr] end def current_xor_exprs @xor_exprs[current_encl_expr] end def current_or_exprs @or_exprs[current_encl_expr] end def current_land_exprs @land_exprs[current_encl_expr] end def current_encl_expr @encl_expr_stack.last end extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :AmbiguousExpressionDetector end class W0508 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_logical_and_expression += T(:check) traversal.enter_logical_or_expression += T(:check) end private def check(node) W(node.location) if node.rhs_operand.have_side_effect? end end class W0512 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_expression_statement += T(:enter_expr_stmt) traversal.leave_expression_statement += T(:leave_expr_stmt) traversal.enter_postfix_increment_expression += T(:check) traversal.enter_postfix_decrement_expression += T(:check) traversal.enter_prefix_increment_expression += T(:check) traversal.enter_prefix_decrement_expression += T(:check) @cur_stmt = nil end private def enter_expr_stmt(node) @cur_stmt = node end def leave_expr_stmt(node) @cur_stmt = nil end def check(node) if @cur_stmt unless @cur_stmt.expression == node W(node.location) end end end end class W0525 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_member_declaration += T(:check) end private def check(node) return unless node.type.scalar? && node.type.integer? if node.type.bitfield? && node.type.signed? && node.type.bit_size == 1 W(node.location) end end end class W0529 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_constant_specifier += T(:check) end private def check(node) if node.constant.value =~ /\A0[0-9]+[UL]*\z/i W(node.location) end end end class W0530 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_constant_specifier += T(:check_constant) traversal.enter_string_literal_specifier += T(:check_string_literal) end private def check_constant(node) if node.constant.value =~ /\AL?'.*\\0[0-9]+.*'\z/i W(node.location) end end def check_string_literal(node) if node.literal.value =~ /\AL?".*\\0[0-9]+.*"\z/i W(node.location) end end end class W0532 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_switch_statement += T(:check_switch_statement) end private def check_switch_statement(node) return unless node.statement.kind_of?(Cc1::CompoundStatement) node.statement.block_items.each_with_index do |item, idx| effective_breaks = EffectiveBreakCollector.new.execute(item) unless effective_breaks.empty? if nxt_item = node.statement.block_items[idx + 1] while nxt_item.kind_of?(Cc1::GenericLabeledStatement) nxt_item = nxt_item.statement end case nxt_item when Cc1::CaseLabeledStatement, Cc1::DefaultLabeledStatement ; else effective_breaks.each do |effective_break| W(effective_break.location) end end end end end end class EffectiveBreakCollector < Cc1::SyntaxTreeVisitor def initialize @result = [] end def execute(node) node.accept(self) @result end def visit_switch_statement(node) end def visit_while_statement(node) end def visit_do_statement(node) end def visit_for_statement(node) end def visit_c99_for_statement(node) end def visit_break_statement(node) @result.push(node) end end private_constant :EffectiveBreakCollector end class W0534 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_for_stmt_started += T(:check_for_stmt) @interp.on_c99_for_stmt_started += T(:check_c99_for_stmt) end private def check_for_stmt(node) inited_var_names = collect_object_specifiers(node.initial_statement).map { |os| os.identifier.value } if ctrl_var_name = deduct_ctrl_variable_name(node, inited_var_names) unless inited_var_names.include?(ctrl_var_name) W(node.initial_statement.location, ctrl_var_name) end end end def check_c99_for_stmt(node) inited_var_names = collect_identifier_declarators(node.declaration).map { |id| id.identifier.value } if ctrl_var_name = deduct_ctrl_variable_name(node, inited_var_names) unless inited_var_names.include?(ctrl_var_name) W(node.declaration.location, ctrl_var_name) end end end def deduct_ctrl_variable_name(node, inited_var_names) var_names = inited_var_names + node.varying_variable_names histo = var_names.each_with_object({}) { |name, hash| hash[name] = 0 } ctrlexpr, * = node.deduct_controlling_expression collect_object_specifiers(ctrlexpr).map { |obj_spec| obj_spec.identifier.value }.each { |obj_name| histo.include?(obj_name) and histo[obj_name] += 1 } histo.to_a.sort { |a, b| b.last <=> a.last }.map(&:first).find do |name| var = variable_named(name) and !var.type.const? end end def interpreter @interp end end class W0535 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_comma_separated_expression += T(:check) traversal.enter_for_statement += T(:enter_for_statement) traversal.leave_for_statement += T(:leave_for_statement) traversal.enter_c99_for_statement += T(:enter_for_statement) traversal.leave_c99_for_statement += T(:leave_for_statement) @in_for_stmt = false end private def check(node) W(node.location) if @in_for_stmt end def enter_for_statement(node) @in_for_stmt = true end def leave_for_statement(node) @in_for_stmt = false end end class W0538 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_switch_statement += T(:check) end private def check(node) return unless node.statement.kind_of?(Cc1::CompoundStatement) labeled_stmt, idx = find_default_labeled_statement(node.statement) if labeled_stmt unless final_clause?(idx, node.statement) W(labeled_stmt.location) end end end def find_default_labeled_statement(compound_stmt) compound_stmt.block_items.each_with_index do |item, idx| case item when Cc1::GenericLabeledStatement item = item.statement redo when Cc1::DefaultLabeledStatement return item, idx end end return nil, nil end def final_clause?(idx, compound_stmt) idx += 1 while item = compound_stmt.block_items[idx] case item when Cc1::GenericLabeledStatement item = item.statement redo when Cc1::CaseLabeledStatement return false else idx += 1 end end true end end class W0540 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:check) end private def check(node) if node.declarator.kind_of?(Cc1::AbbreviatedFunctionDeclarator) W(node.declarator.location) end end end class W0542 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_function_declaration += T(:check) end private def check(node) node.init_declarator.accept(Visitor.new(@phase_ctxt, node)) end class Visitor < Cc1::SyntaxTreeVisitor include Cc1::SyntaxNodeCollector include ReportUtil def initialize(phase_ctxt, fun_dcl) @phase_ctxt = phase_ctxt @function_dcl = fun_dcl end def visit_parameter_type_list(node) return unless node.parameters param_has_name = node.parameters.map { |param_dcl| if param_dcl.declarator collect_identifier_declarators(param_dcl.declarator).count > 0 else false end } unless param_has_name.all? || param_has_name.none? W(@function_dcl.location) end end private extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0543 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:check) @interp = phase_ctxt[:cc1_interpreter] end private def check(node) fun = function_named(node.identifier.value) return unless fun params = fun.declarations_and_definitions.map { |dcl_or_def| case dcl_or_def when Cc1::FunctionDeclaration extract_param_names(dcl_or_def.init_declarator) when Cc1::FunctionDefinition extract_param_names(dcl_or_def.declarator) end } if params.size > 1 params.first.zip(*params[1..-1]) do |names| unless names.tap { |ary| ary.delete("") }.uniq.size == 1 W(node.location) break end end end end def extract_param_names(node) collect_identifier_declarators(node).map { |decl| decl.identifier.value } end def interpreter @interp end end class W0544 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_initialized += T(:check_initialization) interp.on_assignment_expr_evaled += T(:check_assignment) end private def check_initialization(var_def, var, init_var) lhs_type = var.type.unqualify rhs_type = init_var.type.unqualify if lhs_type.pointer? && lhs_type.base_type.function? && rhs_type.pointer? && rhs_type.base_type.function? check(var_def, lhs_type.base_type, rhs_type.base_type) end end def check_assignment(expr, lhs_var, rhs_var) lhs_type = lhs_var.type.unqualify rhs_type = rhs_var.type.unqualify if lhs_type.pointer? && lhs_type.base_type.function? && rhs_type.pointer? && rhs_type.base_type.function? check(expr, lhs_type.base_type, rhs_type.base_type) end end def check(node, lhs_fun_type, rhs_fun_type) param_types = lhs_fun_type.parameter_types.zip(rhs_fun_type.parameter_types) if param_types.any? { |l, r| l && r && l.param_name != r.param_name } W(node.location) end end end class W0546 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_switch_statement += T(:check) end private def check(node) if node.statement.kind_of?(Cc1::CompoundStatement) body = node.statement else return end body.block_items.each { |item| item.accept(Visitor.new(@phase_ctxt)) } end class Visitor < Cc1::SyntaxTreeVisitor include ReportUtil def initialize(phase_ctxt) @phase_ctxt = phase_ctxt @block_level = 0 end def visit_case_labeled_statement(node) super W(node.location) if @block_level > 0 end def visit_default_labeled_statement(node) super W(node.location) if @block_level > 0 end def visit_compound_statement(node) @block_level += 1 super @block_level -= 1 end def visit_if_statement(node) @block_level += 1 node.statement.accept(self) @block_level -= 1 end def visit_if_else_statement(node) @block_level += 1 node.then_statement.accept(self) node.else_statement.accept(self) @block_level -= 1 end def visit_switch_statement(node) end def visit_while_statement(node) @block_level += 1 node.statement.accept(self) @block_level -= 1 end def visit_do_statement(node) @block_level += 1 node.statement.accept(self) @block_level -= 1 end def visit_for_statement(node) @block_level += 1 node.body_statement.accept(self) @block_level -= 1 end def visit_c99_for_statement(node) @block_level += 1 node.body_statement.accept(self) @block_level -= 1 end private extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0551 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_union_type_declaration += T(:check) end private def check(node) W(node.location) end end class W0552 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) end private def check(var_def, var) W(var_def.location) if var.type.union? end end class W0553 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify return unless lhs_type.pointer? && lhs_type.base_type.function? return unless rhs_type.pointer? && rhs_type.base_type.function? unless lhs_type.base_type.same_as?(rhs_type.base_type) W(expr.location) end end end class W0556 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:enter_function) interp.on_function_ended += T(:leave_function) interp.on_function_call_expr_evaled += T(:check) @functions = [] end private def enter_function(*, fun) @functions.push(fun) end def leave_function(*) @functions.pop end def check(funcall_expr, fun, *) if cur_fun = @functions.last and fun == cur_fun W(funcall_expr.location) end end end class W0559 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_unary_arithmetic_expression += T(:check) end private def check(node) if node.operator.type == "!" if Visitor.new.tap { |v| node.operand.accept(v) }.bitwise_expr_num > 0 W(node.location) end end end class Visitor < Cc1::SyntaxTreeVisitor def initialize @bitwise_expr_num = 0 end attr_reader :bitwise_expr_num def visit_unary_arithmetic_expression(node) super unless node.operator.type == "!" end def visit_and_expression(node) super @bitwise_expr_num += 1 end def visit_inclusive_or_expression(node) super @bitwise_expr_num += 1 end end private_constant :Visitor end class W0560 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_unary_arithmetic_expression += T(:check) end private def check(node) if node.operator.type == "~" if Visitor.new.tap { |v| node.operand.accept(v) }.logical_expr_num > 0 W(node.location) end end end class Visitor < Cc1::SyntaxTreeVisitor def initialize @logical_expr_num = 0 end attr_reader :logical_expr_num def visit_unary_arithmetic_expression(node) super unless node.operator.type == "~" end def visit_relational_expression(node) super @logical_expr_num += 1 end def visit_equality_expression(node) super @logical_expr_num += 1 end def visit_logical_and_expression(node) super @logical_expr_num += 1 end def visit_logical_or_expression(node) super @logical_expr_num += 1 end end private_constant :Visitor end class W0561 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_expression_statement += T(:check) end private def check(node) case expr = node.expression when Cc1::IndirectionExpression case expr.operand when Cc1::PostfixIncrementExpression W(node.location) end end end end class W0562 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:check) end private def check(node) if init = node.initializer if initializer_depth(init) > type_depth(node.type) W(init.location) end end end def initializer_depth(init) if inits = init.initializers 1 + inits.map { |i| initializer_depth(i) }.max else 0 end end def type_depth(type) case when type.array? 1 + type_depth(type.base_type) when type.composite? type.members.empty? ? 1 : 1 + type.members.map { |memb| type_depth(memb.type) }.max else 0 end end end class W0563 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_compound_statement += T(:enter_block) traversal.leave_compound_statement += T(:leave_block) traversal.enter_generic_labeled_statement += T(:check) @blocks = [] end private def check(node) return if node.referrers.empty? if @blocks.size > 1 cur_block = @blocks.last anterior_goto = node.referrers.find { |goto| goto.location.line_no < cur_block.head_location.line_no } return unless anterior_goto # FIXME: Must consider that the declaration may appear at anywhere in # ISO C99. cur_block_items = cur_block.block_items if cur_block_items.any? { |item| item.kind_of?(Cc1::Declaration) } W(node.location, node.label.value) end end end def enter_block(node) @blocks.push(node) end def leave_block(node) @blocks.pop end end class W0564 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_compound_statement += T(:enter_block) traversal.leave_compound_statement += T(:leave_block) traversal.enter_generic_labeled_statement += T(:check) @blocks = [] end private def check(node) return if node.referrers.empty? if @blocks.size > 1 cur_block = @blocks.last posterior_goto = node.referrers.find { |goto| goto.location.line_no > cur_block.tail_location.line_no } return unless posterior_goto # FIXME: Must consider that the declaration may appear at anywhere in # ISO C99. cur_block_items = cur_block.block_items if cur_block_items.any? { |item| item.kind_of?(Cc1::Declaration) } W(posterior_goto.location, node.label.value) end end end def enter_block(node) @blocks.push(node) end def leave_block(node) @blocks.pop end end class W0565 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify if lhs_type.integer? && !lhs_type.pointer? && rhs_type.pointer? && rhs_type.base_type.volatile? W(expr.location) return end if rhs_type.integer? && !rhs_type.pointer? && lhs_type.pointer? && lhs_type.base_type.volatile? W(expr.location) return end end end class W0566 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify case when lhs_type.integer? && !lhs_type.pointer? && rhs_type.pointer? && rhs_type.base_type.function? W(expr.location) when rhs_type.integer? && !rhs_type.pointer? && lhs_type.pointer? && lhs_type.base_type.function? W(expr.location) end end end class W0567 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify if lhs_type.integer? && !lhs_type.pointer? && rhs_type.pointer? && !rhs_type.base_type.volatile? W(expr.location) return end if rhs_type.integer? && !rhs_type.pointer? && lhs_type.pointer? && !lhs_type.base_type.volatile? W(expr.location) return end end end class W0568 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) op = expr.operator.type return unless op == "<<" || op == "<<=" return unless constant_expression?(expr.lhs_operand) if lhs_var.type.signed? test = lhs_var.value.test_must_be_less_than(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end if lhs_var.value.test_must_be_greater_than(scalar_value_of(0)).true? lhs_limit = scalar_value_of(lhs_var.type.max) >> rhs_var.value test = lhs_var.value.test_must_be_greater_than(lhs_limit) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def interpreter @interp end end class W0569 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) op = expr.operator.type return unless op == "<<" || op == "<<=" return if constant_expression?(expr.lhs_operand) if lhs_var.type.signed? test = lhs_var.value.test_must_be_less_than(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end if lhs_var.value.test_must_be_greater_than(scalar_value_of(0)).true? lhs_limit = scalar_value_of(lhs_var.type.max) >> rhs_var.value test = lhs_var.value.test_must_be_greater_than(lhs_limit) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def interpreter @interp end end class W0570 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) op = expr.operator.type return unless op == "<<" || op == "<<=" return if constant_expression?(expr.lhs_operand) if lhs_var.type.signed? if lhs_var.value.test_must_be_less_than(scalar_value_of(0)).false? test = lhs_var.value.test_may_be_less_than(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end end lhs_limit = scalar_value_of(lhs_var.type.max) >> rhs_var.value if lhs_var.value.test_must_be_greater_than(lhs_limit).false? test = lhs_var.value.test_may_be_greater_than(lhs_limit) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def interpreter @interp end end class W0571 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, *) op = expr.operator.type if op == ">>" || op == ">>=" W(expr.location) if lhs_var.type.signed? end end end class W0572 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_shift_expr_evaled += T(:check_shift) interp.on_and_expr_evaled += T(:check_binary) interp.on_inclusive_or_expr_evaled += T(:check_binary) interp.on_exclusive_or_expr_evaled += T(:check_binary) interp.on_unary_arithmetic_expr_evaled += T(:check_unary) end private def check_shift(expr, lhs_var, *) if lhs_var.type.scalar? && lhs_var.type.signed? W(expr.location) end end def check_binary(expr, lhs_var, rhs_var, *) if lhs_var.type.scalar? && lhs_var.type.signed? W(expr.location) return end if rhs_var.type.scalar? && rhs_var.type.signed? W(expr.location) return end end def check_unary(expr, var, *) return unless expr.operator.type == "~" if var.type.scalar? && var.type.signed? W(expr.location) end end end class W0578 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_implicit_conv_performed += T(:check) interp.on_function_started += T(:clear_rvalues) interp.on_unary_arithmetic_expr_evaled += T(:handle_unary) interp.on_shift_expr_evaled += T(:handle_shift) interp.on_additive_expr_evaled += T(:handle_additive) interp.on_multiplicative_expr_evaled += T(:handle_multiplicative) @rvalues = nil end private def check(init_or_expr, src_var, dst_var) return unless @rvalues src_type = src_var.type dst_type = dst_var.type return unless src_type.integer? if src_type.integer_conversion_rank < dst_type.integer_conversion_rank case @rvalues[src_var] when Cc1::UnaryArithmeticExpression, Cc1::ShiftExpression, Cc1::AdditiveExpression, Cc1::MultiplicativeExpression W(init_or_expr.location, src_type.brief_image, dst_type.brief_image) end end end def clear_rvalues(*) @rvalues = {} end def handle_unary(expr, *, rslt_var) if expr.operator == "~" memorize_rvalue_derivation(rslt_var, expr) end end def handle_shift(expr, *, rslt_var) if expr.operator.type == "<<" memorize_rvalue_derivation(rslt_var, expr) end end def handle_additive(expr, *, rslt_var) memorize_rvalue_derivation(rslt_var, expr) end def handle_multiplicative(expr, *, rslt_var) unless expr.operator.type == "%" memorize_rvalue_derivation(rslt_var, expr) end end def memorize_rvalue_derivation(rvalue_holder, expr) @rvalues[rvalue_holder] = expr if @rvalues end end class W0579 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) interp.on_function_started += T(:clear_rvalues) interp.on_unary_arithmetic_expr_evaled += T(:handle_unary) interp.on_shift_expr_evaled += T(:handle_shift) interp.on_additive_expr_evaled += T(:handle_additive) interp.on_multiplicative_expr_evaled += T(:handle_multiplicative) @rvalues = nil end private def check(cast_expr, src_var, dst_var) return unless @rvalues src_type = src_var.type dst_type = dst_var.type return unless src_type.integer? if src_type.integer_conversion_rank < dst_type.integer_conversion_rank case @rvalues[src_var] when Cc1::UnaryArithmeticExpression, Cc1::ShiftExpression, Cc1::AdditiveExpression, Cc1::MultiplicativeExpression W(cast_expr.location, src_type.brief_image, dst_type.brief_image) end end end def clear_rvalues(*) @rvalues = {} end def handle_unary(expr, *, rslt_var) if expr.operator == "~" memorize_rvalue_derivation(rslt_var, expr) end end def handle_shift(expr, *, rslt_var) if expr.operator.type == "<<" memorize_rvalue_derivation(rslt_var, expr) end end def handle_additive(expr, *, rslt_var) memorize_rvalue_derivation(rslt_var, expr) end def handle_multiplicative(expr, *, rslt_var) unless expr.operator.type == "%" memorize_rvalue_derivation(rslt_var, expr) end end def memorize_rvalue_derivation(rvalue_holder, expr) @rvalues[rvalue_holder] = expr if @rvalues end end class W0580 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_started += T(:start_function) @interp.on_function_ended += T(:end_function) @interp.on_parameter_defined += T(:add_parameter) @interp.on_indirection_expr_evaled += T(:relate_pointer) @interp.on_assignment_expr_evaled += T(:check) @params = nil @ptr_relat = nil end private def start_function(*) @params = Set.new @ptr_relat = {} end def end_function(*) @params = nil @ptr_relat = nil end def add_parameter(*, var) if @params && var.named? @params.add(var.name) end end def relate_pointer(*, var, derefed_var) if @ptr_relat @ptr_relat[derefed_var] = var end end def check(assign_expr, lhs_var, rhs_var) return unless @params && @ptr_relat return unless lhs_var.type.pointer? && rhs_var.type.pointer? if rhs_pointee = pointee_of(rhs_var) and rhs_pointee.variable? && rhs_pointee.named? && rhs_pointee.scope.local? && rhs_pointee.binding.memory.static? if lhs_var.scope.global? W(assign_expr.location) else if ptr = @ptr_relat[lhs_var] if ptr.named? && @params.include?(ptr.name) W(assign_expr.location) end end end end end def interpreter @interp end end class W0581 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @funcalls = Hash.new { |hash, key| hash[key] = [] } end private def check(funcall_expr, fun, arg_vars, *) return unless fun.named? return if prototype_declaration_of(fun) arg_types = arg_vars.map { |var| var.type.unqualify } @funcalls[fun.name].each do |prv_arg_types| if prv_arg_types.size == arg_types.size conformed = prv_arg_types.zip(arg_types).all? { |prv, lst| case when prv.array? && lst.array?, prv.array? && lst.pointer?, prv.pointer? && lst.array? prv.base_type == lst.base_type else prv == lst end } else conformed = false end unless conformed W(funcall_expr.location) break end end @funcalls[fun.name].push(arg_types) end def prototype_declaration_of(fun) fun.declarations_and_definitions.find do |dcl_or_def| dcl_or_def.kind_of?(Cc1::FunctionDeclaration) end end end class W0582 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::Conversion # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:call_function) @interp.on_explicit_function_declared += T(:check) @funcalls = Hash.new { |hash, key| hash[key] = [] } end private def check(*, fun) return unless fun.named? return if fun.type.have_va_list? param_types = fun.type.parameter_types.reject { |type| type.void? } @funcalls[fun.name].each do |funcall_expr, args| if args.size == param_types.size types = args.map { |ary| ary.first }.zip(param_types) conformed = types.each_with_index.all? { |(atype, ptype), idx| arg_expr = funcall_expr.argument_expressions[idx] constant_expression?(arg_expr) && untyped_pointer_conversion?(atype, ptype, args[idx].last) or atype.convertible?(ptype) } else conformed = false end W(funcall_expr.location) unless conformed end end def call_function(funcall_expr, fun, arg_vars, *) if fun.named? args = arg_vars.map { |var| [var.type, var.value.to_single_value] } @funcalls[fun.name].push([funcall_expr, args]) end end def interpreter @interp end end class W0583 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::Conversion # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:call_function) @interp.on_explicit_function_defined += T(:check) @funcalls = Hash.new { |hash, key| hash[key] = [] } end private def check(*, fun) return unless fun.named? return if fun.type.have_va_list? param_types = fun.type.parameter_types.reject { |type| type.void? } @funcalls[fun.name].each do |funcall_expr, args| if args.size == param_types.size types = args.map { |ary| ary.first }.zip(param_types) conformed = types.each_with_index.all? { |(atype, ptype), idx| arg_expr = funcall_expr.argument_expressions[idx] constant_expression?(arg_expr) && untyped_pointer_conversion?(atype, ptype, args[idx].last) or atype.convertible?(ptype) } else conformed = false end W(funcall_expr.location) unless conformed end end def call_function(funcall_expr, fun, arg_vars, *) if fun.named? args = arg_vars.map { |var| [var.type, var.value.to_single_value] } @funcalls[fun.name].push([funcall_expr, args]) end end def interpreter @interp end end class W0584 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::Conversion # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, arg_vars, *) return unless fun.named? return unless kandr_style_definition_of(fun) return if fun.type.have_va_list? args = arg_vars.map { |var| [var.type, var.value.to_single_value] } param_types = fun.type.parameter_types.reject { |type| type.void? } return unless args.size == param_types.size args.zip(param_types).each_with_index do |(arg, ptype), idx| arg_expr = funcall_expr.argument_expressions[idx] if constant_expression?(arg_expr) next if untyped_pointer_conversion?(arg.first, ptype, arg.last) end unless arg.first.convertible?(ptype) W(arg_expr.location, idx + 1) end end end def kandr_style_definition_of(fun) fun.declarations_and_definitions.find do |dcl_or_def| dcl_or_def.kind_of?(Cc1::KandRFunctionDefinition) end end def interpreter @interp end end class W0585 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_for_stmt_started += T(:check_for_stmt) @interp.on_c99_for_stmt_started += T(:check_c99_for_stmt) end private def check_for_stmt(node) inited_var_names = collect_object_specifiers(node.initial_statement).map { |os| os.identifier.value } if ctrl_var_name = deduct_ctrl_variable_name(node, inited_var_names) if node.expression varying_var_names = collect_varying_variable_names(node.expression) unless varying_var_names.include?(ctrl_var_name) W(node.expression.location, ctrl_var_name) end end end end def check_c99_for_stmt(node) inited_var_names = collect_identifier_declarators(node.declaration).map { |id| id.identifier.value } if ctrl_var_name = deduct_ctrl_variable_name(node, inited_var_names) if node.expression varying_var_names = collect_varying_variable_names(node.expression) unless varying_var_names.include?(ctrl_var_name) W(node.expression.location, ctrl_var_name) end end end end def deduct_ctrl_variable_name(node, inited_var_names) var_names = inited_var_names + node.varying_variable_names histo = var_names.each_with_object({}) { |name, hash| hash[name] = 0 } ctrlexpr, * = node.deduct_controlling_expression collect_object_specifiers(ctrlexpr).map { |obj_spec| obj_spec.identifier.value }.each { |obj_name| histo.include?(obj_name) and histo[obj_name] += 1 } histo.to_a.sort { |a, b| b.last <=> a.last }.map(&:first).find do |name| var = variable_named(name) and !var.type.const? end end def collect_varying_variable_names(node) varying_var_names = [] collect_simple_assignment_expressions(node).each do |expr| if expr.lhs_operand.kind_of?(Cc1::ObjectSpecifier) varying_var_names.push(expr.lhs_operand.identifier.value) end end collect_compound_assignment_expressions(node).each do |expr| if expr.lhs_operand.kind_of?(Cc1::ObjectSpecifier) varying_var_names.push(expr.lhs_operand.identifier.value) end end collect_prefix_increment_expressions(node).each do |expr| if expr.operand.kind_of?(Cc1::ObjectSpecifier) varying_var_names.push(expr.operand.identifier.value) end end collect_prefix_decrement_expressions(node).each do |expr| if expr.operand.kind_of?(Cc1::ObjectSpecifier) varying_var_names.push(expr.operand.identifier.value) end end collect_postfix_increment_expressions(node).each do |expr| if expr.operand.kind_of?(Cc1::ObjectSpecifier) varying_var_names.push(expr.operand.identifier.value) end end collect_postfix_decrement_expressions(node).each do |expr| if expr.operand.kind_of?(Cc1::ObjectSpecifier) varying_var_names.push(expr.operand.identifier.value) end end varying_var_names.uniq end def interpreter @interp end end class W0597 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_sequence_point_reached += T(:commit_changes) interp.on_variable_value_updated += T(:update_variable) @update_cnt = Hash.new(0) end private def commit_changes(seqp) @update_cnt.each { |var, cnt| W(seqp.location, var.name) if cnt > 1 } @update_cnt = Hash.new(0) end def update_variable(*, var) @update_cnt[var] += 1 if var.named? end end class W0598 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_sequence_point_reached += T(:commit_changes) interp.on_variable_value_updated += T(:update_variable) @update_cnt = [Hash.new(0)] end private def commit_changes(seqp) if seqp.obvious? updated_vars = @update_cnt.map { |hash| hash.keys }.flatten.uniq updated_vars.each do |var| if @update_cnt.count { |hash| hash.include?(var) } > 1 if @update_cnt.map { |hash| hash[var] }.max == 1 W(seqp.location, var.name) end end end @update_cnt = [Hash.new(0)] else @update_cnt.push(Hash.new(0)) end end def update_variable(*, var) @update_cnt.last[var] += 1 if var.named? end end class W0599 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_sequence_point_reached += T(:commit_changes) interp.on_variable_value_referred += T(:refer_variable) interp.on_variable_value_updated += T(:update_variable) @refer_cnt = Hash.new(0) @update_cnt = Hash.new(0) end private def commit_changes(seqp) (@refer_cnt.keys & @update_cnt.keys).each do |var| if @refer_cnt[var] > 0 && @update_cnt[var] > 0 W(seqp.location, var.name) end end @refer_cnt = Hash.new(0) @update_cnt = Hash.new(0) end def refer_variable(*, var) @refer_cnt[var] += 1 if var.named? end def update_variable(expr, var) if var.named? case expr when Cc1::SimpleAssignmentExpression, Cc1::CompoundAssignmentExpression # NOTE: The expression-statement `i = i + j;' should not be warned. # But the expression-statement `i = i++ + j;' should be warned. # So, side-effects of the assignment-expression are given # special treatment. else @update_cnt[var] += 1 end end end end class W0600 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_sequence_point_reached += T(:commit_changes) interp.on_variable_value_referred += T(:refer_variable) interp.on_variable_value_updated += T(:update_variable) @refer_cnt = [Hash.new(0)] @update_cnt = [Hash.new(0)] end private def commit_changes(seqp) if seqp.obvious? updated_vars = @update_cnt.map { |hash| hash.keys }.flatten.uniq access_count = @refer_cnt.zip(@update_cnt) updated_vars.each do |var| count = access_count.count { |rhash, uhash| rhash.include?(var) && !uhash.include?(var) } W(seqp.location, var.name) if count > 0 end @refer_cnt = [Hash.new(0)] @update_cnt = [Hash.new(0)] else @refer_cnt.push(Hash.new(0)) @update_cnt.push(Hash.new(0)) end end def refer_variable(*, var) @refer_cnt.last[var] += 1 if var.named? end def update_variable(expr, var) if var.named? case expr when Cc1::SimpleAssignmentExpression, Cc1::CompoundAssignmentExpression # NOTE: The expression-statement `i = i + j;' should not be warned. # But the expression-statement `i = i++ + j;' should be warned. # So, side-effects of the assignment-expression are given # special treatment. else @update_cnt.last[var] += 1 end end end end class W0605 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_break_statement += T(:check) traversal.enter_switch_statement += T(:enter_breakable_statement) traversal.leave_switch_statement += T(:leave_breakable_statement) traversal.enter_while_statement += T(:enter_breakable_statement) traversal.leave_while_statement += T(:leave_breakable_statement) traversal.enter_do_statement += T(:enter_breakable_statement) traversal.leave_do_statement += T(:leave_breakable_statement) traversal.enter_for_statement += T(:enter_breakable_statement) traversal.leave_for_statement += T(:leave_breakable_statement) traversal.enter_c99_for_statement += T(:enter_breakable_statement) traversal.leave_c99_for_statement += T(:leave_breakable_statement) @breakable_stmts = [] end private def check(break_stmt) @breakable_stmts.last[1] += 1 if @breakable_stmts.last[1] > 1 && @breakable_stmts.last[0].kind_of?(Cc1::IterationStatement) W(break_stmt.location) end end def enter_breakable_statement(stmt) @breakable_stmts.push([stmt, 0]) end def leave_breakable_statement(*) @breakable_stmts.pop end end class W0607 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.scalar? && orig_type.integer? && rslt_type.scalar? && rslt_type.integer? && rslt_type.unsigned? return end if orig_var.value.scalar? test = orig_var.value.test_must_be_less_than(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def interpreter @interp end end class W0608 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.scalar? && orig_type.integer? && rslt_type.scalar? && rslt_type.integer? && rslt_type.unsigned? return end if orig_var.value.scalar? && orig_var.value.test_must_be_less_than(scalar_value_of(0)).false? test = orig_var.value.test_may_be_less_than(scalar_value_of(0)) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def interpreter @interp end end class W0609 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_relational_expr_evaled += T(:check) interp.on_equality_expr_evaled += T(:check) interp.on_logical_and_expr_evaled += T(:check) interp.on_logical_or_expr_evaled += T(:check) interp.on_for_stmt_started += T(:enter_for_statement) interp.on_c99_for_stmt_started += T(:enter_for_statement) interp.on_for_stmt_ended += T(:leave_for_statement) interp.on_c99_for_stmt_ended += T(:leave_for_statement) interp.on_for_ctrlexpr_evaled += T(:memorize_for_ctrlexpr) interp.on_c99_for_ctrlexpr_evaled += T(:memorize_for_ctrlexpr) @for_ctrlexpr_stack = [] end private def check(expr, *, rslt_var) if rslt_var.value.test_must_be_true.true? && !should_not_check?(expr) W(expr.location) end end def enter_for_statement(*) @for_ctrlexpr_stack.push(nil) end def leave_for_statement(*) @for_ctrlexpr_stack.pop end def memorize_for_ctrlexpr(for_stmt, *) if explicit_ctrlexpr = for_stmt.condition_statement.expression @for_ctrlexpr_stack[-1] = explicit_ctrlexpr end end def should_not_check?(expr) if ctrlexpr = @for_ctrlexpr_stack.last collect_relational_expressions(ctrlexpr).include?(expr) || collect_equality_expressions(ctrlexpr).include?(expr) || collect_logical_and_expressions(ctrlexpr).include?(expr) || collect_logical_or_expressions(ctrlexpr).include?(expr) else false end end end class W0610 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_relational_expr_evaled += T(:check) interp.on_equality_expr_evaled += T(:check) interp.on_logical_and_expr_evaled += T(:check) interp.on_logical_or_expr_evaled += T(:check) interp.on_for_stmt_started += T(:enter_for_statement) interp.on_c99_for_stmt_started += T(:enter_for_statement) interp.on_for_stmt_ended += T(:leave_for_statement) interp.on_c99_for_stmt_ended += T(:leave_for_statement) interp.on_for_ctrlexpr_evaled += T(:memorize_for_ctrlexpr) interp.on_c99_for_ctrlexpr_evaled += T(:memorize_for_ctrlexpr) @for_ctrlexpr_stack = [] end private def check(expr, *, rslt_var) if rslt_var.value.test_must_be_false.true? && !should_not_check?(expr) W(expr.location) end end def enter_for_statement(*) @for_ctrlexpr_stack.push(nil) end def leave_for_statement(*) @for_ctrlexpr_stack.pop end def memorize_for_ctrlexpr(for_stmt, *) if explicit_ctrlexpr = for_stmt.condition_statement.expression @for_ctrlexpr_stack[-1] = explicit_ctrlexpr end end def should_not_check?(expr) if ctrlexpr = @for_ctrlexpr_stack.last collect_relational_expressions(ctrlexpr).include?(expr) || collect_equality_expressions(ctrlexpr).include?(expr) || collect_logical_and_expressions(ctrlexpr).include?(expr) || collect_logical_or_expressions(ctrlexpr).include?(expr) else false end end end class W0611 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_while_stmt_started += T(:enter_while_stmt) @interp.on_do_stmt_started += T(:enter_do_stmt) @interp.on_for_stmt_started += T(:enter_for_stmt) @interp.on_c99_for_stmt_started += T(:enter_c99_for_stmt) @interp.on_while_ctrlexpr_evaled += T(:memorize_ctrlexpr_val) @interp.on_do_ctrlexpr_evaled += T(:memorize_ctrlexpr_val) @interp.on_for_ctrlexpr_evaled += T(:memorize_ctrlexpr_val) @interp.on_c99_for_ctrlexpr_evaled += T(:memorize_ctrlexpr_val) @interp.on_variable_value_updated += T(:update_ctrl_var) @interp.on_while_stmt_ended += T(:check) @interp.on_do_stmt_ended += T(:check) @interp.on_for_stmt_ended += T(:check) @interp.on_c99_for_stmt_ended += T(:check) @iter_stmts = [] end private def enter_while_stmt(node) enter_iteration_stmt(node.expression) end def enter_do_stmt(node) enter_iteration_stmt(node.expression) end def enter_for_stmt(node) enter_iteration_stmt(node.condition_statement.expression) end def enter_c99_for_stmt(node) enter_iteration_stmt(node.condition_statement.expression) end IterationStmt = Struct.new(:ctrlexpr, :ctrlexpr_val, :ctrl_vars) private_constant :IterationStmt def enter_iteration_stmt(ctrlexpr) if ctrlexpr @iter_stmts.push(IterationStmt.new(ctrlexpr, nil, deduct_ctrl_vars(ctrlexpr))) else @iter_stmts.push(IterationStmt.new(nil, nil, nil)) end end def deduct_ctrl_vars(ctrlexpr) collect_object_specifiers(ctrlexpr).each_with_object({}) do |os, hash| if ctrl_var = variable_named(os.identifier.value) hash[os.identifier.value] = false unless ctrl_var.type.const? end end end def memorize_ctrlexpr_val(*, ctrlexpr_val) @iter_stmts.last.ctrlexpr_val = ctrlexpr_val end def update_ctrl_var(expr, var) if var.named? @iter_stmts.reverse_each do |iter_stmt| if iter_stmt.ctrlexpr && iter_stmt.ctrl_vars.include?(var.name) iter_stmt.ctrl_vars[var.name] = true end end end end def check(*) if ctrlexpr = @iter_stmts.last.ctrlexpr unless constant_expression?(ctrlexpr) ctrlexpr_val = @iter_stmts.last.ctrlexpr_val ctrl_vars = @iter_stmts.last.ctrl_vars if ctrlexpr_val && ctrlexpr_val.test_must_be_true.true? and ctrl_vars && ctrl_vars.values.none? W(ctrlexpr.location) end end end @iter_stmts.pop end def interpreter @interp end end class W0612 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_if_ctrlexpr_evaled += T(:check) @interp.on_if_else_ctrlexpr_evaled += T(:check) end private def check(selection_stmt, ctrlexpr_val) if ctrlexpr = selection_stmt.expression unless constant_expression?(ctrlexpr) W(ctrlexpr.location) if ctrlexpr_val.test_must_be_true.true? end end end def interpreter @interp end end class W0613 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_if_ctrlexpr_evaled += T(:check_if_stmt) interp.on_if_else_ctrlexpr_evaled += T(:check_if_else_stmt) interp.on_while_ctrlexpr_evaled += T(:check_while_stmt) interp.on_for_ctrlexpr_evaled += T(:check_for_stmt) interp.on_c99_for_ctrlexpr_evaled += T(:check_c99_for_stmt) end private def check_if_stmt(if_stmt, ctrlexpr_val) if ctrlexpr_val.test_must_be_false.true? W(if_stmt.expression.location) end end def check_if_else_stmt(if_else_stmt, ctrlexpr_val) if ctrlexpr_val.test_must_be_false.true? W(if_else_stmt.expression.location) end end def check_while_stmt(while_stmt, ctrlexpr_val) if ctrlexpr_val.test_must_be_false.true? W(while_stmt.expression.location) end end def check_for_stmt(for_stmt, ctrlexpr_val) # NOTE: This method is called only if the for-statement has a controlling # expression. if ctrlexpr_val.test_must_be_false.true? W(for_stmt.condition_statement.expression.location) end end def check_c99_for_stmt(c99_for_stmt, ctrlexpr_val) # NOTE: This method is called only if the c99-for-statement has a # controlling expression. if ctrlexpr_val.test_must_be_false.true? W(c99_for_stmt.condition_statement.expression.location) end end end class W0614 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_do_ctrlexpr_evaled += T(:check) end private def check(do_stmt, ctrlexpr_val) unless constant_expression?(do_stmt.expression) if ctrlexpr_val.test_must_be_false.true? W(do_stmt.expression.location) end end end def interpreter @interp end end class W0622 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_function_declared += T(:check) interp.on_block_started += T(:enter_block) interp.on_block_ended += T(:leave_block) @block_level = 0 end private def check(fun_dcl, fun) if @block_level > 0 && fun.declared_as_extern? W(fun_dcl.location) end end def enter_block(*) @block_level += 1 end def leave_block(*) @block_level -= 1 end end class W0623 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:check) interp.on_block_started += T(:enter_block) interp.on_block_ended += T(:leave_block) @block_level = 0 end private def check(var_dcl, var) if @block_level > 0 && var.declared_as_extern? W(var_dcl.location) end end def enter_block(*) @block_level += 1 end def leave_block(*) @block_level -= 1 end end class W0624 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cpp::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:check) traversal.enter_kandr_function_definition += T(:check) @dires = collect_define_lines(phase_ctxt[:cpp_ast]) + collect_undef_lines(phase_ctxt[:cpp_ast]) end private def check(fun_def) @dires.select { |node| in_block?(fun_def.function_body, node) }.each { |node| W(node.location) } end def in_block?(outer_node, inner_node) outer_node.location.fpath == inner_node.location.fpath && outer_node.head_token.location.line_no < inner_node.location.line_no && outer_node.tail_token.location.line_no > inner_node.location.line_no end end class W0625 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::SyntaxNodeCollector # NOTE: W0625 may be duplicative when the same typedef is used twice or # more. mark_as_unique def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath interp = phase_ctxt[:cc1_interpreter] interp.on_typedef_declared += T(:declare_typedef) interp.on_variable_defined += T(:check) interp.on_variable_declared += T(:check) interp.on_explicit_function_declared += T(:check) interp.on_explicit_function_defined += T(:check) @typedef_types = {} end private def declare_typedef(typedef_dcl) typedef_name = typedef_dcl.identifier.value if @fpath == typedef_dcl.location.fpath @typedef_types[typedef_name] = typedef_dcl else @typedef_types.delete(typedef_name) end end def check(dcl_or_def, obj, *) return unless obj.declared_as_extern? if dcl_specs = dcl_or_def.declaration_specifiers find_bad_typedef_decls(dcl_specs).each do |dcl| W(dcl.location, dcl.identifier.value) break end end end def find_bad_typedef_decls(node) collect_typedef_type_specifiers(node).map { |type_spec| @typedef_types[type_spec.identifier.value] }.compact end end class W0626 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_constant_specifier += T(:check_constant) traversal.enter_string_literal_specifier += T(:check_string_literal) end private def check_constant(node) W(node.location) if node.prefix =~ /\AL\z/i end def check_string_literal(node) W(node.location) if node.prefix =~ /\AL\z/i end end class W0627 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_compound_statement += T(:enter_block) traversal.leave_compound_statement += T(:leave_block) traversal.enter_expression_statement += T(:enter_expression_statement) traversal.enter_if_statement += T(:update_last_statement) traversal.enter_if_else_statement += T(:update_last_statement) traversal.enter_switch_statement += T(:update_last_statement) traversal.enter_while_statement += T(:update_last_statement) traversal.enter_do_statement += T(:update_last_statement) traversal.enter_for_statement += T(:enter_for_statement) traversal.enter_c99_for_statement += T(:enter_for_statement) traversal.enter_goto_statement += T(:update_last_statement) traversal.enter_continue_statement += T(:update_last_statement) traversal.enter_break_statement += T(:update_last_statement) traversal.enter_return_statement += T(:update_last_statement) @lst_stmts = [] @expected_stmts = Set.new end private def enter_block(*) @lst_stmts.push(nil) end def leave_block(*) @lst_stmts.pop end def enter_expression_statement(node) return if @expected_stmts.include?(node) unless node.expression if lst_stmt = @lst_stmts.last tail = lst_stmt.tail_location head = node.head_location if tail.fpath == head.fpath && tail.line_no == head.line_no W(node.location) end end end update_last_statement(node) end def enter_for_statement(node) @expected_stmts.add(node.condition_statement) update_last_statement(node) end def update_last_statement(node) @lst_stmts[-1] = node end end class W0629 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_function_defined += T(:define_function) interp.on_function_referred += T(:refer_function) interp.on_translation_unit_ended += M(:check) @static_functions = {} end private def check(*) @static_functions.map { |name, (cnt, loc)| cnt == 0 ? [name, loc] : nil }.compact.each { |name, loc| W(loc, name) } end def define_function(fun_def, fun) if fun.declared_as_static? @static_functions[fun.name] ||= [0, fun_def.location] @static_functions[fun.name][1] ||= fun_def.location end end def refer_function(*, fun) if fun.named? if rec = @static_functions[fun.name] rec[0] += 1 else @static_functions[fun.name] = [1, nil] end end end end class W0635 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| if cs.wellformed? if cs.consume_arguments? && cs.conversion_argument W(fmt.location, idx + 1) unless cs.acceptable? end end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0636 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| if cs.wellformed? if cs.consume_arguments? && cs.conversion_argument.nil? W(fmt.location, idx + 1) end end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0637 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt unless fmt.extra_arguments.empty? if expr = find_extra_argument_expr(funcall_expr, fmt.extra_arguments) W(expr.location) else W(funcall_expr.location) end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end def find_extra_argument_expr(funcall_expr, extra_args) funcall_expr.argument_expressions[-extra_args.size] end end class W0638 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, *) if fun.named? && fun.name =~ /\A.*printf\z/ if funcall_expr.argument_expressions.empty? W(funcall_expr.location) end end end end class W0639 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| if cs.wellformed? if cs.consume_arguments? && cs.conversion_argument W(fmt.location, idx + 1) unless cs.acceptable? end end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0640 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each do |cs| if arg = cs.conversion_argument and !arg.type.pointer? idx = arg_vars.index(arg) if idx and arg_expr = funcall_expr.argument_expressions[idx] W(arg_expr.location) else W(funcall_expr.location) break end end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0641 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify case when lhs_type.floating? && rhs_type.pointer? && !rhs_type.base_type.function? W(expr.location) when rhs_type.floating? && lhs_type.pointer? && !lhs_type.base_type.function? W(expr.location) end end end class W0642 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_address_derivation_performed += T(:check) end private def check(expr, obj, *) W(expr.location) if obj.declared_as_register? end end class W0644 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0644 may be duplicative when both hand side of a binary-expression # refer a value of `void' expression. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_value_referred += T(:check) interp.on_explicit_conv_performed += lambda { |expr, from, *| check(expr, from) } end private def check(expr, var) W(expr.location) if var.type.void? end end class W0646 < PassiveCodeCheck def_registrant_phase Cc1::Prepare1Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super parser = phase_ctxt[:cc1_parser] parser.on_string_literals_concatenated += T(:check) end private def check(former, latter, *) if former.value =~ /\A"/ && latter.value =~ /\AL"/i or former.value =~ /\AL"/i && latter.value =~ /\A"/ W(latter.location) end end end class W0649 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) if constant_expression?(expr.rhs_operand) if rhs_var.value.test_must_be_less_than(scalar_value_of(0)).true? W(expr.location) end end end def interpreter @interp end end class W0650 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) if constant_expression?(expr.rhs_operand) promoted_type = lhs_var.type.integer_promoted_type promoted_bit_size = scalar_value_of(promoted_type.bit_size) if rhs_var.value.test_must_be_equal_to(promoted_bit_size).true? || rhs_var.value.test_must_be_greater_than(promoted_bit_size).true? W(expr.location, promoted_type.brief_image) end end end def interpreter @interp end end class W0653 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_initialized += T(:check) end private def check(var_def, var, init_var) if initializer = var_def.initializer init_depth = initializer_depth(initializer) case when init_depth == 0 && init_var.type.array?, init_depth == 0 && init_var.type.composite? return when init_depth == 0 && type_depth(var.type) > 0 W(initializer.location) end end end def initializer_depth(init) if inits = init.initializers 1 + inits.map { |i| initializer_depth(i) }.max else 0 end end def type_depth(type) case when type.array? 1 + type_depth(type.base_type) when type.composite? type.members.empty? ? 1 : 1 + type.members.map { |memb| type_depth(memb.type) }.max else 0 end end end class W0654 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_initialized += T(:check) end private def check(var_def, var, init_var) type = var.type if type.struct? || type.union? and !type.same_as?(init_var.type) W(var_def.location) end end end class W0655 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_sizeof_expr_evaled += T(:check) end private def check(expr, ope_var, *) type = ope_var.type if type.scalar? && type.integer? && type.bitfield? W(expr.location) end end end class W0656 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| if cs.complete? if cs.undefined? || cs.illformed? W(fmt.location, idx + 1) end end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0657 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| unless cs.valid_length_modifier? warn(fmt, cs.conversion_specifier_character, idx) end end end end def warn(fmt, cs_char, idx) if target_conversion_specifiers.include?(cs_char) W(fmt.location, idx + 1) end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end def target_conversion_specifiers ["i", "d"] end end class W0658 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["o"] end end class W0659 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["u"] end end class W0660 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["x"] end end class W0661 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["X"] end end class W0662 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["f"] end end class W0663 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["e"] end end class W0664 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["E"] end end class W0665 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["g"] end end class W0666 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["G"] end end class W0667 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["c"] end end class W0668 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["%"] end end class W0669 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["s"] end end class W0670 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["n"] end end class W0671 < W0657 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["p"] end end class W0672 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*printf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| W(fmt.location, idx + 1) if cs.incomplete? end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0673 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| if cs.complete? W(fmt.location, idx + 1) if cs.undefined? || cs.illformed? end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0674 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| unless cs.valid_length_modifier? warn(fmt, cs.conversion_specifier_character, idx) end end end end def warn(fmt, cs_char, idx) if target_conversion_specifiers.include?(cs_char) W(fmt.location, idx + 1) end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, fmt_str.location, args, env) end end nil end def target_conversion_specifiers ["d", "i", "n"] end end class W0675 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["o"] end end class W0676 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["u"] end end class W0677 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["x", "X"] end end class W0678 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["e", "E", "f", "g", "G"] end end class W0679 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["s"] end end class W0680 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["p"] end end class W0681 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["%"] end end class W0682 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["["] end end class W0683 < W0674 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def target_conversion_specifiers ["c"] end end class W0684 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each_with_index do |cs, idx| W(fmt.location, idx + 1) if cs.incomplete? end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, fmt_str.location, args, env) end end nil end end class W0694 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, *) W(funcall_expr.location) if fun.named? && fun.name == "assert" end end class W0703 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_struct_declared += T(:declare_struct) interp.on_union_declared += T(:declare_union) interp.on_enum_declared += T(:declare_enum) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @tag_names = [[]] end private def declare_struct(struct_dcl) tag_name = struct_dcl.identifier pair_names = @tag_names.flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(struct_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) end def declare_union(union_dcl) tag_name = union_dcl.identifier pair_names = @tag_names.flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(union_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) end def declare_enum(enum_dcl) tag_name = enum_dcl.identifier pair_names = @tag_names.flatten.select { |id| id.value == tag_name.value } unless pair_names.empty? W(enum_dcl.location, tag_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @tag_names.last.push(tag_name) end def enter_scope(*) @tag_names.push([]) end def leave_scope(*) @tag_names.pop end end class W0704 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:define_variable) interp.on_explicit_function_declared += T(:declare_function) interp.on_variable_declared += T(:declare_variable) interp.on_enum_declared += T(:declare_enum) interp.on_typedef_declared += T(:declare_typedef) interp.on_explicit_function_defined += T(:define_function) interp.on_parameter_defined += T(:define_parameter) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @vdcls = [[]] @vdefs = [[]] @fdcls = [[]] @fdefs = [[]] @tdefs = [[]] @enums = [[]] end private def define_variable(var_def, *) dcl_name = var_def.identifier pair_names = wider_identifiers_of_variable_definition.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(var_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @vdefs.last.push(dcl_name) end def wider_identifiers_of_variable_definition (@vdcls[0..-2] + @vdefs[0..-2] + @fdcls[0..-2] + @fdefs[0..-2] + @tdefs[0..-2] + @enums[0..-2]).flatten end def declare_function(fun_dcl, *) dcl_name = fun_dcl.identifier pair_names = wider_identifiers_of_function_declaration.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(fun_dcl.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @fdcls.last.push(dcl_name) end def wider_identifiers_of_function_declaration (@vdcls[0..-2] + @vdefs[0..-2] + @fdcls[0..-2] + @fdefs[0..-2] + @tdefs[0..-2] + @enums[0..-2]).flatten end def declare_variable(var_dcl, *) dcl_name = var_dcl.identifier pair_names = wider_identifiers_of_variable_declaration.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(var_dcl.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @vdcls.last.push(dcl_name) end def wider_identifiers_of_variable_declaration (@vdefs[0..-2] + @fdcls[0..-2] + @fdefs[0..-2] + @tdefs[0..-2] + @enums[0..-2]).flatten end def declare_enum(enum_dcl) enum_dcl.enumerators.each do |enum| enum_name = enum.identifier pair_names = wider_identifiers_of_enum_declaration.select { |id| id.value == enum_name.value } unless pair_names.empty? W(enum.location, enum_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @enums.last.push(enum_name) end end def wider_identifiers_of_enum_declaration (@vdcls[0..-2] + @vdefs[0..-2] + @fdcls[0..-2] + @fdefs[0..-2] + @tdefs[0..-2] + @enums[0..-2]).flatten end def declare_typedef(typedef_dcl) dcl_name = typedef_dcl.identifier pair_names = wider_identifiers_of_typedef_declaration.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(typedef_dcl.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @enums.last.push(dcl_name) end def wider_identifiers_of_typedef_declaration (@vdcls[0..-2] + @vdefs[0..-2] + @fdcls[0..-2] + @fdefs[0..-2] + @tdefs[0..-2] + @enums[0..-2]).flatten end def define_function(fun_def, *) dcl_name = fun_def.identifier pair_names = wider_identifiers_of_function_definition.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(fun_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @fdefs.last.push(dcl_name) end def wider_identifiers_of_function_definition (@vdcls[0..-2] + @vdefs[0..-2] + @fdefs[0..-2] + @tdefs[0..-2] + @enums[0..-2]).flatten end def define_parameter(param_def, *) dcl_name = param_def.identifier pair_names = wider_identifiers_of_parameter_definition.select { |id| id.value == dcl_name.value } unless pair_names.empty? W(param_def.location, dcl_name.value, *pair_names.map { |pair| C(:C0001, pair.location, pair.value) }) end @vdefs.last.push(dcl_name) end def wider_identifiers_of_parameter_definition (@vdcls[0..-2] + @vdefs[0..-2] + @fdcls[0..-2] + @fdefs[0..-2] + @tdefs[0..-2] + @enums[0..-2]).flatten end def enter_scope(*) @vdcls.push([]) @vdefs.push([]) @fdcls.push([]) @fdefs.push([]) @tdefs.push([]) @enums.push([]) end def leave_scope(*) @vdcls.pop @vdefs.pop @fdcls.pop @fdefs.pop @tdefs.pop @enums.pop end end class W0705 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::InterpreterOptions include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_array_subscript_expr_evaled += T(:check_array_subscript) @interp.on_indirection_expr_evaled += T(:check_indirection) end private def check_array_subscript(expr, ary_or_ptr, subs, ary, *) return unless ary unless constant_expression?(expr.array_subscript) warn_array_oob_access(expr.array_subscript, ary, subs) end end def check_indirection(expr, *) ary, subs_expr = extract_array_and_subscript(expr.operand) return unless ary unless constant_expression?(subs_expr) subs = interpret(subs_expr, QUIET_WITHOUT_SIDE_EFFECT) warn_array_oob_access(expr.operand, ary, subs) end end def warn_array_oob_access(expr, ary, subs) if ary_len = ary.type.length lower_bound = scalar_value_of(0) if subs.value.test_must_be_less_than(lower_bound).false? test = subs.value.test_may_be_less_than(lower_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end end upper_bound = scalar_value_of(ary_len - 1) if subs.value.test_must_be_greater_than(upper_bound).false? test = subs.value.test_may_be_greater_than(upper_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end end def extract_array_and_subscript(expr) ary, ary_name = extract_array(expr) subs_expr = create_subscript_expr(expr, ary_name) return ary, subs_expr end def extract_array(expr) collect_object_specifiers(expr).each do |os| if obj = variable_named(os.identifier.value) case when obj.type.array? return obj, os.identifier.value when obj.type.pointer? if obj = pointee_of(obj) and obj.type.array? return obj, os.identifier.value end end end end nil end def create_subscript_expr(expr, ary_name) expr.accept(ExpressionTransformer.new(ary_name)) end def interpreter @interp end class ExpressionTransformer < Cc1::SyntaxTreeVisitor def initialize(ary_name) @ary_name = ary_name end def visit_error_expression(node) node end def visit_object_specifier(node) if node.identifier.value == @ary_name Cc1::ConstantSpecifier.new(Token.new(:CONSTANT, "0", node.location)) else node end end def visit_constant_specifier(node) node end def visit_string_literal_specifier(node) node end def visit_null_constant_specifier(node) node end def visit_grouped_expression(node) Cc1::GroupedExpression.new(node.expression.accept(self)) end def visit_array_subscript_expression(node) Cc1::ArraySubscriptExpression.new( node.expression.accept(self), node.array_subscript.accept(self), node.operator) end def visit_function_call_expression(node) Cc1::FunctionCallExpression.new( node.expression.accept(self), node.argument_expressions.map { |expr| expr.accept(self) }, node.operator) end def visit_member_access_by_value_expression(node) Cc1::MemberAccessByValueExpression.new( node.expression.accept(self), node.identifier, node.operator) end def visit_member_access_by_pointer_expression(node) Cc1::MemberAccessByPointerExpression.new( node.expression.accept(self), node.identifier, node.operator) end def visit_bit_access_by_value_expression(node) Cc1::BitAccessByValueExpression.new( node.expression.accept(self), node.constant, node.operator) end def visit_bit_access_by_pointer_expression(node) Cc1::BitAccessByPointerExpression.new( node.expression.accept(self), node.constant, node.operator) end def visit_postfix_increment_expression(node) # NOTE: The postfix-increment-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PrefixDecrementExpression.new( Token.new("--", "--", node.operator.location), node.operand.accept(self)) end def visit_postfix_decrement_expression(node) # NOTE: The postfix-decrement-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PrefixIncrementExpression.new( Token.new("++", "++", node.operator.location), node.operand.accept(self)) end def visit_compound_literal_expression(node) Cc1::CompoundLiteralExpression.new( node.type_name, node.initializers.map { |init| init.accept(self) }, node.operator) end def visit_prefix_increment_expression(node) # NOTE: The prefix-increment-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PostfixDecrementExpression.new( Token.new("--", "--", node.operator.location), node.operand.accept(self)) end def visit_prefix_decrement_expression(node) # NOTE: The prefix-decrement-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PostfixIncrementExpression.new( Token.new("++", "++", node.operator.location), node.operand.accept(self)) end def visit_address_expression(node) Cc1::AddressExpression.new(node.operator, node.operand.accept(self)) end def visit_indirection_expression(node) Cc1::IndirectionExpression.new( node.operator, node.operand.accept(self)) end def visit_unary_arithmetic_expression(node) Cc1::UnaryArithmeticExpression.new( node.operator, node.operand.accept(self)) end def visit_sizeof_expression(node) Cc1::SizeofExpression.new(node.operator, node.operand.accept(self)) end def visit_sizeof_type_expression(node) node end def visit_alignof_expression(node) Cc1::AlignofExpression.new(node.operator, node.operand.accept(self)) end def visit_alignof_type_expression(node) node end def visit_cast_expression(node) Cc1::CastExpression.new(node.type_name, node.operand.accept(self)) end def visit_multiplicative_expression(node) Cc1::MultiplicativeExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_additive_expression(node) Cc1::AdditiveExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_shift_expression(node) Cc1::ShiftExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_relational_expression(node) Cc1::RelationalExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_equality_expression(node) Cc1::EqualityExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_and_expression(node) Cc1::AndExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_exclusive_or_expression(node) Cc1::ExclusiveOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_inclusive_or_expression(node) Cc1::InclusiveOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_and_expression(node) Cc1::LogicalAndExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_or_expression(node) Cc1::LogicalOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_conditional_expression(node) Cc1::ConditionalExpression.new(node.condition.accept(self), node.then_expression.accept(self), node.else_expression.accept(self), Token.new("?", "?", node.location)) end def visit_simple_assignment_expression(node) Cc1::SimpleAssignmentExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_compound_assignment_expression(node) Cc1::CompoundAssignmentExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_comma_separated_expression(node) exprs = node.expressions.map { |expr| expr.accept(self) } transformed = Cc1::CommaSeparatedExpression.new(exprs.shift) exprs.each { |expr| transformed.expressions.push(expr) } transformed end def visit_initializer(node) case when node.expression Cc1::Initializer.new(node.expression.accept(self), nil) when node.initializers Cc1::Initializer.new( nil, node.initializers.map { |i| i.accept(self) }) end end end private_constant :ExpressionTransformer end class W0707 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::InterpreterOptions include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_array_subscript_expr_evaled += T(:check_array_subscript) @interp.on_indirection_expr_evaled += T(:check_indirection) end private def check_array_subscript(expr, ary_or_ptr, subs, ary, *) return unless ary if constant_expression?(expr.array_subscript) warn_array_oob_access(expr.array_subscript, ary, subs) end end def check_indirection(expr, *) ary, subs_expr = extract_array_and_subscript(expr.operand) return unless ary if constant_expression?(subs_expr) # NOTE: A constant-expression has no side-effects. subs = interpret(subs_expr, QUIET) warn_array_oob_access(expr.operand, ary, subs) end end def warn_array_oob_access(expr, ary, subs) if ary_len = ary.type.length lower_bound = scalar_value_of(0) test = subs.value.test_must_be_less_than(lower_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end upper_bound = scalar_value_of(ary_len - 1) test = subs.value.test_must_be_greater_than(upper_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def extract_array_and_subscript(expr) ary, ary_name = extract_array(expr) subs_expr = create_subscript_expr(expr, ary_name) return ary, subs_expr end def extract_array(expr) collect_object_specifiers(expr).each do |os| if obj = variable_named(os.identifier.value) case when obj.type.array? return obj, os.identifier.value when obj.type.pointer? if obj = pointee_of(obj) and obj.type.array? return obj, os.identifier.value end end end end nil end def create_subscript_expr(expr, ary_name) expr.accept(ExpressionTransformer.new(ary_name)) end def interpreter @interp end class ExpressionTransformer < Cc1::SyntaxTreeVisitor def initialize(ary_name) @ary_name = ary_name end def visit_error_expression(node) node end def visit_object_specifier(node) if node.identifier.value == @ary_name Cc1::ConstantSpecifier.new(Token.new(:CONSTANT, "0", node.location)) else node end end def visit_constant_specifier(node) node end def visit_string_literal_specifier(node) node end def visit_null_constant_specifier(node) node end def visit_grouped_expression(node) Cc1::GroupedExpression.new(node.expression.accept(self)) end def visit_array_subscript_expression(node) Cc1::ArraySubscriptExpression.new(node.expression.accept(self), node.array_subscript.accept(self), node.operator) end def visit_function_call_expression(node) Cc1::FunctionCallExpression.new( node.expression.accept(self), node.argument_expressions.map { |expr| expr.accept(self) }, node.operator) end def visit_member_access_by_value_expression(node) Cc1::MemberAccessByValueExpression.new( node.expression.accept(self), node.identifier, node.operator) end def visit_member_access_by_pointer_expression(node) Cc1::MemberAccessByPointerExpression.new( node.expression.accept(self), node.identifier, node.operator) end def visit_bit_access_by_value_expression(node) Cc1::BitAccessByValueExpression.new( node.expression.accept(self), node.constant, node.operator) end def visit_bit_access_by_pointer_expression(node) Cc1::BitAccessByPointerExpression.new( node.expression.accept(self), node.constant, node.operator) end def visit_postfix_increment_expression(node) # NOTE: The postfix-increment-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PrefixDecrementExpression.new( Token.new("--", "--", node.operator.location), node.operand.accept(self)) end def visit_postfix_decrement_expression(node) # NOTE: The postfix-decrement-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PrefixIncrementExpression.new( Token.new("++", "++", node.operator.location), node.operand.accept(self)) end def visit_compound_literal_expression(node) Cc1::CompoundLiteralExpression.new( node.type_name, node.initializers.map { |init| init.accept(self) }, node.operator) end def visit_prefix_increment_expression(node) # NOTE: The prefix-increment-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PostfixDecrementExpression.new( Token.new("--", "--", node.operator.location), node.operand.accept(self)) end def visit_prefix_decrement_expression(node) # NOTE: The prefix-decrement-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PostfixIncrementExpression.new( Token.new("++", "++", node.operator.location), node.operand.accept(self)) end def visit_address_expression(node) Cc1::AddressExpression.new(node.operator, node.operand.accept(self)) end def visit_indirection_expression(node) Cc1::IndirectionExpression.new( node.operator, node.operand.accept(self)) end def visit_unary_arithmetic_expression(node) Cc1::UnaryArithmeticExpression.new( node.operator, node.operand.accept(self)) end def visit_sizeof_expression(node) Cc1::SizeofExpression.new(node.operator, node.operand.accept(self)) end def visit_sizeof_type_expression(node) node end def visit_alignof_expression(node) Cc1::AlignofExpression.new(node.operator, node.operand.accept(self)) end def visit_alignof_type_expression(node) node end def visit_cast_expression(node) Cc1::CastExpression.new(node.type_name, node.operand.accept(self)) end def visit_multiplicative_expression(node) Cc1::MultiplicativeExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_additive_expression(node) Cc1::AdditiveExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_shift_expression(node) Cc1::ShiftExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_relational_expression(node) Cc1::RelationalExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_equality_expression(node) Cc1::EqualityExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_and_expression(node) Cc1::AndExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_exclusive_or_expression(node) Cc1::ExclusiveOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_inclusive_or_expression(node) Cc1::InclusiveOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_and_expression(node) Cc1::LogicalAndExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_or_expression(node) Cc1::LogicalOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_conditional_expression(node) Cc1::ConditionalExpression.new(node.condition.accept(self), node.then_expression.accept(self), node.else_expression.accept(self), Token.new("?", "?", node.location)) end def visit_simple_assignment_expression(node) Cc1::SimpleAssignmentExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_compound_assignment_expression(node) Cc1::CompoundAssignmentExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_comma_separated_expression(node) exprs = node.expressions.map { |expr| expr.accept(self) } transformed = Cc1::CommaSeparatedExpression.new(exprs.shift) exprs.each { |expr| transformed.expressions.push(expr) } transformed end def visit_initializer(node) case when node.expression Cc1::Initializer.new(node.expression.accept(self), nil) when node.initializers Cc1::Initializer.new( nil, node.initializers.map { |i| i.accept(self) }) end end end private_constant :ExpressionTransformer end class W0708 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_for_stmt_started += T(:enter_for_stmt) @interp.on_for_stmt_ended += T(:leave_for_stmt) @interp.on_c99_for_stmt_started += T(:enter_c99_for_stmt) @interp.on_c99_for_stmt_ended += T(:leave_c99_for_stmt) @interp.on_variable_value_updated += T(:update_variable) @ctrl_var_stack = [] end private def enter_for_stmt(node) inited_var_names = collect_object_specifiers(node.initial_statement).map { |os| os.identifier.value } if ctrl_var_name = deduct_ctrl_variable_name(node, inited_var_names) @ctrl_var_stack.push([ctrl_var_name, node]) end end def leave_for_stmt(*) @ctrl_var_stack.pop end def enter_c99_for_stmt(node) inited_var_names = collect_identifier_declarators(node.declaration).map { |id| id.identifier.value } if ctrl_var_name = deduct_ctrl_variable_name(node, inited_var_names) @ctrl_var_stack.push([ctrl_var_name, node]) end end def leave_c99_for_stmt(*) @ctrl_var_stack.pop end def update_variable(expr, var) if var.named? and ctrl_vars = @ctrl_var_stack.last if ctrl_vars.first == var.name && !in_ctrl_part(ctrl_vars.last, expr) W(expr.location, var.name) end end end def deduct_ctrl_variable_name(node, inited_var_names) var_names = inited_var_names + node.varying_variable_names histo = var_names.each_with_object({}) { |name, hash| hash[name] = 0 } ctrlexpr, * = node.deduct_controlling_expression collect_object_specifiers(ctrlexpr).map { |obj_spec| obj_spec.identifier.value }.each { |obj_name| histo.include?(obj_name) and histo[obj_name] += 1 } histo.to_a.sort { |a, b| b.last <=> a.last }.map(&:first).find do |name| var = variable_named(name) and !var.type.const? end end def in_ctrl_part(for_or_c99_for_stmt, expr) case for_or_c99_for_stmt when Cc1::ForStatement contain_expr?(for_or_c99_for_stmt.initial_statement, expr) || contain_expr?(for_or_c99_for_stmt.condition_statement, expr) || contain_expr?(for_or_c99_for_stmt.expression, expr) when Cc1::C99ForStatement contain_expr?(for_or_c99_for_stmt.condition_statement, expr) || contain_expr?(for_or_c99_for_stmt.expression, expr) end end def contain_expr?(node, expr) node ? Visitor.new(expr).tap { |v| node.accept(v) }.result : false end def interpreter @interp end class Visitor < Cc1::SyntaxTreeVisitor def initialize(expr) @expr = expr @result = false end attr_reader :result def visit_address_expression(node) node == @expr && @result = true or super end def visit_postfix_increment_expression(node) node == @expr && @result = true or super end def visit_postfix_decrement_expression(node) node == @expr && @result = true or super end def visit_prefix_increment_expression(node) node == @expr && @result = true or super end def visit_prefix_decrement_expression(node) node == @expr && @result = true or super end def visit_simple_assignment_expression(node) node == @expr && @result = true or super end def visit_compound_assignment_expression(node) node == @expr && @result = true or super end def visit_function_call_expression(node) node == @expr && @result = true or super end end private_constant :Visitor end class W0719 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) if constant_expression?(expr.rhs_operand) underlying_type = lhs_var.type underlying_bit_size = scalar_value_of(underlying_type.bit_size) promoted_type = lhs_var.type.integer_promoted_type promoted_bit_size = scalar_value_of(promoted_type.bit_size) rhs_val = rhs_var.value if rhs_val.test_must_be_equal_to(underlying_bit_size).true? || rhs_val.test_must_be_greater_than(underlying_bit_size).true? and rhs_val.test_must_be_less_than(promoted_bit_size).true? W(expr.location, underlying_type.brief_image) end end end def interpreter @interp end end class W0720 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.scalar? && orig_type.floating? && rslt_type.scalar? && rslt_type.integer? return end orig_val = orig_var.value return unless orig_val.scalar? lower_bound = scalar_value_of(rslt_type.min - 1) test = orig_val.test_must_be_less_than(lower_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end upper_bound = scalar_value_of(rslt_type.max + 1) test = orig_val.test_must_be_greater_than(upper_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end def interpreter @interp end end class W0721 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.pointer? && rslt_type.scalar? && rslt_type.integer? return end if orig_type.min < rslt_type.min || orig_type.max > rslt_type.max W(expr.location) end end end class W0722 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) @interp.on_additive_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, rslt_var) return unless lhs_var.type.scalar? && lhs_var.type.signed? return unless rhs_var.type.scalar? && rhs_var.type.signed? return unless lhs_var.value.scalar? && rhs_var.value.scalar? case expr.operator.type when "+" unbound_val = lhs_var.value + rhs_var.value when "-" unbound_val = lhs_var.value - rhs_var.value when "*" unbound_val = lhs_var.value * rhs_var.value else return end lower_test = unbound_val < scalar_value_of(rslt_var.type.min) upper_test = unbound_val > scalar_value_of(rslt_var.type.max) if lower_test.test_must_be_true.true? || upper_test.test_must_be_true.true? W(expr.location) end end def interpreter @interp end end class W0723 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) @interp.on_additive_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, rslt_var) return unless lhs_var.type.scalar? && lhs_var.type.signed? return unless rhs_var.type.scalar? && rhs_var.type.signed? return unless lhs_var.value.scalar? && rhs_var.value.scalar? case expr.operator.type when "+" unbound_val = lhs_var.value + rhs_var.value when "-" unbound_val = lhs_var.value - rhs_var.value when "*" unbound_val = lhs_var.value * rhs_var.value else return end lower_test = unbound_val < scalar_value_of(rslt_var.type.min) upper_test = unbound_val > scalar_value_of(rslt_var.type.max) if !lower_test.test_must_be_true.true? && lower_test.test_may_be_true.true? or !upper_test.test_must_be_true.true? && upper_test.test_may_be_true.true? W(expr.location) end end def interpreter @interp end end class W0727 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) interp.on_implicit_conv_performed += T(:check) end private def check(init_or_expr, orig_var, rslt_var) return unless rslt_var.type.enum? val = orig_var.value.unique_sample unless rslt_var.type.enumerators.any? { |enum| val == enum.value } W(init_or_expr.location) end end end class W0728 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:check) end private def check(expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg_var, param_type), idx| next unless param_type && param_type.enum? arg_expr = expr.argument_expressions[idx] if constant_expression?(arg_expr) if arg_var.type.enum? W(arg_expr.location) unless arg_var.type.same_as?(param_type) end end end end def interpreter @interp end end class W0729 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_assignment_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var) return unless lhs_var.type.enum? if constant_expression?(expr.rhs_operand) if rhs_var.type.enum? && !lhs_var.type.same_as?(rhs_var.type) W(expr.location) end end end def interpreter @interp end end class W0730 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_started += T(:start_function) @interp.on_function_ended += T(:end_function) @interp.on_return_stmt_evaled += T(:check) @cur_fun = nil end private def start_function(*, fun) @cur_fun = fun end def end_function(*) @cur_fun = nil end def check(ret_stmt, ret_var) return unless @cur_fun && ret_var return unless ret_type = @cur_fun.type.return_type return unless ret_type.enum? if constant_expression?(ret_stmt.expression) if ret_var.type.enum? && !ret_type.same_as?(ret_var.type) W(ret_stmt.expression.location) end end end def interpreter @interp end end class W0731 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_switch_stmt_ended += T(:end_switch_statement) interp.on_switch_ctrlexpr_evaled += T(:memorize_switch_ctrlexpr) interp.on_case_ctrlexpr_evaled += T(:check) @switch_ctrlexpr_stack = [] end private def end_switch_statement(*) @switch_ctrlexpr_stack.pop end def memorize_switch_ctrlexpr(*, ctrlexpr_var) @switch_ctrlexpr_stack.push(ctrlexpr_var) end def check(case_stmt, ctrlexpr_var) unless switch_ctrlexpr_var = @switch_ctrlexpr_stack.last return end return unless switch_ctrlexpr_var.type.enum? expected_type = switch_ctrlexpr_var.type val = ctrlexpr_var.value.unique_sample unless expected_type.enumerators.any? { |enum| val == enum.value } W(case_stmt.expression.location, case_stmt.expression.to_s) end end end class W0736 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:define_variable) interp.on_variable_referred += T(:refer_variable) interp.on_function_started += T(:enter_function) interp.on_function_ended += T(:leave_function) interp.on_translation_unit_ended += M(:check) @static_vars = {} @functions = [] end private def define_variable(var_def, var) return unless @functions.empty? @static_vars[var] = [var_def, Set.new] if var.declared_as_static? end def refer_variable(*, var) return if @functions.empty? @static_vars[var].last.add(@functions.last) if @static_vars.include?(var) end def enter_function(*, fun) @functions.push(fun) end def leave_function(*) @functions.pop end def check(*) @static_vars.each do |var, (var_def, accessors)| W(var_def.location, var.name) if accessors.size == 1 end end end class W0737 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:check) interp.on_variable_defined += T(:check) end private def check(dcl_or_def, *) return unless dcl_or_def.type.enum? if dcl_or_def.type.incomplete? W(dcl_or_def.location, dcl_or_def.type.name) end end end class W0738 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_implicit_conv_performed += T(:check) end private def check(init_or_expr, orig_var, rslt_var) case init_or_expr when Cc1::Initializer unless expr = init_or_expr.expression return end when Cc1::Expression expr = init_or_expr end return unless constant_expression?(expr) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.scalar? && orig_type.integer? && rslt_type.scalar? && rslt_type.integer? && rslt_type.unsigned? return end orig_val = orig_var.value return unless orig_val.scalar? upper_test = orig_val > scalar_value_of(rslt_type.max) W(expr.location) if upper_test.test_must_be_true.true? end def interpreter @interp end end class W0739 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_additive_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, rslt_var) return unless expr.operator.type == "-" return unless constant_expression?(expr.lhs_operand) return unless constant_expression?(expr.rhs_operand) return unless lhs_var.type.scalar? && lhs_var.type.unsigned? return unless rhs_var.type.scalar? && rhs_var.type.unsigned? return unless lhs_var.value.scalar? && rhs_var.value.scalar? unbound_val = lhs_var.value - rhs_var.value lower_test = unbound_val < scalar_value_of(rslt_var.type.min) W(expr.location) if lower_test.test_must_be_true.true? end def interpreter @interp end end class W0740 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_additive_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, rslt_var) return unless expr.operator.type == "+" return unless constant_expression?(expr.lhs_operand) return unless constant_expression?(expr.rhs_operand) return unless lhs_var.type.scalar? && lhs_var.type.unsigned? return unless rhs_var.type.scalar? && rhs_var.type.unsigned? return unless lhs_var.value.scalar? && rhs_var.value.scalar? unbound_val = lhs_var.value + rhs_var.value upper_test = unbound_val > scalar_value_of(rslt_var.type.max) W(expr.location) if upper_test.test_must_be_true.true? end def interpreter @interp end end class W0741 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, rslt_var) return unless expr.operator.type == "*" return unless constant_expression?(expr.lhs_operand) return unless constant_expression?(expr.rhs_operand) return unless lhs_var.type.scalar? && lhs_var.type.unsigned? return unless rhs_var.type.scalar? && rhs_var.type.unsigned? return unless lhs_var.value.scalar? && rhs_var.value.scalar? unbound_val = lhs_var.value * rhs_var.value upper_test = unbound_val > scalar_value_of(rslt_var.type.max) W(expr.location) if upper_test.test_must_be_true.true? end def interpreter @interp end end class W0742 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_implicit_conv_performed += T(:check) end private def check(init_or_expr, orig_var, rslt_var) unless orig_var.type.scalar? && rslt_var.type.scalar? && orig_var.type.signed? && rslt_var.type.unsigned? return end if init_or_expr.kind_of?(Cc1::Initializer) expr = init_or_expr.expression else expr = init_or_expr end if expr && constant_expression?(expr) && orig_var.value.test_must_be_less_than(scalar_value_of(0)).true? W(expr.location) end end def interpreter @interp end end class W0743 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_implicit_conv_performed += T(:check) end private def check(init_or_expr, orig_var, rslt_var) case init_or_expr when Cc1::Initializer unless expr = init_or_expr.expression return end when Cc1::Expression expr = init_or_expr end return unless constant_expression?(expr) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.scalar? && orig_type.integer? && rslt_type.scalar? && rslt_type.integer? && rslt_type.signed? return end orig_val = orig_var.value return unless orig_val.scalar? lower_test = orig_val < scalar_value_of(rslt_type.min) upper_test = orig_val > scalar_value_of(rslt_type.max) if lower_test.test_must_be_true.true? || upper_test.test_must_be_true.true? W(expr.location) end end def interpreter @interp end end class W0744 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_if_ctrlexpr_evaled += T(:check_if_statement) @interp.on_if_else_ctrlexpr_evaled += T(:check_if_else_statement) @interp.on_while_ctrlexpr_evaled += T(:check_while_statement) @interp.on_for_ctrlexpr_evaled += T(:check_for_statement) @interp.on_c99_for_ctrlexpr_evaled += T(:check_c99_for_statement) end private def check_if_statement(if_stmt, ctrlexpr_val) ctrlexpr = if_stmt.expression if constant_expression?(ctrlexpr) && ctrlexpr_val.test_must_be_false.true? W(ctrlexpr.location) end end def check_if_else_statement(if_else_stmt, ctrlexpr_val) ctrlexpr = if_else_stmt.expression if constant_expression?(ctrlexpr) && ctrlexpr_val.test_must_be_false.true? W(ctrlexpr.location) end end def check_while_statement(while_stmt, ctrlexpr_val) ctrlexpr = while_stmt.expression if constant_expression?(ctrlexpr) && ctrlexpr_val.test_must_be_false.true? W(ctrlexpr.location) end end def check_for_statement(for_stmt, ctrlexpr_val) ctrlexpr = for_stmt.condition_statement.expression if constant_expression?(ctrlexpr) && ctrlexpr_val.test_must_be_false.true? W(ctrlexpr.location) end end def check_c99_for_statement(c99_for_stmt, ctrlexpr_val) ctrlexpr = c99_for_stmt.condition_statement.expression if constant_expression?(ctrlexpr) && ctrlexpr_val.test_must_be_false.true? W(ctrlexpr.location) end end def interpreter @interp end end class W0745 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::InterpreterOptions include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_array_subscript_expr_evaled += T(:check_array_subscript) @interp.on_indirection_expr_evaled += T(:check_indirection) end private def check_array_subscript(expr, ary_or_ptr, subs, ary, *) return unless ary unless constant_expression?(expr.array_subscript) warn_array_oob_access(expr.array_subscript, ary, subs) end end def check_indirection(expr, *) ary, subs_expr = extract_array_and_subscript(expr.operand) return unless ary unless constant_expression?(subs_expr) subs = interpret(subs_expr, QUIET_WITHOUT_SIDE_EFFECT) warn_array_oob_access(expr.operand, ary, subs) end end def warn_array_oob_access(expr, ary, subs) if ary_len = ary.type.length lower_bound = scalar_value_of(0) test = subs.value.test_must_be_less_than(lower_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end upper_bound = scalar_value_of(ary_len - 1) test = subs.value.test_must_be_greater_than(upper_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def extract_array_and_subscript(expr) ary, ary_name = extract_array(expr) subs_expr = create_subscript_expr(expr, ary_name) return ary, subs_expr end def extract_array(expr) collect_object_specifiers(expr).each do |obj_spec| if obj = variable_named(obj_spec.identifier.value) case when obj.type.array? return obj, obj_spec.identifier.value when obj.type.pointer? if obj = pointee_of(obj) and obj.type.array? return obj, obj_spec.identifier.value end end end end nil end def create_subscript_expr(expr, ary_name) expr.accept(ExpressionTransformer.new(ary_name)) end def interpreter @interp end class ExpressionTransformer < Cc1::SyntaxTreeVisitor def initialize(ary_name) @ary_name = ary_name end def visit_error_expression(node) node end def visit_object_specifier(node) if node.identifier.value == @ary_name Cc1::ConstantSpecifier.new(Token.new(:CONSTANT, "0", node.location)) else node end end def visit_constant_specifier(node) node end def visit_string_literal_specifier(node) node end def visit_null_constant_specifier(node) node end def visit_grouped_expression(node) Cc1::GroupedExpression.new(node.expression.accept(self)) end def visit_array_subscript_expression(node) Cc1::ArraySubscriptExpression.new(node.expression.accept(self), node.array_subscript.accept(self), node.operator) end def visit_function_call_expression(node) Cc1::FunctionCallExpression.new( node.expression.accept(self), node.argument_expressions.map { |expr| expr.accept(self) }, node.operator) end def visit_member_access_by_value_expression(node) Cc1::MemberAccessByValueExpression.new( node.expression.accept(self), node.identifier, node.operator) end def visit_member_access_by_pointer_expression(node) Cc1::MemberAccessByPointerExpression.new( node.expression.accept(self), node.identifier, node.operator) end def visit_bit_access_by_value_expression(node) Cc1::BitAccessByValueExpression.new( node.expression.accept(self), node.constant, node.operator) end def visit_bit_access_by_pointer_expression(node) Cc1::BitAccessByPointerExpression.new( node.expression.accept(self), node.constant, node.operator) end def visit_postfix_increment_expression(node) # NOTE: The postfix-increment-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PrefixDecrementExpression.new( Token.new("--", "--", node.operator.location), node.operand.accept(self)) end def visit_postfix_decrement_expression(node) # NOTE: The postfix-decrement-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PrefixIncrementExpression.new( Token.new("++", "++", node.operator.location), node.operand.accept(self)) end def visit_compound_literal_expression(node) Cc1::CompoundLiteralExpression.new( node.type_name, node.initializers.map { |init| init.accept(self) }, node.operator) end def visit_prefix_increment_expression(node) # NOTE: The prefix-increment-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PostfixDecrementExpression.new( Token.new("--", "--", node.operator.location), node.operand.accept(self)) end def visit_prefix_decrement_expression(node) # NOTE: The prefix-decrement-expression is already evaluated with # side-effect. # To rollback the side-effect, create an inverted expression. Cc1::PostfixIncrementExpression.new( Token.new("++", "++", node.operator.location), node.operand.accept(self)) end def visit_address_expression(node) Cc1::AddressExpression.new( node.operator, node.operand.accept(self)) end def visit_indirection_expression(node) Cc1::IndirectionExpression.new( node.operator, node.operand.accept(self)) end def visit_unary_arithmetic_expression(node) Cc1::UnaryArithmeticExpression.new( node.operator, node.operand.accept(self)) end def visit_sizeof_expression(node) Cc1::SizeofExpression.new(node.operator, node.operand.accept(self)) end def visit_sizeof_type_expression(node) node end def visit_alignof_expression(node) Cc1::AlignofExpression.new(node.operator, node.operand.accept(self)) end def visit_alignof_type_expression(node) node end def visit_cast_expression(node) Cc1::CastExpression.new(node.type_name, node.operand.accept(self)) end def visit_multiplicative_expression(node) Cc1::MultiplicativeExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_additive_expression(node) Cc1::AdditiveExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_shift_expression(node) Cc1::ShiftExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_relational_expression(node) Cc1::RelationalExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_equality_expression(node) Cc1::EqualityExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_and_expression(node) Cc1::AndExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_exclusive_or_expression(node) Cc1::ExclusiveOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_inclusive_or_expression(node) Cc1::InclusiveOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_and_expression(node) Cc1::LogicalAndExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_logical_or_expression(node) Cc1::LogicalOrExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_conditional_expression(node) Cc1::ConditionalExpression.new(node.condition.accept(self), node.then_expression.accept(self), node.else_expression.accept(self), Token.new("?", "?", node.location)) end def visit_simple_assignment_expression(node) Cc1::SimpleAssignmentExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_compound_assignment_expression(node) Cc1::CompoundAssignmentExpression.new(node.operator, node.lhs_operand.accept(self), node.rhs_operand.accept(self)) end def visit_comma_separated_expression(node) exprs = node.expressions.map { |expr| expr.accept(self) } transformed = Cc1::CommaSeparatedExpression.new(exprs.shift) exprs.each { |expr| transformed.expressions.push(expr) } transformed end def visit_initializer(node) case when node.expression Cc1::Initializer.new(node.expression.accept(self), nil) when node.initializers Cc1::Initializer.new( nil, node.initializers.map { |i| i.accept(self) }) end end end private_constant :ExpressionTransformer end class W0747 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_short_t end def to_type signed_char_t end end class W0748 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_short_t end def to_type unsigned_char_t end end class W0749 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type signed_char_t end end class W0750 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_int_t end def to_type signed_short_t end end class W0751 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type unsigned_char_t end end class W0752 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_int_t end def to_type unsigned_short_t end end class W0753 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type signed_char_t end end class W0754 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type signed_short_t end end class W0755 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_t end def to_type signed_int_t end end class W0756 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type unsigned_char_t end end class W0757 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type unsigned_short_t end end class W0758 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_t end def to_type unsigned_int_t end end class W0759 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_char_t end end class W0760 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_short_t end end class W0761 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_int_t end end class W0762 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type signed_long_long_t end def to_type signed_long_t end end class W0763 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_char_t end end class W0764 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_short_t end end class W0765 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_int_t end end class W0766 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type unsigned_long_long_t end def to_type unsigned_long_t end end class W0767 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type float_t end end class W0768 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type float_t end end class W0769 < W0119 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type double_t end end class W0771 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:declare_variable) interp.on_explicit_function_declared += T(:declare_function) interp.on_translation_unit_ended += M(:check) @obj_dcls = Hash.new { |hash, key| hash[key] = [] } end private def declare_variable(var_dcl, var) if var.named? && var.declared_as_extern? @obj_dcls[var.name].push(var_dcl) end end def declare_function(fun_dcl, fun) if fun.named? && fun.declared_as_extern? @obj_dcls[fun.name].push(fun_dcl) end end def check(*) @obj_dcls.each_value do |dcls| similar_dcls = dcls.uniq { |dcl| dcl.location.fpath } next unless similar_dcls.size > 1 similar_dcls.each do |dcl| W(dcl.location, dcl.identifier.value, *similar_dcls.map { |pair_dcl| next if pair_dcl == dcl C(:C0001, pair_dcl.location, pair_dcl.identifier.value) }.compact) end end end end class W0774 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type float_t end end class W0775 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type float_t end end class W0776 < W0255 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type long_double_t end def to_type double_t end end class W0777 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_implicit_conv_performed += T(:check) @interp.on_function_started += T(:clear_rvalues) @interp.on_additive_expr_evaled += T(:handle_additive) @interp.on_multiplicative_expr_evaled += T(:handle_multiplicative) @rvalues = nil end private def check(*, orig_var, rslt_var) return unless @rvalues && orig_var.type.floating? case expr = @rvalues[orig_var] when Cc1::AdditiveExpression, Cc1::MultiplicativeExpression if orig_var.type.same_as?(from_type) && rslt_var.type.same_as?(to_type) W(expr.location) end end end def clear_rvalues(*) @rvalues = {} end def handle_additive(expr, *, rslt_var) memorize_rvalue_derivation(rslt_var, expr) end def handle_multiplicative(expr, *, rslt_var) unless expr.operator.type == "%" memorize_rvalue_derivation(rslt_var, expr) end end def memorize_rvalue_derivation(rvalue_holder, expr) @rvalues[rvalue_holder] = expr if @rvalues end def from_type float_t end def to_type double_t end def interpreter @interp end end class W0778 < W0777 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type long_double_t end end class W0779 < W0777 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type long_double_t end end class W0780 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, *) op = expr.operator.type return unless op == "<<" || op == "<<=" if lhs_var.type.unsigned? && constant_expression?(expr) if must_overflow?(lhs_var, rhs_var) W(expr.location) end end end def must_overflow?(lhs_var, rhs_var) unbound_val = lhs_var.value << rhs_var.value lhs_max_val = scalar_value_of(lhs_var.type.max) unbound_val.test_must_be_greater_than(lhs_max_val).true? end def interpreter @interp end end class W0783 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) from_type = orig_var.type.unqualify to_type = rslt_var.type.unqualify return unless from_type.pointer? && to_type.pointer? unless from_type.base_type.void? || to_type.base_type.void? if from_type.base_type.incomplete? || to_type.base_type.incomplete? W(expr.location) end end end end class W0785 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_struct_declared += T(:check) interp.on_union_declared += T(:check) interp.on_enum_declared += T(:check) @tag_names = Set.new end private def check(type_dcl) # NOTE: Unique autogenerated tag name is assigned to the unnamed # struct/union/enum declarations in parsing phase. tag_name = type_dcl.identifier.value W(type_dcl.location, tag_name) if @tag_names.include?(tag_name) @tag_names.add(tag_name) end end class W0786 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_struct_type_declaration += T(:check) traversal.enter_union_type_declaration += T(:check) @interp = phase_ctxt[:cc1_interpreter] end private def check(node) node.struct_declarations.each do |struct_dcl| struct_dcl.items.each do |memb_dcl| type = memb_dcl.type next unless type.scalar? && type.integer? && type.bitfield? unless type.base_type.same_as?(int_t) || type.base_type.same_as?(unsigned_int_t) || type.base_type.same_as?(signed_int_t) W(node.location) return end end end end def interpreter @interp end end class W0787 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:check_object_declaration) interp.on_variable_defined += T(:check_object_declaration) interp.on_explicit_function_declared += T(:check_object_declaration) interp.on_explicit_function_defined += T(:check_object_declaration) interp.on_typedef_declared += T(:check_typedef_declaration) interp.on_enum_declared += T(:check_enum_declaration) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @obj_dcls = [Hash.new { |hash, key| hash[key] = [] }] @typedef_dcls = [Hash.new { |hash, key| hash[key] = [] }] @enum_names = [Hash.new { |hash, key| hash[key] = [] }] @obj_dcls_in_other_scope = Hash.new { |hash, key| hash[key] = [] } @typedef_dcls_in_other_scope = Hash.new { |hash, key| hash[key] = [] } @enum_names_in_other_scope = Hash.new { |hash, key| hash[key] = [] } end private def check_object_declaration(obj_dcl, obj) return unless obj.declared_as_extern? name = obj_dcl.identifier.value type = obj_dcl.type pairs = @obj_dcls_in_other_scope[name].select { |dcl| dcl.type != type } + @typedef_dcls_in_other_scope[name] + @enum_names_in_other_scope[name] unless pairs.empty? W(obj_dcl.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @obj_dcls.last[name].push(obj_dcl) end def check_typedef_declaration(typedef_dcl) name = typedef_dcl.identifier.value type = typedef_dcl.type pairs = @obj_dcls_in_other_scope[name] + @typedef_dcls_in_other_scope[name].select { |dcl| dcl.type != type } + @enum_names_in_other_scope[name] unless pairs.empty? W(typedef_dcl.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @typedef_dcls.last[name].push(typedef_dcl) end def check_enum_declaration(enum_dcl) enum_dcl.enumerators.each { |enum| check_enumerator(enum) } end def check_enumerator(enum) name = enum.identifier.value pairs = @obj_dcls_in_other_scope[name] + @typedef_dcls_in_other_scope[name] + @enum_names_in_other_scope[name] unless pairs.empty? W(enum.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @enum_names.last[name].push(enum) end def enter_scope(*) @obj_dcls.push(Hash.new { |hash, key| hash[key] = [] }) @typedef_dcls.push(Hash.new { |hash, key| hash[key] = [] }) @enum_names.push(Hash.new { |hash, key| hash[key] = [] }) end def leave_scope(*) @obj_dcls.last.each do |name, dcls| @obj_dcls_in_other_scope[name].concat(dcls) end @obj_dcls.pop @typedef_dcls.last.each do |name, dcls| @typedef_dcls_in_other_scope[name].concat(dcls) end @typedef_dcls.pop @enum_names.last.each do |name, enums| @enum_names_in_other_scope[name].concat(enums) end @enum_names.pop end end class W0788 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:check_object_declaration) interp.on_variable_defined += T(:check_object_declaration) interp.on_explicit_function_declared += T(:check_object_declaration) interp.on_explicit_function_defined += T(:check_object_declaration) interp.on_typedef_declared += T(:check_typedef_declaration) interp.on_enum_declared += T(:check_enum_declaration) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @obj_dcls = [Hash.new { |hash, key| hash[key] = [] }] @typedef_dcls = [Hash.new { |hash, key| hash[key] = [] }] @enum_names = [Hash.new { |hash, key| hash[key] = [] }] end private def check_object_declaration(obj_dcl, *) name = obj_dcl.identifier.value type = obj_dcl.type pairs = @obj_dcls.last[name].select { |dcl| dcl.type != type } + @typedef_dcls.last[name] + @enum_names.last[name] unless pairs.empty? W(obj_dcl.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @obj_dcls.last[name].push(obj_dcl) end def check_typedef_declaration(typedef_dcl) name = typedef_dcl.identifier.value type = typedef_dcl.type pairs = @obj_dcls.last[name] + @typedef_dcls.last[name].select { |dcl| dcl.type != type } + @enum_names.last[name] unless pairs.empty? W(typedef_dcl.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @typedef_dcls.last[name].push(typedef_dcl) end def check_enum_declaration(enum_dcl) enum_dcl.enumerators.each { |enum| check_enumerator(enum) } end def check_enumerator(enum) name = enum.identifier.value pairs = @obj_dcls.last[name] + @typedef_dcls.last[name] + @enum_names.last[name] unless pairs.empty? W(enum.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @enum_names.last[name].push(enum) end def enter_scope(*) @obj_dcls.push(Hash.new { |hash, key| hash[key] = [] }) @typedef_dcls.push(Hash.new { |hash, key| hash[key] = [] }) @enum_names.push(Hash.new { |hash, key| hash[key] = [] }) end def leave_scope(*) @obj_dcls.pop @typedef_dcls.pop @enum_names.pop end end class W0789 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:check_object_declaration) interp.on_variable_defined += T(:check_object_declaration) interp.on_explicit_function_declared += T(:check_object_declaration) interp.on_explicit_function_defined += T(:check_object_declaration) interp.on_typedef_declared += T(:check_typedef_declaration) interp.on_enum_declared += T(:check_enum_declaration) interp.on_block_started += T(:enter_scope) interp.on_block_ended += T(:leave_scope) @obj_dcls = [Hash.new { |hash, key| hash[key] = [] }] @typedef_dcls = [Hash.new { |hash, key| hash[key] = [] }] @enum_names = [Hash.new { |hash, key| hash[key] = [] }] end private def check_object_declaration(obj_dcl, *) name = obj_dcl.identifier.value type = obj_dcl.type pairs = merge_upper_scopes(name, @obj_dcls).select { |dcl| dcl.type != type } + merge_upper_scopes(name, @typedef_dcls) + merge_upper_scopes(name, @enum_names) unless pairs.empty? W(obj_dcl.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @obj_dcls.last[name].push(obj_dcl) end def check_typedef_declaration(typedef_dcl) name = typedef_dcl.identifier.value type = typedef_dcl.type pairs = merge_upper_scopes(name, @obj_dcls) + merge_upper_scopes(name, @typedef_dcls).select { |dcl| dcl.type != type } + merge_upper_scopes(name, @enum_names) unless pairs.empty? W(typedef_dcl.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @typedef_dcls.last[name].push(typedef_dcl) end def check_enum_declaration(enum_dcl) enum_dcl.enumerators.each { |enum| check_enumerator(enum) } end def check_enumerator(enum) name = enum.identifier.value pairs = merge_upper_scopes(name, @obj_dcls) + merge_upper_scopes(name, @typedef_dcls) + merge_upper_scopes(name, @enum_names) unless pairs.empty? W(enum.location, name, *pairs.map { |pair| C(:C0001, pair.location, pair.identifier.value) }) end @enum_names.last[name].push(enum) end def enter_scope(*) @obj_dcls.push(Hash.new { |hash, key| hash[key] = [] }) @typedef_dcls.push(Hash.new { |hash, key| hash[key] = [] }) @enum_names.push(Hash.new { |hash, key| hash[key] = [] }) end def leave_scope(*) @obj_dcls.pop @typedef_dcls.pop @enum_names.pop end def merge_upper_scopes(name, scoped_hash) scoped_hash[0..-2].reduce([]) { |scopes, hash| scopes + hash[name] } end end class W0790 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) interp.on_explicit_function_defined += T(:check) @global_names = Hash.new { |hash, key| hash[key] = [] } end private def check(var_or_fun_def, obj) if obj.declared_as_extern? name = var_or_fun_def.identifier if @global_names.include?(name.value) W(var_or_fun_def.location, name.value, *@global_names[name.value].map { |pair_name| C(:C0001, pair_name.location, pair_name.value) }) end @global_names[name.value].push(name) end end end class W0792 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify case when lhs_type.floating? && rhs_type.pointer? && rhs_type.base_type.function? W(expr.location) when rhs_type.floating? && lhs_type.pointer? && lhs_type.base_type.function? W(expr.location) end end end class W0793 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify if lhs_type.pointer? && rhs_type.pointer? case when lhs_type.base_type.void? || rhs_type.base_type.void? # NOTE: Nothing to be done with conversion between `void *' and any # pointer and between `void *' and `void *'. when lhs_type.base_type.function? && !rhs_type.base_type.function?, rhs_type.base_type.function? && !lhs_type.base_type.function? W(expr.location) end end end end class W0794 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_shift_expr_evaled += T(:check) end private def check(expr, lhs_var, *) case expr.operator.type when "<<", "<<=" unless constant_expression?(expr.lhs_operand) W(expr.location) if lhs_var.type.signed? end end end def interpreter @interp end end class W0795 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, arg_vars, *) if proto = prototype_declaration_of(fun) param_types = proto.type.parameter_types if arg_vars.size < param_types.select { |type| !type.void? }.size W(funcall_expr.location) end end end def prototype_declaration_of(fun) fun.declarations_and_definitions.find do |dcl_or_def| dcl_or_def.kind_of?(Cc1::FunctionDeclaration) end end end class W0796 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, arg_vars, *) if proto = prototype_declaration_of(fun) return if proto.type.have_va_list? param_types = proto.type.parameter_types if !param_types.empty? && arg_vars.size > param_types.select { |type| !type.void? }.size W(funcall_expr.location) end end end def prototype_declaration_of(fun) fun.declarations_and_definitions.find do |dcl_or_def| dcl_or_def.kind_of?(Cc1::FunctionDeclaration) end end end class W0797 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(funcall_expr, fun, arg_vars, *) unless prototype_declaration_of(fun) if fun_def = kandr_style_definition_of(fun) case fun_dcr = fun_def.function_declarator when Cc1::KandRFunctionDeclarator param_num = fun_dcr.identifier_list.size else return end W(funcall_expr.location) unless arg_vars.size == param_num end end end def prototype_declaration_of(fun) fun.declarations_and_definitions.find do |dcl_or_def| dcl_or_def.kind_of?(Cc1::FunctionDeclaration) end end def kandr_style_definition_of(fun) fun.declarations_and_definitions.find do |dcl_or_def| dcl_or_def.kind_of?(Cc1::KandRFunctionDefinition) end end end class W0798 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_indirection_expr_evaled += T(:check_indirection) interp.on_member_access_expr_evaled += T(:check_member_access) interp.on_array_subscript_expr_evaled += T(:check_array_subscript) end private def check_indirection(expr, var, *) if var.type.pointer? base_type = var.type.unqualify.base_type if base_type.union? && base_type.incomplete? W(expr.location) end end end def check_member_access(expr, outer_var, *) if outer_var.type.pointer? base_type = outer_var.type.unqualify.base_type if base_type.union? && base_type.incomplete? W(expr.location) end end end def check_array_subscript(expr, ary_or_ptr, *) if ary_or_ptr.type.pointer? base_type = ary_or_ptr.type.unqualify.base_type if base_type.union? && base_type.incomplete? W(expr.location) end end end end class W0799 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_indirection_expr_evaled += T(:check_indirection) interp.on_member_access_expr_evaled += T(:check_member_access) interp.on_array_subscript_expr_evaled += T(:check_array_subscript) end private def check_indirection(expr, var, *) if var.type.pointer? base_type = var.type.unqualify.base_type if base_type.struct? && base_type.incomplete? W(expr.location) end end end def check_member_access(expr, outer_var, *) if outer_var.type.pointer? base_type = outer_var.type.unqualify.base_type if base_type.struct? && base_type.incomplete? W(expr.location) end end end def check_array_subscript(expr, ary_or_ptr, *) if ary_or_ptr.type.pointer? base_type = ary_or_ptr.type.unqualify.base_type if base_type.struct? && base_type.incomplete? W(expr.location) end end end end class W0800 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) end private def check(var_def, var) unless var.declared_as_extern? W(var_def.location, var.name) if var.type.incomplete? end end end class W0810 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_if_statement += T(:enter_outer_if_stmt) traversal.leave_if_statement += T(:leave_outer_if_stmt) traversal.enter_if_else_statement += T(:check_inner_if_else_stmt) @if_stmt_stack = [] end private def enter_outer_if_stmt(if_stmt) @if_stmt_stack.push(if_stmt) end def leave_outer_if_stmt(*) @if_stmt_stack.pop end def check_inner_if_else_stmt(*) if outer_if_stmt = @if_stmt_stack.last and !outer_if_stmt.statement.kind_of?(Cc1::CompoundStatement) W(outer_if_stmt.location) end end end class W0827 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:enter_variable_definition) end private def enter_variable_definition(node) if outmost_init = node.initializer if inits = outmost_init.initializers case when node.type.array? check(node.type.base_type, inits.first) when node.type.struct? node.type.members.zip(inits).each do |memb, init| check(memb.type, init) if init end end end end end def check(type, init) return unless init if inits = init.initializers case when type.array? check(type.base_type, inits.first) when type.struct? type.members.zip(inits).each { |m, i| i and check(m.type, i) } end else W(init.location) if type.struct? end end end class W0828 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:enter_variable_definition) end private def enter_variable_definition(node) if outmost_init = node.initializer if inits = outmost_init.initializers case when node.type.array? check(node.type.base_type, inits.first) when node.type.struct? node.type.members.zip(inits).each do |memb, init| check(memb.type, init) if init end end end end end def check(type, init) return unless init case when inits = init.initializers case when type.array? check(type.base_type, inits.first) when type.struct? type.members.zip(inits).each { |m, i| i and check(m.type, i) } end when init.expression.kind_of?(Cc1::StringLiteralSpecifier) else W(init.location) if type.array? end end end class W0830 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_enum_specifier += T(:check) end private def check(enum_spec) if extra_comma = enum_spec.trailing_comma W(extra_comma.location) end end end class W0833 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_constant_referred += T(:check) end private def check(const_spec, *) if const_spec.constant.value =~ /LL/i W(const_spec.location) end end end class W0834 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: W0834 may be duplicative on a function-definition because # function-definition has both parameter-declarations and # parameter-definitions. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_member_declaration += T(:check_member_decl) traversal.enter_typedef_declaration += T(:check_declspec_holder) traversal.enter_function_declaration += T(:check_declspec_holder) traversal.enter_parameter_declaration += T(:check_declspec_holder) traversal.enter_variable_declaration += T(:check_declspec_holder) traversal.enter_variable_definition += T(:check_declspec_holder) traversal.enter_ansi_function_definition += T(:check_declspec_holder) traversal.enter_kandr_function_definition += T(:check_declspec_holder) traversal.enter_parameter_definition += T(:check_declspec_holder) traversal.enter_type_name += T(:check_type_name) end private def check_member_decl(node) type_specs = node.specifier_qualifier_list.type_specifiers if fst_ts = type_specs.first node.type.accept(Visitor.new(@phase_ctxt, fst_ts.location)) end end def check_type_name(node) type_specs = node.specifier_qualifier_list.type_specifiers if fst_ts = type_specs.first node.type.accept(Visitor.new(@phase_ctxt, fst_ts.location)) end end def check_declspec_holder(dcl_spec_holder) type_specs = dcl_spec_holder.type_specifiers if fst_ts = type_specs.first dcl_spec_holder.type.accept(Visitor.new(@phase_ctxt, fst_ts.location)) end end class Visitor < Cc1::TypeVisitor include ReportUtil def initialize(phase_ctxt, loc) @phase_ctxt = phase_ctxt @location = loc end def visit_long_long_type(*) W(@location) end def visit_signed_long_long_type(*) W(@location) end def visit_unsigned_long_long_type(*) W(@location) end def visit_long_long_int_type(*) W(@location) end def visit_signed_long_long_int_type(*) W(@location) end def visit_unsigned_long_long_int_type(*) W(@location) end def visit_function_type(type) type.return_type.accept(self) end def visit_struct_type(*) end def visit_union_type(*) end private extend Forwardable def_delegator :@phase_ctxt, :report private :report def_delegator :@phase_ctxt, :message_catalog private :message_catalog def suppressors @phase_ctxt[:suppressors] end end private_constant :Visitor end class W0947 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_string_literal_specifier += T(:check) end private def check(str_lit_spec) W(str_lit_spec.location) unless str_lit_spec.literal.replaced? end end class W0948 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_constant_specifier += T(:check) end private def check(const_spec) if const_spec.character? && !const_spec.constant.replaced? W(const_spec.location, const_spec.constant.value) end end end class W0949 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::InterpreterOptions # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_struct_declarator += T(:check) @interp = Cc1::Interpreter.new(phase_ctxt[:cc1_type_table]) end private def check(node) if node.kind_of?(Cc1::StructDeclarator) if expr = node.expression and expr.kind_of?(Cc1::ConstantSpecifier) && !expr.constant.replaced? bitfield_width = compute_bitfield_width(expr) W(expr.location, expr.constant.value) if bitfield_width > 1 end end end def compute_bitfield_width(expr) obj = interpret(expr, QUIET) if obj.variable? && obj.value.scalar? obj.value.unique_sample || 0 else 0 end end def interpreter @interp end end class W0950 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_variable_definition += T(:check) end private def check(var_def) return unless var_def.type.array? dcr = var_def.init_declarator.declarator ary_dcrs = collect_array_declarators(dcr) ary_dcrs.each do |ary_dcr| if expr = ary_dcr.size_expression const_specs = collect_constant_specifiers(expr) if immediate = const_specs.find { |cs| !cs.constant.replaced? } W(immediate.location, immediate.to_s) end end end end end class W1026 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(expr, fun, arg_vars, *) arg_exprs = expr.argument_expressions arg_exprs.zip(arg_vars).each_with_index do |(arg_expr, var), idx| W(arg_expr.location, idx + 1) if var.type.incomplete? end end end class W1027 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) interp.on_variable_declared += T(:check) end private def check(dcl_or_def, var) W(dcl_or_def.location) if var.type.array? && var.type.base_type.function? end end class W1028 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) interp.on_variable_declared += T(:check) end private def check(dcl_or_def, var) if var.type.array? type = var.type.base_type while type.array? if type.length type = type.base_type else W(dcl_or_def.location) break end end end end end class W1029 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) interp.on_variable_declared += T(:check) end private def check(dcl_or_def, var) if var.type.array? if var.type.base_type.composite? || var.type.base_type.void? W(dcl_or_def.location) if var.type.base_type.incomplete? end end end end class W1031 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:declare_variable) interp.on_variable_defined += T(:define_variable) interp.on_explicit_function_declared += T(:declare_function) interp.on_explicit_function_defined += T(:define_function) end private def declare_variable(var_dcl, var) if var.named? case when var.declared_as_extern? sc_spec = var_dcl.storage_class_specifier if sc_spec && sc_spec.type == :STATIC W(var_dcl.location, var.name) end when var.declared_as_static? sc_spec = var_dcl.storage_class_specifier if sc_spec && sc_spec.type == :EXTERN W(var_dcl.location, var.name) end end end end def define_variable(var_def, var) if var.named? case when var.declared_as_extern? sc_spec = var_def.storage_class_specifier if sc_spec && sc_spec.type == :STATIC W(var_def.location, var.name) end when var.declared_as_static? sc_spec = var_def.storage_class_specifier if sc_spec && sc_spec.type == :EXTERN W(var_def.location, var.name) end end end end def declare_function(fun_dcl, fun) if fun.named? case when fun.declared_as_extern? sc_spec = fun_dcl.storage_class_specifier if sc_spec && sc_spec.type == :STATIC W(fun_dcl.location, fun.name) end when fun.declared_as_static? sc_spec = fun_dcl.storage_class_specifier if sc_spec && sc_spec.type == :EXTERN W(fun_dcl.location, fun.name) end end end end def define_function(fun_def, fun) if fun.named? case when fun.declared_as_extern? sc_spec = fun_def.storage_class_specifier if sc_spec && sc_spec.type == :STATIC W(fun_def.location, fun.name) end when fun.declared_as_static? sc_spec = fun_def.storage_class_specifier if sc_spec && sc_spec.type == :EXTERN W(fun_def.location, fun.name) end end end end end class W1032 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) end private def check(var_def, var) if var.declared_as_static? && var.type.incomplete? W(var_def.location, var.name) end end end class W1034 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_function_declaration += T(:check) traversal.enter_compound_statement += T(:enter_block) traversal.leave_compound_statement += T(:leave_block) @block_level = 0 end private def check(dcl) if @block_level > 0 if sc_spec = dcl.storage_class_specifier and sc_spec.type == :STATIC W(dcl.location, dcl.identifier.value) end end end def enter_block(*) @block_level += 1 end def leave_block(*) @block_level -= 1 end end class W1039 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(expr, fun, arg_vars, *) if fun.named? case fun.name when /\A.*printf\z/ check_printf_format(expr, arg_vars) when /\A.*scanf\z/ check_scanf_format(expr, arg_vars) end end end def check_printf_format(expr, arg_vars) if fmt = create_printf_format(expr, arg_vars) fmt.conversion_specifiers.each_with_index do |conv_spec, idx| W(fmt.location, idx + 1) if conv_spec.length_modifier == "ll" end end end def check_scanf_format(expr, arg_vars) if fmt = create_scanf_format(expr, arg_vars) fmt.conversion_specifiers.each_with_index do |conv_spec, idx| W(fmt.location, idx + 1) if conv_spec.length_modifier == "ll" end end end def create_printf_format(expr, arg_vars) if fmt_idx = format_arg_index_of(expr) fmt_arg = expr.argument_expressions[fmt_idx] if fmt_arg && fmt_arg.literal.value =~ /\AL?"(.*)"\z/i loc = fmt_arg.location args = arg_vars[(fmt_idx + 1)..-1] || [] return Cc1::PrintfFormat.new($1, loc, args, @environ) end end nil end def create_scanf_format(expr, arg_vars) if fmt_idx = format_arg_index_of(expr) fmt_arg = expr.argument_expressions[fmt_idx] if fmt_arg && fmt_arg.literal.value =~ /\AL?"(.*)"\z/i loc = fmt_arg.location args = arg_vars[(fmt_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, loc, args, @environ) end end nil end def format_arg_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end end class W1047 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::SyntaxNodeCollector # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_variable_initialized += T(:check) end private def check(var_def, *) type = var_def.type return unless type.struct? || type.union? || type.array? if init = var_def.initializer Cc1::ExpressionExtractor.new.tap { |extr| init.accept(extr) }.expressions.each do |expr| unless constant_expression?(expr) W(var_def.location) break end end end end def interpreter @interp end end class W1049 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.scalar? && orig_type.integer? && rslt_type.scalar? && rslt_type.integer? && rslt_type.signed? return end orig_val = orig_var.value return unless orig_val.scalar? lower_bound = scalar_value_of(rslt_type.min) if orig_val.test_must_be_less_than(lower_bound).false? test = orig_val.test_may_be_less_than(lower_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end end upper_bound = scalar_value_of(rslt_type.max) if orig_val.test_must_be_greater_than(upper_bound).false? test = orig_val.test_may_be_greater_than(upper_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end end def interpreter @interp end end class W1050 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_explicit_conv_performed += T(:check) end private def check(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type unless orig_type.scalar? && orig_type.integer? && rslt_type.scalar? && rslt_type.integer? && rslt_type.signed? return end orig_val = orig_var.value return unless orig_val.scalar? lower_bound = scalar_value_of(rslt_type.min) test = orig_val.test_must_be_less_than(lower_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) return end upper_bound = scalar_value_of(rslt_type.max) test = orig_val.test_must_be_greater_than(upper_bound) if test.true? W(expr.location, *test.evidence.emit_context_messages(self, expr.location)) end end def interpreter @interp end end class W1051 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) @interp.on_additive_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, rslt_var) return unless lhs_var.type.scalar? && lhs_var.type.unsigned? return unless rhs_var.type.scalar? && rhs_var.type.unsigned? return unless lhs_var.value.scalar? && rhs_var.value.scalar? case expr.operator.type when "+" unbound_val = lhs_var.value + rhs_var.value when "-" unbound_val = lhs_var.value - rhs_var.value when "*" unbound_val = lhs_var.value * rhs_var.value else return end lower_test = unbound_val < scalar_value_of(rslt_var.type.min) upper_test = unbound_val > scalar_value_of(rslt_var.type.max) if lower_test.test_must_be_true.true? || upper_test.test_must_be_true.true? W(expr.location, rslt_var.type.brief_image) end end def interpreter @interp end end class W1052 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_multiplicative_expr_evaled += T(:check) @interp.on_additive_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var, rslt_var) return unless lhs_var.type.scalar? && lhs_var.type.unsigned? return unless rhs_var.type.scalar? && rhs_var.type.unsigned? return unless lhs_var.value.scalar? && rhs_var.value.scalar? case expr.operator.type when "+" unbound_val = lhs_var.value + rhs_var.value when "-" unbound_val = lhs_var.value - rhs_var.value when "*" unbound_val = lhs_var.value * rhs_var.value else return end lower_test = unbound_val < scalar_value_of(rslt_var.type.min) upper_test = unbound_val > scalar_value_of(rslt_var.type.max) if !lower_test.test_must_be_true.true? && lower_test.test_may_be_true.true? or !upper_test.test_must_be_true.true? && upper_test.test_may_be_true.true? W(expr.location, rslt_var.type.brief_image) end end def interpreter @interp end end class W1053 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:check) end private def check(expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg_var, param_type), idx| next unless param_type && param_type.enum? arg_expr = expr.argument_expressions[idx] if constant_expression?(arg_expr) W(arg_expr.location) unless arg_var.type.enum? end end end def interpreter @interp end end class W1054 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_assignment_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var) W(expr.location) if lhs_var.type.enum? && !rhs_var.type.enum? end end class W1055 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:start_function) interp.on_function_ended += T(:end_function) interp.on_return_stmt_evaled += T(:check) @cur_fun = nil end private def start_function(*, fun) @cur_fun = fun end def end_function(*) @cur_fun = nil end def check(ret_stmt, ret_var) return unless @cur_fun && ret_var if ret_type = @cur_fun.type.return_type and ret_type.enum? unless ret_var.type.enum? W(ret_stmt.expression.location) end end end end class W1056 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:check) end private def check(expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg_var, param_type), idx| next unless param_type && param_type.enum? arg_expr = expr.argument_expressions[idx] unless constant_expression?(arg_expr) if arg_var.type.enum? W(arg_expr.location) unless arg_var.type.same_as?(param_type) end end end end def interpreter @interp end end class W1057 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_assignment_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var) return unless lhs_var.type.enum? if rhs_var.type.enum? && !constant_expression?(expr.rhs_operand) unless lhs_var.type.same_as?(rhs_var.type) W(expr.location) end end end def interpreter @interp end end class W1058 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_started += T(:start_function) @interp.on_function_ended += T(:end_function) @interp.on_return_stmt_evaled += T(:check) @cur_fun = nil end private def start_function(*, fun) @cur_fun = fun end def end_function(*) @cur_fun = nil end def check(ret_stmt, ret_var) return unless @cur_fun && ret_var return if constant_expression?(ret_stmt.expression) if ret_type = @cur_fun.type.return_type and ret_type.enum? if ret_var.type.enum? && !ret_type.same_as?(ret_var.type) W(ret_stmt.expression.location) end end end def interpreter @interp end end class W1059 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end private def check(expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg_var, param_type), idx| if param_type && !param_type.enum? W(expr.argument_expressions[idx].location) if arg_var.type.enum? end end end end class W1060 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:start_function) interp.on_function_ended += T(:end_function) interp.on_return_stmt_evaled += T(:check) @cur_fun = nil end private def start_function(*, fun) @cur_fun = fun end def end_function(*) @cur_fun = nil end def check(ret_stmt, ret_var) return unless @cur_fun && ret_var if ret_type = @cur_fun.type.return_type and !ret_type.enum? W(ret_stmt.expression.location) if ret_var.type.enum? end end end class W1061 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_call_expr_evaled += T(:check) end private def check(expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg_var, param_type), idx| next unless param_type && param_type.enum? arg_expr = expr.argument_expressions[idx] unless constant_expression?(arg_expr) unless arg_var.type.same_as?(param_type) W(arg_expr.location) end end end end def interpreter @interp end end class W1062 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_assignment_expr_evaled += T(:check) end private def check(expr, lhs_var, rhs_var) if lhs_var.type.enum? && !constant_expression?(expr.rhs_operand) unless lhs_var.type.same_as?(rhs_var.type) W(expr.location) end end end def interpreter @interp end end class W1063 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_function_started += T(:start_function) @interp.on_function_ended += T(:end_function) @interp.on_return_stmt_evaled += T(:check) @cur_fun = nil end private def start_function(*, fun) @cur_fun = fun end def end_function(*) @cur_fun = nil end def check(ret_stmt, ret_var) return unless @cur_fun && ret_var if ret_type = @cur_fun.type.return_type and ret_type.enum? unless constant_expression?(ret_stmt.expression) unless ret_var.type.same_as?(ret_type) W(ret_stmt.expression.location) end end end end def interpreter @interp end end class W1064 < W0731 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(case_stmt, ctrlexpr_var) unless switch_ctrlexpr_var = @switch_ctrlexpr_stack.last return end return unless switch_ctrlexpr_var.type.enum? W(case_stmt.expression.location) unless ctrlexpr_var.type.enum? end end class W1065 < W0731 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(case_stmt, ctrlexpr_var) unless switch_ctrlexpr_var = @switch_ctrlexpr_stack.last return end return unless switch_ctrlexpr_var.type.enum? if ctrlexpr_var.type.enum? expected_type = switch_ctrlexpr_var.type unless ctrlexpr_var.type.same_as?(expected_type) W(case_stmt.expression.location) end end end end class W1071 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:enter_function) interp.on_function_ended += T(:leave_function) interp.on_implicit_return_evaled += M(:memorize_implicit_termination) interp.on_return_stmt_evaled += T(:memorize_termination) @cur_fun = nil @term_points = 0 end private def enter_function(fun_def, *) @cur_fun = fun_def @term_points = 0 end def leave_function(*) if @cur_fun && @term_points > 1 W(@cur_fun.location, @cur_fun.identifier.value) end @cur_fun = nil end def memorize_implicit_termination(loc) if loc.in_analysis_target?(traits) memorize_termination end end def memorize_termination(*) @term_points += 1 if @cur_fun end end class W1073 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:enter_function) interp.on_function_ended += T(:leave_function) interp.on_function_call_expr_evaled += T(:add_return_value) interp.on_variable_value_referred += T(:refer_return_value) @cur_fun = nil @ret_vals = nil end private def enter_function(fun_def, *) @cur_fun = fun_def @ret_vals = {} end def leave_function(*) if @cur_fun @ret_vals.each_value do |rec| unless rec[0] fun_name = rec[2].named? ? rec[2].name : "(anon)" W(rec[1].location, fun_name) end end end @cur_fun = nil @ret_vals = nil end def add_return_value(expr, fun, *, rslt_var) if @cur_fun unless fun.type.return_type.void? @ret_vals[rslt_var] = [false, expr, fun] end end end def refer_return_value(expr, var) if @cur_fun if rec = @ret_vals[var] rec[0] = true end end end end class W1074 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_sizeof_expression += T(:check) end private def check(expr) W(expr.operand.location) if expr.operand.have_side_effect? end end class W1075 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:declare_variable) interp.on_variable_defined += T(:define_variable) interp.on_explicit_function_declared += T(:declare_function) interp.on_explicit_function_defined += T(:define_function) end private def declare_variable(var_dcl, var) if var.named? if var.declared_as_static? sc_spec = var_dcl.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(var_dcl.location, var.name) end end end end def define_variable(var_def, var) if var.named? if var.declared_as_static? sc_spec = var_def.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(var_def.location, var.name) end end end end def declare_function(fun_dcl, fun) if fun.named? if fun.declared_as_static? sc_spec = fun_dcl.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(fun_dcl.location, fun.name) end end end end def define_function(fun_def, fun) if fun.named? if fun.declared_as_static? sc_spec = fun_def.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(fun_def.location, fun.name) end end end end end class W1076 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_function_defined += T(:define_function) end private def define_function(fun_def, fun) if fun.named? && fun.declared_as_static? anterior_dcls = fun.declarations_and_definitions.reject { |dcl| dcl == fun_def } if anterior_dcls.empty? W(fun_def.location, fun.name) end end end end class W1077 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:check) end private def check(var_dcl, *) type = var_dcl.type begin if type.array? unless type.length W(var_dcl.location) break end else break end end while type = type.base_type end end class W9001 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @fpath = phase_ctxt[:sources].first.fpath traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_error_statement += T(:check) traversal.enter_generic_labeled_statement += T(:check) traversal.enter_case_labeled_statement += T(:check) traversal.enter_default_labeled_statement += T(:check) traversal.enter_expression_statement += T(:check) traversal.enter_if_statement += T(:check) traversal.enter_if_else_statement += T(:check) traversal.enter_switch_statement += T(:check) traversal.enter_while_statement += T(:check) traversal.enter_do_statement += T(:check) traversal.enter_for_statement += T(:check) traversal.enter_c99_for_statement += T(:check) traversal.enter_goto_statement += T(:check) traversal.enter_continue_statement += T(:check) traversal.enter_break_statement += T(:check) traversal.enter_return_statement += T(:check) end private def check(node) if @fpath == node.location.fpath W(node.location) unless node.executed? end end end class W9003 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator include Cc1::Conversion # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_implicit_conv_performed += T(:check) end private def check(init_or_expr, orig_var, rslt_var) from_type = orig_var.type to_type = rslt_var.type if from_type.undeclared? || from_type.unresolved? || to_type.undeclared? || to_type.unresolved? return end case init_or_expr when Cc1::Initializer expr = init_or_expr.expression if expr && constant_expression?(expr) if untyped_pointer_conversion?(from_type, to_type, orig_var.value) return end end when Cc1::Expression if constant_expression?(init_or_expr) if untyped_pointer_conversion?(from_type, to_type, orig_var.value) return end end end unless from_type.standard? && to_type.standard? unless from_type.convertible?(to_type) W(init_or_expr.location, from_type.brief_image, to_type.brief_image) end end end def interpreter @interp end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/cc1_check_shima.rb0000644000004100000410000006370312224440633023264 0ustar www-datawww-data# Code checkings (cc1-phase) of adlint-exam-c_builtin package. # # Author:: Rie Shima # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Rie Shima #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/cc1/phase" require "adlint/cc1/syntax" require "adlint/cc1/format" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class W0573 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) @environ = interp.environment end private def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each do |conv_spec| if conv_spec.scanset && conv_spec.scanset.include?("-") W(fmt.location) break end end end end def format_str_index_of(funcall_expr) funcall_expr.argument_expressions.index do |arg_expr| arg_expr.kind_of?(Cc1::StringLiteralSpecifier) end end def create_format(funcall_expr, fmt_str_idx, arg_vars, env) if fmt_str_idx fmt_str = funcall_expr.argument_expressions[fmt_str_idx] if fmt_str && fmt_str.literal.value =~ /\AL?"(.*)"\z/i trailing_args = arg_vars[(fmt_str_idx + 1)..-1] || [] return Cc1::ScanfFormat.new($1, fmt_str.location, trailing_args, env) end end nil end end class W0606 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_union_type_declaration += T(:check) end private def check(node) node.struct_declarations.each do |struct_dcl| struct_dcl.items.each do |memb_dcl| if memb_dcl.type.scalar? && memb_dcl.type.floating? W(node.location) return end end end end end class W0645 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_kandr_function_definition += T(:check) end def check(node) if node.type.parameter_types.any? { |type| type.void? } W(node.location) end end end class W0685 < W0573 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each do |conv_spec| if conv_spec.scanset conv_spec.scanset.scan(/(.)-(.)/).each do |lhs, rhs| W(fmt.location) if lhs.ord > rhs.ord end end end end end end class W0686 < W0573 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def check(funcall_expr, fun, arg_vars, *) if fun.named? && fun.name =~ /\A.*scanf\z/ fmt = create_format(funcall_expr, format_str_index_of(funcall_expr), arg_vars, @environ) return unless fmt fmt.conversion_specifiers.each do |conv_spec| if conv_spec.scanset W(fmt.location) unless conv_spec.valid_scanset? end end end end end class W0697 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:start_function) interp.on_function_ended += T(:end_function) interp.on_implicit_return_evaled += M(:check_implicit_return) @cur_fun = nil end private def start_function(fun_def, *) @cur_fun = fun_def end def end_function(*) @cur_fun = nil end def check_implicit_return(loc) if @cur_fun && loc.in_analysis_target?(traits) unless @cur_fun.type.return_type.void? W(@cur_fun.location, @cur_fun.identifier.value) end end end end class W0698 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:start_function) traversal.enter_kandr_function_definition += T(:start_function) traversal.leave_ansi_function_definition += T(:end_function) traversal.leave_kandr_function_definition += T(:end_function) traversal.enter_return_statement += T(:check) @cur_fun = nil end private def start_function(fun_def) @cur_fun = fun_def end def end_function(*) @cur_fun = nil end def check(ret_stmt) return unless @cur_fun.explicitly_typed? if ret_type = @cur_fun.type.return_type if !ret_type.void? && ret_stmt.expression.nil? W(ret_stmt.location, @cur_fun.identifier.value) end end end end class W0699 < W0698 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(ret_stmt) return unless @cur_fun.implicitly_typed? if ret_stmt.expression.nil? W(ret_stmt.location, @cur_fun.identifier.value) end end end class W0700 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_started += T(:start_function) interp.on_function_ended += T(:end_function) interp.on_return_stmt_evaled += T(:check_explicit_return) interp.on_implicit_return_evaled += M(:check_implicit_return) @cur_fun = nil end private def start_function(fun_def, *) @cur_fun = fun_def end def end_function(*) @cur_fun = nil end def check_explicit_return(ret_stmt, *) if @cur_fun if @cur_fun.implicitly_typed? && ret_stmt.expression.nil? W(@cur_fun.location, @cur_fun.identifier.value) end end end def check_implicit_return(loc) if @cur_fun && loc.in_analysis_target?(traits) if @cur_fun.implicitly_typed? W(@cur_fun.location, @cur_fun.identifier.value) end end end end class W0711 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_relational_expression += T(:check) end private def check(expr) if !expr.lhs_operand.logical? && expr.rhs_operand.logical? W(expr.rhs_operand.location) end end end class W0712 < W0711 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(expr) if expr.lhs_operand.logical? && !expr.rhs_operand.logical? W(expr.lhs_operand.location) end end end class W0713 < W0711 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(expr) if expr.lhs_operand.logical? && expr.rhs_operand.logical? W(expr.location) end end end class W0714 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_and_expression += T(:check) end private def check(expr) if expr.lhs_operand.logical? && expr.rhs_operand.logical? W(expr.location) end end end class W0715 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_inclusive_or_expression += T(:check) end private def check(expr) if expr.lhs_operand.logical? && expr.rhs_operand.logical? W(expr.location) end end end class W0716 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_additive_expression += T(:check) traversal.enter_multiplicative_expression += T(:check) traversal.enter_shift_expression += T(:check) traversal.enter_and_expression += T(:check) traversal.enter_exclusive_or_expression += T(:check) traversal.enter_inclusive_or_expression += T(:check) traversal.enter_compound_assignment_expression += T(:check) end private def check(expr) if expr.lhs_operand.logical? && expr.rhs_operand.logical? W(expr.location) end end end class W0717 < W0716 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(expr) if expr.lhs_operand.logical? && !expr.rhs_operand.logical? W(expr.lhs_operand.location) end end end class W0718 < W0716 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(expr) if !expr.lhs_operand.logical? && expr.rhs_operand.logical? W(expr.rhs_operand.location) end end end class W0726 < W0698 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(ret_stmt) if ret_stmt.expression if ret_type = @cur_fun.type.return_type if ret_type.void? && (ret_type.const? || ret_type.volatile?) W(ret_stmt.location, @cur_fun.identifier.value) end end end end end class W0732 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_logical_and_expression += T(:check) end private def check(expr) if expr.lhs_operand.arithmetic? || expr.lhs_operand.bitwise? if expr.rhs_operand.arithmetic? || expr.rhs_operand.bitwise? W(expr.location) end end end end class W0733 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_logical_or_expression += T(:check) end private def check(expr) if expr.lhs_operand.arithmetic? || expr.lhs_operand.bitwise? if expr.rhs_operand.arithmetic? || expr.rhs_operand.bitwise? W(expr.location) end end end end class W0734 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_logical_and_expression += T(:check) traversal.enter_logical_or_expression += T(:check) end private def check(expr) if expr.lhs_operand.arithmetic? || expr.lhs_operand.bitwise? unless expr.rhs_operand.arithmetic? || expr.rhs_operand.bitwise? W(expr.lhs_operand.location) end end end end class W0735 < W0734 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(expr) if expr.rhs_operand.arithmetic? || expr.rhs_operand.bitwise? unless expr.lhs_operand.arithmetic? || expr.lhs_operand.bitwise? W(expr.rhs_operand.location) end end end end class W0781 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_switch_statement += T(:enter_switch_statement) traversal.leave_switch_statement += T(:check) traversal.enter_case_labeled_statement += T(:add_exec_path) traversal.enter_default_labeled_statement += T(:add_exec_path) @exec_path_nums = [] end private def enter_switch_statement(*) @exec_path_nums.push(0) end def check(node) if exec_path_num = @exec_path_nums.last and exec_path_num < 2 W(node.location) end @exec_path_nums.pop end def add_exec_path(node) @exec_path_nums[-1] += 1 if node.executed? end end class W0801 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_struct_type_declaration += T(:check) traversal.enter_union_type_declaration += T(:check) end private def check(node) W(node.location) if node.type.members.empty? end end class W0809 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_function_declaration += T(:check_function_name) traversal.enter_variable_declaration += T(:check_variable_name) traversal.enter_variable_definition += T(:check_variable_name) traversal.enter_parameter_definition += T(:check_variable_name) traversal.enter_typedef_declaration += T(:check_typedef_name) traversal.enter_struct_type_declaration += T(:check_tag_name) traversal.enter_union_type_declaration += T(:check_tag_name) traversal.enter_enum_type_declaration += T(:check_tag_name) traversal.enter_enumerator += T(:check_enumerator_name) traversal.enter_kandr_function_definition += T(:enter_function) traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) traversal.leave_ansi_function_definition += T(:leave_function) @function_def_level = 0 end private def check_function_name(fun_dcl) check_object_name(fun_dcl) end def check_variable_name(var_dcl_or_def) check_object_name(var_dcl_or_def) end def check_typedef_name(typedef_dcl) if typedef_dcl.identifier case name = typedef_dcl.identifier.value when /\A__/, /\A_[A-Z]/, /\A_/ W(typedef_dcl.location, name) end end end def check_tag_name(type_dcl) if type_dcl.identifier case name = type_dcl.identifier.value when /\A__adlint/ # NOTE: To ignore AdLint internal tag names. when /\A__/, /\A_[A-Z]/, /\A_/ W(type_dcl.location, name) end end end def check_enumerator_name(enum) if enum.identifier case name = enum.identifier.value when /\A__/, /\A_[A-Z]/, /\A_/ W(enum.location, name) end end end def enter_function(node) check_object_name(node) @function_def_level += 1 end def leave_function(node) @function_def_level -= 1 end def check_object_name(dcl_or_def) if dcl_or_def.identifier case name = dcl_or_def.identifier.value when /\A__/, /\A_[A-Z]/ W(dcl_or_def.location, name) when /\A_/ check_filelocal_object_name(name, dcl_or_def) end end end def check_filelocal_object_name(name, dcl_or_def) if @function_def_level == 0 if sc_spec = dcl_or_def.storage_class_specifier if sc_spec.type == :STATIC W(dcl_or_def.location, name) end end end end end class W1030 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_generic_labeled_statement += T(:check) traversal.enter_ansi_function_definition += T(:enter_function) traversal.leave_ansi_function_definition += T(:leave_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.leave_kandr_function_definition += T(:leave_function) @labels = nil end private def check(labeled_stmt) if @labels if @labels.include?(labeled_stmt.label.value) W(labeled_stmt.label.location, labeled_stmt.label.value) else @labels.add(labeled_stmt.label.value) end end end def enter_function(*) @labels = Set.new end def leave_function(*) @labels = nil end end class W1033 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:check) traversal.enter_kandr_function_definition += T(:check) traversal.enter_function_declaration += T(:check) end private def check(dcl_or_def) if ret_type = dcl_or_def.type.return_type if ret_type.const? || ret_type.volatile? W(dcl_or_def.location) end end end end class W1066 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase include Cc1::InterpreterMediator # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super @interp = phase_ctxt[:cc1_interpreter] @interp.on_explicit_conv_performed += T(:check) @interp.on_function_started += T(:clear_rvalues) @interp.on_additive_expr_evaled += T(:handle_additive) @interp.on_multiplicative_expr_evaled += T(:handle_multiplicative) @rvalues = nil end private def check(*, orig_var, rslt_var) return unless @rvalues && orig_var.type.floating? case expr = @rvalues[orig_var] when Cc1::AdditiveExpression, Cc1::MultiplicativeExpression if orig_var.type.same_as?(from_type) && rslt_var.type.same_as?(to_type) W(expr.location) end end end def clear_rvalues(*) @rvalues = {} end def handle_additive(expr, *, rslt_var) memorize_rvalue_derivation(rslt_var, expr) end def handle_multiplicative(expr, *, rslt_var) unless expr.operator.type == "%" memorize_rvalue_derivation(rslt_var, expr) end end def memorize_rvalue_derivation(rvalue_holder, expr) @rvalues[rvalue_holder] = expr if @rvalues end def from_type float_t end def to_type double_t end def interpreter @interp end end class W1067 < W1066 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type float_t end def to_type long_double_t end end class W1068 < W1066 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def from_type double_t end def to_type long_double_t end end class W1069 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_ansi_function_definition += T(:enter_function) traversal.enter_kandr_function_definition += T(:enter_function) traversal.enter_compound_statement += T(:enter_compound_stmt) traversal.leave_compound_statement += T(:leave_compound_stmt) traversal.enter_if_else_statement += T(:enter_if_else_stmt) traversal.leave_if_else_statement += T(:leave_if_else_stmt) @if_else_stmt_chain_stack = [] end private def enter_function(*) @if_else_stmt_chain_stack = [] end def enter_compound_stmt(*) @if_else_stmt_chain_stack.push([]) end def leave_compound_stmt(*) @if_else_stmt_chain_stack.pop end def enter_if_else_stmt(node) @if_else_stmt_chain_stack.last.push(node) if node.else_statement.kind_of?(Cc1::IfStatement) W(@if_else_stmt_chain_stack.last.first.location) end end def leave_if_else_stmt(*) @if_else_stmt_chain_stack.last.pop end end class W1070 < W0781 def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique private def check(node) if exec_path_num = @exec_path_nums.last and exec_path_num == 2 W(node.location) end @exec_path_nums.pop end def add_exec_path(*) @exec_path_nums[-1] += 1 end end class W1072 < PassiveCodeCheck def_registrant_phase Cc1::Prepare2Phase # NOTE: All messages of cc1-phase code check should be unique till function # step-in analysis is supported. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cc1_ast_traversal] traversal.enter_goto_statement += T(:warn_goto) end private def warn_goto(node) W(node.location) end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/cpp_check_shima.rb0000644000004100000410000001265712224440633023402 0ustar www-datawww-data# Code checkings (cpp-phase) of adlint-exam-c_builtin package. # # Author:: Rie Shima # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Rie Shima #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/cpp/phase" require "adlint/cpp/macro" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class W0687 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0687 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_macro_undefined += T(:check) end private def check(undef_line, *) if undef_line.identifier.value == "defined" W(undef_line.identifier.location) end end end class W0688 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0688 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_line_line += T(:check) end private def check(line_line) if line_no_arg = line_no_argument(line_line) line_no = Integer(line_no_arg.value) unless line_no > 0 && line_no < 32768 W(line_no_arg.location) end end rescue end def line_no_argument(line_line) line_line.pp_tokens ? line_line.pp_tokens.tokens.first : nil end end class W0689 < W0688 def_registrant_phase Cpp::Prepare2Phase # NOTE: W0689 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique private def check(line_line) if fname_arg = file_name_argument(line_line) unless fname_arg.value =~ /\A".*"\z/ W(fname_arg.location) end end end def file_name_argument(line_line) line_line.pp_tokens ? line_line.pp_tokens.tokens[1] : nil end end class W0690 < W0688 def_registrant_phase Cpp::Prepare2Phase # NOTE: W0690 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique private def check(line_line) if line_no_arg = line_no_argument(line_line) Integer(line_no_arg.value) end rescue W(line_no_arg.location) end end class W0695 < W0687 def_registrant_phase Cpp::Prepare2Phase # NOTE: W0695 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique private def check(undef_line, *) if undef_line.identifier.value == "assert" W(undef_line.identifier.location) end end end class W0806 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0806 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_object_like_macro_defined += T(:check) end private def check(define_line, *) if define_line.identifier.value == "defined" W(define_line.identifier.location) end end end class W0807 < W0687 def_registrant_phase Cpp::Prepare2Phase # NOTE: W0807 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique private def check(undef_line, macro) if macro.kind_of?(Cpp::SpecialMacro) identifier = undef_line.identifier W(identifier.location, identifier.value) end end end class W0808 < PassiveCodeCheck def_registrant_phase Cpp::Prepare2Phase # NOTE: W0808 may be duplicative when the same header which causes this # warning is included twice or more. mark_as_unique def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_object_like_macro_defined += T(:check) @macro_tbl = phase_ctxt[:cpp_macro_table] end private def check(define_line, *) id = define_line.identifier W(id.location, id.value) if @macro_tbl.lookup(id.value) end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin/cpp_code.rb0000644000004100000410000001502512224440633022046 0ustar www-datawww-data# Code structure extractions (cpp-phase) of adlint-exam-c_builtin package. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint/exam" require "adlint/report" require "adlint/cpp/phase" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: class ObjLikeMacroExtraction < CodeExtraction def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_object_like_macro_defined += T(:extract) end private def do_prepare(*) end def do_execute(*) end def extract(define_line, macro) MACRODEF(define_line.location, macro.name.value, "O") end end class FunLikeMacroExtraction < CodeExtraction def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_function_like_macro_defined += T(:extract) interp.on_va_function_like_macro_defined += T(:extract) end private def do_prepare(*) end def do_execute(*) end def extract(define_line, macro) MACRODEF(define_line.location, macro.name.value, "F") end end class IncludeDirectiveExtraction < CodeExtraction def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_system_header_included += T(:extract_system_include) interp.on_user_header_included += T(:extract_user_include) end private def do_prepare(*) end def do_execute(*) end def extract_system_include(sys_include_line, sys_header) INCLUDE(sys_include_line.location, "<#{sys_header.fpath}>") end def extract_user_include(usr_include_line, usr_header) INCLUDE(usr_include_line.location, "\"#{usr_header.fpath}\"") end end class DirectiveExtraction < CodeExtraction def_registrant_phase Cpp::Prepare2Phase def initialize(phase_ctxt) super traversal = phase_ctxt[:cpp_ast_traversal] traversal.enter_if_statement += T(:extract_if) traversal.enter_ifdef_statement += T(:extract_ifdef) traversal.enter_ifndef_statement += T(:extract_ifndef) traversal.enter_elif_statement += T(:extract_elif) traversal.enter_else_statement += T(:extract_else) traversal.enter_endif_line += T(:extract_endif) traversal.enter_user_include_line += T(:extract_usr_include) traversal.enter_system_include_line += T(:extract_sys_include) traversal.enter_object_like_define_line += T(:extract_define) traversal.enter_function_like_define_line += T(:extract_define) traversal.enter_va_function_like_define_line += T(:extract_define) traversal.enter_undef_line += T(:extract_undef) traversal.enter_line_line += T(:extract_line) traversal.enter_error_line += T(:extract_error) traversal.enter_pragma_line += T(:extract_pragma) traversal.enter_null_directive += T(:extract_null) end private def do_prepare(*) end def do_execute(*) end def extract_if(if_stmt) PP_DIRECTIVE(if_stmt.location, if_stmt.keyword.value, if_stmt.expression.to_s) end def extract_ifdef(ifdef_stmt) PP_DIRECTIVE(ifdef_stmt.location, ifdef_stmt.keyword.value, ifdef_stmt.identifier.value) end def extract_ifndef(ifndef_stmt) PP_DIRECTIVE(ifndef_stmt.location, ifndef_stmt.keyword.value, ifndef_stmt.identifier.value) end def extract_elif(elif_stmt) PP_DIRECTIVE(elif_stmt.location, elif_stmt.keyword.value, elif_stmt.expression.to_s) end def extract_else(else_stmt) PP_DIRECTIVE(else_stmt.location, else_stmt.keyword.value, nil) end def extract_endif(endif_line) PP_DIRECTIVE(endif_line.location, endif_line.keyword.value, nil) end def extract_usr_include(usr_include_line) PP_DIRECTIVE(usr_include_line.location, usr_include_line.keyword.value, usr_include_line.header_name.value) end def extract_sys_include(sys_include_line) PP_DIRECTIVE(sys_include_line.location, sys_include_line.keyword.value, sys_include_line.header_name.value) end def extract_define(define_line) PP_DIRECTIVE(define_line.location, define_line.keyword.value, define_line.identifier.value) end def extract_undef(undef_line) PP_DIRECTIVE(undef_line.location, undef_line.keyword.value, undef_line.identifier.value) end def extract_line(line_line) PP_DIRECTIVE(line_line.location, line_line.keyword.value, line_line.pp_tokens ? line_line.pp_tokens.to_s : "") end def extract_error(error_line) PP_DIRECTIVE(error_line.location, error_line.keyword.value, error_line.pp_tokens.tokens.map { |t| t.value }.join(" ")) end def extract_pragma(pragma_line) PP_DIRECTIVE(pragma_line.location, pragma_line.keyword.value, pragma_line.pp_tokens ? pragma_line.pp_tokens.to_s : "") end def extract_null(null_directive) PP_DIRECTIVE(null_directive.location, null_directive.token.value, nil) end end end end end adlint-3.2.0/lib/adlint/exam/c_builtin.rb0000644000004100000410000002741412224440633020277 0ustar www-datawww-data# adlint-exam-c_builtin examination package loader. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "adlint" require "adlint/exam/c_builtin/cc1_code" require "adlint/exam/c_builtin/cc1_check" require "adlint/exam/c_builtin/cc1_check_shima" require "adlint/exam/c_builtin/cc1_metric" require "adlint/exam/c_builtin/cpp_code" require "adlint/exam/c_builtin/cpp_check" require "adlint/exam/c_builtin/cpp_check_shima" require "adlint/exam/c_builtin/ld_check" require "adlint/exam/c_builtin/ld_metric" module AdLint #:nodoc: module Exam #:nodoc: module CBuiltin #:nodoc: Catalog = ExaminationCatalog.new(__FILE__) do |cat| cat.name = "c_builtin" cat.major_version = MAJOR_VERSION cat.minor_version = MINOR_VERSION cat.patch_version = PATCH_VERSION cat.release_date = RELEASE_DATE cat.examination_classes = [ W0001_Cc1, W0001_Cpp, W0002, W0003, W0007, W0010, W0013, W0016, W0017, W0018, W0019, W0021, W0023, W0024, W0025, W0026, W0027, W0028, W0030, W0031, W0033, W0035, W0036, W0037, W0038, W0039, W0040, W0041, W0042, W0043, W0049, W0050, W0051, W0052, W0053, W0054, W0055, W0056, W0057, W0058, W0059, W0060, W0061, W0062, W0063, W0064, W0065, W0066, W0067, W0068, W0069, W0070, W0071, W0072, W0073, W0076, W0077, W0078, W0079, W0080, W0081, W0082, W0084, W0085, W0086, W0087, W0088, W0093, W0096, W0097, W0100, W0101, W0102, W0103, W0104, W0105, W0107, W0108, W0109, W0110, W0112, W0114, W0115, W0116, W0117, W0118, W0119, W0120, W0121, W0122, W0123, W0124, W0125, W0126, W0127, W0128, W0129, W0130, W0131, W0132, W0133, W0134, W0135, W0136, W0137, W0138, W0139, W0140, W0141, W0142, W0143, W0144, W0145, W0146, W0147, W0148, W0149, W0150, W0151, W0152, W0153, W0154, W0155, W0156, W0157, W0158, W0159, W0160, W0161, W0162, W0163, W0164, W0165, W0166, W0167, W0168, W0169, W0170, W0171, W0172, W0173, W0174, W0175, W0176, W0177, W0178, W0179, W0180, W0181, W0182, W0183, W0184, W0185, W0186, W0187, W0188, W0189, W0190, W0191, W0192, W0193, W0194, W0195, W0196, W0197, W0198, W0199, W0200, W0201, W0202, W0203, W0204, W0205, W0206, W0207, W0208, W0209, W0210, W0211, W0212, W0213, W0214, W0215, W0216, W0217, W0218, W0219, W0220, W0221, W0222, W0223, W0224, W0225, W0226, W0227, W0228, W0229, W0230, W0231, W0232, W0233, W0234, W0235, W0236, W0237, W0238, W0239, W0240, W0241, W0242, W0243, W0244, W0245, W0246, W0247, W0248, W0249, W0250, W0251, W0252, W0253, W0254, W0255, W0256, W0257, W0258, W0259, W0260, W0261, W0262, W0263, W0264, W0265, W0266, W0267, W0268, W0269, W0270, W0271, W0272, W0273, W0274, W0275, W0276, W0277, W0278, W0279, W0280, W0281, W0282, W0283, W0284, W0285, W0286, W0287, W0288, W0289, W0290, W0291, W0292, W0293, W0294, W0295, W0296, W0297, W0298, W0299, W0300, W0301, W0302, W0303, W0304, W0305, W0306, W0307, W0308, W0309, W0310, W0311, W0312, W0313, W0314, W0315, W0316, W0317, W0318, W0319, W0320, W0321, W0322, W0323, W0324, W0325, W0326, W0327, W0328, W0329, W0330, W0331, W0332, W0333, W0334, W0335, W0336, W0337, W0338, W0339, W0340, W0341, W0342, W0343, W0344, W0345, W0346, W0347, W0348, W0349, W0350, W0351, W0352, W0353, W0354, W0355, W0356, W0357, W0358, W0359, W0360, W0361, W0362, W0363, W0364, W0365, W0366, W0367, W0368, W0369, W0370, W0371, W0372, W0373, W0374, W0375, W0376, W0377, W0378, W0379, W0380, W0381, W0382, W0383, W0384, W0385, W0386, W0387, W0388, W0389, W0390, W0391, W0392, W0393, W0394, W0395, W0396, W0397, W0398, W0399, W0400, W0401, W0402, W0403, W0404, W0405, W0406, W0407, W0408, W0409, W0410, W0411, W0413, W0414, W0421, W0422, W0423, W0424, W0425, W0431, W0432, W0440, W0441, W0442, W0443, W0444, W0445, W0446, W0447, W0456, W0457, W0458, W0459, W0460, W0461, W0462, W0477, W0478, W0479, W0480, W0481, W0482, W0483, W0488, W0489, W0490, W0491, W0492, W0493, W0495, W0496, W0497, W0498, W0499, W0500, W0501, W0502, W0508, W0511, W0512, W0525, W0528, W0529, W0530, W0532, W0534, W0535, W0538, W0540, W0541, W0542, W0543, W0544, W0546, W0549, W0551, W0552, W0553, W0554, W0555, W0556, W0559, W0560, W0561, W0562, W0563, W0564, W0565, W0566, W0567, W0568, W0569, W0570, W0571, W0572, W0573, W0574, W0575, W0576, W0577, W0578, W0579, W0580, W0581, W0582, W0583, W0584, W0585, W0586, W0589, W0591, W0593, W0597, W0598, W0599, W0600, W0605, W0606, W0607, W0608, W0609, W0610, W0611, W0612, W0613, W0614, W0622, W0623, W0624, W0625, W0626, W0627, W0628, W0629, W0632, W0633, W0634, W0635, W0636, W0637, W0638, W0639, W0640, W0641, W0642, W0643, W0644, W0645, W0646, W0649, W0650, W0653, W0654, W0655, W0656, W0657, W0658, W0659, W0660, W0661, W0662, W0663, W0664, W0665, W0666, W0667, W0668, W0669, W0670, W0671, W0672, W0673, W0674, W0675, W0676, W0677, W0678, W0679, W0680, W0681, W0682, W0683, W0684, W0685, W0686, W0687, W0688, W0689, W0690, W0691, W0692, W0694, W0695, W0696, W0697, W0698, W0699, W0700, W0703, W0704, W0705, W0707, W0708, W0711, W0712, W0713, W0714, W0715, W0716, W0717, W0718, W0719, W0720, W0721, W0722, W0723, W0726, W0727, W0728, W0729, W0730, W0731, W0732, W0733, W0734, W0735, W0736, W0737, W0738, W0739, W0740, W0741, W0742, W0743, W0744, W0745, W0747, W0748, W0749, W0750, W0751, W0752, W0753, W0754, W0755, W0756, W0757, W0758, W0759, W0760, W0761, W0762, W0763, W0764, W0765, W0766, W0767, W0768, W0769, W0770, W0771, W0774, W0775, W0776, W0777, W0778, W0779, W0780, W0781, W0783, W0785, W0786, W0787, W0788, W0789, W0790, W0791, W0792, W0793, W0794, W0795, W0796, W0797, W0798, W0799, W0800, W0801, W0804, W0805, W0806, W0807, W0808, W0809, W0810, W0811, W0827, W0828, W0830, W0831, W0832, W0833, W0834, W0947, W0948, W0949, W0950, W1026, W1027, W1028, W1029, W1030, W1031, W1032, W1033, W1034, W1037, W1039, W1040, W1041, W1046, W1047, W1049, W1050, W1051, W1052, W1053, W1054, W1055, W1056, W1057, W1058, W1059, W1060, W1061, W1062, W1063, W1064, W1065, W1066, W1067, W1068, W1069, W1070, W1071, W1072, W1073, W1074, W1075, W1076, W1077, W9001, W9002, W9003, FL_STMT, FL_FUNC, FN_STMT, FN_UNRC, FN_LINE, FN_PARA, FN_UNUV, FN_CSUB, FN_GOTO, FN_RETN, FN_UELS, FN_NEST, FN_PATH, FN_CYCM, FN_CALL, TypeDeclExtraction, GVarDeclExtraction, FunDclExtraction, VarDefExtraction, FunDefExtraction, LabelDefExtraction, InitializationExtraction, AssignmentExtraction, FuncallExtraction, XRefExtraction, LiteralExtraction, ObjLikeMacroExtraction, FunLikeMacroExtraction, IncludeDirectiveExtraction, DirectiveExtraction ] end end end end adlint-3.2.0/lib/adlint.rb0000644000004100000410000000447612224440633015400 0ustar www-datawww-data# AdLint package loader. # # Author:: Yutaka Yanoh # Copyright:: Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # License:: GPLv3+: GNU General Public License version 3 or later # # Owner:: Yutaka Yanoh #-- # ___ ____ __ ___ _________ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint # / __ |/ /_/ / /___/ / /| / / / # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. # # This file is part of AdLint. # # AdLint is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # AdLint. If not, see . # #++ require "pp" require "pathname" require "fileutils" require "set" require "csv" require "psych" require "yaml" require "strscan" require "stringio" require "forwardable" require "logger" require "adlint/memo" require "adlint/prelude" require "adlint/analyzer" require "adlint/annot" require "adlint/code" require "adlint/exam" require "adlint/traits" require "adlint/driver" require "adlint/error" require "adlint/lang" require "adlint/lexer" require "adlint/message" require "adlint/metric" require "adlint/monitor" require "adlint/phase" require "adlint/report" require "adlint/source" require "adlint/supp" require "adlint/symbol" require "adlint/location" require "adlint/token" require "adlint/util" require "adlint/version" require "adlint/cpp" require "adlint/cc1" require "adlint/ld" module AdLint #:nodoc: Config = Hash.new Config[:libdir] = Pathname.new(__FILE__).realpath.dirname Config[:prefix] = Pathname.new("..").expand_path(Config[:libdir]) Config[:bindir] = Pathname.new("bin").expand_path(Config[:prefix]) Config[:etcdir] = Pathname.new("etc").expand_path(Config[:prefix]) end adlint-3.2.0/NEWS0000644000004100000410000005772112224440633013532 0ustar www-datawww-data-- ___ ____ __ ___ _________ / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer / /| | / / / / / / / |/ / / / AdLint - Advanced Lint / __ |/ /_/ / /___/ / /| / / / /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2013, OGIS-RI Co.,Ltd. This file is part of AdLint. AdLint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AdLint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AdLint. If not, see . ++ === \AdLint 3.2.0 is released (2013-08-28) ==== Changes since the 3.0.10 release * Support experimental context-tracing feature so that the warning message can be complemented with the context messages See the file {ChangeLog}[https://github.com/yanoh/adlint/blob/master/ChangeLog] for more details. === \AdLint 3.0.10 is released (2013-06-28) ==== Changes since the 3.0.8 release * Fix incomplete identifier to typedef name translation when the declaring enumerator name is conflicting with the prior typedef name * Add missing comment handling in the initial state of the preprocessing lexer * Fix evaluation of the global constant variable definition in order not to ignore value of the initializer * Revise pointer dereferencing behavior to successfully dereference a pointer only when the value of pointer variable is definite * Improve heuristics of array subscript evaluation with indefinite subscript * Fix controlling-expression deduction of iteration-statements in order to adopt the ordinary expression when no control breaking condition is found in the iteration body * Remove unnecessary controlling expression evaluation at entering a do-statement * Fix value-domain thinning condition to thin domains discarded by a break-statement in the iteration * Fix bypassing inner-variable's value mutation in order to correctly propagate mutation to the outer-variable === \AdLint 3.0.8 is released (2013-05-31) ==== Changes since the 3.0.4 release * Fix abend problem of preprocessor when a block comment is not terminated in the translation-unit * Fix block comment handling in order not to dive into nested part when a single slash character appears before the comment terminator * Fix infinite-loop problem of preprocessor when the #include directive appears with undefined macro * Fix bad expression-constancy check in order to treat an expression derives an address-constant as a constant-expression * Fix bad variable defining behavor in order to correctly evaluate sizeof-expression that refers defining variable in the initializer * Revise specification of W0642 code check in order to warn about all the illegal address derivation from the object declared as `register' * Fix abend problem in parsing unnamed bit-field declaration * Fix W0786 code check in order not to warn when a typedefed type which is same as signed or unsigned int is specified as a base of the bit-field * Fix incomplete object cross-reference extraction in order to record object references within global scope in case of global function table initialization * Fix incomplete object cross-reference graph and function call graph in order to correctly warn about useless objects * Fix bad `##' operator evaluation in order to comply with the ISO C99 standard === \AdLint 3.0.4 is released (2013-04-12) ==== Changes since the 3.0.2 release * Fix abend problem of adlint_chk command === \AdLint 3.0.2 is released (2013-04-12) ==== Changes since the 3.0.0 release * Add missing transparency between a pointer to array and an array variable in expression evaluation * Add missing transparency between a pointer function and a function in expression evaluation * Clarify W0100 message text === \AdLint 3.0.0 is released (2013-03-27) ==== Changes since the 2.6.14 release * Support pathname based code-exam selection * Support message-class based code-check selection * Support annotation based message suppression * Add new field indicates whether the function is declared implicitly or explicitly to DCL(F) record of the metrics file * Improve library interface to support concurrent analysis * Fix W0003 code check not to misunderstand that the switch-statement has no default clause when the switch-statement contains consecutive case and default labels * Fix W1061 code check in order to warn when an enum type of the argument expression is not consistent to one of the corresponding parameter * Fix W1062 code check in order to warn when an enum type of the rhs operand is not consistent to one of the lhs operand * Fix W1063 code check in order to warn when the function returns value of non-constant inconsistent enum-typed expression * Fix W0023 code check in order to warn only when the pointer operand appears in an arithmetic expressions * Fix W1073 code check in order no to warn when a function-call-expression is specified as the controlling expression of switch-statement * Fix bad fall-through logic of switch-statement * Fix missing literal_prefix of LIT record for the octal-constant * Fix bad value domain management in order to correctly thin a value domain of the terminating execution path * Support Ruby 2.0.0-p0 === \AdLint 2.6.14 is released (2012-12-17) ==== Changes since the 2.6.12 release * Revise specification of code checks about implicit conversion from or to `char' type to clarify warning's intention * Improve the library interface to easily integrate \AdLint with other products * Support lint and \AdLint specific predefined macros; `__LINT__', `lint', `__lint', `__lint__', `__ADLINT__', `adlint', `__adlint' and `__adlint__' * Revise code checks' output specification of W0051, W0052, W0491, W0492, W0703, W0704, W0770, W0771, W0787, W0788, W0789, W0790 and W1037 to add context messages telling where is the problematic pair identifiers === \AdLint 2.6.12 is released (2012-11-29) ==== Changes since the 2.6.10 release * Fix abend problem of huge integer-constant evaluation * Correct to run on Ruby 2.0.0dev (r37962) without warnings === \AdLint 2.6.10 is released (2012-11-08) ==== Changes since the 2.6.2 release * Fix code checks so that duplicative messages of the same ID at the same location can be unique till the function step-in analysis is supported * Fix W1069 detection to output a warning message at correct location when an incomplete if-else statements chain appears in a complete if-else-statement * Fix W0708 detection not to warn when an address of the controlling variable is passes to a function in the controlling part of for-statement * Fix W0534, W0585, W0611 and w0708 detections to correctly deduct the controlling variable * Add missing notification of the controlling expression value reference * Fix W0460 detection to output outermost variable name when the referencing variable is an array element or a member of struct or union === \AdLint 2.6.2 is released (2012-10-31) ==== Changes since the 2.6.0 release * Fix compound-assignment-expression evaluation not to propagate initialization status of the rhs operand * Fix bad traits file parser in order to parse compound pathname strings correctly on mswin * Clarify W0082 message text by adding underlying type name of the operand * Clarify W0578 and W0579 message texts by adding source and destination type names of the conversion * Clarify W0650 message text by adding lhs type name of the shift-expression * Clarify W0719 message text by adding lhs underlying type name of the shift-expression * Clarify W1051 and W1052 message texts by adding type name of the arithmetic expression * Fix the interpreter to place sequence-point at the end of the return-statement evaluation === \AdLint 2.6.0 is released (2012-10-22) ==== Changes since the 2.4.10 release * Fix W0609 and w0610 detections not to over-warn about explicit controlling expressions of for-statements by adding workarounds for the interpreter * Fix W0088 detection not to warn about controlling expression of for-statement * Fix W0723 detection in order to correctly warn about signed `-' expression * Fix bad parameter type convertibility check and bad type convertibility check of pointer to arbitrary types to void-pointer * Revise string representation of typedefed type so that message and metric show typedefed type name itself * Clarify W9003 message text by adding destination type name of the implicit conversion === \AdLint 2.4.10 is released (2012-10-15) ==== Changes since the 2.4.6 release * Add value version rollback feature so that the value version management is correctly given up at the end of the branch whose controlling expression is too complex * Fix value version management in order to completely rollback all changes to values of all global variables * Revise evaluation of sizeof-expression and alignof-expression not to evaluate operand expression actually * Fix W0488, W0489, W0490, W0495, W0496, W0497, W0498, W0499, W0500, W0501 and W0502 detections to warn when a problematic expression is grouped entirely === \AdLint 2.4.6 is released (2012-10-09) ==== Changes since the 2.4.0 release * Fix bad controlling statement evaluation in order to manage value domain of the controlling variable correctly * Fix bad argument type specification of `%s', `%p' and `%n' conversion-specifiers of *printf standard functions in order to detect W0635 correctly === \AdLint 2.4.0 is released (2012-09-21) ==== Changes since the 2.2.0 release * Fix W0425 detection not to warn when a selection-statement or a iteration-statement is written in a line * Fix evaluation of sizeof expression to return `size_t' value or `unsigned long' value if size_t is not declared * Fix evaluation of function-definition in order to refer symbols of return type and parameter types * Revise format of the traits file in preparation for supporting warning suppression of 3rd-party headers imported in the target project tree * Support compound pathname as an entry in the directory pathname list item of the traits file * Fix abend problem when no examination package name is specified in the traits file * Fix W0100 detection not to over-warn about variables updated in an iteration-statement * Fix bad preprocess behavior when an empty argument is given to a function-like macro call which applies `##' operator to the empty perameter * Fix #include directive evaluation in order to correctly read header file with an absolute path when any include_path items are not specified === \AdLint 2.2.0 is released (2012-09-12) ==== Changes since the 2.0.10 release * Fix W0431 and W0432 detections not to warn about displaced beginning of the line tokens following upon a function-like macro call * Fix W0787 detection not to warn about a definition of the local variable with type which is different from one of previously defined variable in the other scope * Clarify W0025 and W0026 message texts === \AdLint 2.0.10 is released (2012-09-06) ==== Changes since the 2.0.6 release * Revise value domain management in order not to over-thin value domains of the controlling variables in complexly compounded controlling expression * Support environment variable substitution in the traits file === \AdLint 2.0.6 is released (2012-08-30) ==== Changes since the 2.0.2 release * Fix huge memory consumption problem when a multi-dimensional variable length array is defined without fully narrowed length * Revise variable cross-reference extraction in order to output only about the outmost-variable when its element or member is accessed === \AdLint 2.0.2 is released (2012-08-28) ==== Changes since the 2.0.0 release * Fix bad group skipping problem of the preprocessor when a conditional inclusion directive is commented out in the skipping group * Add templates for gcc 4.6.3-1ubuntu5 on Ubuntu 12.04 LTS (64bit) === \AdLint 2.0.0 is released (2012-08-22) ==== Changes since the 1.18.6 release * In preparation for using optional source code examination packages, refine internal module structure and revise format of the traits file * Revise format of the traits file and the message definition file in preparation for supporting selective code check feature * Revise format of the traits file in preparation for supporting warning suppression of unconcerned headers such as system headers * Add many more functional specifications of builtin code checks === \AdLint 1.18.6 is released (2012-08-14) ==== Changes since the 1.18.2 release * Fix abend problem when a variable of typedefed incomplete array type is defined with an initializer === \AdLint 1.18.2 is released (2012-08-03) ==== Changes since the 1.18.0 release * Fix gem installation problem on mswin === \AdLint 1.18.0 is released (2012-08-01) ==== Changes since the 1.16.0 release * Add W0641 detection * Add W0644 detection * Add W0649 detection * Add W0650 detection * Add W0707 detection * Add W0719 detection * Add W0780 detection * Add W0783 detection * Add W0792 detection * Add W0793 detection * Add W0794 detection * Add W0830 detection * Add W0833 detection * Add W0834 detection * Add W1026 detection * Add W1039 detection * Add W1047 detection * Add W1071 detection * Fix W0459 detection to output outermost variable name when the uninitialized variable is an array element or a member of struct or union * Fix W0705 and W0745 detections to warn about not only array-subscript-expressions but also indirection-expressions only when the subscript is constant * Revise expression evaluation not to give up when a operand is typed as \`void' * Revise arithmetic type resolution not to abort when one type is \`void' * Fix declarator evaluation in order to construct a function object which returns a function pointer correctly when the function-definition written without typedefed function pointer * Implement missing semantics of union object initialization * Revise function-like macro replacement in order to evaluate \`#' operator makes an empty string-literal when the parameter corresponding to the operand has no argument * Fix bad sequence-point timing of logical-and-expression and logical-or-expression * Add extra notification of variable value reference in evaluation of cast-expression in order not to misunderstand that a return value of a function is discarded when the return value is casted before assigning to a variable * Fix evaluation of prefix-increment-expression and prefix-decrement-expression to make rvalue of the new incremented or decremented value in order to comply with the ISO C99 standard === \AdLint 1.16.0 is released (2012-07-18) ==== Changes since the 1.14.0 release * Add W0643 detection * Add W0646 detection * Add W0691 detection * Add W0692 detection * Add W0694 detection * Add W0805 detection * Add W0811 detection * Add W1040 detection * Add W1041 detection * Add W1046 detection * Add W1073 detection * Add W1074 detection * Add W1075 detection * Add W1076 detection * Add W1077 detection * Add extra sequence-point notification in the conditional-expression in order not to over-warn about side-effects between sequence-points * Add extra variable value reference notification not to discard function return values in the 2nd and 3rd expressions of the conditional-expression * Add missing notification of variable value reference in comparison expressions === \AdLint 1.14.0 is released (2012-07-04) ==== Changes since the 1.12.0 release * Add W0645 detection * Add W0697 detection * Add W0700 detection * Add W1066 detection * Add W1067 detection * Add W1068 detection * Add W1069 detection * Add W1070 detection * Add W1072 detection * Fix W0104 detection not to warn when the unchanged parameter is typed with \`const volatile' qualifiers * Add W0104, W0645, W0697, W0700, W1066, W1067, W1068, W1069, W1070 and W1072 functional specifications === \AdLint 1.12.0 is released (2012-06-20) ==== Changes since the 1.10.0 release * Add W0732 detection * Add W0733 detection * Add W0734 detection * Add W0735 detection * Add W9003 detection * Revise the value domain narrowing in order not to over-narrow and under-narrow a value domain of the controlling variable * Fix bad multiplication logic in order to detect W0723 and W1052 correctly * Add unit specifications of domain of variables' value * Add unit specifications of syntax tree of the C language * Add W0093, W0687, W0688, W0689, W0690, W0732, W0733, W0734, W0735, W1052, W9001 and W9003 functional specifications * Add W1066, W1067, W1068, W1069, W1070, W1071, W1072, W1073, W1074, W1075, W1076, W1077 and W9003 message definitions === \AdLint 1.10.0 is released (2012-06-06) ==== Changes since the 1.8.10 release * Add W0716 detection * Add W0717 detection * Add W0718 detection * Fix W0500 detection not to warn when two standalone binary arithmetic expressions are appears at 2nd and 3rd expressions of a conditional-expression * Fix W0501 detection not to duplicate warnings about a conditional-expression * Fix W0582, W0583 and W0584 detections in order to consider type convertibility correctly * Fix W1031 detection not to warn when the declaration with \`static' and definition without storage-class-specifier * Fix lack of sequence-point notification of controlling expressions * Add unit specification of C type models * Add W0001, W0002, W0003, W0007, W0010, W0013, W0109, W0583, W0606, W0698, W0699, W0703, W0716, W0717, W0718, W0723 and W1031 functional specifications === \AdLint 1.8.10 is released (2012-05-18) ==== Changes since the 1.8.2 release * Fix bad narrowing logic of undefined value domain in order to detect W9001 correctly * Fix W0635 detection not to warn when the expected type of the conversion specifier is a pointer type and the corresponding argument's type is a pointer type whose base type is cv-qualified * Fix W0583 detection not to warn when the argument type is a cv-qualified one of the corresponding parameter's type * Fix W0112 detection not to warn about floating point relational-expressions * Fix W0117 and W0118 detection not to misunderstand linkage of object definitions * Fix W0101, W0102, W0103 and W0107 detections not to warn when an address of the parameter array variable (an alias of the caller's array) is going to be saved * Fix W0828 detection not to warn when the member variable is a type of char array and the corresponding initializer is a string-literal-specifier * Fix W0635 detection not to warn when the \`void *' argument passed as the \`%p' conversion specifier * Fix degraded W0118 detection not to warn when the object declaration is in the header file and the same declaration is in the source file, too * Fix bad value domain multiplication logic in order to correctly detect W0723 about multiplicative-expressions * Fix W0771 detection not to warn when declarations of the same object are in a source file * Fix W0080 detection to warn when the file local static variable is defined without initializer * Fix bad value domain multiplication logic in order to correctly detect W0608 about multiplicative-expressions * Fix degraded W0771 detection not to warn when declarations of the same object are in two or more files * Fix degraded W0118 detection to warn when all declarations of an object are in the source file === \AdLint 1.8.2 is released (2012-05-08) ==== Changes since the 1.8.0 release * Fix evaluation of array-subscript-expression not to convert the derived array object into a pointer in order to resolve a type of the nested array-subscript-expression correctly === \AdLint 1.8.0 is released (2012-04-27) ==== Changes since the 1.6.0 release * Add W0607 detection * Add W0608 detection * Add W0625 detection * Add W0632 detection * Add W0633 detection * Add W0634 detection * Add W0642 detection * Add W0711 detection * Add W0712 detection * Add W0713 detection * Add W0714 detection * Add W0715 detection * Add W0832 detection * Fix W0629 detection not to warn when the translation-unit local function is referred to derive a pointer to the function * Fix W0459 and W0460 detections not to warn about inner variables owned by a temporary variable * Fix W0461 and W0462 detections not to warn when the length omitted array parameter is specified as an argument * Fix W1031 detection not to warn when the storage-class-specifier of the object declaration is explicitly specified and the storage-class-specifier of following object definition is omitted * Fix W0581, W0582, W0583 and W0584 detections not to warn when the corresponding types of argument and parameter are array-array or array-pointer pair * Fix W0581 detection to warn when the number of arguments in current function call is greater than the number of arguments in previous function calls * Fix W0582, W0583 and W0584 detections to warn when the number of parameters is greater than the number of arguments * Fix abend problem when the pathname of #include_next directive is not in the executing environment * Support mswin path separator in #include or #include_next directives * Fix bad FN_UELS (number of incomplete if-else-if statement chains) metric measurement * Improve value version management of the abstract interpreter === \AdLint 1.6.0 is released (2012-04-06) ==== Changes since the 1.4.0 release * Add W0541 detection * Add W0573 detection * Add W0579 detection * Add W0685 detection * Add W0686 detection * Add W0781 detection * Add W0787 detection * Add W0788 detection * Add W0789 detection * Add W0807 detection * Add W0808 detection * Add W0809 detection * Add W1030 detection * Add W1053 detection * Add W1054 detection * Add W1055 detection * Add W1056 detection * Add W1057 detection * Add W1058 detection * Add W1059 detection * Add W1060 detection * Add W1061 detection * Add W1062 detection * Add W1063 detection * Fix W0027 detection not to warn when a pointer variable is compared with NULL constant * Fix W0728, W0729 and W0730 detections not to warn when the target is a variable of the other enum type * Fix W0104 detection not to warn about invariant parameter of array type whose base type is qualified as const * Fix bad W0031, W0100, W0104, W0459 and W0460 detections * Fix bad FN_UNUV measurement * Update the user's guide in Japanese * Update the user's guide in English === \AdLint 1.4.0 is released (2012-03-29) ==== Changes since the 1.2.0 release * Add W0606 detection * Add W0687 detection * Add W0695 detection * Add W0698 detection * Add W0699 detection * Add W0720 detection * Add W0721 detection * Add W0722 detection * Add W0723 detection * Add W0726 detection * Add W0727 detection * Add W0728 detection * Add W0729 detection * Add W0730 detection * Add W0731 detection * Add W0737 detection * Add W0738 detection * Add W0739 detection * Add W0740 detection * Add W0741 detection * Add W0743 detection * Add W0801 detection * Add W0806 detection * Add W1033 detection * Add W1064 detection * Add W1065 detection * Add missing implicit conversion of return-statement in order to detect W0727 at an expression of return-statement * Update the user's guide in Japanese * Update the user's guide in English === \AdLint 1.2.0 is released (2012-03-21) ==== Changes since the 1.0.0 release * Add W0597 detection * Add W0598 detection * Add W0599 detection * Add W0600 detection * Add W0688 detection * Add W0689 detection * Add W0690 detection * Change schema version validation method of input YAML files * Clarify message text of W0459 and W0460 * Revise specification of W0459 and W0460 detections not to warn when a pointer argument points to an uninitialized object * Fix bad FN_UNUV metric measurement * Update the user's guide in Japanese * Update the user's guide in English === \AdLint 1.0.0 is released (2012-02-28) This is the initial GA release of \AdLint. ==== Implemented features * Single module analysis * Cross module analysis * 597 kinds of code checkings * 14 kinds of code structure extractions * 15 kinds of quality metric measurements