Merhabalar
Uzun süredir files geliştriyorum. Eklediğim bazı sistemlerde ve düzenlemelerimde aşağıdaki warningler ortaya çıktı; (C+11)
#################
Warning1 -)
#################
#################
Warning2 -)
#################
#################
Warning3 -)
#################
#################
Warning4 -)
#################
Şimdiden teşekkürler
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
#################
Warning1 -)
#################
C++:
ACMD(do_daily_reward_reload){
if (!ch)
return;
ch->ChatPacket(CHAT_TYPE_COMMAND, "ManagerGiftSystem DeleteRewards|");
char* time = ""; /*2401. satır*/
char* rewards = ""; /*2402. satır*/
char* items;
char* counts;
SQLMsg * pkMsg(DBManager::instance().DirectQuery("SELECT UNIX_TIMESTAMP(time),reward from player.gunluk_oduller_alanlar where pid = %u",ch->GetPlayerID()));
SQLResult * pRes = pkMsg->Get();
#################
Warning2 -)
#################
cmd_general.cpp:
ACMD(do_daily_reward_get_reward){
if (!ch)
return;
char* items;
char* counts; /*2471. satır*/
DWORD item;
DWORD count; /*2473. satır*/
bool reward = false;
char* rewards;
// and (NOW() - interval 30 minute > time)
SQLMsg * pkMsg(DBManager::instance().DirectQuery("SELECT reward from player.gunluk_oduller_alanlar where (NOW() > time) and pid = %u", ch->GetPlayerID()));
SQLResult * pRes = pkMsg->Get();
if (pRes->uiNumRows > 0){
MYSQL_ROW row;
while ((row = mysql_fetch_row(pRes->pSQLResult)) != NULL){
rewards = row[0];
}
reward = true;
}
if (reward){
SQLMsg * pkMsg2(DBManager::instance().DirectQuery("SELECT items, count from player.gunluk_oduller where reward = '%s' ORDER BY RAND() limit 1",rewards));
SQLResult * pRes2 = pkMsg2->Get();
if (pRes2->uiNumRows > 0){
MYSQL_ROW row;
while ((row = mysql_fetch_row(pRes2->pSQLResult)) != NULL){
items = row[0];
counts = row[1];
}
}
str_to_number(item, items);
str_to_number(count, counts);
ch->AutoGiveItem(item, count); /*2499. satır*/
// ch->ChatPacket(CHAT_TYPE_INFO, "recompensa: %s",items);
DBManager::Instance().DirectQuery("UPDATE gunluk_oduller_alanlar SET reward = CASE WHEN reward = 0 THEN '1' WHEN reward = 1 THEN '2' WHEN reward = 2 THEN '3' WHEN reward = 3 THEN '4' WHEN reward = 4 THEN '5' WHEN reward = 5 THEN '6' WHEN reward = 6 THEN '0' END, total_rewards = total_rewards +1, time = (NOW() + interval 1 day) WHERE pid = %u", ch->GetPlayerID());
}
else{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Usted aun no puede obtener la recompensa"));
}
}
#################
Warning3 -)
#################
input_p2p.cpp:
void CInputP2P::NesneMarket(const char * c_pData)
{
TPacketGGNesne * p = (TPacketGGNesne *) c_pData; /*353.satır*/
CItemShopManager::instance().LoadItemShopTable();
}
input_p2p.cpp:
void CInputP2P::OfflineShopBuy(LPDESC d, const char* c_pData)
{
TPacketGGOfflineShopBuy* p = (TPacketGGOfflineShopBuy*)c_pData; /*516. satır*/
}
input_main.cpp:
void CInputMain::ItemCombinationCancel(LPCHARACTER ch, const char* c_pData)
{
const TPacketCGItemCombinationCancel* p = reinterpret_cast<const TPacketCGItemCombinationCancel*>(c_pData); /*4101. satır*/
ch->SetItemCombNpc(NULL);
}
#################
Warning4 -)
#################
input.cpp:
#ifdef __DISABLE_SEND_SEQUENCE__
int originalPacketSize = iPacketLen; /*103. satır*/
BYTE preAnalyzeSeq = *(BYTE*)(c_pData + iPacketLen - sizeof(BYTE)); /*104. satır*/
#endif
Şimdiden teşekkürler