Fethi Polat 1
Fethi Polat
Bvural41 1
Bvural41
OnurBoyla 1
OnurBoyla
mavzermete 1
mavzermete
xranzei 1
xranzei
Manwe Work 1
Manwe Work
noisiv 1
noisiv
Hikaye Ekle

Cevaplanmadı Marty sama 5.8 ClientManagerOfflineshop.cpp:47:10: warning: unused variable 'dwOwner'

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Hello colleagues, how are you? Would anyone be so kind as to help me solve this?


1727999972633.png



compiling ClientManagerOfflineshop.cpp
ClientManagerOfflineshop.cpp:47:10: warning: unused variable 'dwOwner' [-Wunused-variable]
47 | DWORD dwOwner =0, dwDuration=0;
| ^~~~~~~
ClientManagerOfflineshop.cpp:47:22: warning: unused variable 'dwDuration' [-Wunused-variable]
47 | DWORD dwOwner =0, dwDuration=0;
| ^~~~~~~~~~
OfflineshopCache.cpp:1162:43: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat]
1161 | snprintf(szQuery, sizeof(szQuery), "INSERT INTO `player`.`offlineshop_shops` (`owner_id`, `duration`, `name`, `pos_x`, `pos_y`, `map_index`, `channel`) VALUES(%u, %u, '%s', %u, %u, %d, %d);",
| ~~
| %ld
1162 | dwOwnerID, dwDuration, szEscapeString, pos.x, pos.y, pos.lMapIndex, pos.bChannel
| ^~~~~
OfflineshopCache.cpp:1162:50: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat]
1161 | snprintf(szQuery, sizeof(szQuery), "INSERT INTO `player`.`offlineshop_shops` (`owner_id`, `duration`, `name`, `pos_x`, `pos_y`, `map_index`, `channel`) VALUES(%u, %u, '%s', %u, %u, %d, %d);",
| ~~
| %ld
1162 | dwOwnerID, dwDuration, szEscapeString, pos.x, pos.y, pos.lMapIndex, pos.bChannel
| ^~~~~
OfflineshopCache.cpp:1162:57: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
1161 | snprintf(szQuery, sizeof(szQuery), "INSERT INTO `player`.`offlineshop_shops` (`owner_id`, `duration`, `name`, `pos_x`, `pos_y`, `map_index`, `channel`) VALUES(%u, %u, '%s', %u, %u, %d, %d);",
| ~~
| %ld
1162 | dwOwnerID, dwDuration, szEscapeString, pos.x, pos.y, pos.lMapIndex, pos.bChannel
| ^~~~~~~~~~~~~
2 warnings generated.
3 warnings generated.
linking ../db
 

Ekli dosyalar

  • src.zip
    src.zip
    6.2 MB · Görüntüleme: 0
47. satırdaki bu iki değişkenin kullanılmadığını belirtiyor.

Delete:
DWORD dwOwner =0, dwDuration=0;

1161, 1162 satırlarında değişkenin belirttiği %u ve %d olan formatları %ld yapmalısın
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Benzer konular

Geri
Üst