get rid of compiler warnings
Posted: Thu Mar 05, 2020 8:01 pm
hello,
is there a way to get rid of all the compiler warnings of makemkv-oss..?
when compiling (makemkv-oss-1.15.0, ubuntu 19.10), i get lot of warnings:
is there a way to get rid of all the compiler warnings of makemkv-oss..?
when compiling (makemkv-oss-1.15.0, ubuntu 19.10), i get lot of warnings:
Code: Select all
makemkvgui/src/client.cpp: In member function ‘bool CApClient::Init(char, const char*, unsigned int*)’:
makemkvgui/src/client.cpp:121:52: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
121 | if (false==ApOpenSgrp(&m_sem,(uint64_t*)m_mem->args))
| ~~~~~~~^~~~
makemkvgui/src/client.cpp: In member function ‘void CApClient::ExecCmd(AP_CMD)’:
makemkvgui/src/client.cpp:218:45: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
218 | p_str = (const utf16_t*) m_mem->strbuf;
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:271:87: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
271 | m_Ui->UpdateCurrentInfo( (unsigned int) m_mem->args[0] , (utf16_t*)m_mem->strbuf );
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:277:128: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
277 | rr = m_Ui->ReportUiMessage( (unsigned long) m_mem->args[0] , (unsigned long) m_mem->args[2] , (utf16_t*)m_mem->strbuf );
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:289:53: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
289 | const utf16_t* p = (utf16_t*)m_mem->strbuf;
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:305:152: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
305 | m_mem->args[0] = m_Ui->ReportUiDialog((unsigned long) m_mem->args[0] , (unsigned long) m_mem->args[1] , count, text , (utf16_t*)m_mem->strbuf );
| ~~~~~~~^~~~~~
makemkvgui/src/marshall.cpp: In member function ‘const utf16_t* CApClient::GetSettingString(ApSettingId)’:
makemkvgui/src/marshall.cpp:59:30: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
59 | return (utf16_t*)(m_mem->strbuf);
| ~~~~~~~~^~~~~~~
makemkvgui/src/marshall.cpp: In member function ‘const utf16_t* CApClient::GetAppString(unsigned int, unsigned int, unsigned int)’:
makemkvgui/src/marshall.cpp:100:33: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
100 | return (utf16_t*)m_mem->strbuf;
| ~~~~~~~^~~~~~
objcopy --strip-all --strip-debug --strip-unneeded --discard-all out/libdriveio.so.0.full out/libdriveio.so.0
makemkvgui/src/client.cpp: In member function ‘bool CApClient::Init(char, const char*, unsigned int*)’:
makemkvgui/src/client.cpp:121:52: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
121 | if (false==ApOpenSgrp(&m_sem,(uint64_t*)m_mem->args))
| ~~~~~~~^~~~
makemkvgui/src/client.cpp: In member function ‘void CApClient::ExecCmd(AP_CMD)’:
makemkvgui/src/client.cpp:218:45: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
218 | p_str = (const utf16_t*) m_mem->strbuf;
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:271:87: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
271 | m_Ui->UpdateCurrentInfo( (unsigned int) m_mem->args[0] , (utf16_t*)m_mem->strbuf );
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:277:128: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
277 | rr = m_Ui->ReportUiMessage( (unsigned long) m_mem->args[0] , (unsigned long) m_mem->args[2] , (utf16_t*)m_mem->strbuf );
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:289:53: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
289 | const utf16_t* p = (utf16_t*)m_mem->strbuf;
| ~~~~~~~^~~~~~
makemkvgui/src/client.cpp:305:152: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
305 | m_mem->args[0] = m_Ui->ReportUiDialog((unsigned long) m_mem->args[0] , (unsigned long) m_mem->args[1] , count, text , (utf16_t*)m_mem->strbuf );
| ~~~~~~~^~~~~~
objcopy --strip-all --strip-debug --strip-unneeded --discard-all out/libmmbd.so.0.full out/libmmbd.so.0
makemkvgui/src/marshall.cpp: In member function ‘const utf16_t* CApClient::GetSettingString(ApSettingId)’:
makemkvgui/src/marshall.cpp:59:30: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
59 | return (utf16_t*)(m_mem->strbuf);
| ~~~~~~~~^~~~~~~
makemkvgui/src/marshall.cpp: In member function ‘const utf16_t* CApClient::GetAppString(unsigned int, unsigned int, unsigned int)’:
makemkvgui/src/marshall.cpp:100:33: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
100 | return (utf16_t*)m_mem->strbuf;
| ~~~~~~~^~~~~~
makemkvgui/src/scsiinfo.cpp: In member function ‘bool CDriveInfo::FormatDriveDiskInfo(const utf16_t*, const void*, unsigned int)’:
makemkvgui/src/scsiinfo.cpp:119:29: warning: ‘%u’ directive writing between 1 and 10 bytes into a region of size 6 [-Wformat-overflow=]
119 | sprintf(ver, " v%u", aacs_ver);
| ^~
makemkvgui/src/scsiinfo.cpp:119:26: note: directive argument in the range [1, 4294967295]
119 | sprintf(ver, " v%u", aacs_ver);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/c++/9/ext/string_conversions.h:43,
from /usr/include/c++/9/bits/basic_string.h:6493,
from /usr/include/c++/9/string:55,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qbytearray.h:52,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:49,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qiodevice.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qfiledevice.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qfile.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qfileinfo.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QFileInfo:1,
from makemkvgui/src/qtgui.h:19,
from makemkvgui/src/qtapp.h:18,
from makemkvgui/src/scsiinfo.cpp:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 4 and 13 bytes into a destination of size 8
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
makemkvgui/src/margui.cpp: In member function ‘const utf16_t* AP_UiItem::GetInfo(AP_ItemAttributeId)’:
makemkvgui/src/margui.cpp:191:62: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
191 | size_t len = utf16len((utf16_t*)m_client->m_mem->strbuf);
| ~~~~~~~~~~~~~~~~~^~~~~~
makemkvgui/src/margui.cpp: In member function ‘bool CGUIApClient::GetInterfaceLanguage(unsigned int, utf16_t**, uint64_t**)’:
makemkvgui/src/margui.cpp:330:30: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
330 | *Name = (utf16_t*)m_mem->strbuf;
| ~~~~~~~^~~~~~
makemkvgui/src/margui.cpp:331:26: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
331 | *Param = ((uint64_t*)&(m_mem->args[1]));
| ^~~~~~~~~~~~~~~~~
makemkvgui/src/margui.cpp: In member function ‘const utf16_t* CGUIApClient::GetProfileString(unsigned int, unsigned int)’:
makemkvgui/src/margui.cpp:358:33: warning: taking address of packed member of ‘_AP_SHMEM’ may result in an unaligned pointer value [-Waddress-of-packed-member]
358 | return (utf16_t*)m_mem->strbuf;
| ~~~~~~~^~~~~~
libffabi/src/ffabi.c: In function ‘ffm_init’:
libffabi/src/ffabi.c:153:5: warning: ‘avcodec_register_all’ is deprecated [-Wdeprecated-declarations]
153 | avcodec_register_all();
| ^~~~~~~~~~~~~~~~~~~~
In file included from libffabi/src/ffabi.c:22:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4102:6: note: declared here
4102 | void avcodec_register_all(void);
| ^~~~~~~~~~~~~~~~~~~~