Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WallオプションででるWarningを消す #59

Merged
merged 15 commits into from
Nov 28, 2021

Conversation

meltingrabbit
Copy link
Collaborator

@meltingrabbit meltingrabbit commented Nov 27, 2021

概要

WallオプションででるWarningを消す

Issue

詳細

  • WallオプションででるWarningを消す
  • Warningが出たときはCIを落とすように
  • Wextra については別で

Warningを消すことにともなう重要な変更

  • if文のエラー修正
  • C89にはroundはないが,C99からroundができるので,関数名を衝突しないように
  • 構造体の前方参照のやり方を改善

検証結果

  • CIが通る
  • 既存のtestがすべて通る

影響範囲

今後,WarningがあるPRは通らなくなる

補足

NA

@meltingrabbit meltingrabbit added enhancement New feature or request priority::high priorityg high tools labels Nov 27, 2021
@meltingrabbit meltingrabbit self-assigned this Nov 27, 2021
@meltingrabbit
Copy link
Collaborator Author

-Werror オプションをつけると, https://github.com/ut-issl/c2a-core/runs/4341988868?check_suite_focus=true のように確かに落ちたが,Warningが出た時点でコンパイルが止まった.

できれば最後までコンパイルし,Warning一覧を見たいところ.

@meltingrabbit
Copy link
Collaborator Author

コンパイル結果をファイルに出力し,grepするのがいいのかしら?

@meltingrabbit
Copy link
Collaborator Author

CIは落とさない WextraのビルドCIをいれた

@meltingrabbit
Copy link
Collaborator Author

Wextraはともかく(多少減らしたけど),Wallは一旦全て消えたのでは?

@meltingrabbit meltingrabbit changed the title WIP: WallオプションででるWarningを消す WallオプションででるWarningを消す Nov 28, 2021
@meltingrabbit meltingrabbit requested a review from sksat November 28, 2021 17:06
@meltingrabbit meltingrabbit requested a review from yngyu November 28, 2021 17:09
CmdTlm/packet_list.c Show resolved Hide resolved
else()
target_compile_options(${PROJECT_NAME} PUBLIC "${CMAKE_CXX_FLAGS}-Wall")
set(CMAKE_CXX_FLAGS "-finput-charset=cp932 -m32 -rdynamic -Wall -g -Wno-unknown-pragma") # SJIS, 32bit
set(CMAKE_C_FLAGS "-finput-charset=cp932 -m32 -rdynamic -Wall -g -Wno-unknown-pragmas") # SJIS, 32bit
if(ADD_WERROR_FLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これはtarget_compile_options()でやるべきですが,どうせ後で直すので一旦スルー

@meltingrabbit
Copy link
Collaborator Author

Cmakeまわりは #35 でお願いするとして,マージします.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority::high priorityg high tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants