Çözüldü Warning

  • Konuyu açan Konuyu açan XPyrion
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 3
  • Gösterim Gösterim 979
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

XPyrion

Premium Üye
Premium Üye
Geliştirici
Yardımsever Üye
Emekli Üye
Editör
Mesaj
805
Çözümler
41
Beğeni
2.215
Puan
1.679
Ticaret Puanı
0
Eski makinadan yeni makinaya taşıdım ve Server gmake all çekince...
Yardımlarınızı bekliyorum şimdiden teşekkürler.
İyi forumlar.

PHP:
Genişlet Daralt Kopyala
llex.c: In function 'read_string':
llex.c:285:7: warning: case label value is less than minimum value for type
  285 |       case EOZ:
      |       ^~~~

PHP:
Genişlet Daralt Kopyala
liolib.c: In function 'g_iofile':
liolib.c:113:34: warning: value computed is not used [-Wunused-value]
  113 | #define tofile(L,i) (tofileh(L,i)->f)
      |                     ~~~~~~~~~~~~~^~~~
liolib.c:251:7: note: in expansion of macro 'tofile'
  251 |       tofile(L, 1);  /* check that it's a valid file handle */
      |       ^~~~~~
liolib.c: In function 'f_lines':
liolib.c:113:34: warning: value computed is not used [-Wunused-value]
  113 | #define tofile(L,i) (tofileh(L,i)->f)
      |                     ~~~~~~~~~~~~~^~~~
liolib.c:286:3: note: in expansion of macro 'tofile'
  286 |   tofile(L, 1);  /* check that it's a valid file handle */
      |   ^~~~~~

PHP:
Genişlet Daralt Kopyala
AsyncSQL.h: In constructor 'CAsyncSQL::CAsyncSQL()':
AsyncSQL.h:201:7: warning: 'CAsyncSQL::m_iCopiedQuery' will be initialized after                                                                                                              [-Wreorder]
  201 |   int m_iCopiedQuery;
      |       ^~~~~~~~~~~~~~
AsyncSQL.h:175:7: warning:   'int CAsyncSQL::m_iPort' [-Wreorder]
  175 |   int m_iPort;
      |       ^~~~~~~
AsyncSQL.cpp:19:1: warning:   when initialized here [-Wreorder]
   19 | CAsyncSQL::CAsyncSQL()
      | ^~~~~~~~~

PHP:
Genişlet Daralt Kopyala
fdwatch.c:163:22: warning: comparison of integer expressions of different signed                                                                                                             ness: 'unsigned int' and 'int' [-Wsign-compare]
  163 |     assert(event_idx < fdw->nfiles * 2);
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~~~
fdwatch.c:165:41: warning: comparison of integer expressions of different signed                                                                                                             ness: '__uintptr_t' {aka 'unsigned int'} and 'socket_t' {aka 'int'} [-Wsign-comp                                                                                                             are]
  165 |     if (fdw->kqrevents[event_idx].ident != fd)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from ../include/stdafx.h:95,
                 from fdwatch.c:2:
fdwatch.c: In function 'int fdwatch_check_event(LPFDWATCH, socket_t, unsigned in                                                                                                             t)':
fdwatch.c:173:22: warning: comparison of integer expressions of different signed                                                                                                             ness: 'unsigned int' and 'int' [-Wsign-compare]
  173 |     assert(event_idx < fdw->nfiles * 2);
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~~~
fdwatch.c:175:41: warning: comparison of integer expressions of different signed                                                                                                             ness: '__uintptr_t' {aka 'unsigned int'} and 'socket_t' {aka 'int'} [-Wsign-comp                                                                                                             are]
  175 |     if (fdw->kqrevents[event_idx].ident != fd)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from ../include/stdafx.h:95,
                 from fdwatch.c:2:
fdwatch.c: In function 'int fdwatch_get_ident(LPFDWATCH, unsigned int)':
fdwatch.c:207:22: warning: comparison of integer expressions of different signed                                                                                                             ness: 'unsigned int' and 'int' [-Wsign-compare]
  207 |     assert(event_idx < fdw->nfiles * 2);
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~~~
fdwatch.c: In function 'void* fdwatch_get_client_data(LPFDWATCH, unsigned int)':
fdwatch.c:225:22: warning: comparison of integer expressions of different signed                                                                                                             ness: 'unsigned int' and 'int' [-Wsign-compare]
  225 |     assert(event_idx < fdw->nfiles * 2);
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~~~

PHP:
Genişlet Daralt Kopyala
log.c: In function 'void log_file_delete_old(const char*)':
log.c:354:37: warning: '%s' directive writing up to 255 bytes into a region of s                                                                                                             ize 56 [-Wformat-overflow=]
  354 |      sprintf(system_cmd, "rm -rf %s/%s", filename, name);
      |                                     ^~             ~~~~
log.c:354:13: note: 'sprintf' output 9 or more bytes (assuming 264) into a desti                                                                                                             nation of size 64
  354 |      sprintf(system_cmd, "rm -rf %s/%s", filename, name);
      |      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
log.c: In function 'void log_file_rotate(LPLOGFILE)':
log.c:441:36: warning: '%s' directive output may be truncated writing up to 127                                                                                                              bytes into a region of size 124 [-Wformat-truncation=]
  441 |   snprintf(system_cmd, 128, "mv %s %s/%s.%02d", logfile->filename, dir,                                                                                                              logfile->filename, logfile->last_hour);
      |                                    ^~                              ~~~
log.c:441:11: note: 'snprintf' output 9 or more bytes (assuming 136) into a dest                                                                                                             ination of size 128
  441 |   snprintf(system_cmd, 128, "mv %s %s/%s.%02d", logfile->filename, dir,                                                                                                              logfile->filename, logfile->last_hour);
      |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PHP:
Genişlet Daralt Kopyala
hangul.c: In function 'const char* first_han(const BYTE*)':
hangul.c:47:15: warning: ISO C++ forbids converting a string constant to 'char*'                                                                                                              [-Wwrite-strings]
   47 |     char *p = "▒׿▒";
      |               ^~~~~~

PHP:
Genişlet Daralt Kopyala
DES_table.h:164:14: warning: 'KeyPerm' defined but not used [-Wunused-variable]
  164 | static DWORD KeyPerm[8][64] =
      |              ^~~~~~~
 
Çözüm
Beraber hatalara baktık ve şu hata h dosyasında tanımlanan sıralama ile cpp dosyasında sınıf oluşturulurken sağlanan default verilerin sıralaması yanlış olduğu için hata veriyor.

C++:
Genişlet Daralt Kopyala
AsyncSQL.h: In constructor 'CAsyncSQL::CAsyncSQL()':
AsyncSQL.h:201:7: warning: 'CAsyncSQL::m_iCopiedQuery' will be initialized after                                                                                                              [-Wreorder]
  201 |   int m_iCopiedQuery;
      |       ^~~~~~~~~~~~~~
AsyncSQL.h:175:7: warning:   'int CAsyncSQL::m_iPort' [-Wreorder]
  175 |   int m_iPort;
      |       ^~~~~~~
AsyncSQL.cpp:19:1: warning:   when initialized here [-Wreorder]
   19 | CAsyncSQL::CAsyncSQL()
      | ^~~~~~~~~

Yukarıdaki hatanın...
Genel olarak tanımsız değikenler ve değişken türü hatası vermiş. Örneğin short bir veri -32768 ve +32767 arası değer alır eğer sen 32768 yazar isen hata verir.
 
Beraber hatalara baktık ve şu hata h dosyasında tanımlanan sıralama ile cpp dosyasında sınıf oluşturulurken sağlanan default verilerin sıralaması yanlış olduğu için hata veriyor.

C++:
Genişlet Daralt Kopyala
AsyncSQL.h: In constructor 'CAsyncSQL::CAsyncSQL()':
AsyncSQL.h:201:7: warning: 'CAsyncSQL::m_iCopiedQuery' will be initialized after                                                                                                              [-Wreorder]
  201 |   int m_iCopiedQuery;
      |       ^~~~~~~~~~~~~~
AsyncSQL.h:175:7: warning:   'int CAsyncSQL::m_iPort' [-Wreorder]
  175 |   int m_iPort;
      |       ^~~~~~~
AsyncSQL.cpp:19:1: warning:   when initialized here [-Wreorder]
   19 | CAsyncSQL::CAsyncSQL()
      | ^~~~~~~~~

Yukarıdaki hatanın çözümü şu şekildedir;
C++:
Genişlet Daralt Kopyala
        //private:
    protected:
        MYSQL m_hDB;

        std::string    m_stHost;
        std::string    m_stUser;
        std::string    m_stPassword;
        std::string    m_stDB;
        std::string    m_stLocale;

        int    m_iMsgCount;
        volatile bool m_bEnd;
       
       
#ifndef __WIN32__
        pthread_t m_hThread;
        pthread_mutex_t    * m_mtxQuery;
        pthread_mutex_t    * m_mtxResult;
#else
        HANDLE m_hThread;
        CRITICAL_SECTION* m_mtxQuery;
        CRITICAL_SECTION* m_mtxResult;
#endif
       
        int    m_iQueryFinished;
        unsigned long m_ulThreadID;
        bool m_bConnected;
        int    m_iCopiedQuery;
       
        int m_iPort;
   
        int    m_aiPipe[2];

        std::queue<SQLMsg *> m_queue_query;
        std::queue<SQLMsg *> m_queue_query_copy;
        //std::map<int, SQLMsg *>    m_map_kSQLMsgUnfinished;

        std::queue<SQLMsg *> m_queue_result;

        CSemaphore m_sem;
};

Hata çözüm ekran görüntüsü.jpeg
 
Çözüm
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Üst