Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
最近静的解析ばかりやってるので目視で気づいたところだけなんとなく修正。
(何かをやった気になるためのコード盆栽ともいう)
*.c
で宣言されている関数はローカル扱いでstatic
付与const
付与(これはスタイル定義からですが、ありなし混在してたので)
char* var
とchar *var
が混在してたところは後者に統一(これもスタイル定義からですが、後者が多数派っぽいので)
static
とconst
は inline とかの最適化で効果あるはず、というやつですが計測はしてません。hidlckflag
とnoemojiflag
はmonoflag
と同列で export じゃないの、という説もありますが現状
nanotodon.h
には無いのと、monoflag
についてもグローバルにせずsixel_init()
とsixel_out()
(とそれを呼び出しているprint_picture()
) の引数でmono
か否かを指定すればいいのでは、とか考え出すと止まらないので機械的にstatic
にしています。あと、
-Wall
だと以下の警告も出ているようですが、意図が把握できていないのでここではいじっていません。