OSDN Git Service

[Refactor] VS警告への対処
authorshimitei <shimitei@gmail.com>
Wed, 24 Mar 2021 14:34:52 +0000 (23:34 +0900)
committershimitei <shimitei@gmail.com>
Wed, 24 Mar 2021 14:34:52 +0000 (23:34 +0900)
GDI+のヘッダーから出る警告はpragma warningで抑制する。

src/main-win/main-win-bg.cpp
src/main-win/main-win-music.cpp

index 1078df4..9da2722 100644 (file)
@@ -8,7 +8,10 @@
 #include "system/h-define.h"
 #include "term/z-form.h"
 
+#pragma warning(push)
+#pragma warning(disable : 4458)
 #include <gdiplus.h>
+#pragma warning(pop)
 
 static HBITMAP hBG = NULL;
 char bg_bitmap_file[MAIN_WIN_MAX_PATH] = ""; //!< 現在の背景ビットマップファイル名。
index def9510..03dc0c2 100644 (file)
@@ -183,6 +183,8 @@ errr play_music(int type, int val)
  * Notify event
  */
 void on_mci_notify(WPARAM wFlags, LONG lDevID) {
+    UNREFERENCED_PARAMETER(lDevID);
+
     if (wFlags == MCI_NOTIFY_SUCCESSFUL) {
         // (repeat) play a music
         mciSendCommand(mci_open_parms.wDeviceID, MCI_SEEK, MCI_SEEK_TO_START | MCI_WAIT, 0);